apollo_normalDensity {apollo} | R Documentation |
Calculates density for a Normal distribution
Description
Calculates density for a Normal distribution at a specific value with a specified mean and standard deviation and can also perform other operations based on the value of the functionality
argument.
Usage
apollo_normalDensity(normalDensity_settings, functionality)
Arguments
normalDensity_settings |
List of arguments to the functions. It must contain the following.
|
functionality |
Character. Setting instructing Apollo what processing to apply to the likelihood function. This is in general controlled by the functions that call
|
Details
This function calcualtes the probability of the linear model outcomeNormal = mu + xNormal + epsilon, where epsilon is a random error distributed Normal(0,sigma).
If using this function in the context of an Integrated Choice and Latent Variable (ICLV) model with continuous
indicators, then outcomeNormal
would be the value of the indicator, xNormal
would be the value of the latent variable (possibly
multiplied by a parameter to measure its correlation with the indicator, e.g. xNormal=lambda*LV), and mu
would be
an additional parameter to be estimated (the mean of the indicator, which should be fixed to zero if the indicator is
centered around its mean beforehand).
Value
The returned object depends on the value of argument functionality
as follows.
-
"components"
: Same as"estimate"
-
"conditionals"
: Same as"estimate"
-
"estimate"
: vector/matrix/array. Returns the likelihood for each observation. -
"gradient"
: Not implemented -
"output"
: Same as"estimate"
but also writes summary of input data to internal Apollo log. -
"prediction"
: Not implemented. Returns NA. -
"preprocess"
: Returns a list with pre-processed inputs, based onnormalDensity_settings
. -
"raw"
: Same as"estimate"
-
"report"
: Dependent variable overview. -
"shares_LL"
: Not implemented. Returns a vector of NA with as many elements as observations. -
"validate"
: Same as"estimate"
, but it also runs a set of tests to validate the function inputs. -
"zero_LL"
: Not implemented. Returns a vector of NA with as many elements as observations.