Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- mianalyze of lsmestimate

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted a week ago
(294 views)

Dear users,

my aim is to do a non-inferiority test by means of proc mixed with lsmestimate using multiple imputation.

I have generated the mi dataset and have generated the outcomes of the proc mixed model with lsmestimate providing the required one-sided tests and CIs for each imputation.

Is it possible to pool the analyses using mianalyze?

I managed to tronsform the file, so that mianalyze pools at least the estimates and SEs.

Is it only possible to calculate the one-sided tests and the CIs by hand?

Best regards,

Maciej

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

As far as I know the only way to do non-inferiority test is using PROC FREQ.

Maybe @lvm @SteveDenham @StatDave @jiltao knew how to do it by PROC MIXED.

And as long as you could get Std Err of the statistical estimator, you could pool the analyses by using mianalyze.

Maybe @lvm @SteveDenham @StatDave @jiltao knew how to do it by PROC MIXED.

And as long as you could get Std Err of the statistical estimator, you could pool the analyses by using mianalyze.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

If I understand correctly, you have obtained the test statistic for each imputation in addition to the estimate and SE. MIANALYZE will correctly combine the estimates (a contrast for each imputation) to give you a global estimate, but you want a global test for significance. This can't be done with a PROC, but Paul Allison wrote a nice macro to do this based on the work by Li et al (Li, K. H., Meng, X. L., Raghunathan, T. E., and Rubin D. B. 1991. Significance levels from repeated P-values with multiply-imputed data. Statitsica Sin. 1:65-92.) and Schafer (1997. Analysis of Incomplete Multivariate Data. London - UK: Chapman and Hall. 444pp.). The macro combines chi-square test statistics from each imputation to estimate a global F statistic for significance. If the test statistic for your problem is a student t for each imputation, then simply square the t values to obtain chi-square statistics for each imputation (the square of a t is a F statistic, but with 1 numerical df, chi-square and F are the same). If your test statistic for each impuation is an F statistic, then multiply the F by the numerical df to obtain the chi-square. (This all assume that you have reasonably large denominator df. ) The macro works by having a file with only one variable, the chi-square test statistic for each impuation. It is run with:

%combchi(df=1, data=DATAFILE);

One does not use the denominator df.

Macro:

%macro combchi(df=,chi=,data=); *---From Paul Allison (pooling chi-squared tests for significance across all imputation results; proc iml; DF=&df; %if &chi ^= and &data ^= %then %do; print, "Error: Can't specify both CHI= and DATA="; abort; %end; %if &chi ^= %then %do; g2={&chi}; %end; %if &data ^= %then %do; use &data; read all into g1; g2=g1`; %end; m=ncol(g2); g=sqrt(g2); mg2=sum(g2)/m; r=(1+1/m)*(ssq(g)-(sum(g)**2)/m)/(m-1); F=(mg2/df - r*(m+1)/(m-1))/(1+r); DDF=(m-1)*(1+1/r)**2/df**(3/m); P=1-probf(f,df,ddf); print f df ddf; print p; run; quit; %mend combchi;

Example here is when there is 1 numerator df for each test. There is another way to run the macro where there is no datafile, but one inputs the test values directly (not discussed here).

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Are you ready for the spotlight? We're accepting content ideas for **SAS Innovate 2025** to be held May 6-9 in Orlando, FL. The call is **open **until September 25. Read more here about **why** you should contribute and **what is in it** for you!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.