BookmarkSubscribeRSS Feed
misha2
Fluorite | Level 6

Hi,

 

I've been grappling with this dataset for a while now, and every time I think have a solution, something goes wrong.

 

I'm using two-stage sample data, so have a strata and psu indicator that I need to include to get standard errors that are reflective of the sampling method. 

 

I'm also using obesity as an outcome, which is very common (30%) meaning I need to calculate prevalence ratios or risk ratios explicitly, as odds ratios will overestimate the association. 

 

I need to be able to obtain adjusted values, as I'd like an estimate that I can go on to use in further models.

 

However, I can't seem to find any way to both get a relative risk & confidence intervals that account for the data. 

 

I've had a gander with relrisk9 (publicly available macro), which allows you to use GEE, but this will only let me adjust for the strata indicator, not the psu.

 

I've also had a go with proc surveylogistic (which models the data) and nlestimates (takes stored parameters to estimate RR). My stats understanding isn't exceptional, so I don't know if the confidence intervals produced by NLestimates reflect the initial standard error as a result of sampling. It uses the Delta method to construct CIs and calls for degrees of freedom, and if these aren't provided, large sample Wald statistics are used). 

 

If this is bang on (crosses fingers), should I be supplying the degrees of freedom (and how would I determine this) or are the Wald statistics likely to be adequate?

 

If that's unlikely to have done what I need it to, what would you recommend? I've seen suggestions to use random effects models through PROC GLIMMIX but don't know if that would provide a relative risk.

 

Thank you so much for your help!

 

Sincerely,

Exhausted.

1 REPLY 1
DWilson
Pyrite | Level 9

The best I think you can do is use SAS proc surveylogistic and use a LSMEANS statement.

 

LSMEANS will give you a predicted probability for the values of the variables listed on the LSMEANS  statement. The variables on the LSMEANS statement have to be in your model.

 

Per SAS 9.3 documentation, LS-means are predicted margins—that is, they estimate the marginal means over a hypothetical balanced population. 

 

I assume you can take the predicted probabilities and calculate your own relative risks or risk ratios.

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1097 views
  • 0 likes
  • 2 in conversation