View source: R/apollo_normalDensity.R
apollo_normalDensity | R Documentation |
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.
apollo_normalDensity(normalDensity_settings, functionality)
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
|
This function calculates 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).
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"
: List containing the likelihood and gradient of the model component.
"output"
: Same as "estimate"
but also writes summary of input data to internal Apollo log.
"prediction"
: Predicted value at the observation level.
"preprocess"
: Returns a list with pre-processed inputs, based on normalDensity_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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.