Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

DLSimulate

Simulate linear time series


Description

The Durbin-Levinsion recursions are used to simulate a stationary time series given an unit innovation sequence and given autocovariance function. Requires

O(n^2)

flops.

Usage

DLSimulate(n, r, useC = TRUE, rand.gen = rnorm, ...)

Arguments

n

length of time series to be generated

r

autocovariances, lags 0, ...,

useC

=TRUE, use C interface. Otherwise direct computation.

rand.gen

random number generator to use

...

optional arguments passed to rand.gen

Details

See Hipel and McLeod (1994) or McLeod, Yu and Krougly (2007).

Value

simulated time series of length n

Author(s)

A.I. McLeod

References

McLeod, A.I., Yu, Hao, Krougly, Zinovi L. (2007). Algorithms for Linear Time Series Analysis, Journal of Statistical Software.

See Also

Examples

#Simulate hyperbolic decay time series 
#with Hurst coefficient, H=0.9
n<-2000
H<-0.9
alpha<-2*(1-H)  #hyperbolic decay parameter
r<-(1/(1:n))^alpha
z<-DLSimulate(n, r)
plot.ts(z)
#can use HurstK function in FGN library to estimate H

ltsa

Linear Time Series Analysis

v1.4.6
GPL (>= 2)
Authors
A.I. McLeod, Hao Yu, Zinovi Krougly
Initial release
2015-12-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.