Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as_bssm

Convert KFAS Model to bssm Model


Description

Converts SSModel object of KFAS package to general bssm model of type ssm_ulg, ssm_mlg, ssm_ung or ssm_mng.

Usage

as_bssm(model, kappa = 100, ...)

Arguments

model

Object of class SSModel.

kappa

For SSModel object, a prior variance for initial state used to replace exact diffuse elements of the original model.

...

Additional arguments to model building functions of bssm (such as prior and updating functions).

Value

Object of class ssm_ulg, ssm_mlg, ssm_ung or ssm_mng.

Examples

library("KFAS")
model_KFAS <- SSModel(Nile ~
  SSMtrend(1, Q = 2, P1 = 1e4), H = 2)
model_bssm <- as_bssm(model_KFAS)  
logLik(model_KFAS)
logLik(model_bssm)

bssm

Bayesian Inference of Non-Linear and Non-Gaussian State Space Models

v1.1.4
GPL (>= 2)
Authors
Jouni Helske [aut, cre] (<https://orcid.org/0000-0001-7130-793X>), Matti Vihola [aut] (<https://orcid.org/0000-0002-8041-7222>)
Initial release
2021-04-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.