bayes {BayesProject} | R Documentation |
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.
bayes(x, threshold, nTimePoints = NULL, K = 1/sqrt(2), rescale.var = TRUE)
x |
A |
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 |
rescale.var |
A boolean flag to indicate if the variance should be rescaled before detecting a changepoint. Default is TRUE. |
Hahn, G., Fearnhead, P., Eckley, I.A. (2020). Fast computation of a projection direction for multivariate changepoint detection. Stat Comput.
library(BayesProject)
data(testdata)
res <- bayes(testdata,nTimePoints=100)
print(res$cpt)