Description Usage Arguments Details Value Author(s) References See Also Examples
Exact maximum likelihood estimation of the parameter H
in fractional Gaussian noise (FGN).
This is a utility function used by FitFGN
but
it is also useful in simulation experiments since it is
faster than using FitFGN
.
See example below.
In this model, alpha=2-2*H.
1 |
z |
time series data vector |
MeanZeroQ |
optional argument, default is MeanZeroQ=FALSE. Set to TRUE if the mean is known to be zero |
algorithm |
"emle" or "wmle" for exact or Whittle mle |
ciQ |
TRUE or FALSE according as 95 percent confidence interval computed and plotted |
The function optimize
is used.
It is very rare but it has been observed that optimize
can incorrectly choose
an endpoint. If this happens a warning is given and optim
is used.
a list with four/five elements:
H |
MLE for H |
Loglikelihood |
value of the maximized loglikelihood |
alpha |
MLE for alpha |
algorithm |
either "emle" or "wmle" |
ci |
95 percent confidence interval for H |
A.I. McLeod
McLeod, A.I., Yu, Hao, Krougly, Zinovi L. (2007). Algorithms for Linear Time Series Analysis, Journal of Statistical Software.
optimize
,
optim
,
Boot.FitFGN
,
FitFGN
,
FitRegressionFGN
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #Example 1
#fit Gaussian White Noise, H=0.5
z<-rnorm(500, 100, 10)
GetFitFGN(z)
#Example 2
#estimate H for NileMin series
data(NileMin)
GetFitFGN(NileMin)
#Example 3
#Timing comparison for GetFitFGN and FitFGN
ns<-c(500,1000) #may extend this to other n's
H<-0.8
nR<-10
tim1<-tim2<-numeric(length(ns))
for (i in 1:length(ns)){
n <- ns[i]
t1<-t2<-0
s1<-proc.time()[1]
for (iR in 1:nR){
z<-SimulateFGN(n, H)
H1<-GetFitFGN(z)
}
e1<-proc.time()[1]
t1<-t1+(e1-s1)
s2<-proc.time()[1]
for (iR in 1:nR){
z<-SimulateFGN(n, H)
H2<-FitFGN(z)
}
e2<-proc.time()[1]
t2<-t2+(e2-s2)
tim1[i]<-t1
tim2[i]<-t2
}
tb<-matrix(c(tim1,tim2),ncol=2)
dimnames(tb)<-list(ns,c("GetFitFGN","FitFGN"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.