simRegression0: Simulate noisy observations from a dynamic regression model

simRegression0R Documentation

Simulate noisy observations from a dynamic regression model

Description

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.

Usage

simRegression0(
  signalNames = c("bumps", "blocks"),
  T = 200,
  RSNR = 10,
  p_0 = 5,
  include_intercept = TRUE,
  scale_all = TRUE,
  include_plot = TRUE,
  ar1 = 0
)

Arguments

signalNames

vector of strings matching the "name" argument in the make.signal() function, e.g. "bumps" or "doppler"

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

Value

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

Note

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].


drkowal/dsp documentation built on July 19, 2023, 11:42 a.m.