Description Usage Arguments Value Author(s)
MCMC sampling for count regression with a constant mean, latent autocorrelated errors, and missing data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | MCMC(
response,
datadist = dpois,
antilink = exp,
beta0ini,
sigmaini = NULL,
sigCARini,
rhoini,
zini,
rhogrid,
detsig,
SigiList,
eff_mat_offset = NULL,
ind_samp,
ind_miss,
sample_sigma = FALSE,
sample_sigCAR = TRUE,
sample_rho = TRUE,
use_trunc = FALSE,
trunc_bound = NULL,
nMCMC = 1000,
n_z_iters = 10,
n_thin = 1,
samp_sd = 0.01,
miss_sd = 0.01,
beta0_sd = 0.1,
sigma_sd = 0.1,
sigCAR_sd = 0.02,
rho_indxpm = 3
)
|
response |
vector with response variable. |
datadist |
probability density function for data. It must be parameterized with a mean parameter, and a variance parameter. If there is no variance parameter, the argument must still be there, and just evaluated to NULL. |
antilink |
function to change mean (linear model) on link scale to mean for datadist distribution. |
beta0ini |
initialize beta0 |
sigmaini |
initialize sigma for datadist, if it has one. |
sigCARini |
initialize sigCAR |
rhoini |
initialize rho. It must be one of the values in rhogrid |
zini |
initialize latent autocorrelated errors z |
rhogrid |
vector of rho values for lookup table |
detsig |
vector of determinant values corresponding to rhogrid |
SigiList |
list of inverse covariances, in sparse matrix form, |
eff_mat_offset |
matrix of samples from posterior distribution for effort. Default is NULL, in which case no offset is used |
ind_samp |
vector of indexes of sampled grid cells |
ind_miss |
vector of indexes of unsampled grid cells |
sample_sigma |
Logical. Should sigma parameter be sampled (TRUE) or held at initial values (FALSE). |
sample_sigCAR |
Logical. Should sigCAR parameter be sampled (TRUE) or held at initial values (FALSE). |
sample_rho |
Logical. Should rho parameter be sampled (TRUE) or held at initial values (FALSE). |
use_trunc |
Logical. Should truncation for z (latent autocorrelated errors) be used. If true, truncated to plus and minus the log of the largest observed value. |
nMCMC |
number of MCMC samples to retain |
n_z_iters |
number of latent autocorrelated errors (z) proposals per further MCMC updating |
n_thin |
number of MCMC samples per retained MCMC sample |
samp_sd |
tuning parameter for width of independent uniform proposal for Metropolis step of sampled z-values |
miss_sd |
tuning parameter for width of independent uniform proposal for Metropolis step of missing z-values |
beta0_sd |
tuning parameter for variance of independent normal proposal for Metropolis step of beta0 |
sigma_sd |
tuning parameter for variance of independent normal proposal for Metropolis step of sigma |
sigCAR_sd |
tuning parameter for variance of independent normal proposal for Metropolis step of sigCAR |
rho_indxpm |
tuning parameter for number of adjacent grid values, plus and minus, of proposal for Metropolis/Hastings step of rho |
a list of MCMC samples of the posteriors and acceptance rates of Metropolis proposals
Jay Ver Hoef
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.