BookmarkSubscribeRSS Feed
burtsm
Calcite | Level 5

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

2 REPLIES 2
jrbrauer
Fluorite | Level 6

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

burtsm
Calcite | Level 5

Thank you Jon--your response was very helpful!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 5041 views
  • 0 likes
  • 2 in conversation