Checks and enhances user defined functions apollo_probabilities, apollo_randCoeff and apollo_lcPars.
apollo_modifyUserDefFunc(
apollo_beta,
apollo_fixed,
apollo_probabilities,
apollo_inputs,
validate = TRUE,
noModification = FALSE
)
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).
Named numeric vector. Names and values for parameters.
Character vector. Names of parameters inside apollo_beta whose values should be kept constant throughout estimation.
Function. Returns probabilities of the model to be estimated. Must receive three arguments:
apollo_beta
: Named numeric vector.
Names and values of
model parameters.
apollo_inputs
: List containing
options of the model.
See apollo_validateInputs.
functionality
: Character. Can be
either "components"
,
"conditionals"
,
"estimate"
(default),
"gradient"
,
"output"
,
"prediction"
,
"preprocess"
,
"raw"
, "report"
,
"shares_LL"
,
"validate"
or
"zero_LL"
.
List grouping most common inputs. Created by function apollo_validateInputs.
Logical. If TRUE, the original and modified
apollo_probabilities
functions are estimated. If their
results do not match, then the original functions are
returned, and success
is set to FALSE
inside
the returned list.
Logical. If TRUE, loop expansion etc are skipped.
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.