Learn R Programming

DynTxRegime (version 2.1)

optTx: Methods to Retrieve Estimated or to Predict Optimal Treatment

Description

Retrieves the estimated or predicted optimal treatment.

Usage

"optTx"(x, newdata, ...) "optTx"(x, newdata, ...)

Arguments

x
an object of class DynTxRegime.
newdata
an object of class data.frame containing covariates and treatment histories.
...
ignored.

Value

For outcome regression methods Q-Learning and IQ-Learning a list
qFunctions
a matrix of estimated Q-Functions.
optimalTx
a vector of estimated optimal treatments.
For value-search methods optimalClass and optimalSeq a a matrix of estimated optimal treatments.

Details

For all DynTxRegime treatment regime methods, if newdata is missing, optTx retrieves the estimated optimal treatment for the training data.

If newdata is provided, optTx estimates the optimal treatment for the new data based on the original analysis.

For optimalSeq, an optinal argument, dp, must be set, which indicates the stage of treatment for which the estimated optimal treatment is desired.