Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The formula of Cook's distance is $$D_i=\frac{(\hat Y-\hat Y(i))^{\prime}(\hat Y-\hat Y(i))}{p\times MSE}$$

where, $\hat Y$ is the prediction from the full regression model and $\hat Y$ is a $(n\times 1)$ matrix

$\hat Y(i)$ is the prediction from a refitted regression model in which observation $i $ has been omitted. That is , $\hat Y(i)$ is a $((n-1)\times 1)$ matrix.

So the order of $\hat Y$ and $\hat Y(i)$ is not same. Then How can i subtract this two matrix since for subtracting we need equal order of two matrices.

share|improve this question
up vote 2 down vote accepted

You can exclude the $i{^\mathrm{th}}$ observation while estimating the model and include it again when predicting $\hat{Y}(i)$, thus resulting in a matrix of the same order as $\hat{Y}$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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