Learn R Programming

DTRlearn (version 1.0)

Olearning: Multiple stage Olearning

Description

This is multiple stage O-learning (with improved single stage O-learing) to find optimal DTR by backward induction.

Usage

Olearning(X,AA,RR,n,K,pi, pentype="lasso",kernel="linear",
sigma=c(0.03,0.05,0.07),clinear = 2^(-2:2), m = 4, e = 1e-05)

Arguments

X
is either a matrix share among different stages, or list of feature matrix, row is sample, feature matrix of different stages can have different dimensions.
AA
List of K, A[[i]] is the treatment assignment vector for stage i.
RR
List of K, R[[i]] is the outcome vector for stage i.
n
sample size
K
number of stages
pi
list of K, the i'th element is the randomization probability at stage i
pentype
The regression used to take residual, 'lasso' is the default, using lasso regression; 'LSE' is the ordianry least square.
kernel
kernal of Olearning, default is 'linear', can also be 'rbf'
sigma
if kernel='rbf', sigma is the grid of tuning parameter for 'rbf' kernal to run cross validation to choose from, the default is (0.03, 0.05, 0.07)
clinear
is grid of tuning parameter for wsvm, which cross validation was run to choose from. the default is 2^(-2:2)
m
number of folds in cross validation
e
The rounding error for computing bias in wsvm

Value

  • modelslist of models of class 'linearcl'

References

Zhao, Y., Zeng, D., Rush, A. J., & Kosorok, M. R. (2012). Estimating individualized treatment rules using outcome weighted learning. Journal of the American Statistical Association, 107(499), 1106-1118. Zhao, Y. Q., Zeng, D., Laber, E. B., & Kosorok, M. R. (2014). New statistical learning methods for estimating optimal dynamic treatment regimes. Journal of the American Statistical Association, (just-accepted), 00-00.

See Also

Olearning_Single

Examples

Run this code
n_cluster=10
pinfo=10
pnoise=20
example2=make_2classification(n_cluster,pinfo,pnoise,200)
test=make_2classification(n_cluster,pinfo,pnoise,200,example2$centroids)
pi=list()
pi[[2]]=pi[[1]]=rep(1,200)
modelO=Olearning(example2$X,example2$A,example2$R,200,2,pi)

Run the code above in your browser using DataLab