CODE

The latest full release of Apollo is always hosted on CRAN and we recommend installing it via install.packages("apollo"). When using the CRAN release, we recommend installation using binaries rather than building from source.

The software on this site comes with no guarantees and the authors cannot be held liable for any errors. Users of Apollo are asked to acknowledge the use of the software by citing the academic paper and the manual for the version used in their work.

» Hess, S. & Palma, D. (2019), Apollo: a flexible, powerful and customisable freeware package for choice model estimation and application, Journal of Choice Modelling, Volume 32, September 2019, 100170

» Hess, S. & Palma, D. (2019), Apollo version 0.1.0, user manual, www.ApolloChoiceModelling.com

For an overview of changes across versions, see below.

Users can also download legacy and development versions, along with the examples and manual for those versions.

Each version of the package can be downloaded in three different formats. All formats have the same functionality, which format you should download will mostly depend on your operating system:

» Source (*.tar.gz): This is the human-readable code. Linux users need to download this format. Window users can use it too, but they will need to have Rtools installed for it to work. macOS users can also use this format, but they will need to install multiple pre-requisites (see cran.r-project.org/bin/macosx/tools)

» macOS binary: This format is for macOS users only. It does not need any pre-requisites (other than R) to install it.

» Windows binary: This format is only for Windows users only. It does not need any pre-requisites (other than R) to install it.

Version Status Release date Source code macOS binary Windows binary Manual Examples
v0.0.6 released 13 March 2019 apollo_0.0.6.tar.gz - - Apollo_v_006.pdf examples_v0.0.6.zip
v0.0.7 released 8 May 2019 apollo_0.0.7.tar.gz - - Apollo_v_007.pdf examples_v0.0.7.zip
v0.0.8 released 9 September 2019 apollo_0.0.8.tar.gz apollo_0.0.8.tgz apollo_0.0.8.zip Apollo_v_008.pdf examples_v0.0.8.zip
v0.0.9 released 23 October 2019 apollo_0.0.9.tar.gz apollo_0.0.9.tgz apollo_0.0.9.zip Apollo_v_009.pdf examples_v0.0.9.zip
v0.1.0 released 16 March 2020 apollo_0.1.0.tar.gz apollo_0.1.0.tgz apollo_0.1.0.zip Apollo_v_010.pdf examples_v0.1.0.zip
v0.1.1 unreleased version (last update 15 September 2020) apollo_0.1.1.tar.gz apollo_0.1.1.tgz apollo_0.1.1.zip Apollo_v_011.pdf examples_v0.1.1.zip
v0.2.0 released 19 October 2020 apollo_0.2.0.tar.gz apollo_0.2.0.tgz apollo_0.2.0.zip Apollo_v_020.pdf examples_v0.2.0.zip
v0.2.1 released 28 October 2020 apollo_0.2.1.tar.gz apollo_0.2.1.tgz apollo_0.2.1.zip Apollo_v_021.pdf examples_v0.2.1.zip
v0.2.2 released 5 December 2020 apollo_0.2.2.tar.gz apollo_0.2.2.tgz apollo_0.2.2.zip Apollo_v_022.pdf examples_v0.2.2.zip
v0.2.3 released 20 January 2021 apollo_0.2.3.tar.gz apollo_0.2.3.tgz apollo_0.2.3.zip Apollo_v_023.pdf examples_v0.2.3.zip
v0.2.4 released 25 February 2021 apollo_0.2.4.tar.gz apollo_0.2.4.tgz apollo_0.2.4.zip Apollo_v_024.pdf examples_v0.2.4.zip
v0.2.5 under development last updated 29 March 2021 apollo_0.2.5.tar.gz apollo_0.2.5.tgz apollo_0.2.5.zip coming soon coming soon
HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO VERSION 0.0.7
GO TO VERSION 0.0.8
GO TO VERSION 0.0.9
GO TO VERSION 0.1.0
GO TO VERSION 0.1.1
GO TO VERSION 0.2.0
GO TO VERSION 0.2.1
GO TO VERSION 0.2.2
GO TO VERSION 0.2.3
GO TO VERSION 0.2.4

Version 0.0.6 (13 March 2019)
This is the first fully functioning release of Apollo.

Version 0.0.7 (8 May 2019)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

Inputs changed for apollo_choiceAnalysis
Functions affected: apollo_choiceAnalysis
Detailed description: inputs changed so function can be called prior to apollo_validateInputs
Backwards compatibility of code: function call changed from version 0.0.7 onwards

