sg.mart | R Documentation |
This function estimates the impact of treating the optimal subgroup using a stabilized one-step estimator.
sg.mart(W, A, Y, SL.library, g0 = NULL, family = binomial(),
sig.truncs = 0.1, alpha = 0.05, elln = ceiling(nrow(W)/10),
num.chunks = 10, num.SL.rep = 5)
W |
data frame with observations in the rows and baseline covariates used to form the subgroup in columns. |
A |
binary treatment vector, where 1 indicates that an individual was treated. |
Y |
real-valued outcome. |
SL.library |
SuperLearner library (see documentation for |
g0 |
if known (as in a randomized controlled trial), a vector of probabilities of treatment A=1 given covariates. If |
family |
|
sig.truncs |
vector of values at which the standard deviation estimate is truncated. See |
alpha |
confidence level for returned confidence interval set to (1-alpha)*100%. |
elln |
number of observations to set aside for the first evaluation of the nuisance functions. Recommend around nrow(W)/10, unless willing to significantly slow down run time by setting num.chunks to (n-elln)/k for a small constant k (e.g. 1 or 2) – in that case can set elln=20 or so. |
num.chunks |
number of chunks to use when computing the nuisance functions – using more chunks should slightly improve statistical properties but slow down the runtime. Allowed values between 1 and |
Stabilized one-step estimator for the impact of treating the optimal subgroup. Users will generally find this estimator more conservative (biased down) than the CV-TMLE. While asymptotic results and prior simulations show that this estimator performs as well as the CV-TMLE in large samples, the CV-TMLE outperforms this estimator provided the necessary regularity conditions hold for the CV-TMLE. Unlike for the CV-TMLE confidence interval, we have theoretical justication for the stabilized one-step confidence interval when the treatment effect is null with positive probability.
sig.truncs
is useful if the treatment effect is negative (or small) in all strata of covariates, since in these cases we expect that the variance estimate will converge to zero and coverage of the non-truncated confidence interval may suffer. The truncation ensures that the standard deviation estimate is never too small so that coverage of the lower bound is at worst conservative. Coverage of the upper bound also relies on being able to estimate the optimal subgroup well in terms of mean outcome (see the cited papers).
Note: Have not implemented resource-constrained stabilized one-step estimator.
a list containing
est |
Vector containing estimates of the impact of treating the optimal subgroup. Items in the vector correspond to different choices of sig.truncs (order maintained). |
ci |
Matrix containing confidence intervals for the impact of treating the optimal subgroup. Left column contains lower bounds, right column contains upper bounds. Rows correspond to different choices of sig.truncs (order maintained). |
“Evaluating the Impact of Treating the Optimal Subgroup,” technical report to be released soon.
A. R. Luedtke and M. J. van der Laan, “Statistical inference for the mean outcome under a possibly non-unique optimal treatment strategy,” Annals of Statistics, vol. 44, no. 2, pp. 713-742, 2016.
SL.library = c('SL.mean','SL.glm')
Qbar = function(a,w){plogis(0.2*a*(w$W1>0))}
n = 1000
W = data.frame(W1=rnorm(n),W2=rnorm(n),W3=rnorm(n),W4=rnorm(n))
A = rbinom(n,1,1/2)
Y = rnorm(n,Qbar(A,W),sd=0.025)
sg.mart(W,A,Y,SL.library=SL.library,family=binomial(),sig.truncs=c(0.001,0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.