I have known of interaction for a long time. But I do not know how to code the simple effects or graph them . I have not worked with estimate statements before. The problem I have is I do not have the original categorical variable only the dummies derived from It. There were 5 levels in the original variable, I have four dummies in my data set. I assume I can just generate the interaction between my interval variable and the dummy variables (so there will be four interaction terms). But am not sure how I go from the following to that or even if you can. The analysis I have seen focuses on the original categorical variable not its levels (the dummies built from it) which is part of my confusion. If there is aa simpler way to do this I will, it is the best code I have found.
Note that before this step was a proc glm imported into proc plm.I found code how to generate results for an interaction of a categorical variable and an interval (hours) variable (the categorical variable prog has three levels the third is the reference level).
To plot the simple effects
proc plm restore = catcont;
estimate 'hours slope, prog=1 jogging' hours 1 hours*prog 1 0 0,
'hours slope, prog=2 swimming' hours 1 hours*prog 0 1 0,
'hours slope, prog=3 reading' hours 1 hours*prog 0 0 1 / e;
A similar problem this will plot the data, but I am not sure how to do it with the dummies.
proc plm resore=catcont;
effectplot slicefit (x=hours sliceby=prog) / clm;
run;
... View more