Description Usage Arguments Value Author(s) Examples
Return the psi-learning models with best tuning parameters.
1 |
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 |
kernel function used in the decision function |
sigma |
bindwidth for 'rbf' kernel it can be provided by the user, if not, it can be estimated from |
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 loss function in psi-Learn |
maxit |
number of max iteration used in |
tol |
tolerance used in |
res |
Whether to estimate the residual as the outcome for interaction effect, default is FALSE |
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 |
MingyangLiu <liux3941@umn.edu>
1 2 3 4 5 6 7 8 | 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_Linear<-cv.psiITR(X,A,R,m=5,kernel='linear',kappa.ratio=0.01,kappa.max=1.5,nkappa=10,tau=0.1,maxit=100, tol=1e-5)
cv_psi_Rbf<-cv.psiITR(X,A,R,m=5,kernel='rbf',kappa.ratio=0.01,kappa.max=1,nkappa=10,tau=0.1,maxit=100, tol=1e-5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.