cv.psiITRVS: Cross validation for psiLearn learning with variable...

Description Usage Arguments Value Author(s) Examples

View source: R/cv.psiVS.R

Description

Return the psi-learning models with best tuning parameters.

Usage

1
cv.psiITRVS(X,A,R,m=5,kernel='linear',kappa.ratio=0.01,kappa.max=1,nkappa=10,tau=0.1,lambda.ratio=0.1,lambda.max=2,nlam=10,tau2=0.2,maxit=100,tol=1e-5,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.

m

m-folds cross validation

kernel

the kernel used in the decision, here we only use the linear kernel.

kappa.ratio

the ratio between the max kappa and the min kappa which controls the complexity of the decision function.

kappa.max

max kappa in the tunning parameter seq.

nkappa

num of kappa for grid search.

tau

tuning parameter for the ridge penalty in psi-Learning.

lambda.ratio

the ratio between the max lambda and the min lambda which controls the complexity of the decision function in the TLP penalty.

lambda.max

max lambda in the tunning parameter seq

nlam

num of kappa for grid search

tau2

tunning parameter to control the margin used in TLP penalty,default is 0.2

maxit

number of max iteration used in psiITR

tol

tolerance used in psiITR

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 after cross validation

w

the coefficent for the decision function.

bias

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

sigma

if the kernel is rbf then the optimal sigma is returned

Author(s)

MingyangLiu <[email protected]>

Examples

1
2
3
4
5
6
7
          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)
          cv_psi_LinearVS<-cv.psiITRVS(X,A,R,m=5,kernel='linear',kappa.ratio=0.01,kappa.max=1,nkappa=10,tau=0.1,lambda.ratio=0.1,lambda.max=2,nlam=10,tau2=0.2,maxit=100,tol=1e-5,res=FALSE)

mylzwq/psi-learning-for-ITR documentation built on Sept. 23, 2018, 12:56 a.m.