classMembership {openCR} | R Documentation |
Class Membership Probability for Mixture Models
Description
Finite mixture models treat class membership as a latent random variable. The probability of an individual's membership in each class may be inferred retrospectively from the relative likelihoods.
Usage
## S3 method for class 'openCR'
classMembership(object, fullCH = NULL, ...)
Arguments
object |
fitted model of class openCR |
fullCH |
capthist object (optional) |
... |
other arguments (not used) |
Details
It is assumed that the input model includes finite mixture terms (h2 or h3).
As the detection histories are saved in compressed (“squeezed”) form in openCR objects the original animal identifiers are lost and the order of animals may change. These may be restored by providing fullCH
.
No class can be assigned from a CJS model for animals detected only in the final session.
Value
Matrix with one row per individual and columns for each class and the class number of the most likely class.
Note
In earlier versions openCR.fit
always computed class membership and saved it in component ‘posterior’ of the fitted model. classMembership
replaces that functionality.
See Also
Examples
## Not run:
jch <- join(ovenCH)
fit <- openCR.fit(ovenCH, model=p~h2)
classMembership(fit, jch)
## End(Not run)