Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 2 3 4 5 |
ss |
an object of class |
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 |
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.
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.