update.krige | R Documentation |
Update the Markov chain associated with the metropolis.krige
model
## S3 method for class 'krige' update(object, n.iter, n.burnin = 0, combine = FALSE, ...)
object |
An |
n.iter |
Number of iterations for the update run. |
n.burnin |
The number of burnin iterations. Defaults to 0. |
combine |
Logical value indicate whether to combine the update run with original output. |
... |
Additional arguments passed to |
Since MCMC calculations typically need to run relatively long. This
function can continue the MCMC calculations by metropolis.krige()
.
The parameters of the original model and the estimated results from the previous
run are passed through the krige
object.
As geospatial estimation can be computationally taxing, the users may want to
preserve more iterations of the posterior samples. The combine
argument
can be used to indicate whether combine the updated run with previous results.
This includes both the posterior samples and acceptance rates.
An object of class krige
that includes the output MCMC matrix
of sampled values from the posterior distribution as well as the record of
function arguments, model frame, acceptance rates, and standing parameters.
## Not run: # Summarize Data summary(ContrivedData) # Set seed set.seed(1241060320) M <- 100 #M<-10000 contrived.run <- metropolis.krige(y ~ x.1 + x.2, coords = c("s.1","s.2"), data = ContrivedData, n.iter = M, range.tol = 0.05) summary(contrived.run) # Update run contrived.run2 <- update(contrived.run, n.iter = M, combine = TRUE) summary(contrived.run2) #plot(contrived.run2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.