Constraints for classical estimation
Functions affected: apollo_estimate
Detailed description: Apollo now allows the user to include a list called constraints in estimate_settings for use with BFGS for classical model estimation.
Backwards compatibility of code: no backwards compatibility issues for existing functions

Scaling of parameters during model estimation
Functions affected: apollo_estimate
Detailed description: scaling of model parameters can be used during estimation
Backwards compatibility of code: no backwards compatibility issues for existing functions

Validation output
Functions affected: apollo_estimate
Detailed description: Apollo no longer reports that all pre-estimation checks were passed for a model component and instead only reports if there are an issues.
Backwards compatibility of code: no backwards compatibility issues for existing functions

Bayesian estimation produces model$estimate
Functions affected: apollo_estimate, apollo_prediction, apollo_llCalc
Detailed description: until version 0.0.6, Bayesian estimation in Apollo did not produce a model$estimate output. We have retained the various existing outputs, but in addition, model$estimate is now produced, combining non-random parameters with individual specific posteriors for random parameters. This now allows the user to use apollo_prediction and apollo_llCalc on such outputs, where care is of course required in interpretation of outputs based on posterior means.
Backwards compatibility of code: no backwards compatibility issues for existing functions

Changes to Apollo examples:
Examples affected: apollo_example_1.r and apollo_example_2.r
Detailed description: Use of apollo_choiceAnalysis added
Backwards compatibility of examples: affected part only works from version 0.0.7 onwards

Examples affected: apollo_example_12.r
Detailed description: Scaling in estimation implemented
Backwards compatibility of examples: only works from version 0.0.7 onwards

Examples affected: apollo_example_26.r
Detailed description: HB prediction component added
Backwards compatibility of examples: affected part only works from version 0.0.7 onwards

Bug fixes:
apollo_speedTest
This function was unintentionally hidden from users in previous versions

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.0.8 (9 September 2019)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

Bootstrap estimation added
Functions affected: apollo_bootstrap, apollo_estimate
Detailed description: the user can now perform bootstrap estimation. This can also be called directly with apollo_estimate during estimation
Backwards compatibility of code: new function from version 0.0.8 onwards, new optional arguments for apollo_estimate, but function called in the same way

Allow user to use subset of rows for analysis of choices
Functions affected: apollo_choiceAnalysis
Detailed description: An additional rows argument can be entered into choiceAnalysis_settings.
Backwards compatibility of code: optional argument added from version 0.0.8 onwards, but function called in the same way

Outputs changed for apollo_choiceAnalysis
Functions affected: apollo_choiceAnalysis
Detailed description: outputs changed so that t-test value is reported instead of p-value, and order of outputs is changed
Backwards compatibility of code: outputs changed from version 0.0.8 onwards, but function called in the same way

Allow user to change name and location of outside good in MDCEV and MDCNEV
Functions affected: apollo_mdcev and apollo_mdcnev
Detailed description: An additional outside argument can be entered into mdcev_settings and mdcnev_settings with the name of the outside good which can now differ from outside. It also no longer needs to be in first position in the list of alternatives.
Backwards compatibility of code: optional argument added from version 0.0.8 onwards, but function called in the same way

No need to define superfluous gamma for outside good in MDCEV and MDCNEV
Functions affected: apollo_mdcev and apollo_mdcnev
Detailed description: The user no longer needs to create a gamma term for the outside good.
Backwards compatibility of code: function called in the same way

Chosen unavailable alternatives have a likelihood of zero
Functions affected: apollo_mnl, apollo_mdcev, apollo_mdcnev
Detailed description: MNL, MDCEV and MDCNEV now return a likelihood equal to zero for chosen alternatives that are not available. This change is only relevant if apollo_control$noValidation is TRUE.
Backwards compatibility of code: new likelihood values for unavailable chosen alternatives on MNL, MDCEV and MDCNEV models from version 0.0.8 onwards

Allow user to specify number of outliers to report
Functions affected: apollo_modelOutput, apollo_saveOutput
Detailed description: In addition to specifying TRUE/FALSE for printOutliers, the user can provide the number of outliers to report (instead of the default of 20).
Backwards compatibility of code: optional argument added from version 0.0.8 onwards, but function called in the same way

Ability to define estimation/validation subsets for apollo_outOfSample
Functions affected: apollo_outOfSample
Detailed description: the user can now provide a matrix or data.frame describing which observations are to be used in the estimation and validation subsets
Backwards compatibility of code: optional argument added from version 0.0.8 onwards, but function called in the same way

