Statistical Procedures

Programming the statistical procedures from SAS
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 7279 views
  • 1 like
  • 2 in conversation