Diff for "FAQ/covary" - CBU statistics Wiki
location: Diff for "FAQ/covary"
Differences between revisions 3 and 6 (spanning 3 versions)
Revision 3 as of 2011-02-02 15:36:58
Size: 1657
Editor: PeterWatson
Comment:
Revision 6 as of 2011-02-02 15:47:01
Size: 2288
Editor: PeterWatson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
 
= Testing the value of a mean adjusted for a covariate within a group = 


= Testing the value of a mean adjusted for a covariate in a single group =
Line 16: Line 17:
More particularly the standard error of both means = $$\mbox{MSE}/sqrt{\mbox{N}}}$$ but the MSE (Mean Square Error) of unexplained response variance with the covariate present will be less. More particularly the standard error of both means = $$\mbox{MSE}/sqrt{\mbox{N}}}$$ but the MSE (Mean Square Error) of unexplained response variance with the covariate present will be less. The t-test of the intercept will have N-2 degrees of freedom because two terms (intercept and slope) are estimated.
Line 18: Line 19:
||<tablewidth="75%">damaged|| When the variable, x, is centered by subtracting its overall mean

||<tablewidth="75%">Matrix X||
Line 21: Line 24:

$$X^text{T}X$$ =

||<tablewidth="75%"> || ||
|| N || 0 ||
|| 0 || $$\sum_text{i}(x_text{i}-\bar{x})^text{2}$$ ||

$$(X^text{T}X)^text{-1}$$ =

||<tablewidth="75%"> || ||
|| 1/N || 0 ||
|| 0 || $$\frac{1}{\sum_text{i}(x_text{i}-\bar{x})^text{2}}$$ ||

Since the diagonals in the inverse are both zero it follows from least squares theory that the intercept equals the response mean regardless of the presence of the covariate.

Testing the value of a mean adjusted for a covariate in a single group

Suppose we have an outcome, y, whice is related to a variable, x, and we wish to see if the mean of y, adjusted for x, equals zero. For a linear regression with coefficient, B we have

Predicted Y = intercept + B(x - mean of x)

When x is equal to its mean the predicted value of Y is the value of the intercept so we just read off the t-value for the intercept or constant term in the regression coefficients output.

This is analogous to a (multi-group) ancova where the covariate group mean is replaced by the overall pooled covariate group mean. The group means are adjusted depending upon how far each covariate group mean is from the overall covariate mean. The adjusted response mean is simply the predicted response evaluated at the overall mean of the covariate.

In the case of one sample the overall mean and the group mean are identical so we obtain the adjusted mean at the covariate mean. This is, in fact, the same so there is no need to adjust the raw response mean in a sample for a covariate.

What does change when adding a covariate is the standard error of the mean because we have removed variance in the outcome attributed to the covariate so the covariate adjusted standard error of the mean will be less than the unadjusted one.

More particularly the standard error of both means = $$\mbox{MSE}/sqrt{\mbox{N}}}$$ but the MSE (Mean Square Error) of unexplained response variance with the covariate present will be less. The t-test of the intercept will have N-2 degrees of freedom because two terms (intercept and slope) are estimated.

When the variable, x, is centered by subtracting its overall mean

Matrix X

1, ..., 1

$$x_text{1}-\bar{x}$$, ..., $$x_text{N}- \bar{x}$$

$$X^text{T}X$$ =

N

0

0

$$\sum_text{i}(x_text{i}-\bar{x})^text{2}$$

$$(Xtext{T}X)text{-1}$$ =

1/N

0

0

$$\frac{1}{\sum_text{i}(x_text{i}-\bar{x})^text{2}}$$

Since the diagonals in the inverse are both zero it follows from least squares theory that the intercept equals the response mean regardless of the presence of the covariate.

None: FAQ/covary (last edited 2013-05-15 15:50:50 by PeterWatson)