foc_membership_v2: Verify membership of a data set in the FOC conditions

View source: R/foc_membership.R

foc_membership_v2R Documentation

Verify membership of a data set in the FOC conditions

Description

If a data set satisfies the FOC conditions with respect to some active basis, then a quantile regression of the concentrated-out outcome using the endogeneous coefficients given by the active basis on the covariates and the transformed instruments should be 0.

Usage

foc_membership_v2(
  h,
  Y_subsample,
  X_subsample,
  D_subsample,
  Phi_subsample,
  tau,
  beta_D = h_to_beta(h, Y = Y_subsample, X = X_subsample, D = D_subsample, Phi =
    Phi_subsample)$beta_D,
  tolerance = 1e-09
)

Arguments

h

Indices of the active basis written in terms of the subsample data (p-dimensional vector)

Y_subsample

Outcome vector in the subsample (m by 1 matrix)

X_subsample

Covariates in subsample (m by p_X matrix)

D_subsample

Endogeneous variables in subsample (m by p_D matrix)

Phi_subsample

Transformed instruments in subsample (m by p_Phi)

tau

Quantile (numeric)

beta_D

Coefficients on the endogeneous variable; ideally obtained from h (p_D by 1 matrix)

Value

Named list

  1. status: TRUE if subsample satisfies FOC conditions; FALSE otherwise

  2. beta_Phi: coefficients on transfomed instruments when running a QR of Y - D %*% beta_D on X and Phi, where beta_D is given by h

  3. norm: L1 norm of beta_Phi

See Also

Other mcmc_subsampling: foc_membership(), h_to_beta()


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