sspir {sspir} | R Documentation |
State Space Models in R
Description
The main contribution of this package is to give a formula
language for specifying dynamic generalized linear models. That is, an
extension of glm formulae by marking terms with tvar
to specify
that their coefficients are time-varying. The package also provides
(extended) Kalman filter and Kalman smoother for models within
Gaussian, Poisson and binomial families. To get started, try
demo(gas)
, demo(vandrivers)
and demo(mumps)
.
What sspir does not include
- Optimization
- To keep full generality, the Kalman filter and
smoother use the
SS
functions Fmat
,
Gmat
, Vmat
, Wmat
. The special cases where these
matrices are time-invariant, the algorithms can be considerably
speeded up by implementing these special cases eg. in C. For simple
models, see StructTS
.
- Diffuse initialization
- We use m_0 and C_0 as
initialization of the state process. This may cause numeric problems
which may be solved using diffuse initialization (see Durbin and
Koopman (2000)).
- ARIMA models
- These are not directly supported, but since they
can be expressed as state space models, it is possible to specify
them as
SS
objects.
- Importance sampling
- We use iterated extended Kalman smoothing
and use the likelihood from the approximating Gaussian state space
model. This may be improved using importance sampling.
- Multivariate observations
- We have plans including methods for
combining
ssm
objects for different time-series so
that they can possibly share components in the latent process.
- Multi-process models
- We have plans for including
methods for combining
ssm
objects defining different
models for the same time-series. Providing prior probabilities for
these models, it is possible to calculate posterior probabilites for
the models, thereby discriminating between the models.
- Markov chain Monte Carlo
- A state space model may be part of a
hierarchical model giving priors on hyper-parameters. Inference may
be done using MCMC methods and for the state space model, the
Forwards filtering, Backwards sampling method may be used. We plan
to include at least some support for this.
- Missing values
- Missing values are not allowed in the covariates.
- Family
- Currently, only three combinations of distribution/link
functions are supported: Gaussian/identity, Poisson/log,
Binomial/logit. To add new variations, edit the function
getFamily
Other software
Probably this list is incomplete. Feel free to contribute with
more links to packages.
Author(s)
Claus Dethlefsen and Søren Lundbye-Christensen.
See Also
ssm
[Package
sspir version 0.2.0
Index]