Description Usage Arguments Details Value Examples
View source: R/glmnet_dispatch.R
Helper function that dispatches to glmnet for the post-double estimation.
1 2 3 |
X |
A matrix of covariates (must be all numeric) |
Y |
A vector of the target variable, of same length as the number of rows of Y, must be numeric |
W |
A vector of the treatment variable, of same length as the number of rows of X, must be numeric |
Z.trans |
A logical value indicating whether to standardize inputs, defaults to TRUE |
cv.steps |
The number of folds for k-fold cross-validation of the hyperparameter tuning, defaults to 100 |
parallelize |
Whether to run the simulations in parallel, using every available core. Defaults to FALSE. |
cores.to.use |
The number of cores to use. If NULL (the default), uses the maximum number of cores detected by detectCores. |
lambda.set.Y |
Allows the user to specify lambda for the Y model, defaults to null. |
lambda.set.W |
Allows the user to specify lambda for the W model, defaults to null. |
This function does not support the full range of arguments to glmnet, intentionally. If you need something specific please refer to custom_generator.
A list with two elements: The fitted W model and the fitted Y model.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.