gmwm icon indicating copy to clipboard operation
gmwm copied to clipboard

Guessing issue with White Noise

Open coatless opened this issue 9 years ago • 0 comments

Issue:

@HaotianXu discovered a bug on the WN() guessing feature:

wn_guessing_bug

Using:

N = 80 # dyadic length of time series
J = floor(log(N,2)) 
H = 1000 # number of simulations

dist.gmwm = rep(NA,H)
dist.gmwm.robust = rep(NA,H)

dist.gmwm.guess = rep(NA,H)
dist.gmwm.robust.guess = rep(NA,H)

for(k in 1:H){
  x.star = rnorm(N,0,1)

  classic = gmwm(WN(), x.star, robust=FALSE)

  robust = gmwm(WN(), x.star, robust=TRUE)

  dist.gmwm[k] = classic$obj.fun 
  dist.gmwm.robust[k] = robust$obj.fun # the empirical distribution of robust test statistic under the null

  dist.gmwm.guess[k] = classic$init.guess 
  dist.gmwm.robust.guess[k] = robust$init.guess # the empirical distribution of robust test statistic under the null

}

hist(dist.gmwm, nclass=100)
hist(dist.gmwm.robust, nclass=100)
sum(dist.gmwm.robust>0.6)/H

The guesses look like: image

image

Solution:

Temporarily use exact values e.g. WN(sigma2 = 1).... This gives a distribution that looks like:

image

Main issue: Figure out a better guessing algorithm?

coatless avatar Jun 03 '15 03:06 coatless