integer > 2. Indicates the length of the time series to be
generated. The default value is 200.
d
positive integer. Indicates the number of covariates to simulate.
The default value is 3.
sv
logical value. If set to TRUE, the data will be generated with
stochastic volatility for the errors of the observation equation using svsim. The default value is FALSE.
sigma2
positive real number. Determines the variance on the errors of the observation
equation. Ignored if sv is TRUE. The default value is 1.
theta
(optional) vector containing positive real numbers. If supplied, these determine the variances of the
innovations of the state equation. Otherwise, the elements of theta are generated from a ChiSq(1) distribution.
Has to be of length d or an error will be thrown.
beta_mean
(optional) vector containing real numbers. If supplied, these determine the mean of the
initial value of the state equation. Otherwise, the elements of beta_mean are generated from a Normal(0,1) distribution.
Has to be of length d or an error will be thrown.
Value
The value returned is a list object containing:
data
a data frame that holds the simulated data.
true_vals
a list object containing:
theta: the values of theta used in the data generating process.
beta_mean: the values of beta_mean used in the data generating process.
beta: the true paths of beta used for the data generating process.
sigma2: the value(s) of sigma2 used in the data generating process.
# NOT RUN {# Generate a time series of length 300res <- simTVP(N = 300)
# Extract the generated datadata <- res$data
# Now with stochastic volatilityres_sv <- simTVP(N = 300, sv = TRUE)
# }