Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Possible Duplicate:
Deletion residuals

The $i^{th}$ deletion residual $e_{−i}$ is defined as $e_{−i}=y_{i}−X^{⊤}B_{−i}$ where $X^{⊤}$ is the $i^{th}$ row of the design matrix $X$ and $B_{−i}$ is a column vector of least square parameter estimates calculated without the $i^{th}$ observation. Write some annotated R code to calculate the deletion residuals when the linear model $y_{i}=B_{0}+B_{1}X_{i}+B_{2}X_{2i}+E_{i}$ is fitted to the data in the file quadratic.txt. By drawing suitable plot, comment on the distribution of these deletion residuals.

should I write what the exactly distribution?

share|improve this question

marked as duplicate by Andy W, jbowman, whuber Dec 5 '12 at 1:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Please don't copy and paste homework assignments verbatim. Put some effort into it and show what you have done so far. As is the last sentence doesn't even make sense. –  Andy W Dec 4 '12 at 23:52
add comment

1 Answer 1

Agree with Andy W.

There's no way of learning R without practice...

To make your life easier:

$$ e_{(i)}=\frac{e_i}{1-h_{ii}} $$

where $e_i = y_i - \hat{y_i}$ and $h_{ii}$ is the $i^{th}$ element of the diagonal of the matrix $H = X(X^tX)^{-1}X^t$

share|improve this answer
how can I get vec command in R thanks –  hhh Dec 5 '12 at 18:40
add comment

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