# plot.SNSeg_Multi: Plotting the output for multivariate time series with... In SNSeg: Self-Normalization(SN) Based Change-Point Estimation for Time Series

 plot.SNSeg_Multi R Documentation

## Plotting the output for multivariate time series with dimension no greater than 10

### Description

Plotting method for S3 objects of class `SNSeg_Multi`

### Usage

``````## S3 method for class 'SNSeg_Multi'
plot(x, cpts.col = "red", ...)
``````

### Arguments

 `x` a `SNSeg_Multi` object `cpts.col` a specification for the color of the vertical lines at the change point estimators, see par `...` additional graphical arguments, see plot and abline

### Details

The location of each change point estimator is plotted as a vertical line against the input time series.

### Examples

``````
# Please run this function before simulation
exchange_cor_matrix <- function(d, rho){
tmp <- matrix(rho, d, d)
diag(tmp) <- 1
return(tmp)
}

# simulation of multivariate time series
library(mvtnorm)
set.seed(10)
d <- 5
n <- 600
nocp <- 5
cp_sets <- round(seq(0, nocp+1 ,1)/(nocp+1)*n)
mean_shift <- rep(c(0,2),100)[1:(length(cp_sets)-1)]/sqrt(d)
rho_sets <- 0.2
sigma_cross <- list(exchange_cor_matrix(d,0))
ts <- MAR_MTS_Covariance(n, 2, rho_sets, cp_sets = c(0,n), sigma_cross)
ts <- ts[1][[1]]

# Test for the change in multivariate means
# grid_size defined
result <- SNSeg_Multi(ts, paras_to_test = "mean", confidence = 0.99,
grid_size_scale = 0.05, grid_size = 45)
# plot method
plot(result)

``````

SNSeg documentation built on June 22, 2024, 10:50 a.m.