$$sw_i = \prod_t f(A_{it}|A_{i,t-1}) / f(A_{it}|H_{it})$$
The marginal numerator keeps the weights centred near one instead of
letting one small conditional probability blow the weight up.
Correctly specified stabilized weights have mean close to 1, so
mean_weight is the diagnostic to look at.
Examples
Gstabwt(denominator_model = matrix(c(0.3, 0.6, 0.7, 0.2), nrow = 2))
#> $estimate
#> [1] 6.547619
#>
#> $weights
#> [1] 4.761905 8.333333
#>
#> $unstabilized
#> [1] 4.761905 8.333333
#>
#> $mean_weight
#> [1] 6.547619
#>
#> $max_weight
#> [1] 8.333333
#>
#> $n
#> [1] 2
#>
#> $n_times
#> [1] 2
#>
#> $method
#> [1] "stabilized IPT weights (Robins, Hernan & Brumback 2000)"
#>
