iqr_milp | R Documentation |
Solve a mixed integer linear program to compute the inverse quantile regression estimator.
iqr_milp( Y, X, D, Z, Phi = linear_projection(D, X, Z), tau, O_neg = NULL, O_pos = NULL, M = NULL, TimeLimit = 300, VarHintVal_bool = FALSE, VarHintPri_bool = FALSE, BranchPriority_bool = FALSE, sparse = TRUE, attributes = list(), params = list(FeasibilityTol = 1e-06, LogToConsole = 0), start_method = NULL, start = NULL, fix = NULL, quietly = TRUE, show_progress = TRUE, LogFileName = "", LogFileExt = ".log" )
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) |
O_neg, O_pos |
Indices for residuals whose sign is fixed to be negative and positive, respectively (vectors) |
M |
A large number that bounds the absolute value of the residuals (a positive number); defaults to 2 times the largest absolute residual from quantile regression of Y on X and D |
TimeLimit |
Maximum time (in seconds) spent on a linear program;
defaults to 300, will be appended to |
VarHintVal_bool |
If TRUE, instead of fixing the binary variables as
determined by |
VarHintPri_bool |
If TRUE, we specify the strength of the "hints"
according to the magnitude of the residual from a naive QR;
only valid if VarHintVal_bool is TRUE; overrides |
BranchPriority_bool |
If TRUE, we specify which variables will be branched on first according to the magnitude of the residual from a naive QR; defaults to FALSE; see https://www.gurobi.com/documentation/9.1/refman/branchpriority.html |
sparse |
If TRUE (default), use sparse matrices |
attributes |
named list of Gurobi attributes, see https://www.gurobi.com/documentation/9.1/refman/attributes.html and https://www.gurobi.com/documentation/9.1/refman/the_model_argument.html; defaults to empty list |
params |
Gurobi parameters, see https://www.gurobi.com/documentation/9.1/refman/parameter_descriptions.html |
start_method |
Feed into |
start |
Gurobi attribute, see
https://www.gurobi.com/documentation/9.1/examples/mip_starts.html; If
NULL (default), no starting solution will be provided; see |
fix |
Fix decision variables; If NULL (default), no starting solution will be provided; if NA, the respective decision variable won't be fixed; decision variables are:
|
quietly |
If TRUE (default), supress messages during execution (boolean) |
show_progress |
If TRUE (default), sends progress messages during execution (boolean) |
LogFileName |
Name of Gurobi log file; If string is empty (default), Gurobi log won't be saved (string) |
LogFileExt |
Extension of Gurobi log file; If |
A named list of
iqr: Gurobi model that was solved
params: Gurobi parameters used
result: solution to MILP returned by Gurobi
status: status of Gurobi's solution
beta_X: coefficients on exogenous variables
beta_Phi_plus: positive part of coefficients on instruments
beta_Phi_minus: negative part of coefficients on instruments
beta_D: coefficients on endogenous variables
u: positive part of residuals
v: negative part of residuals
a: dual variable
k: binary variable associated with u
l: binary variable associated with v
beta_Phi: coefficients on instruments (beta_Phi_plus - beta_Phi_minus)
resid: residuals (u - v)
objval: value of objective function (absolute value of beta_Phi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.