Solved
Contributor
Posts: 20

# Interpreting PROC GLM Results

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
Posts: 2,982

## Re: Interpreting PROC GLM Results

[ Edited ]

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

All Replies
Solution
‎03-19-2018 03:15 PM
Posts: 2,982

## Re: Interpreting PROC GLM Results

[ Edited ]

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
Contributor
Posts: 20

## Re: Interpreting PROC GLM Results

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?

Posts: 2,982

## Re: Interpreting PROC GLM Results

@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
Super User
Posts: 23,666

## Re: Interpreting PROC GLM Results

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.

https://stats.idre.ucla.edu/sas/webbooks/reg/chapter3/regression-with-saschapter-3-regression-with-c...

Contributor
Posts: 20

## Re: Interpreting PROC GLM Results

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?

Posts: 2,982

## Re: Interpreting PROC GLM Results

@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
Posts: 2,982

## Re: Interpreting PROC GLM Results

@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
☑ This topic is solved.