Learn R Programming

apollo (version 0.3.9)

apollo_validateControl: Validates apollo_control

Description

Validates the options controlling the running of the code apollo_control and sets default values for the omitted ones.

Usage

apollo_validateControl(database, apollo_control, silent = FALSE)

Value

Validated version of apollo_control, with additional element called panelData set to TRUE for repeated choice data.

Arguments

database

data.frame. Data used by model.

apollo_control

List. Options controlling the running of the code. User input is required for all settings except those with a default or marked as optional.

  • analyticGrad: Boolean. TRUE to use analytical gradients where available. Default is TRUE for non-HB models and FALSE for HB models.

  • analyticHessian: Boolean. TRUE to use analytical Hessians where available. Default is FALSE.

  • calculateLLC: Boolean. TRUE if user wants to calculate LL at constants (if applicable). - TRUE by default.

  • cpp: Boolean. TRUE to use C++ implementations where available. Default is FALSE.

  • debug: Boolean. TRUE to print additional diagnostic messages during validation. Default is FALSE.

  • dropLoopExpansion: Boolean. TRUE to skip loop-expansion checks during preprocessing. Default is FALSE.

  • dropRedefCheck: Boolean. TRUE to skip checks for variable redefinitions during preprocessing. Default is FALSE.

  • HB: Boolean. TRUE if using RSGHB for Bayesian estimation. Default is FALSE.

  • indivID: Character. Name of column in the database with each decision maker's ID.

  • matrixMult: Boolean. TRUE to use matrix multiplication mode in compatible non-mixing models. Default is FALSE.

  • memorySaver: Boolean. TRUE to reduce memory usage when calculating analytical gradients and hessian - FALSE by default.

  • mixing: Boolean. TRUE for models that include random parameters. Default is FALSE, unless implied by other inputs before validation.

  • modelDescr: Character. Description of the model. Used in output files. If omitted, a default description is used.

  • modelName: Character. Name of the model. Used when saving the output to files.

  • nCores: Numeric scalar. Number of cores to use in likelihood calculations. Default is 1.

  • noDiagnostics: Boolean. TRUE if user does not wish model diagnostics to be printed - FALSE by default.

  • noModification: Boolean. TRUE to avoid automatic modification of model code during preprocessing. Default is FALSE.

  • noValidation: Boolean. TRUE if user does not wish model input to be validated before estimation - FALSE by default.

  • outputDirectory: Character. Optional directory for outputs if different from the working directory. If omitted or empty, the current working directory is used.

  • overridePanel: Boolean. TRUE to override panel-data likelihood multiplication where supported. Default is FALSE.

  • panelData: Boolean. TRUE if there are multiple observations (i.e. rows) for each decision maker - Automatically set based on indivID by default.

  • preventOverridePanel: Boolean. TRUE to prevent automatic panel override where supported. Default is FALSE.

  • seed: Numeric scalar. Seed for random number generation. Default is 13.

  • subMaxV: Boolean. TRUE to subtract the maximum utility before exponentiation in supported models for numerical stability. Default is TRUE.

  • weights: Character. Name of column in database containing weights for estimation.

  • workInLogs: Boolean. TRUE for increased numeric precision in models with panel data - FALSE by default.

silent

Boolean. If TRUE, no messages are printed to screen.

Details

This function should be run before running apollo_validateData.