Dear S-Plus users,
Appologies if this message appears twice on the list as it did not
seem to get through when I first sent it.
I have a query about drawing simulated samples using SimSmoDraw in
S+Finmetrics. Using the example of river nile data, "nile.dat", why is
it that when I do this:
nile.mod = GetSsfStsm(irregular=sqrt(15099), level=sqrt(1469))
nile.fil = KalmanFil(nile.dat, ssf.mod, task="STSIM")
set.seed(123)
ssf.draw = SimSmoDraw(nile.fil, nile.mod, task="STSIM")
nile.draw = ssf.draw$response
tsplot(nile.draw, nile.dat)
I get a different answer than to when I do this:
nile.mod = GetSsfStsm(irregular=sqrt(15099), level=sqrt(1469))
nile.fil = KalmanFil(nile.dat, ssf.mod, task="DSSIM")
set.seed(123)
ssf.draw = SimSmoDraw(nile.fil, nile.mod, task="DSSIM")
nile.draw = nile.dat - ssf.draw$response
tsplot(nile.draw, nile.dat)
More importantly I know the first example using simulated states gives
the wrong answer because the smoothed simulated mean appears to bear
little resemblance to the actual data. It is as if the smoothed draw
is not conditional on the data as in the example in "Time series
analysis by state space methods [by] Durbin and Koopman (2001) figure
2.4 (i). It seems to occur whatever seed value I use. If this is the
case, then how can I make the smoothed draw conditional on the data?
I am using S-Plus 7 and Finmetrics 2 on Windows XP.
Hope someone can help, thanks in advance,
James Dartnall
|