Explain ANCOVA to a newbie

I'm currently doing a statistical analysis between the effect of diversity and population density on depression in different counties across the US. I have currently run a two way ANOVA test and I have run a linear regression as well. I read a little bit on ANCOVA and I think it may be useful but I don't quite understand the full scope and importance of it. I read it is like a two way anova but controls confounding variables but I am not really sure how it works and how to identify confounding variables. If someone could explain ANCOVA to me or point me to a site that explains it well and how to identify confounding variables that would be supper helpful.

1 Answer

You say you have a "linear model as well" but ANOVA is a linear model. So is ANCOVA. So is linear regression. In fact, they are all the same model:

$$Y = b_0 + b_1x_1 + b_2x_2 + \dots + b_px_p + e$$

ANOVA is sometimes used when all the independent variables are categorical; ANCOVA adds one continuous variable. Linear regression can handle any combination of categorical and continuous independent variables.

The two sets of models developed separately and the output can look different, but the meaning and the underlying math is the same.

• Ah sorry I meant I have run a linear regression. Correct me if I misunderstand but pretty much ANCOVA test the effect of a combination of categorical and quantitative predictors on a quantitative response variable while ANOVA tests only the effect of categorical variables on a quantitative response variable? Commented Jun 1 at 18:56
• Yes you are right Commented Jun 1 at 21:23