|
Size: 361
Comment:
|
Size: 2136
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 1: | Line 1: |
| Describe FAQ/matalg here. | = Matrix algebra derivation of Sums of Squares = |
| Line 3: | Line 4: |
| ||<tablewidth="52%"17%> ||||<45%> || ||<17%>$$Z\text^{T}$$ = ||<38%> 1,...,1||<45%> $$z_text{1}, … ,z_text{N}$$|| |
||<tablewidth="52%<"17%> ||||<45%> || ||<17%>$$Z^{T}$$ = ||<38%> 1,...,1||<45%> $$z_text{1}, … ,z_text{N}$$|| |
| Line 6: | Line 7: |
| ||<tablewidth="52%"17%> ||<38%> ||<45%> || ||<17%>$$Z\text^{T}Z =$$ ||<38%> N||<45%> $$\sum_text{i}z_text{i}$$ || ||<17%>Refused||<38%> $$\sum_text{i}z_text{i}$$ ||<45%> $$\sum_text{i}z_text{i}^text{2}$$ || |
||<tablewidth="52%<"17%> ||<38%> ||<45%> || ||<17%>$$Z^{T}Z =$$ ||<38%> N||<45%> $$\sum_text{i}z_text{i}$$ || || ||<38%> $$\sum_text{i}z_text{i}$$ ||<45%> $$\sum_text{i}z_text{i}^text{2}$$ || ||<tablewidth="52%<"17%> ||<38%> ||<45%> || ||<17%>$$(Z^{T}Z)^{-1} =$$ ||<38%> $$\frac{\sum_{i}z_{i}^{2}}{N\sum_text{i}z_{i}^{2}} $$||<45%> 0 || || ||<38%> 0 ||<45%> $$\frac{N}{N\sum_text{i}z_{i}^{2}}$$ || which may be more simply as expressed as ||<tablewidth="52%<"17%> ||<38%> ||<45%> || ||<17%>$$(Z^{T}Z)^{-1} =$$ ||<38%> $$\frac{1}{N} $$||<45%> 0 || || ||<38%> 0 ||<45%> $$\frac{1}{\sum_text{i}z_{i}^{2}}$$ || ||<tablewidth="52%<"17%> ||<38%> ||<45%> || ||<17%>$$Z^{T}Y =$$ ||<38%> $$\sum_text{i} y_text{i}$$ ||<45%> $$\sum_text{i}z_text{i}y_text{i}$$ || Then the regression terms are obtained using the least squares estimate B = $$(Z^text{T}Z)^text{-1}Z^text{T}Y$$. Two terms required: in the regression of the standardised covariate on the difference in a pair of response level means we require the regression estimate of the intercept (W1) and covariate (W1 x covariate). For the intercept using the above: B = average difference between levels of W1, call this $$\bar{y}$$ For the W1 x covariate interaction B = $$\frac{\sum_text{i}z_text{i}y_text{i}}{\sum_text{i}z_{i}^{2}}$$ Since SS explained by the regression = B $$Z^text{T}Z$$ B (see e.g., Rao, Toutenburg, Shalabh and Heumann(2007)). Taking the appropriate Bs above and the diagonal entries of $$Z\text^{T}Z$$ this gives $$\bar{y}\mbox{ x }\bar{y}$$ N for the W1 SS and $$(\frac{\sum_text{i}z_text{i}y_text{i}}{\sum_text{i}z_{i}^{2}})^text{2}$$ x $$\sum_text{i}z_text{i}^text{2}$$ = $$\frac{(\sum_text{i}z_text{i}y_text{i})^text{2}}{\sum_text{i}z_{i}^{2}}$$ for the W1 x covariate SS. __Reference__ Rao CR, Toutenberg H, Shalabh, and Heumann C (2007). Linear models and generalizations: least squares and alternatives. Third Edition. Springer-Verlag:Berlin. |
- = Matrix algebra derivation of Sums of Squares =
|
|
|
$$Z^{T}$$ = |
1,...,1 |
$$z_text{1}, … ,z_text{N}$$ |
|
|
|
$$Z^{T}Z =$$ |
N |
$$\sum_text{i}z_text{i}$$ |
|
$$\sum_text{i}z_text{i}$$ |
$$\sum_text{i}z_text{i}^text{2}$$ |
|
|
|
$$(Z{T}Z){-1} =$$ |
$$\frac{\sum_{i}z_{i}{2}}{N\sum_text{i}z_{i}{2}} $$ |
0 |
|
0 |
$$\frac{N}{N\sum_text{i}z_{i}^{2}}$$ |
which may be more simply as expressed as
|
|
|
$$(Z{T}Z){-1} =$$ |
$$\frac{1}{N} $$ |
0 |
|
0 |
$$\frac{1}{\sum_text{i}z_{i}^{2}}$$ |
|
|
|
$$Z^{T}Y =$$ |
$$\sum_text{i} y_text{i}$$ |
$$\sum_text{i}z_text{i}y_text{i}$$ |
Then the regression terms are obtained using the least squares estimate B = $$(Ztext{T}Z)text{-1}Z^text{T}Y$$. Two terms required: in the regression of the standardised covariate on the difference in a pair of response level means we require the regression estimate of the intercept (W1) and covariate (W1 x covariate).
For the intercept using the above: B = average difference between levels of W1, call this $$\bar{y}$$
For the W1 x covariate interaction B = $$\frac{\sum_text{i}z_text{i}y_text{i}}{\sum_text{i}z_{i}^{2}}$$
Since SS explained by the regression = B $$Ztext{T}Z$$ B (see e.g., Rao, Toutenburg, Shalabh and Heumann(2007)). Taking the appropriate Bs above and the diagonal entries of $$Z\text{T}Z$$ this gives $$\bar{y}\mbox{ x }\bar{y}$$ N for the W1 SS and $$(\frac{\sum_text{i}z_text{i}y_text{i}}{\sum_text{i}z_{i}{2}})text{2}$$ x $$\sum_text{i}z_text{i}text{2}$$ = $$\frac{(\sum_text{i}z_text{i}y_text{i})text{2}}{\sum_text{i}z_{i}^{2}}$$ for the W1 x covariate SS.
Reference
Rao CR, Toutenberg H, Shalabh, and Heumann C (2007). Linear models and generalizations: least squares and alternatives. Third Edition. Springer-Verlag:Berlin.
