I would like to know whether R produces single degrees of freedom tests for a formula. Assume we have a model in R:
model = lm(x ~ a + b + c, data=mydata) # augmented model
Is R
only doing an omnibus test and comparing my augmented model to a null model with only an intercept:
null=lm(x ~ 1, data=mydata) # compact model
or is it doing multiple single-degree-of-freedom tests, such as comparing:
model = lm(x ~ a + b + c, data=mydata) # augmented model
to all of the following compact models:
null1=lm(x ~ b + c, data=mydata) # compact model1
null2=lm(x ~ a + c, data=mydata) # compact model2
null3=lm(x ~ a + b, data=mydata) # compact model3
I am worried because I was taught to compare models with only a single degree of freedom between them, ie an augmented model that includes the parameter of interest against a compact model that excludes the parameter of interest. So, if I was interested in the effect of a, then I was taught to compare the augmented model with the compact model as follows:
model = lm(x ~ a + b + c, data=mydata) #augmented model
null = lm(x ~ b + c, data=mydata) #compact model
anova(null, model) # single degree-of-freedom comparison between augmented model and compact model.
But this latter approach isn't very often taught, particularly when one is using R, though Bodo Winter seems to be an exception [EDIT: I've realised that the Winter tutorial is for random effects using lmer(), which does not automatically produce a p value, so this would explain why he teaches the model comparison approach in that context]. Is there any point in doing the comparison?
In other words, if R is doing the first thing (comparing to a null with just an intercept), then I think this is contrary to what I've been taught, but if the latter (comparing to multiple nulls, each test being a single degree of freedom comparison), then I don't think there is a problem.