- formula
- A formula using the syntax of the lm() function. However, due to identifiability 
issues covariates are not allowed. So the only elements allowed on the right side
of the formula are an intercept term and an offset term using the offset() 
function. The response variable and the offset (if specified) should be vectors 
of length (KN)*1, where K is the number of spatial units and N is the number of 
time periods. Each vector should be ordered so that the first K data points are 
the set of all K spatial locations at time 1, the next K are the set of spatial 
locations for time 2 and so on. 
- family
- One of either "binomial" or"poisson", which respectively specify a binomial 
likelihood model with a logistic link function, or a Poisson likelihood model 
with a log link function. 
- data
- An optional data.frame containing the variables in the formula. 
- trials
- A vector the same length and in the same order as the response containing the 
total number of trials for each area and time period. 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. 
- n.sample
- The number of MCMC samples to generate. 
- thin
- The level of thinning to apply to the MCMC samples to reduce their temporal 
autocorrelation. Defaults to 1 (no thinning). 
- trends
- A vector containing the temporal trend functions to include in the model, which 
include: constant ("Constant""); linear decreasing ("LD"); linear increasing 
("LI"); Known change point, where the trend can increase towards the change point 
before subsequently decreasing ("CP"); or decrease towards the change point before 
subsequently increasing ("CT"); and monotonic cubic splines which are decreasing 
("MD") or increasing ("MI"). At least two trends have to be selected, with the 
constant trend always included. To avoid identifiability problems only one of "LI" 
or "MI" can be included at a given time (similarily for "LD" and "MD"). 
- changepoint
- A scalar indicating the position of the change point should one of the change point 
trend functions be included in the trends vector, i.e. if "CP" or "CT" is specified. 
- knots
- A scalar indicating the number of knots to use should one of the monotonic cubic 
splines trend functions be included in the trends vector, i.e. if "MD" or "MI" is 
specified. 
- 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.mean.gamma
- A vector of prior means for the temporal trend parameters (Gaussian priors are 
assumed). Defaults to a vector of zeros. 
- prior.var.gamma
- A vector of prior variances for the temporal trend parameters (Gaussian priors 
are assumed). Defaults to a vector with values 100,000. 
- prior.lambda
- A vector of prior samples sizes for the Dirichlet prior controlling the 
probabilities that each trend function is chosen. The vector should be the same 
length as the trends vector and defaults to a vector of ones. 
- prior.tau2
- The prior shape and scale in the form of c(shape, scale) for an Inverse-Gamma(shape, scale) 
prior for the random effect variances tau2. Defaults to c(1, 0.01). 
- Nchains
- The number of parallel Markov chains to be used in the Metropolis coupled Markov 
chain Monte Carlo (MCMCMC) simulations. Defaults to 4. 
- verbose
- Logical, should the function update the user on its progress.