Description Usage Arguments Details Value Author(s) References See Also Examples
Simulate a realization from a fitted AR model. This is useful in the parametric bootstrap. Generic function for "Boot" method.
1 2 |
obj |
the output from FitAR |
R |
number of bootstrap replications |
... |
optional arguments |
The method of Davies and Harte (1987) is used if it is applicable, otherwise the Durbin-Levinsion recursion is used.
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.
A.I. McLeod
McLeod, A.I., Yu, Hao, Krougly, Zinovi L. (2007). Algorithms for Linear Time Series Analysis, Journal of Statistical Software.
SimulateFGN
,
DHSimulate
DLSimulate
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.