continue: Continue Sampling

Description Usage Arguments Value See Also Examples

View source: R/BAMLSS.R

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 = 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

 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)

bamlss documentation built on May 31, 2017, 3:41 a.m.