line_confint | R Documentation |
Search for the smallest/largest value of a particular coefficient where the null hypothesis of the coefficient being equal to that value is not rejected.
line_confint( index, endogeneous = TRUE, beta_null = NULL, stopping_tolerance = NULL, width_ratio = 1, step_size = NULL, step_rate = 0.5, cores = 2, log_dir = NULL, log_name = "line_search.csv", remove_intermediate_csvs = FALSE, return_setup = FALSE, p_val_tol = 1e-06, small_change_count_tol = 10, alpha = 0.1, Y, X, D, Z, Phi = linear_projection(D, X, Z), tau, B = NULL, orthogonalize_statistic = FALSE, homoskedasticity = FALSE, kernel = "Powell", residuals = NULL, show_progress = TRUE, print_test_stat_results = TRUE, initial_TimeLimit = NULL, initial_globalTimeLimit = Inf, save_log = FALSE, ... )
index |
Index of the coefficient of interest
(numeric between 1 and p_D if |
endogeneous |
If TRUE (default), |
beta_null |
Initial value of line search; suggested value is given by
|
stopping_tolerance |
Smallest step size before stopping the line
search; if NULL (default), takes on the value of |
width_ratio |
Determines the relationship between the size of naive
confidence interval and default value of |
step_size |
Initial step size of line search; if NULL(default), use half the width of the naive confidence interval (numeric) |
step_rate |
Rate at which we decrease the step size when we cross the border of the confidence interval; defaults to 0.5 (numeric, less than 1) defaults to 1 (numeric) |
cores |
Number of cores to be used in parallelization process; defaults to 2 (no more than 2 needed) |
log_dir |
Path of log directory to store parallelized results; if NULL (default), log is not saved (string) |
log_name |
Name of CSV file (including extension) to store results; defaults to "gridsearch_results.csv" (string) |
remove_intermediate_csvs |
If TRUE, intermediate csvs created during while loop will be removed after line search is finished; defaults to FALSE |
return_setup |
If TRUE, return the step size and naive quantile regression summary without carrying out the line search; defaults to FALSE |
p_val_tol, small_change_count_tol |
If the change in p-value is less
than |
alpha |
Alpha level of the test; defaults to 0.1; only used when
|
Y |
Dependent variable (vector of length n) |
X |
Exogenous variable (including constant vector) (n by p_X matrix) |
D |
Endogenous variable (n by p_D matrix) |
Z |
Instrumental variable (n by p_Z matrix) |
Phi |
Transformation of X and Z to be used in the program; defaults to the linear projection of D on X and Z (matrix with n rows) |
tau |
Quantile (number between 0 and 1) |
B |
Matrix that enters numerator of test statistic (n by |J| + |K| matrix); If NULL (default), this matrix is (Phi_J, X_K), where Phi_J and X_K are the columns of Phi and X with indices J and K; |
orthogonalize_statistic |
If TRUE, \tilde{B} will be used in numerator of test statistic; defaults to FALSE; for advanced users only |
homoskedasticity |
If TRUE, assume density of error at 0 is constant; defaults to FALSE (boolean) |
kernel |
Only active if |
residuals |
Residuals from IQR MILP program; if NULL (default), use residuals from short-iqr regression |
show_progress |
If TRUE (default), sends progress messages during
execution (boolean); also passed to |
initial_TimeLimit |
Time limit (in sec) for each iteration of preprocessing in the computation of initial test-statistic; defaults to heuristic (scalar) |
initial_globalTimeLimit |
Time limit (in sec) for computation of initial test-statistic; defaults to Inf (scalar) |
save_log |
If TRUE, save log files from Gurobi programs in
|
... |
Arguments passed to |
The suggested value of beta_null
is given by the output of
iqr_milp
or preprocess_iqr_milp
. For example, if index
is 2, endogeneous
is TRUE, and the iqr_milp
estimates are
stored in iqr
, then iqr$beta_D[2]
should be the value of
beta_null
.
The time limit for computing the test-statistic at each step of the line search code is twice as long as the time it takes to compute the initial test statistic. If the time limit is too restrictive thereby ending the computation of the test-statistic too early, we skip the step and move a bit forward in the line search code and temporarily increase the time limit for this new step.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.