I have data with 3 columns: y
represents dependent continuous variable, xcont
represents independent continuous variable, xcat
represents independent categorical variable with 3 levels: xcat1
, xcat2
, and xcat3
.
I am doing simple model with interaction:
y = xcont + xcat + xcon*xcat
The statistical software I am using (in my case, R) shows the standard table with coefficients, standard errors and p-values, respectively, like this (using made up numbers for simplicity):
xcont 5 (2) 0.05
xcat1 10 (2) 0.02
xcat2 18 (1.5) 0.01
...
Now, I see that xcont
is significant. But it is significant for the full model (with xcat3
used as reference level for categorical variable xcat
).
Is there a way I could explore significance of xcont
for specific levels of xcat
? I.e. estimate the coefficient and standard error?
For example, I would like to conclude something like "conditioning on xcat1
, xcont
is significant at this level".
It seems like the simplest solution is to do the regression of:
y = xcont + xcat1 + xcont*xcat1
Is there a "smarter" way though?