I have a dataset comparing three different treatment groups. There is not a specific control group. I used multiple imputation to fill in the missing values and now would like to build my descriptive tables. I have pooled the medians for each treatment group and computed pairwise p-values but is there a way to get an overall p-value comparing all three groups? I have tried proc quantreg, surveymeans, and lifetest but I am having trouble figuring out how to get an accurate p-value. (I get a pooled p-value of <0.001 for every continuous variable which seems very suspicious.)
The Kruskal Wallis test reports a Chi-Square statistic so I would suggest combining the Chi-Square statistic instead. An overall Chi-Square statistic can be obtained by using the %COMBCHI macro that can be found on Dr. Paul Allison's website linked below.
www.ssc.upenn.edu/~allison/combchi.sas
The small p-values might be because it doesn't make sense to test if the median is zero (the default). It might be more interesting to test a different value using the THETA0= option in Proc MIANALYZE.
It would be helpful to see the code you used for the comparisons as well as combining the medians themselves. Did you use the EDF= option on the MIANALYZE statement?
Setting aside the fact that you used Multiple Imputation, what test would you normally use to test the equality of the median for the three groups jointly?
I used proc quantreg for the pairwise comparisons, though I would prefer to use proc surveymeans or lifetest instead if possible since the medians are more in line with those from proc means and the p-values in quantreg seem to differ depending on which group is used as the reference (A vs. B gives a different p-value than B vs. A).
Normally, I probably would have used Kruskal-Wallis to compare the three medians on an unimputed dataset.
proc quantreg data=mnps ci=resampling; class group; model bmi=group/quantile=0.5; by _imputation_; ods output parameterestimates=parms; run; proc mianalyze parms(classvar=level)=parms edf=2340; class group; modeleffects intercept group; ods output parameterestimates=out; run;
This seems like it might work for combining the medians from quantreg but I'm not sure that it is correct.
proc mianalyze data=parms edf=2340; modeleffects estimate; stderr stderr; ods output parameterestimates=out; run;
proc surveymeans data=mnps median; domain group; var bmi; by _imputation_; ods output domainquantiles=quants; run; proc sort data=quants; by group _imputation_; run; proc mianalyze data=quants edf=2340; modeleffects estimate; stderr stderr; ods output parameterestimates=out; run;
The Kruskal Wallis test reports a Chi-Square statistic so I would suggest combining the Chi-Square statistic instead. An overall Chi-Square statistic can be obtained by using the %COMBCHI macro that can be found on Dr. Paul Allison's website linked below.
www.ssc.upenn.edu/~allison/combchi.sas
The small p-values might be because it doesn't make sense to test if the median is zero (the default). It might be more interesting to test a different value using the THETA0= option in Proc MIANALYZE.
That is such an easy solve. Thank you! This has been driving me nuts over the last few weeks.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.