SimulateFGN {FGN}R Documentation

Simulates FGN

Description

A fractional Gaussian noise time series is simulated.

Usage

SimulateFGN(n, H)

Arguments

n length of time series
H Hurst coefficient

Details

The FFT is used so it is most efficient if you select n to be a power of 2.

Value

vector of length containing the simulated time series

Author(s)

A.I. McLeod

References

Davies, R. B. and Harte, D. S. (1987). Tests for Hurst Effect. Biometrika 74, 95–101.

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

See Also

DLSimulate

Examples

#Example 1
#simulate a process with H=0.2 and plot it
z<-SimulateFGN(100, 0.2)
ts.plot(z)
# 
#Example 2
#simulate FGN and compare theoretical and sample autocovariances
H<-0.7
n<-8192
z<-SimulateFGN(n, H)
#autocovariances
sacvf<-acf(z, plot=FALSE,type="covariance")$acf
tacf<-FGNAcf(0:(n-1), H)
tb<-matrix(c(tacf[1:10],sacvf[1:10]),ncol=2)
dimnames(tb)<-list(0:9, c("Tacvf","Sacvf"))
tb

[Package FGN version 1.1 Index]