BookmarkSubscribeRSS Feed
CathyVI
Pyrite | Level 9

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;

 

5 REPLIES 5
tarheel13
Rhodochrosite | Level 12
Proc reg is for linear regression so it does not look correct since you saw you want logistic regression. Read this: https://stats.idre.ucla.edu/sas/dae/logit-regression/

CathyVI
Pyrite | Level 9
Sorry I meant to say Linear regression
tarheel13
Rhodochrosite | Level 12
Okay if it’s linear then your code is fine.
Ksharp
Super User
I don't understand your question. Do you mean constant coefficient of AgeAtStart be 1 ?
maybe @Rick_SAS know something more .
Rick_SAS
SAS Super FREQ

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)

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1743 views
  • 1 like
  • 4 in conversation