simu.SEPP {changepoints}R Documentation

Simulate a (stable) SEPP model (without change point).

Description

Simulate a (stable) SEPP model (without change point).

Usage

simu.SEPP(intercept, n, A, threshold, vzero = NULL)

Arguments

intercept

A numeric scalar representing the intercept of the model.

n

An integer scalar representing sample size.

A

A numeric pXp matrix representing the coefficient matrix.

threshold

A numeric scalar representing the upper bound for each coordinate of X_t (for stability).

vzero

A numeric vector representing the observation at time 0. If vzero = NULL, each coordinate is generated from a Poisson distribution with mean lambda.

Value

A p-by-n matrix.

Author(s)

Daren Wang & Haotian Xu

References

Wang, Yu, & Willett (2020). Detecting Abrupt Changes in High-Dimensional Self-Exciting Poisson Processes. <arXiv:2006.03572>.

Examples

p = 10 # dimension
n = 50
s = 5 # sparsity
factor = 0.12 # large factor gives exact recovery
threshold = 4 # thresholding makes the process stable
intercept = 1/2 # intercept of the model. Assume to be known as in the existing literature
A1 = A2 = A3 = matrix(0, p, p)
diag(A1[,-1]) = 1
diag(A1) = 1
diag(A1[-1,]) = -1
A1 = A1*factor
A1[(s+1):p, (s+1):p] = 0
diag(A2[,-1]) = 1
diag(A2) = -1
diag(A2[-1,]) = 1
A2 = A2*factor
A2[(s+1):p, (s+1):p] = 0
diag(A3[,-1]) = 1
diag(A3) = 1
diag(A3[-1,]) = -1
A3 = A3*factor
A3[(s+1):p, (s+1):p] = 0
data1 = simu.SEPP(intercept, n, A1, threshold, vzero = NULL)
data2 = simu.SEPP(intercept, n, A2, threshold, vzero = data1[,n])
data3 = simu.SEPP(intercept, n, A3, threshold, vzero = data2[,n])
data = cbind(data1, data2, data3)
dim(data)

[Package changepoints version 1.1.0 Index]