MyNixOS website logo
Description

Nonparametric Change Point Detection for Multivariate Time Series.

Implements the nonparametric moving sum procedure for detecting changes in the joint characteristic function (NP-MOJO) for multiple change point detection in multivariate time series. See McGonigle, E. T., Cho, H. (2023) <doi:10.48550/arXiv.2305.07581> for description of the NP-MOJO methodology.

CptNonPar

R-CMD-check Codecov testcoverage

Nonparametric change point detection for multivariate time series. Implements the NP-MOJO methodology proposed in

McGonigle, E. T., Cho, H. (2023). Nonparametric data segmentation in multivariate time series via joint characteristic functions. arXiv preprint arXiv:2305.07581.

Installation

You can install the released version of CptNonPar from CRAN with:

install.packages("CptNonPar")

You can install the development version of CptNonPar from GitHub with:

devtools::install_github("https://github.com/EuanMcGonigle/CptNonPar")

Usage

For further examples, see the help files within the package. We can generate an example for change point detection as follows.

We generate a univariate time series of length 1000, with a mean change at time 300, and an autocovariance (but not marginal) change at time 650. Then, we perform the multi-lag NP-MOJO algorithm with lags 0 and 1, and print the estimated change points and the associated clusters:

library(CptNonPar)

n <- 1000
set.seed(123)

noise1 <- stats::arima.sim(model = list(ar = -0.5), n = n, sd = sqrt(1 - 0.5^2))
noise2 <- stats::arima.sim(model = list(ar = 0.5), n = n, sd = sqrt(1 - 0.5^2))

noise <- c(noise1[1:650], noise2[651:n])

signal <- c(rep(0, 300), rep(0.7, 700))

x <- signal + noise

x.c <- np.mojo.multilag(x, G = 166, lags = c(0, 1))

x.c$cpts
#>       cp lag p.val
#> [1,] 295   0 0.000
#> [2,] 648   1 0.005

x.c$cpt.clusters
#> [[1]]
#>       cp lag p.val
#> [1,] 295   0     0
#> [2,] 296   1     0
#> 
#> [[2]]
#>       cp lag p.val
#> [1,] 648   1 0.005
Metadata

Version

0.2.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows