psiITR: psi-Learning in individulized treatment rule

Description Usage Arguments Value Author(s) See Also Examples

Description

Given the tunning parameters return the psiLearning model to estimate the optimal ITR

Usage

1
psiITR(X,A,R,w0=NULL,tau=0.1,kappa=0.1,maxit=100,tol=1e-4,kernel='linear',sigma=NULL,res=FALSE)

Arguments

X

n by p input matrix.

A

a vector of n entries coded 1 and -1 for the treatment assignments.

R

a vector of outcome variable, larger is more desirable.

w0

Inital estimate for the coefficients from psi_Init or can be provided by the user.

tau

tuning parameter for the loss function in psi-Learn

kappa

tunning parameter to control the complexity of the decision function.

maxit

maximum iterations

tol

tolerance error bound

kernel

kernel function for psi-Learning, can be 'linear' or 'rbf' (radial basis kernel), default is 'linear'.When 'rbf' is specified, one can specify the sigma parameter for rbf kernel.

sigma

when using the rbf kernel, the bandwidth parameter for 'rbf' kernel, default is 0.5.

res

Whether to estimate the residual as the outcome for interaction effect, default is FALSE

Value

It returns the estimated coefficients in the decision funcion and the fitted value

w

the coefficent for the decision function, if in the linear case it is p-dimension and if in the rbf kernel case, it is n-dimension.

bias

the intercept in both the linear case and the kernel case.

fit

a vector of estimated values for \hat{f(x)} in training data, in the linear case it is fit=bias+X*w and in the kernel case fit=bias+K(X,X)w.

Author(s)

MingyangLiu <liux3941@umn.edu>

See Also

psi_Init

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
          n=100;p=5
          X=replicate(p,runif(n, min = -1, max = 1))
          A=2*rbinom(n, 1, 0.5)-1
          T=cbind(rep(1,n,1),X)%*%c(1,2,1,0.5,rep(0,1,p-3))
          T0=(cbind(rep(1,n,1),X)%*%c(0.54,-1.8,-1.8,rep(0,1,p-2)))*A
          R=as.vector(rnorm(n,mean=0,sd=1)+T+T0)
          w0.Linear=psi_Init(X,A,R,kernel='linear')
          psi_Linear<-psiITR(X,A,R,w0.Linear,tau=0.1,kappa=0.5,maxit=100,tol=1e-4,kernel='linear')
          w0.rbf=psi_Init(X,A,R,kernel='rbf')
          sigma=Sig_est(X,A)
          psi_rbf<-psiITR(X,A,R,w0.rbf,tau=0.1,kappa=0.1,maxit=100,tol=1e-4,kernel='rbf',sigma=sigma)

mylzwq/psi-learning-for-ITR documentation built on May 15, 2019, 1:18 p.m.