Programming the statistical procedures from SAS

Comparing the difference in means of two subgroups for a binary variable for weighted data?

Reply
New Contributor
Posts: 3

Comparing the difference in means of two subgroups for a binary variable for weighted data?

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!

SAS Employee
Posts: 386

Re: Comparing the difference in means of two subgroups for a binary variable for weighted data?

Posted in reply to knicks1189

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.

Ask a Question
Discussion stats
  • 1 reply
  • 151 views
  • 0 likes
  • 2 in conversation