rbiogeme-package: Interface to Biogeme

rbiogeme-packageR Documentation

Interface to Biogeme

Description

rbiogeme is a complete R-facing interface to the native Biogeme estimation engine. Data, parameters, expressions, models, estimation controls, and post-estimation operations are specified from R. The bridge compiles the complete expression tree once before native numerical work begins.

Details

Start a new session with biogeme_setup() to provision or verify the runtime and receive corrective actions. Configure the runtime with biogeme_config() before the first call that initializes Python when selecting an existing interpreter. The default runtime is lazy. A typical workflow is to create a numeric data frame, wrap it with biogeme_database(), build symbolic expressions with variable() and biogeme_beta(), construct a specialized or generic model, and call estimate(). The returned fit supports the ordinary R methods summary(), coef(), vcov(), logLik(), and nobs().

Specialized constructors cover multinomial, nested, cross-nested, panel, Bayesian, MDCEV, hybrid-choice, catalog, assisted-specification, and sampled-alternative workflows. Generic models use a complete likelihood expression and can additionally hold a probability, named simulation expressions, weights, panel aggregation, draw metadata, subsets, and parameter overrides.

Expressions are symbolic. Arithmetic, comparisons, logical operators, transformations, probability functions, draws, integration nodes, and derivatives create neutral expression nodes; they do not evaluate a local R likelihood. Native Biogeme performs compilation, differentiation, integration, optimization, simulation, and reporting.

The expression operators +, -, *, /, and ^ build arithmetic nodes. Comparisons ==, !=, <, <=, >, and >= build indicator nodes. Logical conjunction, disjunction, and negation use \&, |, and !. Use logzero() and safe_exp() when the native numerically safe form is required.

Use estimate() for fresh estimation. Use estimate_or_load() only when explicit YAML loading or recycling is desired, and choose a fresh temporary output directory for equivalence tests. Random-draw and sampling examples should fix the native draw design and seed and document any remaining simulation noise.

Start with ?biogeme_setup or ?biogeme_check, then read vignette("getting-started", package = "rbiogeme") and vignette("modeling-workflows", package = "rbiogeme") for the R syntax and the complete workflow. Advanced Bayesian, Monte Carlo, MDCEV, catalog, hybrid-choice, and sampled-alternative examples are in vignette("advanced-models", package = "rbiogeme").

The whole package was implemented by ChatGPT 5.6 Luna under the supervision of Michel Bierlaire.

Value

Depending on the function, a database, expression, model, diagnostics list, estimation result, or result-derived object.

See Also

biogeme_config, biogeme_database, biogeme_model, logit_model, estimate, simulate, summary.biogeme_fit, coef.biogeme_fit, vcov.biogeme_fit, logLik.biogeme_fit


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