plot_matrix: Plot the AR coefficient matrix

plot_matrixR Documentation

Plot the AR coefficient matrix

Description

Plot the AR coefficient matrix

Usage

plot_matrix(phi, p)

Arguments

phi

parameter matrix

p

number of segements times number of lags

Value

a plot of AR coefficient matrix

Examples

nob <- (10^3*4); #number of time points
p <- 15; # number of time series components
brk <- c(floor(nob/3),floor(2*nob/3),nob+1); # true break points with nob+1 as the last element
m0 <- length(brk) -1; # number of break points
q.t <- 2; # the true AR order
m <- m0+1 #number of segments
sp_density <- rep(0.05, m*q.t) #sparsity level (5%)
try<-simu_var("sparse",nob=nob,k=p,lags=q.t,brk =brk,sp_pattern="random",sp_density=sp_density)
print(plot_matrix(do.call("cbind",try$model_param), m*q.t ))


VARDetect documentation built on May 10, 2022, 9:07 a.m.