We search over a grid of values for the elastic-net to find the optimal alpha parameter. Set alpha to NULL to find the optimal alpha value. The Elastic-Net family of regressions is estimated with `glmnet` package. Parallelization is done with the `parallel` package.

tep_enet(
  training_X,
  training_TE,
  test_X,
  alpha = 1,
  alpha_seq = seq(0, 1, by = 0.01),
  threads = 1L,
  cv_folds = 10L,
  est_seed = 1234L,
  ...
)

Arguments

training_X

A data frame of the training set features (data.frame)

training_TE

A vector of the individually estimated treatment effects (numeric)

test_X

A data frame of the test set features (data.frame)

alpha

The alpha value for the elastic net (numeric)

alpha_seq

The a vector alpha value to consider (numeric)

threads

The value of number of threads to use (integer)

cv_folds

The number of folds for the cross-validation step (integer)

est_seed

A value for CV estimation seed (integer)

...

Additional parameters to be passed to glmnet::cv.glmnet

Value

A vector of the TEP projection values for the test set (numeric)