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.

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!

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
  • 1427 views
  • 0 likes
  • 2 in conversation