Learn R Programming

SNSeg (version 1.0.2)

MAR_Variance: A funtion to generate a multivariate autoregressive process (MAR) model in time series for testing change points based on variance and autocovariance

Description

The function MAR_Variance is used for generating MAR model(s) for examples of the functions SNSeg_Uni, SNSeg_Multi, and SNSeg_HD.

Usage

MAR_Variance(reptime, type = "V3")

Value

Returns a matrix of the simulated MAR processes. The number of columns of this matrix is equivalent to the value of input argument reptime.

Arguments

reptime

The number of time series to be generated

type

The type of time series for simulation, which includes V1, V2, V3 , A1, A2 and A3. The V-beginnings are for testing the variance, and the A-beginnings are for testing the autocorrelation. The simulated time series come from supplement of Zhao et al. (2022) doi:10.1111/rssb.12552. Default type is V3.

The time length and "true change-points locations" (cps) for each type are as follows: V1: cps at 400 and 750 with a time length of 1024. V2: cps at 125, 532 and 704 with a time length of 1024. V3: cps at 512 and 768 with a time length of 1024. A1: cps at 400 and 750 with a time length of 1024. A2: cps at 50 with a time length of 1024. A3: cps at 512 and 768 with a time length of 1024.

Examples

Run this code
MAR_Variance(reptime = 2, type = "V1")

Run the code above in your browser using DataLab