turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Interpreting PROC GLM Results

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-18-2018 02:13 PM

I'm trying to run the proc genmod command, but when I look at level 3, it has 0s across the board but levels 1 and 2 have values. How do I get my level 3 data to show up or interpret them I was told that this was the correct output for what Im trying to do and that I only need 2 estimates to calculate the 3rd but Im unsure of how to do that. Would level 1 be considered the intercept in this case? Would level 2 be considered level 1 and level 3 considered level 2?

```
Data UGAStudent_DATA;
Set date_difference;
if cd4 <= 200 then cd4_levels='1';
if cd4 >=201 <=500 then cd4_levels='2';
if cd4 > 500 then cd4_levels='3';
run;
proc genmod data= ugastudent_data;
class cd4_levels /param=glm ;
model Factor1 = cd4_levels n_Duration_on_ART_months ;
run;
```

Accepted Solutions

Solution

03-19-2018
03:15 PM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to UGAstudent

03-18-2018 03:57 PM - edited 03-18-2018 04:17 PM

This is the default way that SAS (all procedures) handles categorical variables. There are different ways to parameterize the model, each with different coefficients, but each parameterization produces the same model and predictions. Under your parameterization, the value of the last level alphabetically (in your case, level 3) is set to zero. The true effect for level 1 is really intercept + level 1 coefficient = 7.76 + 0.3812, and so on.

Instead of trying to interpret the model coefficients of class variables, you probably want to use the LSMEANS command and interpret the LSMEANS values.

A better idea, in my opinion, is to treat CD4 as a continuous variable rather than as a class variable CD4_LEVELS.

--

Paige Miller

Paige Miller

All Replies

Solution

03-19-2018
03:15 PM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to UGAstudent

03-18-2018 03:57 PM - edited 03-18-2018 04:17 PM

This is the default way that SAS (all procedures) handles categorical variables. There are different ways to parameterize the model, each with different coefficients, but each parameterization produces the same model and predictions. Under your parameterization, the value of the last level alphabetically (in your case, level 3) is set to zero. The true effect for level 1 is really intercept + level 1 coefficient = 7.76 + 0.3812, and so on.

Instead of trying to interpret the model coefficients of class variables, you probably want to use the LSMEANS command and interpret the LSMEANS values.

A better idea, in my opinion, is to treat CD4 as a continuous variable rather than as a class variable CD4_LEVELS.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PaigeMiller

03-18-2018 08:49 PM

Thank you,

Ive added in the lsmeans command. The lsmeans estimate represents severity of disease. So is the interpretation of the LsMeans simply that the higher the mean, the more severity occurs in that particular CD4 level?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to UGAstudent

03-19-2018 07:58 AM

@UGAstudent wrote:

Thank you,

Ive added in the lsmeans command. The lsmeans estimate represents severity of disease. So is the interpretation of the LsMeans simply that the higher the mean, the more severity occurs in that particular CD4 level?

Yes, this is the estimated mean value of Factor1 based upon the level of CD4_LEVEL. You can also turn on other options in the LSMEANS statement to test whether or not the cd4_level values has statistically different means.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to UGAstudent

03-18-2018 04:51 PM

How do I get my level 3 data to show up or interpret them I was told that this was the correct output for what Im trying to do and that I only need 2 estimates to calculate the 3rd but Im unsure of how to do that.

To determine the effect for Level 1, everything else held constant:

Level1: Intercept + Level1

Level2: Intercept + Level2

Level3: Intercept

Here's a good write up on interpreting categorical/dummy variables that may help you understand it, especially if you work through it.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

03-18-2018 09:03 PM

Thank you!

Im controlling for ART duration, so when interpreting for lets say level 1, im not also controlling for levels 2 and 3 since they are the same variable correct?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to UGAstudent

03-19-2018 08:00 AM

@UGAstudent wrote:

Thank you!

Im controlling for ART duration, so when interpreting for lets say level 1, im not also controlling for levels 2 and 3 since they are the same variable correct?

I would say this is not correct.

There is no such concept of "controlling for" for dummy variables representing levels of a categorical variable.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

03-19-2018 07:56 AM

@Reeza wrote:

How do I get my level 3 data to show up or interpret them I was told that this was the correct output for what Im trying to do and that I only need 2 estimates to calculate the 3rd but Im unsure of how to do that.

To determine the effect for Level 1, everything else held constant:

Level1: Intercept + Level1

Level2: Intercept + Level2

Level3: Intercept

I would quibble with this -- I would say the following:

Level1: Intercept + Level1

Level2: Intercept + Level2

Level3: Intercept + Level3

--

Paige Miller

Paige Miller