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!
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.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.