mcmc_bin_metropolis.RdPerform MCMC with Metropolis Hastings algorithm
mcmc_bin_metropolis(y, X, nsim, burnin, lag, inv_link_f, type, sample_c, sample_d, sigma_beta, a_c, b_c, a_d, b_d, a_lambda, b_lambda, var_df, var_c, var_d, var_lambda, p_c, p_d, p_prop, p_beta, p_df, p_lambda, const, const_beta, const_c, const_d, const_df, const_lambda)
| y | Bernoulli observed values |
|---|---|
| X | Covariate matrix |
| nsim | Sample size required for MCMC |
| burnin | Burn in for MCMC |
| lag | Lag for MCMC |
| inv_link_f | Inverse link function |
| type | "logit", "probit", "cauchit", "robit", "cloglog" or "loglog" |
| sample_c | Should c be sampled? |
| sample_d | Should c be sampled? |
| sigma_beta | Variance of beta prior |
| a_c | Shape1 for c prior |
| b_c | Shape2 for c prior |
| a_d | Shape1 for d prior |
| b_d | Shape2 for d prior |
| a_lambda | Inferior limit for lambda |
| b_lambda | Superior limit for lambda |
| var_df | Variance to sample 1-exp(-df/const) |
| var_c | Variance to sample from c (if sample_d = TRUE) otherwise log(c/(1-c)) |
| var_d | Variance to sample d (if sample_c = TRUE) otherwise log(c/(1-c)) |
| var_lambda | Variance to sample lambda |
| p_c | To restore c |
| p_d | To restore d |
| p_prop | To restore p |
| p_beta | To restore beta |
| p_df | To restore df |
| p_lambda | To restore lambda |
| const | A constant to help on sampling degrees of freedom \(\tilde{df} = df/c\) |
| const_beta | A constant to tunning the acceptance rate (default = 2.38^2) |
| const_c | A constant to tunning the acceptance rate (default = 2.38^2) |
| const_d | A constant to tunning the acceptance rate (default = 2.38^2) |
| const_df | A constant to tunning the acceptance rate (default = 2.38^2) |
| const_lambda | A constant to tunning the acceptance rate (default = 2.38^2) |
Chains of all parameters