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;
See if specifying this at the end of your MODEL statement does what you want: / SOLUTION;
See if specifying this at the end of your MODEL statement does what you want: / SOLUTION;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.