distributed_parameter: Store a simulated individual-level parameter in Bayesian...

View source: R/expressions.R

distributed_parameterR Documentation

Store a simulated individual-level parameter in Bayesian results

Description

Wraps a child expression in native Biogeme's DistributedParameter node. The wrapper preserves the named variable in Bayesian output and is compiled before native estimation; it is not evaluated by R during sampling.

Usage

distributed_parameter(name, expression)

Arguments

name

Name used for the stored native variable.

expression

Child Biogeme expression, usually a location parameter plus a scale parameter multiplied by draw().

Details

This helper is a thin interface to native Biogeme and does not implement a sampling or likelihood engine in R.

Value

A symbolic Biogeme expression compiled to native DistributedParameter.

Examples

beta <- biogeme_beta("b_time")
random_coefficient <- distributed_parameter(
  "b_time_rnd",
  beta + biogeme_beta("b_time_s", start = 1) * draw("b_time_eps", "NORMAL")
)
format(random_coefficient)

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