Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: How to modify 'proc glm' in sas to find estimates per 10 units or ...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 03-01-2021 12:20 PM
(1925 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Paige Miller

10 REPLIES 10

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you so much. For the SD do you have any thoughts how could modify the data?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you, what if I have logistic regression?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Logistic regression check UNITS Statement.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Would it be OK to divide x by 10, and standardize the SDs before running the model?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

No. That is not OK. Logistic model have different LINK function .

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

.

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.