mediation icon indicating copy to clipboard operation
mediation copied to clipboard

An issue with the BCa CI implementation?

Open Tal-Golan opened this issue 5 years ago • 2 comments

This is most probably my own misunderstanding, but I'm wondering whether bootstrap CIs are correctly implemented. Two questions:

  1. In line 1584 of mediate.py, z_0 is calculated by compare theta to mean theta.
            z.inv <- length(theta[theta < mean(theta)])/sims

However, eq. 2.8 in DiCiccio & Efron, 1996 is different: theta is compared to the original, non-bootstrapped statistic. The current implementation assumes that the mean of the bootstrap distribution equals to the original statistic. Is this necessarily true?

  1. In line 1586, U is calculated, in a way that seem to follow eq. 6.7 in the paper:
U <- (sims - 1) * (mean(theta) - theta)

However, eq. 6.7 uses jackknife estimator, not the bootstrap estimator. Is the usage of the bootstrap estimator here justified?

Tal-Golan avatar Oct 02 '19 16:10 Tal-Golan

Hi there,

Regarding your second question: If I am not mistaken, using theta instead of the jacknife estimator leads, in this specific application, to the acceleration constant a having the wrong sign.

With kind regards, stepls

stepls avatar Jun 10 '22 19:06 stepls

As it turns out, I was mistaken. In Efron's and Tibshirani's Introduction to the Bootstrap (1993), the acceleration constant is defined in equation (14.14) on page 186.

It is calculated from the jackknife replication of the original dataset and does not depend on what happens during bootstrapping.

stepls avatar Jun 21 '22 17:06 stepls