BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GKati
Pyrite | Level 9

Hello, 

 

I'm trying to run a Proc GLM with categorical variables (year and age-groups). I would like to see the interaction of each year and each age-group (plus female, etc.) explicitly WITHOUT having to create dummy variables for each year, as this would make my model very cumbersome. 

 

Indicating year and age_gr in a CLASS statement works well with PROC logistic on the same model. I get individual coefficients for year=2010  to year=2013, but this does not work with Proc GLM and I get one coefficient for the year variable only.

 

What am I doing wrong?

 

 

********************************************************

 

proc logistic data=data_predict descending;

class year age_gr;

model treated=contract|year|age|female;

run;

 

proc glm data=data_predict;

class year age_gr;

model prob_score=contract|year|age_gr|female;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Ammonite | Level 13

See if specifying this at the end of your MODEL statement does what you want: / SOLUTION;

View solution in original post

1 REPLY 1
WarrenKuhfeld
Ammonite | Level 13

See if specifying this at the end of your MODEL statement does what you want: / SOLUTION;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

Discussion stats
  • 1 reply
  • 6900 views
  • 1 like
  • 2 in conversation