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)
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: