BookmarkSubscribeRSS Feed
ProfB
Fluorite | Level 6

I'm trying to generate median values for urine trace elements using NHANES data.  Proc surveymeans does not produce quantiles when a domain statement is used and employment of 'where' or 'class' disrupts the weights and does not produce population representative medians.  So....I'm stuck.  Any advice on how I can generate unbiased medians for age/gender subgroups?  Thanks much.

3 REPLIES 3
ballardw
Super User

I suspect the issue of the domain analysis and quantiles revolves around the confidencle limits and variability and such combined with the treatments of ties.

Since median is a central measure AND unless you need confidence limits I would start with Proc Means with the weights and your domain variable as a class variable. Generally the central measures don't vary between Means and SurveyMeans.

ProfB
Fluorite | Level 6

Thanks very much, How would you suggest I handle the clustering?

ballardw
Super User

By clustering do you mean the Age group in your example? I would normally think of that as a domain variable as cluster with survey procs relates to sampling design. Does NHANES use a cluster sample design?

Any way, clustering is just factor in the calculations for variability, not the central measure. So even with a cluster design I don't think it will effect the actual median.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 515 views
  • 1 like
  • 2 in conversation