Usage
rhoLvfree(Y, W_SR, rho_max = 10, rho_init = "PML", sd_rho_init = "PML", site_order = NULL, dprior = function(x){stats::dunif(x,0,rho_max)}, epsilon = 0.001, update_epsilon = 1,
n.sample = 2500, iter_max = 3, burn_in = round(0.25 * n.sample), thin = 1,
n.chain = 1, verbose = 3, cpus = 1, export.coda = TRUE)
Arguments
Y
a matrix containing the observations (by rows) for the various groups (by columns). REQUIRED.
W_SR
the local neighbourhood matrix. dgCMatrix. Should be normalized by row (i.e. rowSums(W_SR)=1
). REQUIRED.
rho_max
maximum possible rho value, minimum is 0. double.
rho_init
the initial rho value. double. If NULL
, it is sample in a uniform law between 0 and rho_max
sd_rho_init
the standard deviation of the rho value for the proposal distribution. double. It is updated at the end of the burn in.
site_order
a specific order to go all over the sites. Can be NULL
or an integer vector.
dprior
the prior distribution. function. Must be a density function between 0 and rho_max
.
epsilon
the tolerance parameter regulating the acceptance of the parameter. double.
update_epsilon
if over 1 the value by which the epsilon parameter is devided every 5% of the total iterations, if under one the acceptance rate to reach. double.
n.sample
the number of iterations of the Gibbs sampler. integer.
iter_max
the number of Gibbs move for each simulation. integer.
burn_in
the number of iteration of the burn in phase. integer.
thin
the thinning interval between consecutive observations. integer.
n.chain
the number of chain to use. integer.
verbose
how should the execution of the function should be traced ? 1 traces display the initialization and the final result, 2
traces every 5% of the total iterations and 3
also displays the update performed every 5%.
cpus
the number of CPU to use. integer.
export.coda
should the results be convert to the mcmc format of the coda package ? logical.