Skip to content
Prev 3814 / 5636 Next

[R-meta] possible miscalculation of Cook’s distances

Dear Reza,

Thank you very much for your reply. I do understand that not all outliers
have to be influential and that not all influential cases have to be
outliers. But thank you for mentioning this and for the code provided. I
did notice you set the reestimate = FALSE. This raises two questions,
actually. It would be great if you help with them.

1) Is there any explanation why cooks.distance.rma.mv(res.ml) and
cooks.distance.rma.mv(res.ml , reestimate = FALSE) give completely
different results about the experiments 1 and 2 (and very similar for the
remaining experiments)?

According to cooks.distance.rma.mv(res.ml), the Study 1, Experiment 2 is
influential, but
according to  cooks.distance.rma.mv(res.ml , reestimate = FALSE), Study 1,
Experiment 1 is influential


#the code illustrating my question

dat <- data.frame(study=c(1,1,2,3,3,3), experiment=c(1:6),
                  yi=c( 68, 18, 31,20,10,26),
                  vi=c(60,32, 15, 19, 41, 82))

res.ml <- rma.mv(yi, vi,
                 random = ~ 1 | study/experiment,
                 data=dat,
                 slab = paste("Study ", study,", ", "Experiment ",
experiment, sep = ""))

cook_with_reest <- cooks.distance.rma.mv(res.ml)
cook_without_reest <- cooks.distance.rma.mv(res.ml, reestimate = FALSE)

plot(1:length(cook_with_reest), cook_with_reest, ylim=c(0,2), type="o",
pch=19, las=1, xaxt="n",
     xlab="Study and Experiment ID", ylab="Cook's Distance")
points(cook_without_reest, type="o", pch=19, col = "red")
axis(1, 1:length(cook_with_reest), labels=names(cook_with_reest))
abline(h=4/length(cook_with_reest), lty="dotted", lwd=2)
legend("top", pch=19, col=c("black","red"), lty="solid",
       legend=c("reestimate = TRUE","reestimate = FALSE"), bty="n")



2) And could you please explain what is the rationale to set reestimate =
FALSE? According to the metafor documentation:
"Doing so only yields an approximation to the Cook?s distances that ignores
the influence of the ith case on the variance/correlation components"


Sincerely,
Antonina
On Fri, Feb 4, 2022 at 3:29 AM Reza Norouzian <rnorouzian at gmail.com> wrote: