Statistical Procedures

Programming the statistical procedures from SAS
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 3327 views
  • 1 like
  • 2 in conversation