rtimeseries {ExtremeRisks} | R Documentation |
Simulation of One-Dimensional Temporally Dependent Observations
Description
Simulates samples from parametric families of time series models.
Usage
rtimeseries(ndata, dist="studentT", type="AR", par, burnin=1e+03)
Arguments
ndata |
A positive interger specifying the number of observations to simulate. |
dist |
A string specifying the parametric family of the innovations distribution. By default |
type |
A string specifying the type of time series. By default |
par |
A vector of |
burnin |
A positive interger specifying the number of initial observations to discard from the simulated sample. |
Details
For a time series class (type
) with a parametric family (dist
) for the innovations, a sample of size ndata
is simulated. See for example Brockwell and Davis (2016).
The available categories of time series models are: Auto-Regressive (
type="AR"
), Auto-Regressive and Moving-Average (type="ARMA"
), Generalized-Autoregressive-Conditional-Heteroskedasticity (type="GARCH"
) and Auto-Regressive and Moving-Maxima (type="ARMAX"
).With AR(1) and ARMA(1,1) times series the available families of distributions for the innovations are:
Student-t (
dist="studentT"
) with parameters:\phi\in(-1,1)
(autoregressive coefficient),\nu>0
(degrees of freedom) specified bypar=c(corr, df)
;symmetric Frechet (
dist="double-Frechet"
) with parameters\phi\in(-1,1)
(autoregressive coefficient),\sigma>0
(scale),\alpha>0
(shape),\theta
(movingaverage coefficient), specified bypar=c(corr, scale, shape, smooth)
;symmetric Pareto (
dist="double-Pareto"
) with parameters\phi\in(-1,1)
(autoregressive coefficient),\sigma>0
(scale),\alpha>0
(shape),\theta
(movingaverage coefficient), specified bypar=c(corr, scale, shape, smooth)
.
With ARCH(1)/GARCH(1,1) time series the Gaussian family of distributions is available for the innovations (
dist="Gaussian"
) with parameters,\alpha_0
,\alpha_1
,\beta
specified bypar=c(alpha0, alpha1, beta)
. Finally, with ARMAX(1) times series the Frechet families of distributions is available for the innovations (dist="Frechet"
) with parameters,\phi\in(-1,1)
(autoregressive coefficient),\sigma>0
(scale),\alpha>0
(shape) specified bypar=c(corr, scale, shape)
.
Value
A vector of (1 \times n)
observations simulated from a specified time series model.
Author(s)
Simone Padoan, simone.padoan@unibocconi.it, http://mypage.unibocconi.it/simonepadoan/; Gilles Stupfler, gilles.stupfler@ensai.fr, http://ensai.fr/en/equipe/stupfler-gilles/
References
Brockwell, Peter J., and Richard A. Davis. (2016). Introduction to time series and forecasting. Springer.
Padoan A.S. and Stupfler, G. (2020). Extreme expectile estimation for heavy-tailed time series. arXiv e-prints arXiv:2004.04078, https://arxiv.org/abs/2004.04078.
See Also
Examples
# Data simulation from a 1-dimensional AR(1) with univariate Student-t
# distributed innovations
tsDist <- "studentT"
tsType <- "AR"
# parameter setting
corr <- 0.8
df <- 3
par <- c(corr, df)
# sample size
ndata <- 2500
# Simulates a sample from an AR(1) model with Student-t innovations
data <- rtimeseries(ndata, tsDist, tsType, par)
# Graphic representation
plot(data, type="l")
acf(data)