mix.loglik: Compute the log likelihood of input data given a parameter vector and a list of 2 distribution functions.
Description
This is the main function to compute the negative 2 x log likelihood function of parameters given data.
This function is not intended to be called directly by users, but can be useful to test user-specified mixture distributions passed to mix.mle.Usage
mix.loglik(.pars, .input, .distlist, do.sum = TRUE)
Arguments
.pars
A list of the following 5 parameters:
Probability of second distribution
- dist1.par1
Lower distribution: mean for normal, shape for gamma
- dist1.par2
Lower distribution: SD Value
- Numeric: the negative 2 x log likelihood of trait measurement.
Details
Computes maximum likelihood function for either the normal mixture distribution or the facing gamma distribution model for a dimorphic trait.References
Rowland JM, Qualls CR. 2005. Likelihood models for discriminating alternative phenotypes in morphologically dimorphic species.
Evolutionary Ecology Research 7: 421-434.