Continue Sampling

Share:

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

1
2
continue(object, cores = NULL, combine = FALSE,
  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?

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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(samples(a, combine = FALSE))

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.