#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