Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

DTRlearn (version 1.0)

Plearning: Plearning

Description

This is the Plearning to learn optimal multistage DRT.

Usage

Plearning(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. see also wsvm
clinear
is grid of tuning parameter for wsvm, see also Olearning_Single
m
number of folds in cross validation. see also
e
The rounding error for that numerically, $|\alpha|
kernel
The choice of kernel for Improved O-learning, default is 'linear', can also be 'rbf'
sigma
if 'rbf' is chosen for kernel, the grid of sigma to serach by cross validation.

Value

  • modelslist of models of class 'linearcl'

References

Use of personalized Dynamic Treatment Regimes (DTRs) and Sequential Multiple Assignment Randomized Trials (SMARTs) in mental health studies http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4311115/ The methodology paper is under double blinded review.

See Also

Olearning_Single, Qlearning_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)
modelP=Plearning(example2$X,example2$A,example2$R,200,2,pi)

Run the code above in your browser using DataLab