- Analysis of covariance
**Analysis of covariance (ANCOVA)**is ageneral linear model with one continuous outcome variable and one or more factors. ANCOVA is a merger ofANOVA and regression for continuous variables. ANCOVA tests whether certain factors have an effect on the outcome variable after removing the variance for which quantitative predictors (covariate s) account. The inclusion of covariates can increasestatistical power because it accounts for some of the variability.**Assumptions**As any statistical procedure, ANCOVA makes certain assumptions about the data entered into the model. Only if these assumptions are met, at least approximately, will ANCOVA yield valid results. Specifically, ANCOVA, just like

ANOVA , assumes that the residuals [*http://www.statsoft.com/textbook/stbasic.html*] are normally distributed and homoscedastic. Further, since ANCOVA is a method based in linear regression, the relationship of the dependent variable to theindependent variable (s) must be linear in the parameters.**Power considerations**While the inclusion of a covariate into an ANOVA generally increases

statistical power by accounting for some of the variance in the dependent variable and thus increasing the ratio of variance explained by the independent variables, adding a covariate into ANOVA also reduces the degrees of freedom (see below). Accordingly, adding a covariate which accounts for very little variance in the dependent variable might actually reduce power.**Equations****One-factor ANCOVA analysis**One factor analysis is appropriate when dealing with more than 3 populations; "k" populations. The single factor has "k" levels equal to the "k" populations. "n" samples from each population are chosen randomly from their respective population.

**Calculating the sum of squared deviates for the independent variable "X" and the dependent variable "Y"**The

sum of squared deviates (SS): $SST\_y$, $SSTr\_y$, and $SSE\_y$ must be calculated using the following equations for the dependent variable, "Y". The SS for the covariate must also be calculated, the two necessary values are $SST\_x$ and $SSE\_x$.The total sum of squares determines the variability of all the samples. $n\_T$ represents the total number of samples:

:$SST\_y=sum\_\{i=1\}^nsum\_\{j=1\}^kY\_\{ij\}^2-frac\{left(sum\_\{i=1\}^nsum\_\{j=1\}^kY\_\{ij\}\; ight)^2\}\{n\_T\}$

The sum of squares for treatments determines the variability between populations or factors. $n\_k$ represents the number of factors

:$SSTr\_y=sum\_\{i=1\}^nleft(frac\{sum\_\{j=1\}^kY\_\{ij\}^2\}\{n\_k\}\; ight)-frac\{left(sum\_\{i=1\}^nsum\_\{j=1\}^kY\_\{ij\}\; ight)^2\}\{n\_T\}$

The sum of squares for error determines the variability within each population or factor. $n\_n$ represents the number of samples with a given population:

:$SSE\_y=sum\_\{i=1\}^nsum\_\{j=1\}^kY\_\{ij\}^2-sum\_\{i=1\}^nleft(frac\{sum\_\{j=1\}^kY\_\{ij\}^2\}\{n\_k\}\; ight)$

The total sum of squares is equal to the sum of squares for treatments and the sum of squares for error:

:$SST\_y=SSTr\_y+SSE\_y,$

**Calculating the covariance of "X" and "Y"**The total sum of square covariates determines the covariance of "X" and "Y" within all the data samples:

:$SCT=sum\_\{i=1\}^nsum\_\{j=1\}^kX\_\{ij\}Y\_\{ij\}-frac\{left(sum\_\{i=1\}^nsum\_\{j=1\}^kX\_\{ij\}\; ight)left(sum\_\{i=1\}^nsum\_\{j=1\}^kY\_\{ij\}\; ight)\}\{n\_T\}$

:$SCE=sum\_\{j=1\}^kleft(sum\_\{i=1\}^nX\_\{ij\}Y\_\{ij\}-frac\{sum\_\{i=1\}^n(X\_\{ij\}Y\_\{ij\})\}\{n\_n\}\; ight)$

**Adjusting SST**_{"y"}The

correlation between "X" and "Y" is $r\_T^2$.:$r\_T^2=frac\{SCT^2\}\{SST\_xSST\_y\}$

:$r\_n^2=frac\{SCE^2\}\{SSE\_xSSE\_y\}$

The proportion of covariance is subtracted from the dependent, $SS\_y$ values:

:$SST\_\{yadj\}=SST\_y-r\_T^2,$

:$SSE\_\{yadj\}=SSE\_y-r\_n^2,$

:$SSTr\_\{yadj\}=SST\_\{yadj\}-SSE\_\{yadj\}$

**Adjusting the means of each population "k"**The mean of each population is adjusted in the following manner:

:$M\_\{y\_iadj\}=M\_\{y\_i\}-frac\{SCE\_y\}\{SCE\_x\}(M\_\{x\_i\}-M\_\{x\_T\})$

**Analysis using adjusted sum of squares values**Mean squares for treatments where $df\_\{Tr\}$ is equal to $N\_T-k-1$. $df\_\{Tr\}$ is one less than in ANOVA to account for the covariance and $df\_E=k-1$:

:$MSTr=frac\{SSTr\}\{df\_\{Tr$

:$MSE=frac\{SSE\}\{df\_E\}$

The

F statistic is:$F\_\{df\_E,df\_mathrm\{Tr=frac\{mathrm\{MSTr\{mathrm\{MSE.$

**ee also****External links*** [

*http://www.southampton.ac.uk/~cpd/anovas/datasets/index.htm Examples of all ANOVA and ANCOVA models with up to three treatment factors, including randomized block, split plot, repeated measures, and Latin squares*]

* [*http://faculty.vassar.edu/lowry/ch17pt1.html One-Way Analysis of Covariance for Independent Samples*]

*Wikimedia Foundation.
2010.*