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).

 

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

 

proc glm data = final_data;

        class ID gender;

        model exercise = gender / solution;

run;

 

Thank you in advance.

2 REPLIES 2
DWilson
Pyrite | Level 9

That's because you also are estimating an intercept term. In a simple model with a single two level categorical predictor, the estimated mean value for the reference level (by default I believe this corresponds to the largest value of the categorical variable) is the value of the intercept term.

 

There should be an option to run the model without an intercept term. Something like /noint on the model statement or something like that.

 

You also should be able to get predicted means, by the values of all class variables, by using a MEANS or LSMEANS statement. Look into that.

hwkim286
Calcite | Level 5

I have multiple class variables. The noint gave me all the estimates for the first one but the others are still missing the estimates for the last output. 

Ready to join fellow brilliant minds for the SAS Hackathon?

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

Register today!
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
  • 2 replies
  • 470 views
  • 1 like
  • 2 in conversation