Description Usage Arguments Details Value Author(s) References See Also Examples
This function performs conditional simulation (by MCMC) in a generalised linear spatial model for fixed parameters.
1 2 |
geodata |
a list containing elements |
coords |
an n x 2 matrix, each row containing Euclidean
coordinates of the n data locations. By default it takes the
element |
data |
a vector with data values. By default it takes the
element |
units.m |
n-dimensional vector of observation times for the data. By default ( |
model |
defines the model components. Either an object of
class
|
mcmc.input |
input parameter for the MCMC algorithm. It can take an output from |
messages |
logical. Indicates whether or not status messages are printed on the screen (or other output device) while the function is running. |
For simulating the conditional distribution of S given y, the Langevin-Hastings algorithm with the parametrisation in Papaspilliopoulus, Roberts and Skold (2003) is used. This algorithm is a Metropolis-Hastings algorithm, where the proposal distribution uses gradient information from the log-posterior distribution.
The proposal variance (called S.scale
; see mcmc.control
)
for the algorithm needs to be scaled
such that approximately 60 percent of the proposals are accepted. We
also recommend that the user to studies plots of the autocorrelations.
A list with the following components:
simulations |
an n x n.sim matrix with n.sim being the number of MCMC simulations. containing S_i. Each column corresponds to a conditional simulation of the conditional distribution of S_i at the data locations. |
acc.rate |
matrix with acceptance rates from MCMC. Only returned when no prediction locations are given. |
model |
Information about the model parameters, link function and error distribution family used. |
geodata |
Information about the data. |
call |
the function call. |
Ole F. Christensen OleF.Christensen@agrsci.dk,
Paulo J. Ribeiro Jr. Paulo.Ribeiro@est.ufpr.br.
O. Papaspiliopoulus and G. O. Roberts and M. Skold (2003). Non-centered parameterizations for hierarchical models and data augmentation. Bayesian statistics 7 (eds. J. M. Bernardo, S. Bayarri, J. O. Berger, A. P. Dawid, D. Heckerman, A. F. M. Smith and M. West), Oxford University Press, 307-326.
Further information about geoRglm can be found at:
http://gbi.agrsci.dk/~ofch/geoRglm.
binom.krige
for prediction with fixed parameters in the
Binomial-normal model, pois.krige
for prediction with fixed parameters in the
Poisson normal model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | if(!exists(".Random.seed", envir=.GlobalEnv, inherits = FALSE)) set.seed(1234)
data(b50)
test <- glsm.mcmc(b50, model = list(family="binomial",
cov.pars = c(1,1), beta = c(1,0), trend =~ rnorm(50),
cov.model="spherical", nugget=0.3),
mcmc.input = mcmc.control(S.scale = 0.2, thin = 1))
## visulalising the MCMC output using the coda package
test.coda <- create.mcmc.coda(test, mcmc.input = list(thin = 1))
library(coda)
## Not run:
plot(test.coda)
autocorr.plot(test.coda)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.