Skip to contents

A marginal structural model fitted under both non-random treatment and non-random censoring uses the product of the two stabilized weights. The product has a much heavier right tail than either factor; Cole and Hernan truncate it, accepting a little bias for a large variance reduction. The cut is the type-7 percentile of the product.

Usage

Trcwgt(sw_A, sw_C, quantile = 0.99)

Arguments

sw_A

Positive stabilized treatment weights.

sw_C

Positive stabilized censoring weights, same length.

quantile

Upper percentile in (0, 1], default 0.99.

Value

List with estimate (mean truncated weight), weights, cut, n_truncated, max_before, max_after, sd, mean_untruncated, n, method.

Details

Formula: sw_i = min(sw_A_i sw_C_i, Q_q(sw_A sw_C)).

References

Cole, S. R. and Hernan, M. A. (2008). Constructing inverse probability weights for marginal structural models. American Journal of Epidemiology 168(6):656-664. doi:10.1093/aje/kwn164

Examples

Trcwgt(c(1, 1, 1, 1), c(1, 1, 1, 1), 0.99)
#> $estimate
#> [1] 1
#> 
#> $weights
#> [1] 1 1 1 1
#> 
#> $cut
#> [1] 1
#> 
#> $n_truncated
#> [1] 0
#> 
#> $max_before
#> [1] 1
#> 
#> $max_after
#> [1] 1
#> 
#> $sd
#> [1] 0
#> 
#> $mean_untruncated
#> [1] 1
#> 
#> $n
#> [1] 4
#> 
#> $method
#> [1] "sw = min(sw_A sw_C, q-th percentile) [Cole & Hernan 2008]"
#>