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

Hi;

I intend to make a 3-way interaction using the "Proc Genmod". For this purpose, I made the following variables:

EPU: a categorical variable which takes the value of 1,2 or 3 and I made it using a continuous variable.

M2CAT: a categorical variable which takes the value of 1,2 or 3 and I made it using a continuous variable.

MM: a continuous variable.

The model is as follow:

     proc genmoddata=rr;
     class fyear sic2 ;
     model capas= epu|mm|m2cat C1 C2 C3 C4 sic2;
     repeated subject=fyear ;
     store capascont;
     run;

When I run the model, it shows the degree of freedom (DF)=1 for EPU and M2CAT. It has caused me a problem since it doesn't show me the interaction of each category with my continuous variable and it seems that SAS treats these categorical variables as a continuous variable. I tried to change the format using the PROC FORMAT but the results stay the same. The problem remains even when I use PROC GLM instead of proc Genmod:

    proc glm=rr;
     class fyear sic2 ;
     model capas= epu|mm|m2cat C1 C2 C3 C4 sic2;
     run;

I would be grateful if you could help me with this.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

If EPU and M2CAT are categorical, you need to include them in the CLASS statement.

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

If EPU and M2CAT are categorical, you need to include them in the CLASS statement.

--
Paige Miller
hyous0001
Calcite | Level 5

You're right, it worked! Thank you dear Paige.

I just got confused since it is exactly what we need to do to add a fixed effect!