Learn R Programming

FluxPoint (version 0.1.2)

add_jumps: Add mean shifts to multivariate time series data

Description

Adds constant mean shifts to a multivariate time series by applying a fixed jump vector at evenly spaced change points. After each change point, all subsequent observations are shifted by the specified vector.

Usage

add_jumps(data, delta, num)

Value

A numeric matrix of the same dimension as `data`, containing the adjusted series with added mean shifts.

Arguments

data

Numeric matrix of dimension \(n \times p\), representing the time series data.

delta

Numeric vector of length \(p\), specifying the shift magnitudes added to each variable after each change point.

num

Integer; number of change points. The data are divided evenly into num + 1 segments, and delta is added cumulatively after each change point.

Details

The total length of the time series is denoted by \(n\). Change points are placed at evenly spaced locations given by \(k \lfloor n / (num + 1) \rfloor\), for \(k = 1, \ldots, num\). After each change point, a constant shift vector delta is added to all subsequent observations. This construction produces synthetic data with known and controlled mean shifts, making the function useful for simulation studies and benchmarking change point detection methods.