Individual IDs and choice scenario numbers added in predictions
Functions affected: apollo_prediction
Detailed description: The output from apollo_prediction now includes the IDs and choice observation numbers as the first two columns.
Backwards compatibility of code: function called in the same way

Changes to Apollo examples:

Examples affected: apollo_example_3.r, apollo_example_11.r, apollo_example_13.r, apollo_example_22.r, apollo_example_24.r, apollo_example_25.r, apollo_example_26.r

Detailed description: apollo_prediction now includes the IDs and observation numbers as the first two columns, meaning some output is shifted.
Backwards compatibility of examples: use of outputs needs adjusting to reflect change in columns

Bug fixes:

apollo_combineResults
This function failed in earlier versions when using only a single model

apollo_firstRow
This function mistakenly replicated the first row for each person Tn times

apollo_estimate with scaling and HB
HB estimation failed in earlier versions for models without any random parameters

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.0.9 (23 October 2019)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

Additional diagnostic message for HB estimation
Functions affected: apollo_estimate
Detailed description: the RSGHB package used for Bayesian estimation left censors likelihood values at the individual level to avoid numerical issues. This has the undesired side effect of mis-specified models still running, and a warning message is now displayed when censoring has been used
Backwards compatibility of code: function called in the same way

Pre-estimation tests to ensure all parameters affect likelihood function
Functions affected: apollo_estimate
Detailed description: unless apollo_control$noDiagnostics==TRUE, a pre-estimation check is used to ensure that there are no parameters in apollo_beta for which changes do not lead to changes in the model likelihood
Backwards compatibility of code: function called in the same way

Changes to Apollo examples:
None

Bug fixes:

apollo_deltaMethod
This function had a small error in the calculation for standard errors for logistic transforms

apollo_estimate with HB and only non-random parameters
HB estimation failed in earlier versions for models without any random parameters if using scaling

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.1.0 (16 March 2020)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

R version requirement changed to 3.6.0
Functions affected: all of Apollo
Detailed description: users running Apollo version 0.1.0 require at a minimum R version 3.6.0
Backwards compatibility of code: no changes to actual functions

Improved error reporting and printing
Functions affected: majority of functions
Detailed description: warnings are now generally displayed at the point they apply rather than after estimation. In addition, numerous new checks have been implemented for many of the functions.
Backwards compatibility of code: no backwards compatibility issues

Referring to database inside apollo_probabilties no longer allowed
Functions affected: all functions that call apollo_probabilties
Detailed description: the user is not allowed to refer to database by name inside apollo_probabilties. There is no reason for doing so as the database is attached and all elements therein can be referred to directly
Backwards compatibility of code: this should not affect any users. The only requirement is to now use the get function when attempting to retrieve an object whose name is put together via paste0

Can define names for individual model components
Functions affected: all existing functions for models, i.e. apollo_mnl etc
Detailed description: the user can now include an optional additional argument componentName in the settings for individual models. This is then used in the reporting of outputs as well as in any error messages
Backwards compatibility of code: no backwards compatibility issues

Tests for zero probabilities at starting values for individual model components
Functions affected: all existing functions for models, i.e. apollo_mnl etc
Detailed description: unless apollo_control$noValidation==TRUE, Apollo now checks the likelihood of individual model components in addition to the overall model and prints a warning if probabilities are zero for some individuals while estimation is not started if probabilities are zero for all. This is relevant for latent class models, where it is permissable to have zero probabilities for some individuals in some classes, but where initial zero probabilities for all individuals in a class are likely to highlight problems.
Backwards compatibility of code: no backwards compatibility issues

Ability to sort results by date
Functions affected: apollo_combineResults
Detailed description: an additional option sortByDate has been included. When set to TRUE, the models in the summary file will be sorted by the date when the model was estimated (default set to TRUE)
Backwards compatibility of code: no backwards compatibility issues

Improved memory usage with multi-core estimation
Functions affected: apollo_estimate
Detailed description: Memory requirements for multi-core estimation have been reduced substantially compared to previous versions
Backwards compatibility of code: no backwards compatibility issues

Constraints in HB estimation can now use names of parameters
Functions affected: apollo_estimate with apollo_control$HB==TRUE
Detailed description: the user can now use names of parameters when creating constraints for HB estimation rather than relying on the numeric coding from RSGHB
Backwards compatibility of code: no backwards compatibility issues for existing functions as old format for input still permitted

