Hello,
Does anyone have experience in comparing medians for weighted data? For example I would like to compare the median age of the patients to see if they change over time/season, what is the best SAS procedures and statistical computation options can be used? I am looking into Proc SurveyMeans and Proc surveyreg and proc quantreg but would like to hear your thoughts/inputs. Thanks so much and Happy New Year!!
Do you have survey data, or not? What do the weights represent?
If not, here is a long discussion with a very good answer in the case of unweighted medians: https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/td-p/82303. For weighted medians, I believe you can use the FREQ statement in PROC NPAR1WAY to compare different medians, if I am understanding you properly.
Do you have survey data, or not? What do the weights represent?
If not, here is a long discussion with a very good answer in the case of unweighted medians: https://communities.sas.com/t5/Statistical-Procedures/Compare-two-medians/td-p/82303. For weighted medians, I believe you can use the FREQ statement in PROC NPAR1WAY to compare different medians, if I am understanding you properly.
Hi Paige Miller,
Appreciate your response on New Year's Eve day!! We do have survey data and sample weight (sampwght) is calculated base don different sampling strategy used by different sites. So with Proc Surveymeans allow to look at mean or median age for different groups but does not allow testing the difference I don't think. Thanks
I think you can use the CONTRAST statement in PROC SURVEYREG to estimate the difference of means between groups. See 34607 - How can I compare means in PROC SURVEYMEANS? (sas.com)
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.