The wrapper function for mean-optimal treatment regime that calls a genetic algorithm.
This function supports the IPWE_Mopt
function.
mestimate(x, y, a, prob, p_level, nvars, hard_limit = FALSE, max = TRUE,
cl.setup = 1, s.tol = 1e-04, it.num = 8, pop.size = 3000)
a matrix of observed covariates from the sample. Notice that we assumed the class of treatment regimes is linear.
a vector, the observed responses from a sample
a vector of 0s and 1s, the observed treatments from a sample
a vector, the propensity scores of getting treatment 1 in the samples
choose between 0,1,2,3 to indicate different levels of output from the genetic function. Specifically, 0 (minimal printing), 1 (normal), 2 (detailed), and 3 (debug.)
an integer. The number of parameters indexing a treatment regime.
logical. This logical variable determines if the max.generations variable is a binding constraint for genoud.
logical. If max=TRUE
, it indicates we wish to maximize the marginal
mean; If max=FALSE
, we wish to minimize the marginal mean. The default is TRUE
.
the number of nodes. >1 indicates choosing parallel computing option in
rgenoud::genoud
. Default is 1.
This is the tolerance level used by genoud
.
Default is \(10^{-5}\) times the difference between
the largest and the smallest value in the observed responses.
This is particularly important when it comes to evaluating it.num
.
integer > 1. This argument will be used in rgeound::geound
function.
If there is no improvement in the objective function in this number of generations,
rgenoud::genoud
will think that it has found the optimum.
an integer with the default set to be 3000. This is the population number for the first generation
in the genetic algorithm (rgenoud::genoud
).
zhang2012robustquantoptr
The function IPWE_Mopt
is based on this function.