Smallest absolute eigenvalue of Hessian reported
Functions affected: apollo_estimate, apollo_modelOutput, apollo_saveOutput
Detailed description: Apollo reports the eigenvalue of the Hessian that is closest to zero. Small values can indicate convergence issues. A special warning message is displayed if some of the eigenvalues are positive.
Backwards compatibility of code: no backwards compatibility issues

Check whether class allocation probabilities for latent class sum to 1
Functions affected: apollo_lc
Detailed description: New check to ensure that class alloaction probabilities for latent class sum to 1
Backwards compatibility of code: no backwards compatibility issues

Calculation of LL(0)
Functions affected: apollo_modelOutput and apollo_saveOutput
Detailed description: The calculation of the log-likelihood at zero has been improved for some models, as has the reporting of it. Where this measure does not apply, Apollo now reports “Not applicable” instead of “NA”
Backwards compatibility of code: no backwards compatibility issues

Ordered probit added
Functions affected: apollo_op
Detailed description: the user can now use ordered probit models via the function apollo_op
Backwards compatibility of code: no backwards compatibility issues

Out of sample testing can add to existing runs
Functions affected: apollo_outOfSample
Detailed description: apollo_outOfSample checks whether output files already exists and adds to those if the number of runs requested is larger than what is already stored in these files
Backwards compatibility of code: no backwards compatibility issues

Prevent use of some functions for HB models
Functions affected: apollo_panelProd, apollo_avgInterdraws, apollo_avgIntraDraws, apollo_deltaMethod, apollo_conditionals, apollo_unconditionals, apollo_lcConditionals, apollo_lcUnconditionals
Detailed description: Many of the Apollo functions are for classical estimation only, and their use previously led to failures. Their use is now prevented when apollo_control$HB==TRUE.
Backwards compatibility of code: the call to these functions was previously ignored and will now lead to a failure in any files they are still included in. The appropriate lines need commenting out.

Inputs changed for apollo_prediction and added ability to calculate standard errors
Functions affected: apollo_prediction
Detailed description: the apollo_prediction function now takes prediction_settings as an input, where this is the new location for including modelComponent. In addition, an optional setting called runs has been included that computes standard errors across multiple prediction runs based on different draws from the estimates and covariance matrix for the model parameters
Backwards compatibility of code: no backwards compatibility issues for existing functions as old format for input still permitted

Output files no longer overwritten
Functions affected: apollo_saveOutputs
Detailed description: the apollo_saveOutput function now checks whether output files for the model already exists and changes their names (by including OLD in the name) rather than overwritting them
Backwards compatibility of code: no backwards compatibility issues

Output file for starting value search simplified
Functions affected: apollo_searchStart
Detailed description: The output file for apollo_searchStart was simplified from v0.0.9 to v0.1.0. Now it only records starting candidate values, and their loglikelihoods throughout the stages, but not their values at each stage, as it used to.
Backwards compatibility of code: no backwards compatibility issues

Subsetting of data when some variables are factors
Functions affected: all functions making use of the database
Detailed description: If a dataset contains factors, the use of subsetting of the data in R would still retain levels that no longer apply. This is a feature of R which can have unintended consequences and we thus eliminate any missing levels.
Backwards compatibility of code: no backwards compatibility issues

Changes to Apollo examples:
Examples affected: apollo_example_3
Detailed description: include calculation of standard errors for forecasts
Backwards compatibility of examples: affected part only works from version 0.1.0 onwards

Examples affected: apollo_example_3 and apollo_example_26
Detailed description: use cost increase by 1% instead of 10% for calculating elasticities
Backwards compatibility of examples: no backwards compatibility issues

Examples affected: apollo_example_5
Detailed description: apollo_example_5 no longer reads in the results from apollo_example_4 as starting values as this woudl have implied an inconsistent initial nesting structure
Backwards compatibility of examples: no backwards compatibility issues

Examples affected: apollo_example_18, apollo_example_19, apollo_example_20, apollo_example_22, apollo_example_27 and apollo_example_28
Detailed description: componentName added to class specific models
Backwards compatibility of examples: setting ignored in earlier versions

Examples affected: apollo_example_22
Detailed description: in the use of apollo_prediction, modelComponent is now included in prediction_settings rather than as a direct input
Backwards compatibility of examples: affected part only works from version 0.1.0 onwards

