Skip to contents

A subgroup effect is not the full-sample effect restricted to a few rows: the target changes, so the clever covariate changes with it. Conditioning on S = 1 divides the efficient influence function by P(S = 1) and zeroes it outside the subgroup, giving H = I(S = 1)/P(S = 1) * [D/g(X) - (1 - D)/(1 - g(X))].

Usage

Tmlsbg(y, D, X, subgroup)

Arguments

y

Outcome.

D

Binary treatment.

X

Covariates.

subgroup

1 for subgroup membership, 0 otherwise.

Value

List with estimate, se, eps, n_sub, n.

Details

The nuisance models are fitted on the whole sample – the point of not subsetting first – while the target parameter is the subgroup one. With S all ones this reduces exactly to the full-sample TMLE.

References

Chernozhukov, V., Demirer, M., Duflo, E. & Fernandez-Val, I. (2025). Econometrica 93(4):1121-1164; van der Laan, M. J. & Rubin, D. (2006). IJB 2(1):11.

Examples

Tmlsbg(y = c(1, 2, 3, 4, 5, 6, 7, 8), D = c(1, 2, 3, 4, 5, 6, 7, 8),
  X = c(1, 2, 3, 4, 5, 6, 7, 8), subgroup = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] -1.346696e+16
#> 
#> $se
#> [1] 6.380237e+17
#> 
#> $eps
#> [1] -1.172026e+14
#> 
#> $n_sub
#> [1] 36
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "TMLE for the average treatment effect within a subgroup"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"