WHITTLE
SAMPLE RUN ONE
# Denotes comments added after the session.
# In S-Plus:
> X11() # Enable graphics window.
> source("whittle.S") # Read in the program.
> z <- scan(file="data") # Read in file called data and assign to vector z.
> h1 <- whittle(z,model="fgn")
# Do the Whittle method with a FGN model and
# assign result to h1.
#Intermediate results of the minimization. etatry
# is H, B is the value being minimized.
etatry= 0.5 B= 1.00022927893032
etatry= 0.500000014901161 B= 1.00022925550517
etatry= 0.999 B= 1.02218824080293
etatry= 0.742705939789286 B= 0.884005310343698
etatry= 0.742705053700002 B= 0.884005156062208
etatry= 0.718504838680966 B= 0.880828221477977
etatry= 0.718505168437669 B= 0.880828250207842
etatry= 0.694266514080424 B= 0.879860064932244
etatry= 0.694266980348998 B= 0.879860060786826
etatry= 0.696510889409528 B= 0.879850585969451
etatry= 0.696510445274812 B= 0.879850585779315
etatry= 0.696407782606995 B= 0.879850563700104
etatry= 0.696408237954346 B= 0.879850563701856
etatry= 0.696407327259644 B= 0.879850563699207
etatry= 0.696407077341415 B= 0.879850563699092
etatry= 0.696416131546077 B= 0.87985056386839
etatry= 0.696398023136753 B= 0.879850563868667
theta= 0.140032566394901 0.696407077341415
H= 0.696407077341415 #Estimated H.
95%-C.I. for H: [ 0.683541807805226 , 0.709272346877604 ]
95%-C.I.:
etalow etaup #Approximate 95% confidence intervals
[1,] 0.6835418 0.7092723 # for H.
> h1[[1]]$parameter #h1 contains the parameter estimate.
[1] 0.6964071 #[[1]] is necessary for the case where
#several subseries are used, to distin-
#guish them.
SAMPLE RUN TWO
> h2 <- whittle(data,out=F)
#Now we run the estimator with a FARIMA(1,d,1) model (Default).
#The intermediate output is not produced.
>h2[[1]]$parameter
#Output the estimate.
[1] 0.6940678 0.0369692 -0.0334319
#Contains the estimated: H, and phi_1 and theta_1 for the
#(1,d,1) model.
>q() # Quit.
SAMPLE RUN THREE
# Denotes comments added after the session.
# In S-Plus:
z1 <- rep(0,1000) # Initialize vector.
for ( i in 1:1000){
z1[i] <- 1/10*sum(z[(10*i-9):(10*i)])}
# Aggregate the vector z by a factor of 10.
> h3 <- whittle(z1,model="fgn")
# Do the Whittle method with a FGN model and
# the aggregated series z1, assign result to h3.
#Intermediate results of the minimization. etatry
# is H, B is the value being minimized.
etatry= 0.5 B= 1.00049318502577
etatry= 0.500000014901161 B= 1.00049316047897
etatry= 0.999 B= 0.990106893837151
etatry= 0.998999062241329 B= 0.990104299949572
etatry= 0.7495 B= 0.862081752334782
etatry= 0.749500294232016 B= 0.862081788105388
etatry= 0.738029903867731 B= 0.860922000220984
etatry= 0.738030172460806 B= 0.860922021808059
etatry= 0.715655615675116 B= 0.860067724273093
etatry= 0.715656076822042 B= 0.860067721857196
etatry= 0.717024808865672 B= 0.860064289453432
etatry= 0.717024362086441 B= 0.860064289356667
etatry= 0.716970451671377 B= 0.860064283504803
etatry= 0.716971326385792 B= 0.860064283507541
etatry= 0.716969576956961 B= 0.860064283505106
etatry= 0.716970100010298 B= 0.860064283504558
etatry= 0.716979577031209 B= 0.860064283683035
etatry= 0.716960622989387 B= 0.860064283683146
theta= 0.13688348209654 0.716970100010298
H= 0.716970100010298
95%-C.I. for H: [ 0.676137287998876 , 0.75780291202172 ]
95%-C.I.:
etalow etaup #Approximate 95% confidence intervals
[1,] 0.6761373 0.7578029 # for H.
> h3[[1]]$parameter #h3 contains the parameter estimate.
[1] 0.7169701 #[[1]] is necessary for the case where
#several subseries are used, to distin-
#guish them.