2
$\begingroup$

Consider a modelling a response $Y$ against two categorical variables (which can take $4\times 2=8$ possible combinations). We have 16 values for the response, with two values for every combination of categorical variables.

When plotting the studentised residuals against the fitted values (so we have two residuals for every one of the 8 distinct fitted $y$ values), I am getting perfect symmetry about $0$. I know symmetry about zero is expected as the studentised residuals have the $t$-distribution, but perfect symmetric seems rather odd and makes me uncertain about the linear model.

If this is indeed true, could someone post a sketch proof? I am guessing this is linked to all the variables here being categorical (so matrix $X$ in the model $Y = X\beta +\varepsilon$ only contains the entries $0$ or $1$) somehow leading to the the fitted values coming out to be the average of the two values for every separate combination of categorical variables.

$\endgroup$
  • 1
    $\begingroup$ At each level you have one mean fitted to two values. That mean will be at the average of the observations, so the corresponding residuals must be equidistant and opposite in sign. $\endgroup$ – Glen_b Nov 30 '14 at 6:07
2
$\begingroup$

In a linear model the fitted values are conditional means. When you have a continuous variable with the X values distributed any old where, the residuals might not look perfectly symmetrical. This is particularly true if your model's functional form is mis-specified. However, when you have categorical variables, the fitted values are simply category means. If you have only two points per category, the means have to be the exact midpoint between the two points for every category. Thus, the residuals have to be perfectly symmetrical.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.