Usage
ebsglmm(formula, family = c("gaussian", "binomial", "poisson", "Gamma",
"GEV.binomial", "GEVD.binomial", "Wallace.binomial"), data, weights, subset,
atsample, parskel, paroptim, corrfcn = c("matern", "spherical",
"powerexponential"), Nout, Nthin = 1, Nbi = 0, Npro, Nprt = 1,
Nprb = 0, betm0, betQ0, ssqdf, ssqsc, zstart, dispersion = 1,
bfsize1 = 0.8, reference = 1, bfmethod = c("RL", "MW"),
transf = FALSE, useCV = TRUE, longlat = FALSE, control = list(),
verbose = TRUE)
Arguments
formula
A representation of the model in the form
response ~ terms
. The response must be set to NA
's
at the prediction locations (see the example in
mcsglmm
for how to do this using
family
The distribution of the data. The
"GEVbinomial"
family is the binomial family with link the
GEV link (see Details).
data
An optional data frame containing the variables in the
model.
weights
An optional vector of weights. Number of replicated
samples for Gaussian and gamma, number of trials for binomial,
time length for Poisson.
subset
An optional vector specifying a subset of
observations to be used in the fitting process.
atsample
A formula in the form ~ x1 + x2 + ... + xd
with the coordinates of the sampled locations.
parskel
A data frame with the components "linkp", "phi",
"omg", and "kappa", corresponding to the link function, the
spatial range, the relative nugget, and the spatial smoothness
parameters. The latter can be omitted if not used in the
correlation function. Let
paroptim
A named list with the components "linkp", "phi",
"omg", "kappa". Each component must be numeric with length 1, 2,
or 3 with elements in increasing order but for the binomial family
linkp is also allowed to be the character "logit" and "probit". If
its len
corrfcn
Spatial correlation function. See Details.
Nout
A scalar or vector of size k. Number of MCMC samples
to take for each run of the MCMC algorithm for the estimation of
the Bayes factors. See argument parskel
.
Nthin
A scalar or vector of size k. The thinning of the
MCMC algorithm for the estimation of the Bayes factors.
Nbi
A scalar or vector of size k. The burn-in of the MCMC
algorithm for the estimation of the Bayes factors.
Npro
A scalar. The number of Gibbs samples to take for
estimation of the conjugate parameters and for prediction at the
unsampled locations while the other parameters are fixed at their
empirical Bayes estimates.
Nprt
The thinning of the Gibbs algorithm for the estimation
of the conjugate parameters and for prediction.
Nprb
The burn-in of the Gibbs algorithm for the estimation
of the conjugate parameters and for prediction.
betm0
Prior mean for beta (a vector or scalar).
betQ0
Prior standardised precision (inverse variance)
matrix. Can be a scalar, vector or matrix. The first two imply a
diagonal with those elements. Set this to 0 to indicate a flat
improper prior.
ssqdf
Degrees of freedom for the scaled inverse chi-square
prior for the partial sill parameter.
ssqsc
Scale for the scaled inverse chi-square prior for the
partial sill parameter.
zstart
Optional starting value for the MCMC for the GRF.
This can be either a scalar, a vector of size n where n is the
number of sampled locations, or a matrix with dimensions n by k
where k is the number of the skeleton points in parskel
.
dispersion
The fixed dispersion parameter.
bfsize1
A scalar or vector of length k with all integer
values or all values in (0, 1]. How many samples (or what
proportion of the sample) to use for estimating the Bayes factors
at the first stage. The remaining sample will be used for
estimating the Bayes fact
reference
An integer between 1 and k. Which model to be
used as a reference, i.e. the one that goes in the denominator of
the Bayes factors.
bfmethod
Which method to use to calculate the Bayes
factors: Reverse logistic or Meng-Wong.
transf
Whether to use the transformed sample mu for the
computations. Otherwise it uses z.
useCV
Whether to use control variates for finer
corrections.
longlat
How to compute the distance between locations. If
FALSE
, Euclidean distance, if TRUE
Great Circle
distance. See spDists
. control
A list of control parameters for the optimisation.
See optim
. verbose
Whether to print messages when completing each
stage on screen.