How can I calculate Cook's distance for lm.ridge objects?

I first created a glmnet object and carried out ridge regression finding suitable shrinkage parameter. After that, I am calculating the beta values:

object<-cv.glmnet(as.matrix(indp_data),response_data,type.measure = "mse")
fit_lm<-MASS:::lm.ridge(formula,data,lambda = seq(object$lambda.min,0.1,len=10),model=TRUE)
  whichIsBest <- which.min(fit_lm$GCV)
  colnames(gcv_est)[1] <- "Estimates"


All variables are of class numeric. I have calculated the residual by subtracting fitted values from the observed. But how can I calculate Cook's distance from here?


migrated from stackoverflow.com Dec 21 '16 at 14:34

This question came from our site for professional and enthusiast programmers.

Your Answer

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

Browse other questions tagged or ask your own question.