bayes {BayesProject} R Documentation

## Cpp implementation of the Bayesian projection algorithm to detect single multivariate changepoints.

### Description

Detects one multivariate changepoint in a dataset using the fast projection direction algorithm of Hahn et al. (2019). Solely required is the dataset as first parameter. The testing threshold ("threshold"), the number of timepoints to calculate a projection ("nTimePoints") and the regularisation parameter ("K") are chosen automatically.

### Usage

bayes(x, threshold, nTimePoints = NULL, K = 1/sqrt(2), rescale.var = TRUE)


### Arguments

 x A p \times n matrix representing p data series having n observations each. threshold The testing threshold to detect the single changepoint. If missing, parameter will be calibrated automatically. nTimePoints The number of equidistant timepoints at which the projection direction is calculated. If no value (NULL) is given, timepoints are chosen automatically. K The regularisation parameter for the Bayesian projection direction. Default is 1/√(2). rescale.var A boolean flag to indicate if the variance should be rescaled before detecting a changepoint. Default is TRUE.

### References

Hahn, G., Fearnhead, P., Eckley, I.A. (2020). Fast computation of a projection direction for multivariate changepoint detection. Stat Comput.

### Examples

library(BayesProject)
data(testdata)
res <- bayes(testdata,nTimePoints=100)
print(res\$cpt)



[Package BayesProject version 1.0 Index]