I am looking for an explanation as to how the ANCOVA results, below, show that the means of the groups defined by IndVar1 and IndVar2 are not equal, after accounting for the covariate, Covar.
I think the answer is that the intercept is adjusted (due to the covariate), and the p-values of IndVar1 and IndVar2 are still significant (p < 0.05).
-Model_1 includes the covariate, Covar. Model_2 does not (included for reference).
-DependentVar and Covar are continuous variables.
-IndVar1 and IndVar2 are categorical.
-The assumptions of ANCOVA for this test are met.
-Covar is significant when it is the only variable in the model.
-The interaction of IndVar1 and IndVar2 is not significant, so it’s not included.
> Model_1 <- aov(DependentVar ~ IndVar1 + IndVar2 + Covar, data = Dataset) > Model_1 <- Anova(Model_1, type = "III") > Model_1 Anova Table (Type III tests) Response: DependentVar Sum Sq Df F value Pr(>F) (Intercept) 8335.0 1 6244.6 < 2.2e-16 *** IndVar1 18.5 5 2.7 0.029 * IndVar2 49.2 5 6.5 7.821e-06 *** Covar 2.9 1 1.8 0.18360 Residuals 2075.2 1250 > Model_2 <- aov(DependentVar ~ IndVar1 + IndVar2, data = Dataset) > Model_2 <- Anova(Model_2, type = "III") > Model_2 Anova Table (Type III tests) Response: DependentVar Sum Sq Df F value Pr(>F) (Intercept) 12235.4 1 7310.5 < 2.2e-16 *** IndVar1 16.4 5 2.8 0.04549 * IndVar2 49.6 5 6.9 3.7e-06 *** Residuals 2099.2 1251
The answer is as I suspected. The intercepts are adjusted due to the covariate, and if one of the p-values of the two grouping variables is significant, then the adjusted means of all of the groups are not equal.
Answered by Kyle on October 13, 2020
I may be misunderstanding what you're asking here, so please clarify if I have misread something. As currently written, my understanding is that you have a factor,
IndVar1, with some number of levels and another factor,
IndVar2, with also some number of levels. Your question is then how the results from the ANCOVA would show that the means of at least one level of the
IndVar1 factor differ from the means of at least one level of the
If that is correct, then you need to include an interaction term in the model. Right now, the ANOVA table just shows that there is at least one mean difference within the factors. So, say that
IndVar1 has 3 levels. These results tell you that there is at least one of those levels that is significantly different from the other two. So, you know that
IndVar2 both have significant main effects even after controlling for some other variable (i.e.,
Running the following code instead will add the interaction term and let you know more about how the independent variables relate to one another:
Model_1 <- aov(DependentVar ~ IndVar1 + IndVar2 + IndVar1:Indvar2 + Covar, data = Dataset)
and just to be complete, a slightly more parsimonious way of running the two-way ANCOVA would be like this:
Model_1 <- aov(DependentVar ~ IndVar1*IndVar2 + Covar, data = Dataset)
Answered by Billy on October 13, 2020
1 Asked on February 6, 2021 by randy-welt
1 Asked on February 5, 2021 by cherry-wu
0 Asked on February 5, 2021 by mksm1228
1 Asked on February 4, 2021 by paze
1 Asked on February 4, 2021 by gideon-j-i
0 Asked on February 4, 2021 by zesla
1 Asked on February 4, 2021 by user964689
0 Asked on February 3, 2021 by relieff
1 Asked on February 2, 2021 by user777
2 Asked on February 2, 2021
3 Asked on February 1, 2021 by mikhail
1 Asked on February 1, 2021 by user70990
1 Asked on February 1, 2021 by rafael-hernndez-salazar
1 Asked on January 31, 2021 by user179028
1 Asked on January 30, 2021 by eddie-s
0 Asked on January 30, 2021 by virginie
1 Asked on January 29, 2021 by i-a
1 Asked on January 29, 2021
2 Asked on January 29, 2021 by marcus-bdholm
Get help from others!