continue {bamlss}R Documentation

Continue Sampling

Description

This function takes a bamlss object which was created using a sampler function and continues sampling from the last state of the MCMC chain.

Usage

continue(object, cores = NULL, combine = TRUE,
  sleep = NULL, results = TRUE, ...)

Arguments

object

A bamlss object which contains samples.

cores

An integer specifying the number of cores that should be used for the sampler function. This is based on function mclapply of the parallel package.

combine

Should the new samples be combined with the old samples into one mcmc matrix? Note that if combine = FALSE and the number of iterations differ from one sampling step to the other there will be an error since the start and end points in the samples mcmc objects are different!

sleep

Time the system should sleep before the next core is started.

results

If a results function was used to create the bamlss object, should the results function be applied using the new samples?

...

Arguments passed to the sampler function.

Value

A bamlss object.

See Also

bamlss

Examples

## Not run: ## Simulate and run model with MCMC.
set.seed(123)
d <- GAMart()
b <- bamlss(num ~ s(x1) + s(x2) + s(x3) + te(lon,lat), data = d)

## Continue sampling.
a <- continue(b)

## Plot all samples.
## plot(a, which = "samples")

## End(Not run)

[Package bamlss version 1.2-4 Index]