Simulates data from a time series regression with dynamic regression coefficients.
The dynamic regression coefficients are simulated as a Gaussian random walk,
where jumps occur with a pre-specified probability sparsity
.
The coefficients are initialized by a N(0,1) simulation.
simRegression(
nT = 200,
p = 20,
p_0 = 15,
sparsity = 0.05,
RSNR = 5,
ar1 = 0,
include_plot = FALSE
)
a list containing
the simulated function y
the simulated predictors X
the simulated dynamic regression coefficients beta_true
the true function mu_true
the true observation standard deviation sigma_true
number of time points
number of predictors (total)
number of true zero regression terms
the probability of a jump (i.e., a change in the dynamic regression coefficient)
root-signal-to-noise ratio
the AR(1) coefficient for the predictors X; default is zero for iid N(0,1) predictors
logical; if TRUE, include a plot of the simulated data and the true curve