Compute the constant multinomial component of the SECR log likelihood
logmultinom(capthist, grp =NULL)
Arguments
capthist: capthist object
grp: factor defining group membership, or a list (see Details)
Details
For a particular dataset and grouping, the multinomial coefficient is a constant; it does not depend on the parameters and may be ignored when maximizing the likelihood to obtain parameter estimates. Nevertheless, the log likelihood reported by secr.fit includes this component unless the detector type is signal', polygon', polygonX', transect' or `transectX' (from 2.0.0).
If grp is NULL then all animals are assumed to belong to one group. Otherwise, the length of grp should equal the number of rows of capthist.
grp may also be any vector that can be coerced to a factor. If capthist is a multi-session capthist object then grp should be a list with one factor per session.
If capture histories are not assigned to groups the value is the logarithm of
(n1,...,nCn)=n1!n2!...nC!n!seepdfmanual
where n is the total number of capture histories and n1 ... nC are the frequencies with which each of the C unique capture histories were observed.
If capture histories are assigned to G groups the value is the logarithm of
g=1∏Gng1!ng2!...ngCg!ng!seepdfmanual
where ng is the number of capture histories of group g and ng1 ... ngCg are the frequencies with which each of the Cg unique capture histories were observed for group g.
For multi-session data, the value is the sum of the single-session values. Both session structure and group structure therefore affect the value computed. Users will seldom need this function.
Returns
The numeric value of the log likelihood component.
References
Borchers, D. L. and Efford, M. G. (2008) Spatially explicit maximum likelihood methods for capture--recapture studies. Biometrics
64 , 377--385.
Efford, M. G., Borchers D. L. and Byrom, A. E. (2009) Density estimation by spatially explicit capture--recapture: likelihood-based methods. In: D. L. Thompson, E. G. Cooch and M. J. Conroy (eds) Modeling Demographic Processes in Marked Populations. Springer. Pp. 255--269.