table_pcpt: ~~Frequency table of the within period changepoint events.~~

View source: R/Summary_pcpt.R

table_pcptR Documentation

~~Frequency table of the within period changepoint events.~~

Description

Frequency table of the within period changepoint events.

Usage

  table_pcpt(object)

Arguments

object

An pcpt class object.

Details

Returns a frequency table of the number of samples where the within period time step appears anywhere in the periodic changepoint vector. Note that the changepoint vector "c(1)" corresponds to the no-within period change (m=1) where the "1" is used as a holding space. As such, these samples are added as an extra column at the end of the table and the totals elsewhere in the table relates to the remaining samples where the number of within period changepoint events are >= 2.

Value

A table either with each row corresponding to each chain, or a single row if the chains have previously been summarised into a single overall table.

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  = summarise_chains(ans)
  table_pcpt(ans)

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