MAR_MTS_Covariance {SNSeg} | R Documentation |
A Funtion to generate a multivariate autoregressive process (MAR) model in time series. It is used for testing change-points based on the change in multivariate means or multivariate covariance for multivariate time series. It also works for the change in correlations between two univariate time series.
Description
The function MAR_MTS_Covariance
is used to generate MAR model(s) for
examples of the functions SNSeg_Uni
, SNSeg_Multi
, and SNSeg_HD
.
Usage
MAR_MTS_Covariance(n, reptime, rho_sets, cp_sets, sigma_cross)
Arguments
n |
the size of time series to be generated. |
reptime |
the number of time series to be generated. |
rho_sets |
autocorrelations for each univariate time series. |
cp_sets |
numeric values of the true change-point locations (0, change-point locations and the end point). |
sigma_cross |
a list of matrices to generate the multivariate covariance matrices. |
Value
Returns a list of matrices where each matrix is a MAR process. The
number of columns for each sub-matrix is equivalent to the value of input
argument reptime
.
Examples
n <- 1000
reptime <- 2
sigma_cross <- list(4*matrix(c(1,0.8,0.8,1), nrow=2),
matrix(c(1,0.2,0.2,1), nrow=2),
matrix(c(1,0.8,0.8,1), nrow=2))
cp_sets <- round(c(0,n/3,2*n/3,n))
noCP <- length(cp_sets)-2
rho_sets <- rep(0.5, noCP+1)
MAR_MTS_Covariance(n, reptime, rho_sets, cp_sets, sigma_cross)
[Package SNSeg version 1.0.3 Index]