apollo_modifyUserDefFunc {apollo} | R Documentation |
Checks and modifies Apollo user-defined functions
Description
Checks and enhances user defined functions apollo_probabilities, apollo_randCoeff and apollo_lcPars.
Usage
apollo_modifyUserDefFunc(
apollo_beta,
apollo_fixed,
apollo_probabilities,
apollo_inputs,
validate = TRUE,
noModification = FALSE
)
Arguments
apollo_beta |
Named numeric vector. Names and values for parameters. |
apollo_fixed |
Character vector. Names of parameters inside apollo_beta whose values should be kept constant throughout estimation. |
apollo_probabilities |
Function. Returns probabilities of the model to be estimated. Must receive three arguments:
|
apollo_inputs |
List grouping most common inputs. Created by function apollo_validateInputs. |
validate |
Logical. If TRUE, the original and modified
|
noModification |
Logical. If TRUE, loop expansion etc are skipped. |
Details
Internal use only. Called by apollo_estimate
before estimation.
Checks include: no re-definition of variables, no (direct) calls to database,
calling of apollo_weighting if weights are defined.
Value
List with four elements: apollo_probabilities, apollo_randCoeff, apollo_lcPars and a dummy called success (TRUE if modification was successful, FALSE if not. FALSE will be only be returnes if the modifications are validated).