RICWL: RICWL, robust confidence index weighted learning functions.

Description Usage Arguments Examples

View source: R/RICWL.R

Description

This is confidence index weighted learning that takes patient's characteristic X, treatment A and outcome Y and estimate an optimal individual treament rule.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
RICWL(
  H,
  A,
  R2,
  pi = rep(0.5, n),
  kernel = "rbf",
  pentype = "lasso",
  XS = NULL,
  sigma,
  cpar,
  theta,
  frac.par = 0.5,
  method = "cos",
  m = 10,
  e = 1e-05
)

Arguments

H:

n by P feature matrix

A:

treatment, takes value -1 and +1 with size n

R2:

outcome or residual vector with length n

pi:

propensity score with length n, when RCT, it shoud be set as 0.5 for each subject

kernel:

kernel used in SVM

pentype:

penalty in the residual estimation process, useful or RWL only

XS:

variable used in similarity calculation, if not provided, use all features

sigma:

hyper-parameter in SVM rbf kernel

cpar:

hyper-parameter in SVM rbf kernel

theta:

hyper-parameter governing the definition of neighborhood. It's the quantile probability for similarity

frac.par:

if "frac" similarity is used, then provide this fraction parameter, ranges from 0-1

method:

either "cos" or "frac" for similarity definition

m:

number of fold for cross validation in parameter tunning, default is 10

e:

least tolerated error, default is 1e-5

Examples

1
2
3
4
5
6
7
n = 200
p = 5
H = matrix(rnorm(n*p), nrow=n)
A = rbinom(n=n, size=1, prob=0.5)*2 - 1
R2 = 4*H[,1]^2 + A*(H[,2]^2 + H[,4]^2 < 1.5) + rcauchy(n)
fit = RICWL(H, A, R2)
optimalITR_pred = predict(fit, H)

sambiostat/RICWL documentation built on Dec. 31, 2020, 3:17 a.m.