CreateModel: CreateModel

Description Usage Arguments Value

View source: R/simulate.R

Description

Create a model to generate data from for simulating the detection of changepoints

Usage

1
2
CreateModel(n_segments, n, p, modelFUN, equispaced = T, mean_vecs = NULL,
  ...)

Arguments

n_segments

Number of segments in the model. There will be one less changepoints than segments.

n

Number of observations

p

Number of dimensions

modelFUN

A function that spawns covariance matrices of dimension p.

equispaced

If TRUE, the segments will be of equal length (up to rounding) and hence the changepoints will be equispaced. Otherwise the changepoints will be drawn randomly and the distance between them will differ.

mean_vecs

If NULL, the mean for each segment will be zero. Otherwise mean_vecs should be a list containing a p-dimensional numeric vector with the means for each segment.

...

Addtional arguments to be supplied to modelFUN

Value

An object to be used by SimulateFromModel


lorenzha/hdcd documentation built on Sept. 2, 2018, 8:20 p.m.