Skip to content

Add convert() method to convert dfm objects to dlm and KFAS formats - #104

Open
SebKrantz wants to merge 1 commit into
mainfrom
claude/issue-103-20260605-0239
Open

Add convert() method to convert dfm objects to dlm and KFAS formats#104
SebKrantz wants to merge 1 commit into
mainfrom
claude/issue-103-20260605-0239

Conversation

@SebKrantz

Copy link
Copy Markdown
Member

Closes #103

Adds a convert() S3 generic and convert.dfm() method that converts a dfm object into equivalent state space representations for the dlm and KFAS packages.

Changes

  • New R/convert.R: convert() generic + convert.dfm() with to = c("dlm", "KFAS")
  • DESCRIPTION: added dlm and KFAS to Suggests
  • NAMESPACE: added export(convert) and S3method(convert,dfm)

Generated with Claude Code

…ersion

Adds a new convert() S3 generic and convert.dfm() method that converts
a dfm object into equivalent state space representations for the dlm
and KFAS packages. This enables prediction intervals, forecasts, and
other functionality from those packages.

- convert(mod, to = "dlm"): maps FF=C, GG=A, V=R, W=Q with diffuse C0
- convert(mod, to = "KFAS"): builds SSModel with SSMcustom, Z=C, T=A,
  R=I, Q=Q, H=R, diffuse P1inf, with standardized data embedded

Fixes #103

Co-authored-by: Sebastian Krantz <SebKrantz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Object conversion

1 participant