
Simulate a Variable from a negative binomial mixture (Negative Binomial Error)
rnegbinStateValueMembership.RdSimulate a variable from negative binomial mixture.
Arguments
- n
An integer scalar containing the number of variables to simulate (NIMBLE currently only allows n = 1)
- 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)
Author
Joseph D. Chipperfield, joechip90@googlemail.com