fsvsim {factorstochvol} | R Documentation |
Simulate data from a factor SV model
Description
fsvsim
generates simulated data from a factor SV model.
Usage
fsvsim(
n = 1000,
series = 10,
factors = 1,
facload = "dense",
idipara,
facpara,
heteroskedastic = rep(TRUE, series + factors),
df = Inf
)
Arguments
n |
Length of the series to be generated. |
series |
Number of component series |
factors |
Number of factors |
facload |
Can either be a matrix of dimension |
idipara |
Optional matrix of idiosyncratic SV parameters
to be used for simulation. Must have exactly three columns containing
the values of |
facpara |
Optional matrix of idiosyncratic SV parameters
to be used for simulation. Must have exactly two columns containing
the values of |
heteroskedastic |
Logical vector of length |
df |
If not equal to Inf, the factors are misspecified (come from a t distribution instead of a Gaussian). Only used for testing. |
Value
The value returned is a list object of class fsvsim
holding
- y
The simulated data, stored in a
n
timesm
matrix with colnames 'Sim1', 'Sim2', etc.- fac
The simulated factors, stored in a
r
timesr
matrix.- facload
Factor loadings matrix.
- facvol
Latent factor log-variances for times 1 to
n
.- facvol0
Initial factor log-variances for time 0.
- facpara
The parameters of the factor volatility processes.
- idivol
Latent idiosyncratic log-variances for times 1 to
n
.- idivol0
Initial idiosyncratic log-variances for time 0.
- idipara
The parameters of the idiosyncratic volatility processes.
Note
This object can be passed to many plotting functions to indicate the data generating processes when visualizing results.