Probably I know what you mean, but at first, I present what I concluded from your question. You have single quantitive response (DV) variable Y and several independent variables (IV) / predictors, e.g. A, B.
I assume you're asking inter alia what's the difference between these two approaches:
anova(lm(Y ~ A * B, data=my_data))
From anova(stats)
summary(lm(Y ~ A * B, data = my_data)) or to get coefficients
printCoefmat(summary(lm(Y ~ A * B, data = my_data)))$coefs
From summary.lm(stats)
Probably you're trying to test the significance of additive effects of those IVs.
Below I'm using the R convention:
- Y ~ 1 - empty model only with the mean
- A:B - only interaction between A and B
- A * B - adds both of the IVs A and B as well as their interaction A:B
The first case (anova) is Test I type or sequential and you're comparing bigger and bigger models, starting from an empty model (with only mean).
In this case the order of IVs is important:
For Y ~ A * B you're goint to compare such models:
- Y ~ 1 versus Y ~ 1 + A
- Y ~ 1 + A versus Y ~ A + B
- Y ~ 1 + A + B versus Y ~ 1 + A + B + A:B
Watch out Here, the order is important: Y ~ A * B and Y ~ B * A will lead to different tests.
In the second case (summary) you're comparing the full model and almost full model without effect of particular IV. That is called Test III type or marginal. For Y ~ A * B are performed three tests comparing these pairs of models (the second in each pair is always full):
Y ~ 1 + A + A:B versus Y ~ 1 + A + B + A:B
Y ~ 1 + B + A:B versus Y ~ 1 + A + B + A:B
Y ~ 1 + A + B versus Y ~ 1 + A + B + A:B
The most important part
If you're using Test III type / marginal with full model Y ~ A * B, that is
Y ~ A + B + A:B you would knock out only one factor at a time, so if you knock out A you leave the interaction A:B, so an influence from A isn't deleted completly.
ANOVA is all about comparing two models. You can literally compare any two models in the following manner:
model1 = lm(Y ~ A * C, data = my_data)
model2 = lm(Y ~ A * B * C, data = my_data)
anova(model1, model2)
Here, I compared the model with all IVs with a model without B and its interactions with diffrent IVs (e.g. A:B or C:B), (but interaction A:C holds).
Probably, you cannot do that with summary.