echoice20.2.5 package

Choice Models with Economic Foundation

dd_dem_sr

Discrete Choice Predictions (HMNL with attribute-based screening)

dd_dem

Discrete Choice Predictions (HMNL)

dd_est_hmnl_screen

Estimate discrete choice model (HMNL, attribute-based screening (not i...

dd_est_hmnl

Estimate discrete choice model (HMNL)

dd_LL_sr

Log-Likelihood for screening hmnl model

dd_LL

Log-Likelihood for compensatory hmnl model

dummify

Create dummy variables within a tibble

dummyvar

Dummy-code a categorical variable

ec_boxplot_MU

Generate MU_theta boxplot

ec_boxplot_screen

Generate Screening probability boxplot

ec_dem_aggregate

Aggregate posterior draws of demand

ec_dem_eval

Evaluate (hold-out) demand predictions

ec_dem_summarise

Summarize posterior draws of demand

ec_demcurve_cond_dem

Create demand-incidence curves

ec_demcurve_inci

Create demand-incidence curves

ec_demcurve

Create demand curves

ec_draws_MU

Obtain MU_theta draws

ec_draws_screen

Obtain Screening probability draws

ec_estimates_MU

Obtain upper level model estimates

ec_estimates_screen

Summarize attribute-based screening parameters

ec_estimates_SIGMA_corr

Obtain posterior mean estimates of upper level correlations

ec_estimates_SIGMA

Obtain posterior mean estimates of upper level covariance

ec_gen_err_ev1

Simulate error realization from EV1 distribution

ec_gen_err_normal

Simulate error realization from Normal distribution

ec_lmd_NR

Obtain Log Marginal Density from draw objects

ec_lol_tidy1

Convert "list of lists" format to long "tidy" format

ec_screen_summarise

Summarize posterior draws of screening

ec_screenprob_sr

Screening probabilities of choice alternatives

ec_summarize_attrlvls

Summarize attributes and levels

ec_trace_MU

Generate MU_theta traceplot

ec_trace_screen

Generate Screening probability traceplots

ec_undummy_lowhigh

Convert dummy-coded variables to low/high factor

ec_undummy_lowmediumhigh

Convert dummy-coded variables to low/medium/high factor

ec_undummy_yesno

Convert dummy-coded variables to yes/no factor

ec_undummy

Converts a set of dummy variables into a single categorical variable

ec_util_choice_to_long

Convert a vector of choices to long format

ec_util_dummy_mutualeclusive

Find mutually exclusive columns

echoice2-package

echoice2: Choice Models with Economic Foundation

get_attr_lvl

Obtain attributes and levels from tidy choice data with dummies

grapes-.-grapes

Get the attribute of an object

logMargDenNRu

Log Marginal Density (Newton-Raftery)

prep_newprediction

Match factor levels between two datasets

vd_add_prodid

Add product id to demand draws

vd_dem_summarise

Summarize posterior draws of demand (volumetric models only)

vd_dem_vdm_screen

Demand Prediction (Volumetric demand, attribute-based screening)

vd_dem_vdm_ss

Demand Prediction (Volumetric demand, accounting for set-size variatio...

vd_dem_vdm

Demand Prediction (Volumetric Demand Model)

vd_est_vdm_screen

Estimate volumetric demand model with attribute-based conjunctive scre...

vd_est_vdm_ss

Estimate volumetric demand model accounting for set size variation (1s...

vd_est_vdm

Estimate volumetric demand model

vd_LL_vdm_screen

Log-Likelihood for conjunctive-screening volumetric demand model

vd_LL_vdm

Log-Likelihood for compensatory volumetric demand model

vd_LL_vdmss

Log-Likelihood for volumetric demand model with set-size variation

vd_long_tidy

Generate tidy choice data with dummies from long-format choice data

vd_prepare_nox

Prepare choice data for analysis (without x being present)

vd_prepare

Prepare choice data for analysis

vd_thin_draw

Thin 'echoice2'-vd draw objects

Implements choice models based on economic theory, including estimation using Markov chain Monte Carlo (MCMC), prediction, and more. Its usability is inspired by ideas from 'tidyverse'. Models include versions of the Hierarchical Multinomial Logit and Multiple Discrete-Continous (Volumetric) models with and without screening. The foundations of these models are described in Allenby, Hardt and Rossi (2019) <doi:10.1016/bs.hem.2019.04.002>. Models with conjunctive screening are described in Kim, Hardt, Kim and Allenby (2022) <doi:10.1016/j.ijresmar.2022.04.001>. Models with set-size variation are described in Hardt and Kurz (2020) <doi:10.2139/ssrn.3418383>.

  • Maintainer: Nino Hardt
  • License: MIT + file LICENSE
  • Last published: 2025-11-02