Learn R Programming

FGN (version 2.0-12)

FGN-package: Fractional Gaussian Noise and hyperbolic decay time series model fitting

Description

Exact and Whittle MLE for time series models with hyperbolic decay. Simulation and regression supported for FGN.

Arguments

Details

Package:
FGN
Type:
Package
Version:
2.0-12
Date:
2014-05-15
License:
CC BY-NC-SA 3.0
LazyLoad:
yes
LazyData:
yes

References

Hipel, K.W. and McLeod, A.I., (2005). Time Series Modelling of Water Resources and Environmental Systems. Electronic reprint of our book orginally published in 1994. http://www.stats.uwo.ca/faculty/aim/1994Book/.

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

McLeod, A.I. and Veenstra, Justin (2012). Hyperbolic Decay Time Series Models (in press).

See Also

HurstK, FitFGN, FitRegressionFGN, SimulateFGN, print.FitFGN, summary.FitFGN, predict.FitFGN, plot.FitFGN, residuals.FitFGN, GetFitFGN, GetFitFD, GetFitPLS, GetFitPLA

Examples

Run this code
#Example 1
#Compare HurstK and MLE for H
#Hurst K for Nile Minima
data(NileMin)
HurstK(NileMin)
out<-FitFGN(NileMin)
summary(out)
plot(out)
coef(out)
#
#Example 2.
#Compare models
## Not run: 
#    T1 <- proc.time()[3]
#    ansFD <- GetFitFD(NileMin)
#    T2 <- proc.time()[3]
#    ansFGN <- GetFitFGN(NileMin)
#    T3 <- proc.time()[3]
#    ansPLS <- GetFitPLS(NileMin)
#    T4 <- proc.time()[3]
#    ansPLA <- GetFitPLA(NileMin)
#    T5 <- proc.time()[3]
#    tbLLE <- c(ansFD[[2]],ansFGN[[2]],ansPLS[[2]],ansPLA[[2]])
#    est <-  c(ansFD[[3]],ansFGN[[3]],ansPLS[[3]],ansPLA[[3]])
#    tbLL <- round(tbLLE, 2)
#    est <- round(est, 3)
#    T<-c(T2-T1,T3-T2,T4-T3,T5-T4)
#    m<-matrix(c(est,tbLL, T),nrow=4, ncol=3)
#    dimnames(m)<-list(list("FD","FGN","PLS","PLA"), list("alpha","logL", "time"))
#    mE <- m
#    mE
#    #
#    T1 <- proc.time()[3]
#    ansFD <- GetFitFD(NileMin, algorithm="wmle")
#    T2 <- proc.time()[3]
#    ansFGN <- GetFitFGN(NileMin, algorithm="wmle")
#    T3 <- proc.time()[3]
#    ansPLA <- GetFitPLS(NileMin, algorithm="wmle")
#    T4 <- proc.time()[3]
#    ansPLS <- GetFitPLA(NileMin, algorithm="wmle")
#    T5 <- proc.time()[3]
#    #tbLL <- c(ansFD[[2]],ansFGN[[2]],ansPLS[[2]],ansPLA[[2]])
#    z <- NileMin-mean(NileMin)
#    tbLLW <- c(LLFD(ansFD[[1]],z), LLFGN(ansFGN[[1]],z), LLPLS(ansPLS[[1]],z), LLPLA(ansPLA[[1]],z))
#    est <-  c(ansFD[[3]],ansFGN[[3]],ansPLS[[3]],ansPLA[[3]])
#    tbLL <- round(tbLLW, 2)
#    est <- round(est, 3)
#    T<-c(T2-T1,T3-T2,T4-T3,T5-T4)
#    m<-matrix(c(est,tbLL, T),nrow=4, ncol=3)
#    dimnames(m)<-list(list("FD","FGN","PLS","PLA"), list("alpha","logL", "time"))
#    mW<-m
#    mW
#    m<-cbind(mE,mW)
#    m
#    ## End(Not run)
  

Run the code above in your browser using DataLab