Repository of Apollo examples and Data files
On this page, users can download example files provided with Apollo. The examples are organised by model type. The examples use four datasets that are provided with Apollo. These are included in the package, but on this site, we also provide the datasets in .csv
format that can be opened in any text editor or spreadsheet software.
Data files
Expand/collapse
Mode choice |
apollo_modeChoiceData |
.pdf |
.csv |
Drug choice |
apollo_drugChoiceData |
.pdf |
.csv |
Route choice |
apollo_swissRouteChoiceData |
.pdf |
csv |
Time use |
apollo_timeUseData |
.pdf |
.csv |
Example files
MNL
Expand/collapse
MNL_RP |
.r |
.txt |
Simple MNL model on mode choice RP data |
MNL_SP |
.r |
.txt |
Simple MNL model on mode choice SP data |
MNL_SP_effects |
.r |
.txt |
Simple MNL model on mode choice SP data using effects coding |
MNL_SP_WTP_space |
.r |
.txt |
Simple MNL model on mode choice SP data in WTP space |
MNL_SP_covariates |
.r |
.txt |
MNL model with socio-demographics on mode choice SP data |
MNL_RP_SP |
.r |
.txt |
RP-SP model on mode choice data |
MNL_iterative_coding |
.r |
.txt |
MNL model using iterative coding for alternatives and attributes |
GEV
Expand/collapse
NL_two_levels |
.r |
.txt |
Two-level NL model with socio-demographics on mode choice SP data |
NL_two_levels_constraints_on_lambda |
.r |
.txt |
Two-level NL model with socio-demographics on mode choice SP data, with constraint on lambda |
NL_three_levels |
.r |
.txt |
Three-level NL model with socio-demographics on mode choice SP data |
NL_three_levels_constraints_on_lambdas |
.r |
.txt |
Three-level NL model with socio-demographics on mode choice SP data, with constraints on lambdas |
CNL |
.r |
.txt |
CNL model with socio-demographics on mode choice SP data |
CNL_constraint_on_alphas |
.r |
.txt |
CNL model with socio-demographics on mode choice SP data, with constraint on alphas |
CNL_logistic_transform_for_alphas |
.r |
.txt |
CNL model with socio-demographics on mode choice SP data, using logistic transform to ensure alphas meet constraints |
Non-RUM
Expand/collapse
RRM |
.r |
.txt |
Simple RRM model on mode choice SP data |
DFT_route_choice |
.r |
.txt |
DFT model on Swiss route choice SP data |
DFT_mode_choice |
.r |
.txt |
DFT model on mode choice SP data |
Ranking and rating
Expand/collapse
EL |
.r |
.txt |
Exploded logit model on drug choice data |
BW_EL |
.r |
.txt |
Best-worst logit model on drug choice data, using exploded logit function |
BW_joint_model |
.r |
.txt |
Best-worst logit model on drug choice data (coded as two stages) |
BW_joint_model_diff_params |
.r |
.txt |
Best-worst logit model on drug choice data, using different parameters for best and worst choices |
BW_simultaneous |
.r |
.txt |
Best-worst model on drug choice data, simultaneous choice |
OL |
.r |
.txt |
Ordered logit model fitted to attitudinal question in drug choice data |
OP |
.r |
.txt |
Ordered probit model fitted to attitudinal question in drug choice data |
normal_density |
.r |
.txt |
Normal density function fitted to attitudinal question in drug choice data |
Discrete-continuous
Expand/collapse
FMNL |
.r |
.txt |
Fractional logit (FMNL) model on time use data |
MDCEV_no_outside_good |
.r |
.txt |
MDCEV model on time use data, alpha-gamma profile, no outside good and constants only in utilities |
MDCEV_with_outside_good |
.r |
.txt |
MDCEV model on time use data, alpha-gamma profile with outside good and socio-demographics |
MDCNEV |
.r |
.txt |
MDCNEV model on time use data, alpha-gamma profile with outside good and socio-demographics |
eMDC_with_budget |
.r |
.txt |
Extended MDC with complementarity and substitution, with observed budget and socio-demographics |
eMDC_without_budget |
.r |
.txt |
Extended MDC with complementarity and substitution, with unobserved budget and socio-demographics |
Mixture models
Expand/collapse
MMNL_preference_space |
.r |
.txt |
Mixed logit model on Swiss route choice data, uncorrelated Lognormals in preference space |
MMNL_preference_space_correlated |
.r |
.txt |
Mixed logit model on Swiss route choice data, correlated Lognormals in utility space |
MMNL_wtp_space_inter_intra |
.r |
.txt |
Mixed logit model on Swiss route choice data, WTP space with correlated and flexible distributions, inter and intra-individual heterogeneity |
ECL_preference_space_heteroskedasticity |
.r |
.txt |
Error components logit model with heteroskedasticity term |
ECL_preference_space_panel_effect |
.r |
.txt |
Error components logit model with panel effect term |
DM |
.r |
.txt |
Simple DM model on Swiss route choice data |
LC_no_covariates |
.r |
.txt |
Simple LC model on Swiss route choice data, no covariates in class allocation model |
LC_with_covariates |
.r |
.txt |
LC model with covariates in class allocation model |
LC_MMNL |
.r |
.txt |
Latent class with continuous random parameters on Swiss route choice data |
Mixed_MDCEV |
.r |
.txt |
Mixed MDCEV model on time use data, alpha-gamma profile, no outside good and random constants |
Hybrid choice
Expand/collapse
Hybrid_with_continuous_measurement |
.r |
.txt |
Hybrid choice model using continuous measurement model for indicators |
Hybrid_with_OL |
.r |
.txt |
Hybrid choice model using ordered measurement model for indicators |
Hybrid_with_OL_bugged_example |
.r |
n/a |
Hybrid choice model using ordered measurement model for indicators - bugged example for debugging |
Hybrid_with_OL_and_MMNL |
.r |
.txt |
Hybrid choice model on drug choice data, classical estimation |
Hybrid_LC_with_OL |
.r |
.txt |
Hybrid latent class choice model using ordered measurement model for indicators |
Alternative estimation approaches
Expand/collapse
HB_MNL |
.r |
.txt |
Bayesian estimation of MNL model on mode choice SP data |
HB_MMNL |
.r |
.txt |
Bayesian estimation of Mixed Logit model on mode choice SP data |
Hybrid_with_OL_and_MMNL_bayesian |
.r |
.txt |
Hybrid choice model on drug choice data, Bayesian estimation |
EM_MMNL |
.r |
.txt |
Mixed logit model on Swiss route choice data, EM algorithm |
EM_LC_no_covariates |
.r |
.txt |
LC model with class allocation model on Swiss route choice data, EM algorithm |
EM_LC_with_covariates |
.r |
.txt |
LC model with class allocation model on Swiss route choice data, EM algorithm |