simu.change.regression {changepoints}  R Documentation 
Simulate a sparse regression model with change points in coefficients.
Description
Simulate a sparse regression model with change points in coefficients under temporal dependence.
Usage
simu.change.regression(
d0,
cpt_true,
p,
n,
sigma,
kappa,
cov_type = "I",
mod_X = "IID",
mod_e = "IID"
)
Arguments
d0 
A numeric scalar stands for the number of nonzero coefficients.

cpt_true 
An integer vector contains true change points (sorted in strictly increasing order).

p 
An integer scalar stands for the dimensionality.

n 
An integer scalar stands for the sample size.

sigma 
A numeric scalar stands for error standard deviation.

kappa 
A numeric scalar stands for the minimum jump size of coefficient vector in l_2 norm.

cov_type 
A character string stands for the type of covariance matrix of covariates. 'I': Identity; 'T': Toeplitz; 'E': Equalcorrelation.

mod_X 
A character string stands for the time series model followed by the covariates. 'IID': IID multivariate Gaussian; 'AR': Multivariate AR1 with rho = 0.3; Multivariate MA1 theta = 0.3.

mod_e 
A character string stands for the time series model followed by the errors 'IID': IID univariate Gaussian; 'AR': Univariate AR1 with rho = 0.3; Univariate MA1 theta = 0.3.

Value
A list
with the following structure:
cpt_true 
A vector of true changepoints (sorted in strictly increasing order).

X 
An nbyp design matrix.

y 
An ndim vector of response variable.

betafullmat 
A pbyn matrix of coefficients.

Author(s)
Daren Wang, Zifeng Zhao & Haotian Xu
References
Rinaldo, Wang, Wen, Willett and Yu (2020) <arxiv:2010.10410>; Xu, Wang, Zhao and Yu (2022) <arXiv:2207.12453>.
Examples
d0 = 10
p = 30
n = 100
cpt_true = c(10, 30, 40, 70, 90)
data = simu.change.regression(d0, cpt_true, p, n, sigma = 1, kappa = 9)
[Package
changepoints version 1.1.0
Index]