Learn R Programming

⚠️There's a newer version (0.3.5) of this package.Take me there.

apollo (version 0.1.0)

Tools for Choice Model Estimation and Application

Description

The Choice Modelling Centre (CMC) at the University of Leeds has developed flexible code for the estimation and application of choice models in R. Users are able to write their own model functions or use a mix of already available ones. Random heterogeneity, both continuous and discrete and at the level of individuals and choices, can be incorporated for all models. There is support for both standalone models and hybrid model structures. Both classical and Bayesian estimation is available, and multiple discrete continuous models are covered in addition to discrete choice. Multi-threading processing is supported for estimation and a large number of pre and post-estimation routines, including for computing posterior (individual-level) distributions are available. For examples, a manual, and a support forum, visit www.ApolloChoiceModelling.com. For more information on choice models see Train, K. (2009) and Hess, S. & Daly, A.J. (2014) for an overview of the field.

Copy Link

Version

Install

install.packages('apollo')

Monthly Downloads

2,151

Version

0.1.0

License

GPL-2

Maintainer

David Palma

Last Published

March 16th, 2020

Functions in apollo (0.1.0)

apollo_el

Calculates exploded logit probabilities
apollo_lc

Calculates the likelihood of a latent class model
apollo_lcConditionals

Calculates conditionals of a latent class model.
apollo_estimate

Estimates model
apollo_mlhs

Generate random draws using MLHS algorithm
apollo_mdcnev

Calculates MDCNEV likelihoods with an outside good.
apollo_fitsTest

Compares fit of model across categories
apollo_initialise

Prepares environment
apollo_insertRows

Inserts rows
apollo_keepRows

Keeps only some rows
apollo_estimateHB

Estimates model
apollo_attach

Attaches predefined variables.
apollo_firstRow

Keeps only the first row for each individual
apollo_prediction

Predicts using an estimated model
apollo_loadModel

Loads model from file
apollo_sharesTest

Compares predicted and observed shares
apollo_prepareProb

Checks likelihood
apollo_dft

Calculate DFT probabilities
apollo_speedTest

Measures evaluation time of a model
apollo_printLog

Returns the log of Apollo
apollo_makeLogLike

Creates log-likelihood function.
apollo_lrTest

Likelihood ratio test
apollo_mdcev

Calculates MDCEV likelihoods.
apollo_readBeta

Reads parameters from file
apollo_drugChoiceData

Simulated dataset of medication choice.
apollo_lcUnconditionals

Returns draws for random parameters in a latent class model model
apollo_deltaMethod

Delta method
apollo_llCalc

Calculates log-likelihood of all model components
apollo_modeChoiceData

Simulated dataset of mode choice.
apollo_mnl

Calculates multinomial logit probabilities
apollo_makeCluster

Creates cluster for estimation.
apollo_detach

Detaches parameters and the database.
apollo_mnl_2

Calculates probabilities of a multinomial logit model.
apollo_nl

Calculates probabilities of a nested logit
apollo_validateControl

Validates apollo_control
apollo_timeUseData

Dataset of time use.
apollo_unconditionals

Returns draws for random parameters in a latent class model model
apollo_normalDensity

Calculates density from a Normal distribution
apollo_makeDraws

Creates draws for models with mixing
apollo_validateData

Validates data
apollo_modelOutput

Prints estimation results to console
apollo_ol

Calculates the probability of an ordered logit model
apollo_mdcevInside

Calculates MDCEV likelihoods without an outside good.
apollo_op

Calculates the probability of an ordered probit model
apollo_validateHBControl

Validates the apollo_HB list of parameters
apollo_reportModelTypeLog

Writes the type of a model inside apolloLog
apollo_saveOutput

Saves estimation results to files.
apollo_splitDataDraws

Splits data and draws for loading in cluster
apollo_validateInputs

Prepares input for apollo_estimate
apollo_swissRouteChoiceData

Dataset of route choice.
apollo_weighting

Applies weights
apollo_mdcevOutside

Calculates MDCEV likelihoods with an outside good.
apollo_writeF12

Writes an F12 file with the results of a model estimation.
apollo_outOfSample

Out-of-sample fit (LL)
apollo_searchStart

Searches for better starting values.
apollo_writeTheta

Writes the vector [beta,ll] to a file called modelname_iterations.csv
apollo_setRows

Sets specified rows to a given value
apollo_panelProd

Calculates product of panel observations.
.onAttach

Prints package startup message
apollo_conditionals

Calculates conditionals
apollo_cnl

Calculates probabilities of a cross nested logit
apollo_bootstrap

Bootstrap a model
apollo_avgInterDraws

Averages inter-individual draws
apollo_avgIntraDraws

Averages intra-individual draws
apollo_combineResults

Write model results to file
apollo_choiceAnalysis

Reports market share for subsamples
apollo_addLog

Writes an entry to apolloLog
apollo_combineModels

Combines separate model components.