Examples affected: apollo_example_28
Detailed description: included apollo_probabilities as an argument for apollo_unconditionals
Backwards compatibility of examples: this is a bug fix that ensures the example now runs correctly

Bug fixes:

apollo_bootstrap
Adding additional bootstrap runs with the same seed now ensures that new draws are used rather than adding the same results that already exist.

apollo_combineResults
When combineResults_settings$modelNames was not provided, other settings were ignored

apollo_estimate
Earlier versions still performed model validation even if apollo_control$noValidation==TRUE

apollo_lc
The pre-estimation diagnostic tests would fail in case the starting values were the same for multiple classes in a latent class model

apollo_lcConditionals
Conditionals from latent class used to report one row per observation, while they should have reported one row per individual

apollo_mdcev
When the rows option was used, any pre-estimation checks still included all rows in the data. In addition, some failures could occur in estimation.

apollo_prediction
Predictions from latent class were missing the names of the alternatives in the output

apollo_searchStart
Multiple bugs have been corrected. In previous versions, the function would ignore converged candidates and would pick the wrong candidate as “best”

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.1.1 (15 September 2020)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

Additional checks on draws
Functions affected: all functions with mixing
Detailed description: Apollo now ensures that intra-individual draws are only used in the presence of multiple observations per individual.
Backwards compatibility of code: no backwards compatibility issues

Additional checks for exploded logit
Functions affected: apollo_el
Detailed description: The apollo_el now ensures that no alternative is chosen more than once across stages and ensures that any obsolete stages have the choice variable coded as -1.
Backwards compatibility of code: no backwards compatibility issues

Parameter specific constraints in HB estimation can now use names of parameters
Functions affected: apollo_estimate with apollo_control$HB==TRUE
Detailed description: the user can now use names of parameters when creating constraints for individual parameters in HB estimation rather than relying on the numeric coding from RSGHB
Backwards compatibility of code: no backwards compatibility issues for existing functions as old format for input still permitted

Additional flexibility for thresholds in ordered logit and ordered probit
Functions affected: apollo_ol and apollo_op
Detailed description: The thresholds for ordered logit and ordered logit are now given as a list, with one entry per threshold, thus allowing the user to have thresholds varying across observations/individuals, with possible additional random heterogeneity.
Backwards compatibility of code: no backwards compatibility issues as the function can still be called with the thresholds as a simple vector

Check for use of reserved names
Functions affected: apollo_validateInputs
Detailed description: For internal consistency, some core names, such as alternatives, avail and sigma are now protected and cannot be used in the data, apollo_beta, apollo_lcPars and apollo_randCoeff.
Backwards compatibility of code: backwards compatibility for some model files, but can be easily addressed by changing names

Changes to Apollo examples:
Examples affected: apollo_example_24.r
Detailed description: Uses new specification of thresholds as a list for apollo_ol
Backwards compatibility of examples: old format still accepted

Examples affected: apollo_example_11.r, apollo_example_12.r and apollo_example_17.r
Detailed description: sigma replaced by sig to avoid protected names issue
Backwards compatibility of examples: change required for v 0.1.1 onwards

Bug fixes:

apollo_conditionals with apollo_control$workInLogs==TRUE
Fixed a bug where Apollo allowed the use of apollo_conditionals despite having apollo_control$workInLogs==TRUE. This led to a failure as the probabilities are not available at the draw level when working in logs. This functionality is consequently not available now.

apollo_estimate with HB and constraints
Fixed a bug that led to a failure if a constraint was imposed on the final element of apollo_beta.

apollo_estimate with apollo_control$workInLogs==TRUE
Fixed a bug that led to a failure if the probabilities were zero with some draws. Also fixed a bug when using latent class models with apollo_control$workInLogs==TRUE which led to a bias in the calculation of probabilities.

apollo_ol and apollo_op
Fixed a bug that led to a failure when using a response variable with fewer or more than 5 levels

apollo_sharesTest
Fixed a bug that led to a failure when using apollo_sharesTest with sharesTest_settings$subsamples==NA and when using rows inside the model

apollo_inputs$apollo_control
Fixed a bug to ensure that when apollo_control is used by a function, it is fetched from apollo_inputs$apollo_control, making sure that when debugging, the correct (i.e. processed) apollo_control is used.

apollo_mdcev
Fixed a bug that led to an erroneous error message and halt to estimation with MDCEV models when using the mdcev_settings$minConsumption setting.

