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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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