03-31-2018 01:24 AM
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!
04-02-2018 10:19 AM
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.