tune_theta {tehtuner} | R Documentation |
Estimate the penalty parameter for Step 2 of Virtual Twins
Description
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.
Usage
tune_theta(
data,
Trt,
Y,
zbar,
step1,
step2,
threshold,
alpha0,
p_reps,
parallel,
...
)
Arguments
data |
a data frame containing a response, binary treatment indicators, and covariates. |
Trt |
a string specifying the name of the column of |
Y |
a string specifying the name of the column of |
zbar |
the estimated marginal treatment effect |
step1 |
character strings specifying the Step 1 model. Supports
either " |
step2 |
a character string specifying the Step 2 model. Supports
" |
threshold |
for " |
alpha0 |
the nominal Type I error rate. |
p_reps |
the number of permutations to run. |
parallel |
Should the loop over replications be parallelized? If
|
... |
additional arguments to the Step 1 model call. |
Value
the estimated penalty parameter