BookmarkSubscribeRSS Feed
hwkim286
Calcite | Level 5

Hello all.

I've been trying to run proc glm using categorical variables like gender and education level.

For some reason, the last outcome for each categorical variable are not printing. (0 for estimate and missing for others) 

http://support.sas.com/kb/22/590.html The first two tables in this link show the same thing for type webster and block 3.

Is there a way to code to make sure that all the outcome for categorical variables show? I know for sure that there are values through proc freq. For instance, when using gender as a categorical variable, I am getting estimates for male but not for female (male = 1 and female = 2). For education level I am getting estimates for low but not high (low = 1 and high = 2).

 

My code is something like this. (only variable names are different)

 

proc glm data = final_data;

        class ID gender;

        model exercise = gender education_level/ noint solution;

run;

 

I've tried noint and got the estimates for the first class variable. However the second class variable is still not showing an output value for the estimate.

 

Thank you in advance.

1 REPLY 1
PGStats
Opal | Level 21

This is called Reference parameterization. The last level from each class effect is fixed at zero and the other levels are estimated as offsets from that reference. So zero really is the estimate for that last class level.

You would probably find LSMEANS more informative. Add

 

LSMEANS gender;

LSMEANS education_level;

 

say, to your proc glm code and see if those results are more interesting to you. There are also plenty of options that can be added to the LSMEANS statement.

 

 

PG

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 342 views
  • 0 likes
  • 2 in conversation