kfs {sspir} | R Documentation |
Runs the Kalman smoother on an ssm
object if the
family-attribute of the object is gaussian
. If not, the
iterated extended Kalman smoother is used.
kfs(ss, ...)
ss |
an object of class ssm . |
... |
further arguments passed to the Kalman smoother. |
The function is a wrapper for kfilter
followed by
smoother
in the Gaussian case. For other family types,
extended
is called.
The returned value from either smoother
(Gaussian
case) or extended
.
Claus Dethlefsen and Søren Lundbye-Christensen.
kfilter
, smoother
,
extended
, ssm
.
data(mumpsdat) time <- 1:nrow(mumpsdat) m3 <- ssm( mumps ~ -1 + tvar(polytime(time,1)) + tvar(polytrig(time,12,1)), family=poisson(link=log),time=time,data=mumpsdat) m3$ss$phi["epsilon"] <- 0 m3$ss$phi["polytime(time, 1)time0"] <- 0 m3$ss$phi["polytime(time, 1)time1"] <- 0.0005 m3$ss$phi["polytrig(time,12,1)"] <- 0.0001 diag(m3$ss$C0) <- 1 m3.fit <- kfs(m3)