extended {sspir} | R Documentation |
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.
extended(ss, maxiter = 50, epsilon = 1e-06, debug = FALSE)
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. |
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.
The object ss
with updated components m
, C
,
loglik
, iteration
, ytilde
, x$vtilde
,
mu
. These describe the approximating Gaussian state space model.
Claus Dethlefsen and Søren Lundbye-Christensen.
Durbin J, Koopman SJ (2001). Time series analysis by state space methods. Oxford University Press.
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