SimulateFGN: Simulates FGN

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

A fractional Gaussian noise time series is simulated.

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#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<-acvfFGN(H, n-1)
tb<-matrix(c(tacf[1:10],sacvf[1:10]),ncol=2)
dimnames(tb)<-list(0:9, c("Tacvf","Sacvf"))
tb

FGN documentation built on May 30, 2017, 7:19 a.m.