What does it mean if I'm asked to adjust for a variable?
Using sashelp.heart dataset, i want to run a linear regression of weight as my dependent variable and height as my independent variable adjusting for AgeAtStart.
Is this code correct?
proc reg data=sashelp.heart;
model weight =height AgeAtStart;
run;
If I want to add more independent variable like diastolic, systolic, and still adjusting for AgeAtStart how will I arrange the code? Is this correct?
proc reg data=sashelp.heart;
model weight =height diastolic systolic AgeAtStart;
run;
As you say, "adjusting for a variable" (or "controlling for a variable") is related to including that variable in an appropriate regression model. For a good explanation and example, see regression - Explain model adjustment, in plain English - Cross Validated (stackexchange.com)
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.