BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ph6
Obsidian | Level 7 ph6
Obsidian | Level 7

I am using proc glm in SAS to find the estimates per unit change of exposure for the response variables. How could I modify my code so that it would calculate the estimates per 10 units or per SD change of the exposure variables? Here is my code:

 PROC GLM DATA=MyData PLOTS=NONE;
        CLASS &ClassAdj;
        MODEL &TraitList = &PVar &ClassAdj &ContAdj / SOLUTION E;
        %IF &ByVars ^= %THEN BY &ByVars;;
    QUIT;

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

You can change the input data by standardizing it so each continuous variable has a standard deviation of 1.

 

Use PROC STDIZE with METHOD=STD

--
Paige Miller

View solution in original post

10 REPLIES 10
PaigeMiller
Diamond | Level 26

Per 10 Units:

You don't have to modify your code, you can just multiply the regression coefficients by 10.

 

Per 1 SD unit change

As above, you just need to multiply the regression coefficients by the proper number.

 

Or you could modify the input data, but that isn't what you asked.

--
Paige Miller
ph6
Obsidian | Level 7 ph6
Obsidian | Level 7
Thank you so much. For the SD do you have any thoughts how could modify the data?
PaigeMiller
Diamond | Level 26

You can change the input data by standardizing it so each continuous variable has a standard deviation of 1.

 

Use PROC STDIZE with METHOD=STD

--
Paige Miller
jiltao
SAS Super FREQ

You can also consider using the ESTIMATE statement in PROC GLM to estimate what you wanted. For example, if the model is --

model y=x1 x2 x3;

 

then estimate 'change in y for 10 units change in x1' x1 10;

estimate ' change in y for sd=3.4 units change in x1' x1 3.4;

 

might get what you wanted.

 

 

ph6
Obsidian | Level 7 ph6
Obsidian | Level 7
Thank you, what if I have logistic regression?
jiltao
SAS Super FREQ
You would use PROC LOGISTIC to fit your model with similar ESTIMATE statements to get what you wanted. The results are in the logit scale.
ph6
Obsidian | Level 7 ph6
Obsidian | Level 7
Would it be OK to divide x by 10, and standardize the SDs before running the model?
Ksharp
Super User
No. That is not OK. Logistic model have different LINK function .

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!

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
  • 10 replies
  • 1776 views
  • 5 likes
  • 4 in conversation