
Probability Density of a response variable from negative binomial mixture (Negative Binomial Error)
dnegbinStateValueMembership.RdCalculate the probability density of a response variable from negative binomial mixture.
Arguments
- x
A scalar value containing the value of the response variable
- stateVal
A numeric vector containing the mean values of the mixture components
- statePrec
A numeric vector containing the precision (reciprocal of the variance) of the mixture components
- stateProb
A numeric vector containing the probabilities of belonging to each mixture component (internally normalised to one)
- log
If
TRUEthen return the log density
Author
Joseph D. Chipperfield, joechip90@googlemail.com