LL(0) with some models using random coefficients
Fixed a bug that led to incorrect LL(0) for some models using random coefficients, notably for latent class models with continuous random coefficients in the class allocation model.

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.2.0 (19 October 2020)
Changes to Apollo code:

General
Major improvements to efficiency, stability and reporting of user errors.

Ben-Akiva & Swait test added
Functions affected: apollo_basTest
Detailed description: the user can now perform the Ben-Akiva & Swait test
Backwards compatibility of code: new function from version 0.2.0 onwards

New outputs for bootstrap, and changes to storage of repetitions
Functions affected: apollo_bootstrap
Detailed description: apollo_bootstrap now returns a list which contains two components, namely a list of estimated parameters and likelihood function in each repetition, and the covariance matrix. In addition, when called an additional time, the function will always add new repetitions to old files, if they exist (it wont complete" the requested number).
Backwards compatibility of code: format of output has changed for post-processingno backwards compatibility issues

apollo_inputs is no longer automatically updated when calling post-processing functions
Functions affected: apollo_conditionals, apollo_lcConditionals, apollo_lcUnconditionals, apollo_llCalc, apollo_prediction, apollo_unconditionals
Detailed description: In previous versions, apollo_inputs would be updated when calling post-processing functions. Now Apollo instead checks if any inputs have changed and alerts the user to revalidate apollo_inputs.
Backwards compatibility of code: examples where changes to the data were made post estimation require a call to apollo_validateInputs

Model description added to output of apollo_combineResults
Functions affected: apollo_combineResults
Detailed description: The csv file produced by apollo_combineResults now includes the model description defined in apollo_control by the user
Backwards compatibility of code: Ouput changed, but no backwards compatibility issues

Estimation time split into separate components in output
Functions affected: apollo_modelOuptut, whether using apollo_estimate or apollo_estimateHB
Detailed description: The time taken by apollo_modelOuptut and apollo_estimate is now split into pre-processing, estimation, and post-processing time
Backwards compatibility of code: Ouput changed, but no backwards compatibility issues

apollo_fitsTest uses log-likelihood instead of probabilities
Functions affected: apollo_fitsTest
Detailed description: In previous versions of Apollo, the function apollo_fitsTest used the probability of correct prediction, which was not appropriate for non-discrete choice models and also not for multi-component models. The function now uses the log-likelihood instead. The function also only does this for the overall model, i.e. no longer allowing the user to look separately at subcomponents of a joint model.
Backwards compatibility of code: Ouput changed.

ID included in outputs of apollo_lcConditionals
Functions affected: apollo_lcConditionals
Detailed description: The individual-specific value for apollo_control$indivID is now included as the first column of the output of apollo_lcConditionals
Backwards compatibility of code: Ouput changed.

New function for EM algorithm for latent class models
Functions affected: apollo_lcEM
Detailed description: Function for automatically using the EM algorithm for latent class models rather than requiring the user to code this for a specific model
Backwards compatibility of code: New function. Users interested in how to code this manually are referred to earlier manuals.

New function for EM algorithm for mixed logit
Functions affected: apollo_mixEM
Detailed description: Function for automatically using the EM algorithm for mixed logit models with a full covariance matrix and all parameters being random
Backwards compatibility of code: New function. Users interested in how to code this manually are referred to earlier manuals.

New input options for likelihood ratio test, and enhanced output
Functions affected: apollo_lrTest
Detailed description: Apollo now allows the user to apply a likelihood ratio test using outputs from two models that are stored in memory (rather than one model needing to have been saved to disk). The restricted model also no longer needs to be given first, as Apollo will determine the order of the two models. The apollo_llTest function now also prints the likelihoods of each model as well as their difference.
Backwards compatibility of code: No backwards compatibility issues.

User can specify number of replications to use in MDCEV forecasting
Functions affected: apollo_mdcev and apollo_mdcev
Detailed description: The user can specify the number of replications using the optional argument nRep
Backwards compatibility of code: No backwards compatibility issues.

New optional settings for model output
Functions affected: apollo_modelOutput and apollo_saveOutput
Detailed description: The setting printPVal can now take three values: 0 (no p-vals), 1 (one-sided), or 2 (two-sided). The setting printDiagnostics was split in two settings: printDataReport (logical) to print the summary of the dependant variable, and printModelStructure (logical) to print data on nesting structures. A new setting printFunctions is included to print a copy of apollo_probabilities, apollo_control, scaling (for estimation and Hessian), Hessian routines attempted, apollo_lcPars and apollo_randCoeff.
Backwards compatibility of code: No backwards compatibility issues as old input still accepted and new inputs are optional.

Changes to storage of repetitions for out of sample prediction
Functions affected: apollo_outOfSample
Detailed description: When called an additional time apollo_outOfSample will always add new repetitions to old files, if they exist (it wont complete" the requested number).
Backwards compatibility of code: format of output has changed for post-processingno backwards compatibility issues

Improved output for predictions
Functions affected: apollo_prediction
Detailed description: A summary of the predictions are printed in a nice way, with special handling of MDCEV models. Automatic creation of confidence intervals when using repeated sampling.
Backwards compatibility of code: Output changed

Data no longer gets sorted by ID
Functions affected: apollo_validateData
Detailed description: Apollo no longer sorts the data by apollo_control$ID. Sorting is not required by the user either, but all observations from same individual need to be contiguous in the data.
Backwards compatibility of code: Apollo will now ask the user to group together data for the same individual. Some older models may thus require adjustment to the data.

Allow working in logs for cross-sectional data
Functions affected: apollo_validateInputs
Detailed description: Previous versions of Apollo allowed the use of apollo_control$workInLogs only with panel data.
Backwards compatibility of code: No backwards compatibility issues.

Changes to reserved names
Functions affected: apollo_validateInputs
Detailed description: The restrictions imposed in version 0.1.1 for reserved names have been relaxed, and replaced by a check that no names from apollo_beta, apollo_randCoeff, database, apollo_draws or apollo_lcPars are redefined elsewhere.
Backwards compatibility of code: Possible changes needed to old model files.

Ability to use a subset of model components in apollo_combineModels
Functions affected: apollo_combineModels
Detailed description: The user can now specify a subset of model components to multiply.
Backwards compatibility of code: New optional argument.

Changes to Apollo examples:

Examples affected: apollo_example_2.r
Detailed description: Uses bootstrap standard errors.
Backwards compatibility of examples: This functionality was not supported in previous versions.

Examples affected: apollo_example_3.r and apollo_example_22.r
Detailed description: Function apollo_validateInputs is called before every apollo_prediction to update database inside apollo_inputs.
Backwards compatibility of examples: If apollo_validateInputs is not called before prediction (as in previous versions), then the prediction will not change, even if the version of database in the Global Environment changes.

Examples affected: apollo_example_6.r
Detailed description: Added Ben-Akiva and Swait test, i.e. a call to function apollo_basTest.
Backwards compatibility of examples: apollo_basTest was not implemented in previous version, so it will fail.

Examples affected: apollo_example_11.r and apollo_example_12.r
Detailed description: Name of scale parameter is now sigma.
Backwards compatibility of examples: Previous versions did not allow user defined variables to be called sigma, so the example will fail in previous versions.

Examples affected: apollo_example_11.r
Detailed description: Removed line colMeans(predictions_base). This is no longer necessary as apollo_prediction now prints an aggregate summary of the predicted values.
Backwards compatibility of examples: The aggregate summary of the prediction will not be shown in previous versions.

Examples affected: apollo_example_14.r
Detailed description: This example now uses 4-core multithreading for estimation.
Backwards compatibility of examples: No issues.

Examples affected: apollo_example_18.r, apollo_example_20.r, apollo_example_27.r and apollo_example_28.r
Detailed description: When looping over latent classes inside apollo_probabilities, the total number of classes is not hard-coded any more. Instead, the number of classes is obtained as the length of pi_values (part of the return of apollo_lcPars())
Backwards compatibility of examples: No issues.

Examples affected: apollo_example_20.r
Detailed description: Dropping first column of conditionals as this now includes the ID.
Backwards compatibility of examples: Change needed from v.0.2.0. onwards.

Examples affected: apollo_example_27.r and apollo_example_28.r
Detailed description: EM estimation is now achieved using apollo_lcEM.
Backwards compatibility of examples: This example will not run in Apollo v0.1.1 or earlier, as function apollo_lcEM does not exist in those versions.

Examples affected: apollo_example_29.r
Detailed description: EM estimation is now achieved using apollo_mixEM.
Backwards compatibility of examples: This example will not run in Apollo v0.1.1 or earlier, as function apollo_mixEM does not exist in those versions.

Bug fixes:
apollo_choiceAnalysis
Fixed a bug where apollo_choiceAnalysis failed when an entry in choiceAnalysis_settings$explanators was empty

Seed for apollo_makeDraws
Fixed a bug where this function was looking for apollo_control$seed_draws instead of apollo_control$seed

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.2.1 (28 October 2020)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

Changes to Apollo examples:
None

Bug fixes:
apollo_lcEM
Fixed bugs where apollo_lcEM could not be used with multiple cores, or when not additionally computing the covariance matrix

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.2.2 (5 December 2020)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

New options for shares test added added
Functions affected: apollo_sharesTest
Detailed description: the user can now create pseudo-alternatives, grouping together existing alternatives
Backwards compatibility of code: new optional argument, no backwards compatibility issues

User can omit avail when all alternatives are available
Functions affected: apollo_mnl, apollo_nl, apollo_cnl, apollo_dft, apollo_el, apollo_mdcev, apollo_mdcnev
Detailed description: the user can now omit the avail argument if all alternatives are available
Backwards compatibility of code: optional, no backwards compatibility issues

Improved counting of modelled outcomes
Functions affected: apollo_modelOutput and apollo_saveOutput
Detailed description: the output now counts modelled outcomes as opposed to rows in the data, which leads to different statistics for multi-component models
Backwards compatibility of code: outputs changed, with resulting changes in goodness-of-fit statistics

Optionally drop fixed parameters from output
Functions affected: apollo_modelOutput and apollo_saveOutput
Detailed description: the user can now optionally exclude fixed parameters from the output
Backwards compatibility of code: outputs changed

Optionally return only the model component when using apollo_combineModels
Functions affected: apollo_combineModels
Detailed description: the user can now optionally exclude subcomponents when calling apollo_combineModels
Backwards compatibility of code: new optional argument, no backwards compatibility issues

Individual IDs and observation numbers included in output of apollo_bootstrap
Functions affected: apollo_bootstrap
Detailed description: apollo_bootstrap now writes the indivID and apollo_seq to its file output .
Backwards compatibility of code: Changes to output.

Ability to include constraints in classical estimation
Functions affected: apollo_estimate
Detailed description: apollo_estimate now has an additional optional argument for constraints.
Backwards compatibility of code: New capability.

Changes to Apollo examples:
None

Bug fixes:
apollo_lcEM
Fixed a bug where apollo_lcEM was still running when generic parameters were included, and a separate bug with the calculation of the log-likelihood with multiple cores

apollo_estimate with bootstrap
Fixed a bug where apollo_estimate could not run post-estimation bootstrapping when using multiple cores

apollo_basTest
Fixed a bug to prevent apollo_basTest from running when the better fitting model has fewer parameters

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.2.3 (20 January 2021)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

Changes to Apollo examples:
None

Bug fixes:
apollo_estimate
Fixed a bug where apollo_estimate could fail due to missing arguments, where this is now checked before estimation starts

GO TO HISTORY OF APOLLO VERSIONS AND CHANGES
GO TO TOP OF PAGE

Version 0.2.4 (25 February 2021)
Changes to Apollo code:

General
Minor improvements to efficiency, stability and reporting of user errors.

Monte Carlo replications for MDCEV can now be set by user
Functions affected: apollo_prediction with apollo_mdcev, apollo_mdcnev
Detailed description: the user can now set the number of Monte Carlo replications to use when predicting from MDCEV models
Backwards compatibility of code: new optional argument, no backwards compatibility issues

MDCEV predictions now include expenditure
Functions affected: apollo_prediction with apollo_mdcev, apollo_mdcnev
Detailed description: the output from apollo_prediction for MDCEV models now includes the expenditure
Backwards compatibility of code: new output, no backwards compatibility issues

Predictions now returned as data.frame instead of matrix
Functions affected: apollo_prediction
Detailed description: the output from apollo_prediction is now a data.frame instead of a matrix, which helps avoid issues with non-numeric IDs
Backwards compatibility of code: new output format, some possible backwards compatibility issues with examples

apollo_sharesTest now returns output
Functions affected: apollo_sharesTest
Detailed description: the output from apollo_prediction is now not just printed to screen, but also returned
Backwards compatibility of code: new output format, no backwards compatibility issues

Changes to Apollo examples:
None

Bug fixes:
apollo_dft
Fixed a bug where apollo_dft could fail in mixture models
apollo_prediction with apollo_mdcev, apollo_mdcnev
Fixed a bug where apollo_predictions could produce errors when asking for confidence intervals with MDCEV models
apollo_cnl
Fixed a bug where apollo_cnl would not check for allocation parameters to sum to 1