Learn R Programming

artfima (version 1.5)

artsim: Simulation of stationary ARTFIMA

Description

Simulation of stationary ARTFIMA, ARFIMA or ARIMA or bootstrap a fitted model. Useful for the parametric bootstrap.

Usage

artsim(n = 100, d = 0, lambda = 0, phi = numeric(0), theta = numeric(0), mean = 0, sigma2 = 1, obj = NULL)

Arguments

n
length of time series
d
artfima difference parameter, real value greater than zero. If d=0, ARIMA model is used.
lambda
lambda artfima temper decay parameter, if lambda=0, ARFIMA model is simulated
phi
AR coefficients
theta
MA coefficients
mean
mean of series
sigma2
innovation variance
obj
output from artfima(). If obj is not output from artfima() then the other arguments are used to determine the time series parameters, except for the series length n.

Value

vector of length n, the simulated time series

References

McLeod, A.I., Yu, Hao and Krougly, Z. (2007). Algorithms for Linear Time Series Analysis: With R Package. Journal of Statistical Software 23/5 1-26.

Examples

Run this code
z <- artsim(5000, d=5/6, lambda=0.045)
var(z)
artfimaTACVF(d=5/6, lambda=0.045, maxlag=1)[1]

Run the code above in your browser using DataLab