simRegression0 | R Documentation |
Simulates data from a time series regression with dynamic regression coefficients.
The dynamic regression coefficients are selected using the options from the
make.signal()
function in the wmtsa
package.
simRegression0(
signalNames = c("bumps", "blocks"),
T = 200,
RSNR = 10,
p_0 = 5,
include_intercept = TRUE,
scale_all = TRUE,
include_plot = TRUE,
ar1 = 0
)
signalNames |
vector of strings matching the "name" argument in the |
T |
number of points |
RSNR |
root-signal-to-noise ratio |
p_0 |
number of true zero regression terms to include |
include_intercept |
logical; if TRUE, the first column of X is 1's |
scale_all |
logical; if TRUE, scale all regression coefficients to [0,1] |
include_plot |
logical; if TRUE, include a plot of the simulated data and the true curve |
ar1 |
the AR(1) coefficient for the predictors X; default is zero for iid N(0,1) predictors |
a list containing
the simulated function y
the simulated predictors X
the simulated dynamic regression coefficients beta_true
the true function y_true
the true observation standard devation sigma_true
The number of predictors is p = length(signalNames) + p_0
.
The root-signal-to-noise ratio is defined as RSNR = [sd of true function]/[sd of noise].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.