Learn R Programming

abn (version 3.1.12)

export_abnFit_bayes: Export abnFit object fitted with Bayesian methods

Description

Export abnFit object fitted with Bayesian methods

Usage

export_abnFit_bayes(
  object,
  format,
  include_network,
  scenario_id = NULL,
  label = NULL,
  ...
)

Value

A named list with components: scenario_id, label, variables, parameters, arcs.

Arguments

object

An object of class abnFit, typically created by fitAbn.

format

Character string specifying the export format. Currently, only "json" is supported.

include_network

Logical, whether to include network structure (variables and arcs). Default is TRUE.

scenario_id

Optional character string or numeric identifier for the model run or scenario. Useful for tracking multiple model versions or experiments. Default is NULL.

label

Optional character string providing a descriptive name or label for the scenario. Default is NULL.

...

Additional export options (currently unused, reserved for future extensions).

Details

This function handles abnFit objects fitted using Bayesian methods. It will extract the posterior distributions and other Bayesian-specific information.

The structure will follow the same variables/parameters/arcs format, but parameters will include posterior summaries (mean, median, credible intervals) instead of point estimates and standard errors.

TODO: Implement the full extraction logic for Bayesian models, including:

  • Posterior mean/median for parameters

  • Credible intervals

  • Convergence diagnostics (Rhat, ESS)

  • Prior specifications