find_subsample_in_polytope: Find subsample in the FOC polytope

View source: R/foc-center-archive.R

find_subsample_in_polytopeR Documentation

Find subsample in the FOC polytope

Description

It is useful to start our random walk at a subsample that is inside the FOC polytope. To find this polytope, we solve a linear program that aims to minimize the absolute L-1 norm of the weighted average of the xi_i objects. The weights are inside the unit interval and sum to the size of our subsample. Most of the weights will be integral, but some will be between 0 and 1. We will round the non-integral solutions so they are integra. If the weight for an observaion is 1, then that observation belongs in the subsample. Otherwise, the observation doesn't belong in the subsample. Due to the rounding, it isn't guaranteed that the resulting subsample belongs in the FOC polytope, but it shouldn't be too far away from the polytope. Note that this program excludes the observations in the active basis – we must add them back in after-the-fact.

Usage

find_subsample_in_polytope(
  h,
  Y,
  X,
  D,
  Z,
  Phi = linear_projection(D, X, Z),
  tau,
  beta_D_proposal = NULL,
  beta_X_proposal = NULL,
  subsample_size,
  params = list(OutputFlag = 0),
  type = "C"
)

Arguments

h

Active basis in terms of the data provided

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 (numeric)

beta_D_proposal

Coefficients on the endogeneous variables (vector of length p_D); if NULL, use h_to_beta function and the h argument to determine beta_D_proposal

beta_X_proposal

Coefficients on the exogeneous variables (vector of length p_D); if NULL, use h_to_beta function and the h argument to determine beta_X_proposal

subsample_size

Size of subsample

params

Named list of parameters to send to Gurobi

type

Either "C" or "B" to denote if our "omega" variables are continuous or binary; If "C", then the solution is the continuous center of our FOC polytope; If "B", then the solution is the actual center


omkarakatta/ivqr documentation built on Aug. 20, 2022, 11:04 p.m.