PeriodCPT_extend: ~~Run more MCMC samples.~~

View source: R/PeriodCPT_extend.R

PeriodCPT_extendR Documentation

~~Run more MCMC samples.~~

Description

Run more MCMC samples.

Usage

  PeriodCPT_extend(object, newiters = 1e4)

Arguments

object

An pcpt class object.

newiters

A positive integer indicating how many iterations to perform.

Details

This function provides the utility to run the with period cpt algorithm for a further newiters iterations following on from the last sample from the previous run. All previous samples will be treated as being part of the burn-in period and will be discarded.

Value

An object of class pcpt with the new chains.

Author(s)

Simon Taylor

See Also

pcpt, PeriodCPT

Examples

  set.seed(1)
  data = ts( rbinom(120, size = 1, prob = rep(c(0.2, 0.8), each=6)), freq = 12)
  ans  = PeriodCPT.bern(data, niter = 1e3)
  ans  = PeriodCPT_extend(ans, newiters = 1e3)

taylors2/PeriodCPT documentation built on June 28, 2024, 12:32 p.m.