Skip to contents

Formula: compare E[psi^2]/n to the bootstrap

Usage

Chasym(y, A = NULL, H = NULL, B = 200, seed = 42)

Arguments

y

Outcome.

A

Treatment indicator, or NULL.

H

IPW weights, or NULL for unit weights.

B

Bootstrap replicates.

seed

Seed of the deterministic bootstrap stream.

Value

List with estimate, theta, var_if, var_boot, ratio, ess, agree, n, B, method.

Details

The influence function of the IPW mean is psi_i = w_i (Y_i - theta), so the sandwich variance is sum w_i^2 (Y_i - theta)^2 / (sum w_i)^2. If the estimator really is asymptotically linear that number matches the bootstrap variance; a systematic gap is the signal that the weights are too unstable for the normal approximation. With unit weights the sandwich reduces to the plain sample variance over n.

References

van der Laan & Rose (2011), Targeted Learning, Springer, ch. 5; Funk et al. (2011), Am. J. Epidemiology 173(7):761-767.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Chasym(V)
#> $estimate
#> [1] 1.062082
#> 
#> $theta
#> [1] 4.5
#> 
#> $var_if
#> [1] 0.65625
#> 
#> $var_boot
#> [1] 0.6969912
#> 
#> $ratio
#> [1] 1.062082
#> 
#> $ess
#> [1] 8
#> 
#> $agree
#> [1] 1
#> 
#> $n
#> [1] 8
#> 
#> $B
#> [1] 200
#> 
#> $method
#> [1] "asymptotic-variance check for an IPW MSM"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"