Following this great QA here, I have some basic questions on performing hypothesis test for categorical predictors while controlling for the effect of other predictors (continuous):
Suppose I have a categorical predictor C with 3 levels C1, C2, and C3, and a continuous predictor called Z that I want to control for while performing a one-sided Wald test on the coefficients of the dummy variables of C (C1, C2, and C3).
As @COOLSerdash suggested one can exclude the intercept to avoid having coefficients denoting the difference to the base:
my.mod <- glm(y ~ Z + C - 1, data = data, family = "binomial")
summary(my.mod) # no intercept model
Coefficients:
Estimate Std. Error z value Pr(>|z|)
Z 0.002264 0.001094 2.070 0.038465 *
C1 -3.989979 1.139951 -3.500 0.000465 ***
C2 -4.665422 1.109370 -4.205 2.61e-05 ***
C3 -5.330183 1.149538 -4.637 3.54e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- Does the exclusion of intercept affect
Z? In other words, in these scenarios, what's the point of having intercept, when one is not interested in comparing the effect of levels of C compared to baseC1? - Does the same approach apply to linear regression?
- And to my understanding, here I'm performing three one-sided Wald tests (using z scores) which needs correction for multiple tests, to make sure alpha is still 0.05, is that right?