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;
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
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
Thank you so much! It worked.
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;
I would like something to similar to the following
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
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!
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.