This is a statistic function intended for use with a bootstrapping function
(e.g., boot::boot()). On each bootstrap sample of the data, it calculates
a relative treatment effect (e.g., log odds ratio, log relative risk, or
risk difference) using G-computation with maximum likelihood.
gcomp_ml.boot(
data,
indices,
R,
formula = NULL,
family,
trt_var,
ref_trt = NA,
comp_trt = NA,
rho = NA,
N = 1000,
marginal_distns = NA,
marginal_params = NA,
ald
)A single numeric value representing the relative treatment effect
A data frame containing the original individual participant data (IPD).
A vector of indices supplied by the bootstrapping function,
used to resample data.
Linear regression formula object. Prognostic factors (PF) are main effects and effect modifiers (EM) are
interactions with the treatment variable, e.g., y ~ X1 + trt + trt:X2. For covariates as both PF and EM use * syntax.
A 'family' object specifying the distribution and link function (e.g., 'binomial'). See stats::family() for more details.
A named square matrix specifying the correlation between covariates
for synthetic data generation. Defaults to NA, assuming independence.
Synthetic sample size for G-computation
Marginal distributions and parameters
A data frame of aggregate-level data providing covariate distributions.
strategy_gcomp_ml()