sampled_alternatives_model: Define a sampled-alternative Biogeme model

View source: R/sampling.R

sampled_alternatives_modelR Documentation

Define a sampled-alternative Biogeme model

Description

Defines the protocol for a native sampling-of-alternatives model. Sampling, cross-variable expansion, likelihood construction, differentiation, and optimization are performed by native Biogeme through the Python bridge. Sampling is regenerated with recycling disabled by default.

Usage

sampled_alternatives_model(
  alternatives,
  individuals,
  choice_column,
  id_column,
  utility,
  partition,
  biogeme_file_name,
  model_type = c("logit", "nested", "cnl"),
  combined_variables = list(),
  mev_partition = NULL,
  mev_sample_sizes = NULL,
  nests = NULL,
  control = NULL
)

Arguments

alternatives

Numeric data frame with one row per alternative.

individuals

Numeric data frame with one row per decision maker.

choice_column

Choice column in individuals; values are alternative IDs.

id_column

Unique alternative-ID column in alternatives.

utility

Complete neutral Biogeme utility expression.

partition

Main [biogeme_sampling_partition()].

biogeme_file_name

Path for the native sampled-data file.

model_type

One of "logit", "nested", or "cnl".

combined_variables

Optional list of [cross_variable()] objects.

mev_partition

Optional partition used for MEV terms.

mev_sample_sizes

Optional MEV sample sizes.

nests

Nested or cross-nested nest object for the selected model type.

control

Optional [biogeme_control()] object.

Value

A biogeme_sampled_alternatives_model object containing ordinary R data and a neutral expression specification.

See Also

estimate_sampled_alternatives()


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