fracdiff.sim {fracdiff}R Documentation

Simulate fractional ARIMA Time Series

Description

Generates simulated long-memory time series data from the fractional ARIMA(p,d,q) model. This is a test problem generator for fracdiff.

Usage

fracdiff.sim(n, ar = NULL, ma = NULL, d,
             rand.gen = rnorm, innov = rand.gen(n+q, ...),
             n.start = NA, allow.0.nstart = FALSE, ..., mu = 0.)

Arguments

n

length of the time series.

ar

vector of autoregressive parameters; empty by default.

ma

vector of moving average parameters; empty by default.

d

fractional differencing parameter.

rand.gen

a function to generate the innovations; the default, rnorm generates white N(0,1) noise.

innov

an optional times series of innovations. If not provided, rand.gen() is used.

n.start

length of “burn-in” period. If NA, the default, the same value as in arima.sim is computed.

allow.0.nstart

logical indicating if n.start = 0 should be allowed even when p + q > 0. This not recommended unless for producing the same series as with older versions of fracdiff.sim.

...

additional arguments for rand.gen(). Most usefully, the standard deviation of the innovations generated by rnorm can be specified by sd.

mu

time series mean (added at the end).

Value

a list containing the following elements :

series

time series

ar, ma, d, mu, n.start

same as input

See Also

fracdiff, also for references; arima.sim

Examples

## Pretty (too) short to "see" the long memory
fracdiff.sim(100, ar = .2, ma = .4, d = .3)

## longer with "extreme" ar:
r <- fracdiff.sim(n=1500, ar=-0.9, d= 0.3)
plot(as.ts(r$series))

[Package fracdiff version 1.4-1 Index]