simTVP | R Documentation |
simTVP
generates synthetic data from a time-varying parameter model. The covariates are always
generated i.i.d. from a Normal(0,1) distribution.
simTVP(
N = 200,
d = 3,
sv = FALSE,
DTG = FALSE,
sigma2 = 1,
theta,
beta_mean,
sv_mu = 0,
sv_phi = 0.98,
sv_sigma2 = 0.2,
a_psi = 0.5,
c_psi = 2,
rho = 0.9
)
N |
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 |
DTG |
logical value. If set to |
sigma2 |
positive real number. Determines the variance of the errors of the observation
equation. Ignored if sv is |
theta |
(optional) vector containing positive real numbers. If supplied, these determine the variances of the
innovations of the state equation. Otherwise, the elements of |
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 |
sv_mu |
real number. Determines the mean of the logarithm of the volatility. Ignored if |
sv_phi |
real number between -1 and 1. Determines the persistence of the SV process. Ignored if |
sv_sigma2 |
positive, real number. Determines the variance of the innovations of the logarithm of the volatility.
Ignored if |
a_psi |
positive, real number. Determines the pole parameter of the dynamic triple gamma process.
Ignored if |
c_psi |
positive, real number. Determines the tail parameter of the dynamic triple gamma process.
Ignored if |
rho |
real number between 0 and 1. Determines the persistence of the dynamic triple gamma process.
Ignored if |
The value returned is a list object containing:
data |
data frame that holds the simulated data. |
true_vals |
list object containing:
|
Peter Knaus peter.knaus@wu.ac.at
# Generate a time series of length 300
res <- simTVP(N = 300)
# Extract the generated data
data <- res$data
# Now with stochastic volatility
res_sv <- simTVP(N = 300, sv = TRUE)
# Now with dynamic triple gamma process
res_DTG <- simTVP(N = 300, DTG = TRUE, c_psi = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.