- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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)