HDCATE_R6Class {hdcate} | R Documentation |
High-Dimensional Conditional Average Treatment Effects (HDCATE) Estimator
Description
Use a two-step procedure to estimate the conditional average treatment effects (CATE) for all possible values of the covariate(s).
Format
R6::R6Class object.
Methods
Public methods
Method new()
Usage
HDCATE_R6Class$new(data, y_name, d_name, x_formula)
Method propensity_hd_estimate()
Usage
HDCATE_R6Class$propensity_hd_estimate(data = NA, verbose = F)
Method conditional_expectations_hd_estimate()
Usage
HDCATE_R6Class$conditional_expectations_hd_estimate(data = NA, verbose = F)
Method first_stage()
Usage
HDCATE_R6Class$first_stage(data = NA, verbose = F)
Method second_stage()
Usage
HDCATE_R6Class$second_stage( predictor_eta_hat = NA, eta_hat = NA, subsample_idx = NULL, local_weight = NULL, estimate_std = TRUE, verbose = FALSE, save_model = TRUE )
Method get_bw()
Usage
HDCATE_R6Class$get_bw(phi, use_sample_idx)
Method fit()
Fit the HDCATE function
Usage
HDCATE_R6Class$fit(verbose = FALSE)
Returns
estimated HDCATE
Method inference()
Usage
HDCATE_R6Class$inference( sig_level = 0.01, boot_method = "normal", n_rep_boot = 1000, verbose = FALSE )
Method plot()
Plot the results.
Usage
HDCATE_R6Class$plot( output_pdf = FALSE, pdf_name = "hdcate_plot.pdf", include_band = TRUE, test_side = "both", y_axis_min = "auto", y_axis_max = "auto", display.hdcate = "HDCATEF", display.ate = "ATE", display.siglevel = "sig_level" )
Arguments
output_pdf
if
TRUE
, save image to a pdf file named aspdf_name
pdf_name
the name of the output PDF file
include_band
if
TRUE
, plot uniform confidence bands as well.test_side
'both'
for a 2-sided test,'left'
for a left-sided test or'right'
for a right-sided testy_axis_min
the lowest value plotted in Y axis, the default is
'auto'
y_axis_max
the largest value plotted in Y axis, the default is
'auto'
display.hdcate
the name of HDCATE function in the legend, the default is 'HDCATEF'
display.ate
the name of average treatment effect in the legend, the default is 'ATE'
display.siglevel
the name of the significant level for confidence bands in the legend, the default is 'sig_level'
Method get_confidence_bands()
Usage
HDCATE_R6Class$get_confidence_bands(test_side = "both")
Method draw_weights()
Usage
HDCATE_R6Class$draw_weights(method, n_rep_boot, n_obs)
Method set_condition_var()
Usage
HDCATE_R6Class$set_condition_var(name = NA, min = NA, max = NA, step = NA)
Method clone()
The objects of this class are cloneable with this method.
Usage
HDCATE_R6Class$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.