BookmarkSubscribeRSS Feed
iressa13
Fluorite | Level 6

Hello, I am very new to SAS and was wondering how to control for a variable in a linear regression model. 

 

Here is the the original code to get the initial model. I am trying to control for X1. Thanks for any help!!

proc reg data = WORK.IMPORT PLOTS= NONE; 
model Y=x2 x1;
run;
quit;
2 REPLIES 2
Reeza
Super User

Don't you control for a variable by including it in your model, which you've already done? 

 

Your base model shouldn't include the variables you're trying to control for...

 

PS. My stats are rusty so I'm moving this to the Stats Forum, so you can get an answer from someone more appropriate.

 


@iressa13 wrote:

Hello, I am very new to SAS and was wondering how to control for a variable in a linear regression model. 

 

Here is the the original code to get the initial model. I am trying to control for X1. Thanks for any help!!

proc reg data = WORK.IMPORT PLOTS= NONE; 
model Y=x2 x1;
run;
quit;

 

PeterClemmensen
Tourmaline | Level 20

I dont understand the question. In my terminology, you already control for it?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1498 views
  • 0 likes
  • 3 in conversation