rcate.am: Robust estimation of treatment effect using additive b-spline...

Description Usage Arguments Details Value Examples

View source: R/rcate.am.R

Description

rcate.am fit additive model for robust treatment effect estimation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
rcate.am(
  x,
  y,
  d,
  method = "MCMEA",
  nknots = NA,
  lambda.smooth = 1,
  nlambda = 30,
  nfolds = 5,
  n.trees.p = 40000,
  shrinkage.p = 0.005,
  n.minobsinnode.p = 10,
  interaction.depth.p = 1,
  cv.p = 2,
  n.trees.mu = c(1:50) * 50,
  shrinkage.mu = 0.01,
  n.minobsinnode.mu = 5,
  interaction.depth.mu = 5,
  cv.mu = 5
)

Arguments

x

matrix or a data frame of predictors.

y

vector of response values.

d

vector of binary treatment assignment (0 or 1).

method

character string of CATE estimation method: "MCMEA" - modified co-variate method with efficiency augmentation or "RL" - R-learning.

nknots

number of knots for B-spline.

lambda.smooth

scalar represent the smoothness penalty lambda2. The default is 2.

nlambda

number of lambda1s for cross-validation. The default is 30.

nfolds

number of folds for cross-validation. The default is 5.

n.trees.p

tuning parameter the number of trees used for estimating propensity score with GBM. the default value is 40000.

shrinkage.p

tuning parameter the shrinkage level for estimating propensity score with GBM. the default value is 0.005.

n.minobsinnode.p

tuning parameter the minimum node size for estimating propensity score with GBM. the default value is 10.

interaction.depth.p

tuning parameter the number of interactions for estimating propensity score with GBM. the default value is 1.

cv.p

tuning parameter the number of folds in cross-validation for estimating propensity score with GBM. the default value is 2.

n.trees.mu

scalar or vector of the number of trees for estimating mean function with GBM. The default is (1:50)*50.

shrinkage.mu

tuning parameter the shrinkage level for estimating mean function with GBM. the default value is 0.01.

n.minobsinnode.mu

tuning parameter the minimum node size for estimating mean function with GBM. the default value is 10.

interaction.depth.mu

tuning parameter the number of interactions for estimating mean function with GBM. the default value is 5.

cv.mu

tuning parameter the folds for cross-validation for estimating mean function with GBM. The default value is 5.

Details

Fits a L_1 additive regression model with the group SCAD penalty.

Value

a list of components

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n <- 1000; p <- 2; set.seed(2223)
X <- as.data.frame(matrix(runif(n*p,-3,3),nrow=n,ncol=p))
tau = 3*X[,1]-2*X[,2]
p = 1/(1+exp(-X[,1]+X[,2]))
d = rbinom(n,1,p)
t = 2*d-1
y = 100+tau*t/2 + rnorm(n,0,1); set.seed(2223)
x_val = as.data.frame(matrix(rnorm(200*2,0,1),nrow=200,ncol=2))
tau_val = 3*x_val[,1]-2*x_val[,2]

fit <- rcate.am(X,y,d,lambda.smooth = 4, method = 'RL')
y_pred <- predict(fit,x_val)$pred
plot(tau_val,y_pred);abline(0,1)

rhli-Hannah/RCATE documentation built on Aug. 26, 2020, 9:40 a.m.