Learn R Programming

FGN (version 2.0-12)

Boot.FitFGN: Simulate Fitted FGN Model

Description

Simulate a realization from a fitted AR model. This is useful in the parametric bootstrap. Generic function for "Boot" method.

Usage

"Boot"(obj, R = 1, ...)

Arguments

obj
the output from FitAR
R
number of bootstrap replications
...
optional arguments

Value

If R=1, a simulated time series with the same length as the original fitted time series is produced. Otherwise if R>1, a matrix with R columns and number of rows equal to the length of the series containing R replications of the bootstrap.

Details

The method of Davies and Harte (1987) is used if it is applicable, otherwise the Durbin-Levinsion recursion is used.

References

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

See Also

SimulateFGN, DHSimulate DLSimulate

Examples

Run this code
#Example 1
#Fit a FGN model and determine the bootstrap sd of H
#Measure cpu time. With R=250, it takes about 23 sec 
#on 3.6 GHz Pentium IV.
## Not run: 
# data(NileMin)
# outNileMin<-FitFGN(NileMin)
# start<-proc.time()[1]
# R<-25
# Hs<-numeric(R)
# Z<-Boot(outNileMin, R=R)
# for (i in 1:R)
#     Hs[i]<-GetFitFGN(Z[,i])$H
# BootSD<-sd(Hs) #this is the bootstrap sd
# end<-proc.time()[1]
# totTim<-end-start
# ## End(Not run)

Run the code above in your browser using DataLab