Computes the total variance of marginal treatment effects using the delta method.
Usage
marginal_variance(ald, ref_trt = NA, comp_trt = NA, scale, family)
Arguments
- ald
Aggregate-level data
- ref_trt
Treatment labels reference (common; e.g. placebo)
- comp_trt
Treatment labels comparator
- scale
A scaling parameter for the calculation.
- family
A character string specifying the family distribution (e.g., "binomial").
Value
The total variance of marginal treatment effects.