Retrieves the estimated or predicted optimal treatment.
optTx(x, newdata, ...)
# S4 method for DynTxRegime,data.frame
optTx(x, newdata)
# S4 method for DynTxRegime,missing
optTx(x, newdata)
# S4 method for IQLearnFS,data.frame
optTx(x, newdata, ..., y = NULL, z = NULL, dens = NULL)
# S4 method for IQLearnFS,missing
optTx(x, newdata, ..., y = NULL, z = NULL, dens = NULL)
An object of class "DynTxRegime"
.
"data.frame"
of covariates
Ignored. Used to required named input
An object of class IQLearnFS
.
An object of class IQLearnFS
.
"character"
indicating density estimator. One
of {'nonpar','norm'}.
For outcome regression methods Q-Learning and IQ-Learning and weighted learning methods OWL, BOWL, RWL, and EARL, a list with elements: 'decisionFunc', a matrix of estimated Q-Functions and 'optimalTx', a vector of estimated optimal treatments. For value-search methods optimalClass() and optimalSeq() a matrix of estimated optimal treatments.