spglm | R Documentation |
fit_hal
), a flexible and adaptive spline regression estimator, is recommended for medium-small to large sample sizes.spglm
Semiparametric generalized linear models for causal inference
Supports flexible semiparametric conditional average treatment effect (CATE), conditional odds ratio (OR), and conditional relative risk (RR) estimation
Highly Adaptive Lasso (HAL) (see fit_hal
), a flexible and adaptive spline regression estimator, is recommended for medium-small to large sample sizes.
spglm( formula, data, W, A, Y, estimand = c("CATE", "OR", "RR"), learning_method = c("HAL", "SuperLearner", "glm", "glmnet", "gam", "mars", "ranger", "xgboost"), append_interaction_matrix = TRUE, cross_fit = FALSE, sl3_Learner_A = NULL, sl3_Learner_Y = NULL, wrap_in_Lrnr_glm_sp = TRUE, HAL_args_Y0W = list(smoothness_orders = 1, max_degree = 1, num_knots = c(10, 5, 1)), HAL_fit_control = list(parallel = F), sl3_Learner_var_Y = Lrnr_glmnet$new(family = "poisson"), delta_epsilon = 0.1, verbose = TRUE, warn = TRUE, ... )
formula |
A R formula object specifying the parametric form of CATE, OR, or RR (depending on method). |
data |
A data.frame or matrix containing the numeric values corresponding with the nodes |
W |
A character vector of covariates contained in |
A |
A character name for the treatment assignment variable contained in |
Y |
A character name for the outcome variable contained in |
estimand |
Estimand/parameter to estimate. Choices are:
'CATE': Estimate conditional average treatment effect with |
learning_method |
Machine-learning method to use. This is overrided if argument |
append_interaction_matrix |
Default: TRUE. This argument is passed to |
cross_fit |
Whether to cross-fit the initial estimator. This is always set to FALSE if argument |
sl3_Learner_A |
A |
sl3_Learner_Y |
A |
wrap_in_Lrnr_glm_sp |
Mostly for internal use (should be TRUE usually). Whether |
HAL_args_Y0W |
A list of parameters for the semiparametric Highly Adaptive Lasso estimator for E[Y|A=0,W].
Possible parameters are:
1. 'smoothness_orders': Smoothness order for HAL estimator of E[Y|A=0,W] (see |
HAL_fit_control |
See the argument 'fit_control' of (see |
sl3_Learner_var_Y |
A |
delta_epsilon |
Step size of iterative targeted maximum likelihood estimator. 'delta_epsilon = 1 ' leads to large step sizes and fast convergence. 'delta_epsilon = 0.005' leads to slower convergence but possibly better performance. Useful to set to a large value in high dimensions. |
... |
Not used |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.