Skip to contents

Weighting estimator of the population average treatment effect from trial data with estimated sampling scores s(x): the weighted difference of arm means with weights normalised within each arm (Tipton and Hartman 2023, Eq. 3.10). For generalizability the weights are inverse sampling probabilities, w = 1/s (Eq. 3.11); for transport to a disjoint target population they are the odds w = (1 - s)/s divided by Pr(W = 0) (Eq. 3.12; the constant cancels in the ratio form). Identification of transported effects is due to Pearl and Bareinboim (2014).

Usage

Caustrnsp(y, z, s, mode = "transport", pr_w0 = NULL)

Arguments

y

Outcomes of the trial units.

z

Randomized binary treatment, 0/1.

s

Estimated sampling scores, strictly inside (0, 1).

mode

Either "transport" (odds weights) or "generalize" (inverse probability weights).

pr_w0

Optional Pr(W = 0) for the unnormalised odds weights; affects only the reported weights, not the estimate.

Value

List with estimate, mean_treated, mean_control, weights, n, n_treat, n_control, mode, method.

References

Tipton, E. and Hartman, E. (2023), Generalizability and transportability, Ch. 3 Eqs. 3.10-3.12 in Zubizarreta, Stuart, Small and Rosenbaum (eds), Handbook of Matching and Weighting Adjustments for Causal Inference, Chapman and Hall/CRC, doi:10.1201/9781003102670. Pearl, J. and Bareinboim, E. (2014), External validity: From do-calculus to transportability across populations, Statistical Science 29(4), 579-595, doi:10.1214/14-STS486.

Examples

set.seed(1)
Caustrnsp(y = rnorm(60), z = rbinom(60, 1, 0.5), s = runif(60, 0.1, 0.9))
#> $estimate
#> [1] 0.02261453
#> 
#> $mean_treated
#> [1] 0.03183021
#> 
#> $mean_control
#> [1] 0.009215675
#> 
#> $weights
#>  [1] 1.9852161 2.9524428 0.2358484 0.9893704 0.2474334 2.9784385 0.4154633
#>  [8] 0.4714557 0.1696182 0.8583310 0.4938861 1.4323557 4.5340802 0.1878718
#> [15] 2.0619806 0.7468514 4.3109993 0.2946565 1.8219018 0.3768774 2.1846468
#> [22] 2.6374717 0.9476568 2.1729867 3.0827215 0.9422721 0.8174339 3.9182227
#> [29] 2.2776775 0.4829134 0.1505786 4.5520800 0.4073047 0.1649946 0.3246652
#> [36] 1.8848884 0.6137789 0.1591725 0.1587672 1.6882923 2.2260220 3.3036084
#> [43] 1.7953696 0.9681159 0.1916469 0.9655334 2.2669382 6.2902924 1.3026353
#> [50] 0.2768111 1.6470114 3.8743905 1.5025683 0.6525206 1.4268125 0.5344430
#> [57] 0.5348470 0.8385040 1.2537775 1.1636777
#> 
#> $n
#> [1] 60
#> 
#> $n_treat
#> [1] 33
#> 
#> $n_control
#> [1] 27
#> 
#> $mode
#> [1] "transport"
#> 
#> $method
#> [1] "Tipton-Hartman Eq. 3.10 weighted PATE, transport weights"
#>