mcmc_h | R Documentation |
The proposal distribution Q_beta is the asymptotic distribution of the IQR estimator limited to the finite support of possible solutions enumerated by the active basis. This MH sampler returns draws from the proposal distribution by
mcmc_h( iterations, h_opt, beta_D_opt, beta_X_opt, residuals_opt, theta, varcov_mat, Y, X, D, Phi, discard_burnin, manual_burnin = 1, unique_beta_quota = rep(0, ncol(D)), largest_min = rep(Inf, ncol(D)), smallest_max = rep(-Inf, ncol(D)), max_iterations = Inf, label_function = function(idx, total = iterations) { print(paste("MCMC-H IDX:", idx, "/", total)) }, label_skip = floor(iterations/5), label_bool = TRUE, always_accept = FALSE )
iterations |
Number of iterations |
residuals_opt |
Residuals from IQR-QR problem |
theta |
Tuning parameter |
varcov_mat |
Variance-covariance matrix |
Y, X, D, Phi |
Data |
discard_burnin |
If TRUE, remove first few samples that have the same coefficients |
unique_beta_quota |
Vector of length p_D; minimum number of unique beta (defaults to 0) |
largest_min |
Vector of length p_D; sample from MCMC must contain
beta_D below corresponding value of |
smallest_max |
Vector of length p_D; sample from MCMC must contain
beta_D above corresponding value of |
max_iterations |
Total number of iterations before stopping the
program; defaults to Inf, but set to a lower number when using |
always_accept |
If FALSE (default), sample from |
initial_h |
Initial active basis indices |
initial_beta_D, initial_beta_X |
Initial coefficients, e.g., IQR point estimate |
Proposing an active basis h_star
according to Q_h, which puts more
weight on indices with smaller residuals
Computing coefficients beta_star
(see h_to_beta
)
Computing the acceptance probability
Accept/Reject in the usual MH manner
named list
beta
: data frame where each row is a vector of coefficients (one
row per iteration)
h
: data frame where each row is a vector of indices in the active
basis (one row per iteration)
record
: binary vector, 1 if that iteration's proposal was accepted
stationary_begin
: all iterations prior to this number were discarded
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.