BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
UcheOkoro
Lapis Lazuli | Level 10

Please, I need help with SAS code for pooled descriptive statistics after Multiple imputation.  I need to calculate the pooled proportions, median with the interquartile range and risk difference. Below is my SAS code, thank you :

proc means data=Avera_matched_data_all n nmiss q1 q3 median;
class telemed_use;
var age;
by _Imputation_;
run;


proc freq data=Avera_matched_data_all;
table  new_dialysis*telemed_use sex2*telemed_use age2*telemed_use/norow nocol chisq riskdiff;
by by _Imputation_;run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

PROC MIANALYZE.  After doing the by imputation runs, you need to consolidate the results. The first example in the MIANALYZE documentation should provide what you need for the output from PROC MEANS.  Unfortunately, PROC FREQ does not provide a standard error for the analysis, so you will need to switch to PROC SURVEYFREQ.  See this post from @SAS_Rob for details: https://communities.sas.com/t5/Statistical-Procedures/proc-freq-with-multiple-imputation/td-p/671680 

 

SteveDenham

View solution in original post

4 REPLIES 4
SteveDenham
Jade | Level 19

PROC MIANALYZE.  After doing the by imputation runs, you need to consolidate the results. The first example in the MIANALYZE documentation should provide what you need for the output from PROC MEANS.  Unfortunately, PROC FREQ does not provide a standard error for the analysis, so you will need to switch to PROC SURVEYFREQ.  See this post from @SAS_Rob for details: https://communities.sas.com/t5/Statistical-Procedures/proc-freq-with-multiple-imputation/td-p/671680 

 

SteveDenham

UcheOkoro
Lapis Lazuli | Level 10

Thank you so much! It worked.

UcheOkoro
Lapis Lazuli | Level 10

Please, I have another related question. I am using the proc surveymeans and I would like to include  a within stratum median analysis statement 

 

 

proc surveymeans data=Avera_matched_data_all q1 q3 median;
stratum telemed_use/list;
var age ;
by _imputation_;
run;

UcheOkoro_0-1619540678326.png

I would like something to similar to the following

UcheOkoro_1-1619540725435.png

 

SteveDenham
Jade | Level 19

Not totally familiar with this, but based on the documentation, I think you will need to change your STRATA (misspelled, btw) to a DOMAIN statement.

 

SteveDenham

SAS Innovate 2025: Call for 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!

Submit your idea!

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.

Discussion stats
  • 4 replies
  • 2388 views
  • 1 like
  • 2 in conversation