Fit a Restricted Spatial Frailty model using BUGS

rsfm_mcmc(model, data, inits, parameters, covariates, area,
                 proj = "none", fast = TRUE, nsamp = 1000, burnin = 5000, lag = 10, ...)

Arguments

model

character with the model in text format.

data

a data frame or list containing the variables in the model.

inits

initial values for the chain.

parameters

vector of parameters names to restore.

covariates

vector of covariates names.

area

areal variable name in data.

proj

"none" or "rhz".

fast

set TRUE, to use the reduction operator.

nsamp

number of samples. Default = 1000.

burnin

burn-in size.

lag

lag parameter.

...

other parameters used in ?R2OpenBUGS::bugs

Value

$unrestricted

A list containing

  • $sample: a sample of size nsamp for all parameters in the model

  • $summary_fixed: summary measures for the coefficients

  • $summary_hyperpar: summary measures for hyperparameters

  • $summary_random: summary measures for random quantities

$restricted

A list containing

  • $sample: a sample of size nsamp for all parameters in the model

  • $summary_fixed: summary measures for the coefficients

  • $summary_hyperpar: summary measures for hyperparameters

  • $summary_random: summary measures for random quantities

$out

BUGS output

$time

time elapsed for fitting the model