- formula
A formula for the covariate part of the model using the syntax of the
lm() function. Offsets can be included here using the offset() function. The
response, offset and each covariate is a vector of length K*1. The response can
contain missing (NA) values.
- formula.omega
A one-sided formula object with no response variable (left side of the "~")
needed, specifying the covariates in the logistic regression model for
modelling the probability of an observation being a structural zero. Each
covariate (or an offset) needs to be a vector of length K*1. Only required for
zero-inflated Poisson models.
- family
One of either "binomial", "gaussian", "poisson" or "zip", which respectively
specify a binomial likelihood model with a logistic link function,
a Gaussian likelihood model with an identity link function, a Poisson likelihood
model with a log link function, or a zero-inflated Poisson model with a log link
function.
- data
An optional data.frame containing the variables in the formula.
- trials
A vector the same length as the response containing the total number of trials
for each area. Only used if family="binomial".
- W
A non-negative K by K neighbourhood matrix (where K is the number of
spatial units). Typically a binary specification is used, where the jkth
element equals one if areas (j, k) are spatially close (e.g. share a common
border) and is zero otherwise. The matrix can be non-binary, but each row must
contain at least one non-zero entry.
- burnin
The number of MCMC samples to discard as the burn-in period in each chain.
- n.sample
The overall number of MCMC samples to generate in each chain.
- thin
The level of thinning to apply to the MCMC samples in each chain to reduce their
autocorrelation. Defaults to 1 (no thinning).
- n.chains
The number of MCMC chains to run when fitting the model. Defaults to 1.
- n.cores
The number of computer cores to run the MCMC chains on. Must be less than or
equal to n.chains. Defaults to 1.
- prior.mean.beta
A vector of prior means for the regression parameters beta (Gaussian priors are
assumed). Defaults to a vector of zeros.
- prior.var.beta
A vector of prior variances for the regression parameters beta (Gaussian priors
are assumed). Defaults to a vector with values 100,000.
- prior.nu2
The prior shape and scale in the form of c(shape, scale) for an Inverse-Gamma(shape, scale)
prior for nu2. Defaults to c(1, 0.01) and only used if family="Gaussian".
- prior.tau2
The prior shape and scale in the form of c(shape, scale) for an Inverse-Gamma(shape, scale)
prior for tau2. Defaults to c(1, 0.01).
- prior.mean.delta
A vector of prior means for the regression parameters delta (Gaussian priors are
assumed) for the zero probability logistic regression component of the model.
Defaults to a vector of zeros. Only used if family="multinomial".
- prior.var.delta
A vector of prior variances for the regression parameters delta (Gaussian priors
are assumed) for the zero probability logistic regression component of the model.
Defaults to a vector with values 100,000. Only used if family="multinomial".
- rho
The value in the interval [0, 1] that the spatial dependence parameter rho is
fixed at if it should not be estimated. If this arugment is NULL then rho is
estimated in the model.
- MALA
Logical, should the function use Metropolis adjusted Langevin algorithm
(MALA) updates (TRUE, default) or simple random walk updates (FALSE) for
the regression parameters. Not applicable if family="gaussian".
- verbose
Logical, should the function update the user on its progress.