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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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
  • 1641 views
  • 0 likes
  • 3 in conversation