first_approach_v4: Propose subsamples

View source: R/mcmc-subsample-archive.R

first_approach_v4R Documentation

Propose subsamples

Description

Propose observations, one at a time, until we have enough to create a subsample. Note that observations inside the active basis will be inside the final subsample. Unlike the original first_approach, I am replacing the exponential function with the reciprocal.

Usage

first_approach_v4(
  Y,
  X,
  D,
  Z,
  Phi = linear_projection(D, X, Z),
  tau,
  h,
  subsample_size,
  beta_D_proposal = NULL,
  beta_X_proposal = NULL,
  gamma = 1,
  l_norm = 1,
  l_power = l_norm
)

Arguments

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)

tau

Quantile (numeric)

h

Indices of active basis (vector of length p_X + p_Phi)

subsample_size

Size of subsample (numeric at most n)

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

gamma, l_norm, l_power

Hyperparameters

Value

Named list

  1. subsample_set: set of indices in subsample

  2. subsample_weights: set of weights for each observation in subsample

  3. prob: probability of proposing subsample_set (except for observations already in active basis)

  4. log_prob: log of prob

  5. xi: xi vector for this subsample


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