For each identified subgroup and in the overall population, use the double robust estimator (Funk et al 2011). Usable for continuous and binary outcomes, specifically for the estimand E(Y|X,A=1)-E(Y|X,A=0).
param_dr(Y, A, X, mu_hat, Subgrps, alpha_ovrl, alpha_s, ...)
The outcome variable. Must be numeric or survival (ex; Surv(time,cens) )
Treatment variable. (a=1,...A)
Covariate space.
Patient-level estimates (See PLE_models)
Identified subgroups (can be the overall population)
Two-sided alpha level for overall population
Two-sided alpha level at subgroup
Any additional parameters, not currently passed through.
Data-set with parameter estimates (average treatment effect) and corresponding variability metrics, for overall and subgroups. Subgrps=0 corresponds to the overall population by default.
param.dat - Parameter estimates and variability metrics (est, SE, LCL/UCL = lower/upper confidence limits, pval = p-value).
# NOT RUN {
library(StratifiedMedicine)
## Continuous ##
dat_ctns = generate_subgrp_data(family="gaussian")
Y = dat_ctns$Y
X = dat_ctns$X
A = dat_ctns$A
## Estimate PLEs (ranger) ##
res_ranger = ple_train(Y, A, X, Xtest=X, ple="ple_ranger")
## Identify Subgroups: MOB (lmtree) ##
res_lmtree = submod_train(Y, A, X, Xtest=X, submod="submod_lmtree")
## Parameter-estimation ##
params = param_dr(Y, A, X, mu_hat = res_ranger$mu_train,
Subgrps = res_lmtree$Subgrps.train, alpha_ovrl=0.05,
alpha_s=0.05)
params
# }
Run the code above in your browser using DataLab