bayesian_estimate: Estimate a model with native Bayesian inference

View source: R/results.R

bayesian_estimateR Documentation

Estimate a model with native Bayesian inference

Description

The complete R expression tree is compiled once, then native Biogeme builds and samples the PyMC model. The returned R object contains the native posterior summary and the paths of any generated NetCDF/YAML/HTML files; posterior draws are not represented as manually managed Python objects.

Usage

bayesian_estimate(
  model,
  model_name = "rbiogeme_model",
  controls = list(),
  starting_values = NULL,
  control = NULL
)

Arguments

model

A biogeme_model.

model_name

Native Biogeme model name.

controls

Named native Biogeme controls.

starting_values

Optional named numeric vector of starting values.

control

Optional biogeme_control() object; an alias for controls.

Details

NetCDF and YAML output are enabled by default for this operation. Additional Bayesian controls such as bayesian_draws, warmup, chains, target_accept, calculate_likelihood, calculate_waic, calculate_loo, and mcmc_sampling_strategy are passed to native Biogeme through controls. Because those default Bayesian files are persistent, supply an explicit output_directory through biogeme_control() (or disable both output types explicitly).

Value

An object of class biogeme_bayesian_fit containing the native posterior summary and output paths.


rbiogeme documentation built on Sept. 29, 2026, 5:09 p.m.