extended: Iterated Extended Kalman Smoothing

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

An iterative procedure for calculation of the conditional mean and variance of the latent process in non-Gaussian state space models. The method calculates an approximating Gaussian state space model.

Usage

1
2
3
4
5
extended( ss,
          maxiter = 50,
          epsilon = 1e-06,
          debug = FALSE
        )

Arguments

ss

an object of class SS.

maxiter

a positive integer giving the maximum number of iterations to run.

epsilon

a (small) positive numeric giving the tolerance of the maximum relative differences of m and C between iterations.

debug

a logical. If TRUE, some extra information is printed.

Details

This is the default method when using kfs on an object of class ssm when the family is not gaussian. The conditional mean and variance can be retrieved using getFit and are then stored in the attributes m and C, respectively.

Value

The object ss with updated components m, C, loglik, iteration, ytilde, x$vtilde, mu. These describe the approximating Gaussian state space model.

Author(s)

Claus Dethlefsen and Søren Lundbye-Christensen.

References

Durbin J, Koopman SJ (2001). Time series analysis by state space methods. Oxford University Press.

See Also

ssm, kfilter, smoother.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(mumps)
index <- 1:length(mumps) # use 'index' instead of time
model <- ssm( mumps ~ -1 + tvar(polytime(index,1)),
              family=poisson(link=log))
results <- getFit(model)
plot(mumps,type='l',ylab='Number of Cases',xlab='',axes=FALSE)
lines( exp(results$m[,1]), lwd=2)
## Alternatives:
## results2 <- extended(model$ss)
## results3 <- kfs(model) ## yields the same

ClausDethlefsen/sspir documentation built on May 6, 2019, 7 p.m.