DPDU.regression {changepoints}R Documentation

Dynamic programming with dynamic update algorithm for regression change points localisation with l_0 penalisation.

Description

Perform DPDU algorithm for regression change points localisation.

Usage

DPDU.regression(y, X, lambda, zeta, eps = 0.001)

Arguments

y

A numeric vector of response variable.

X

A numeric matrix of covariates with vertical axis being time.

lambda

A positive numeric scalar of tuning parameter for lasso penalty.

zeta

A positive integer scalar of tuning parameter associated with l_0 penalty (minimum interval size).

eps

A numeric scalar of precision level for convergence of lasso.

Value

An object of class "DP", which is a list with the following structure:

partition

A vector of the best partition.

cpt

A vector of change points estimation.

Author(s)

Haotian Xu

References

Xu, Wang, Zhao and Yu (2022) <arXiv:2207.12453>.

Examples

d0 = 10
p = 20
n = 100
cpt_true = c(30, 70)
data = simu.change.regression(d0, cpt_true, p, n, sigma = 1, kappa = 9)
temp = DPDU.regression(y = data$y, X = data$X, lambda = 1, zeta = 20)
cpt_hat = temp$cpt

[Package changepoints version 1.1.0 Index]