Permutes data under the null hypothesis of a constant treatment effect and
calculates the MNPP on each permuted data set. The 1 - alpha quantile
of the distribution is taken.
tune_theta(
data,
Trt,
Y,
zbar,
step1,
step2,
threshold,
alpha0,
p_reps,
parallel,
...
)the estimated penalty parameter
a data frame containing a response, binary treatment indicators, and covariates.
a string specifying the name of the column of data
contains the treatment indicators.
a string specifying the name of the column of data
contains the response.
the estimated marginal treatment effect
character strings specifying the Step 1 model. Supports
either "lasso", "mars", "randomforest", or
"superlearner".
a character string specifying the Step 2 model. Supports
"lasso", "rtree", "classtree", or "ctree".
for "step2 = 'classtree'" only. The value against
which to test if the estimated individual treatment effect from Step 1 is
higher (TRUE) or lower (FALSE).
the nominal Type I error rate.
the number of permutations to run.
Should the loop over replications be parallelized? If
FALSE, then no, if TRUE, then yes.
Note that running in parallel requires a parallel backend that must be
registered before performing the computation.
See the foreach documentation for more details.
additional arguments to the Step 1 model call.