View source: R/mcmc-subsample-archive.R
first_approach_v4 | R Documentation |
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.
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 )
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 |
beta_X_proposal |
Coefficients on the exogeneous variables (vector of
length p_D); if NULL, use |
gamma, l_norm, l_power |
Hyperparameters |
Named list
subsample_set
: set of indices in subsample
subsample_weights
: set of weights for each observation in subsample
prob
: probability of proposing subsample_set
(except
for observations already in active basis)
log_prob
: log of prob
xi
: xi vector for this subsample
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.