Desktop productivity for business analysts and programmers

Regression with robust standard errors and interacting variables

Reply
Occasional Contributor
Posts: 18

Regression with robust standard errors and interacting variables

Hi,

I'm doing some data analysis for a project and my advisor would like me to run simple linear regressions with robust standard errors on all the models. I was planning to use the /acov option in proc reg to calculate the robust standard errors.

A few of the models include interaction of variables. I know that I can use proc glm for interacted variables, but I'm not able to generate the robust standard errors with this procedure. Any thoughts on how to get both robust standard errors and include interacted variables in a simple linear regression procedure?

I appreciate any help!
Stephanie

Occasional Contributor
Posts: 10

Re: Regression with robust standard errors and interacting variables

Hi Stephanie,

This link may help with robust regressions/standard errors:

http://www.ats.ucla.edu/stat/sas/webbooks/reg/chapter4/sasreg4.htm

If you are only interested in outputting robust standard errors and including interactions, this can be done in proc reg by creating multiplicative product variables to represent the interaction terms. See below for a simple example examining the interaction between female and age.

data new; set old;

femXage = female*age;

run;

proc reg data=new;

model depvar = female age femXage / acov;

run;

With that said, I recommend comparing robust and regular standard errors, examining residuals, and exploring the causes of any potential differences in findings because an alternative analytic approach may be more appropriate (e.g., you may need to use surveyreg, glm w/repeated, or mixed to account for non-normally distributed DVs/residuals or clustered or repeated measures data). 

Good luck - I hope this helps!

Jon

Occasional Contributor
Posts: 18

Re: Regression with robust standard errors and interacting variables

Thank you Jon--your response was very helpful!

Ask a Question
Discussion stats
  • 2 replies
  • 1518 views
  • 0 likes
  • 2 in conversation