Help using Base SAS procedures

Standard Errors in Weighted Regression using PROC GLM

Reply
New Contributor
Posts: 2

Standard Errors in Weighted Regression using PROC GLM

I'm using proc glm to perform a regression with observation weights. This yields standard errors for the betas based on all observations. I would like to have the standard errors computed using the observation weights instead. Can this be done using Proc Glm or another SAS procedure?

Thanks Much,

Joe

Super User
Posts: 19,841

Re: Standard Errors in Weighted Regression using PROC GLM

Proc SurveyReg? I don't know if there's a SURVEYGLM, but that's probably the type of procedures you're looking for.

Respected Advisor
Posts: 4,927

Re: Standard Errors in Weighted Regression using PROC GLM

If all you want is to exclude observations with zero weight from the analysis, then use a FREQ variable with value 0 or 1 (see the FREQ statement). Observations with freq=0 will not count towards degrees of freedom but will remain available for predictions.

PG

PG
Contributor
Posts: 47

Re: Standard Errors in Weighted Regression using PROC GLM

I don't know the answer, but that is an interesting question to me as well. I have been using PROC GLIMMIX to do inverse probability of treatment weighted regressions  using the WEIGHT statement  using the EMPIRICAL option to get heteroskedastictiy consistent standard errors.  From correspondence with SAS tech support the WEIGHT statement in GLIMMIX  gives the correct weighting for IPTW regression but I did not ask about the standard errors.  I assumed that they were the correct ones.  I'm not sure if they are or if GLM and GLIMMIX compute them the same way when the WEIGHT statement is invoked.

I wish I knew.

New Contributor
Posts: 2

Re: Standard Errors in Weighted Regression using PROC GLM

Thanks to all.

Proc Survey Reg does yield larger standard errors, which given my proportional weights makes sense. I've read thru the documentation without finding a definitive statement that proc surveyreg uses the weights in computing the standard errors (what I'm hoping for here). Does anyone know for sure that this is the reason for the difference in the standard errors compared to proc glm or proc reg when run on the exact same data?

Ask a Question
Discussion stats
  • 4 replies
  • 292 views
  • 0 likes
  • 4 in conversation