BookmarkSubscribeRSS Feed
knicks1189
Fluorite | Level 6

Does anyone know how I can compare the difference in means for a binary variable for two subgroups using one of the proc survey procedures? I have to use the proc survey procedures because my data has weights. I know I am supposed to use the LS means option, but I don't really see how a regression would make sense with my dependent variable and my subgroups as my independent. I did try doing it regardless in procsurveyreg, but I get non-est for some of my parameter estimates. Please help!

1 REPLY 1
StatDave
SAS Super FREQ

With a logistic model, the difference of LS-means as provided by the LSMEANS / DIFF statement is a difference in log odds, or log odds ratio. If you particularly need the difference in means, then that is a nonlinear combination of model parameters which can only be done using the NLEstimate macro. You will have to determine the proper function to estimate based on your model. See this example which shows estimating a difference in probabilities from a logistic model. It uses a model in PROC LOGISTIC, but the same should still apply to a model from SURVEYLOGISTIC.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1491 views
  • 0 likes
  • 2 in conversation