logmultinom {secr}R Documentation

Multinomial Coefficient of SECR Likelihood

Description

Compute the constant multinomial component of the SECR log likelihood

Usage

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

{{n}\choose{n_1, ..., n_C}} = {{n!} \over {n_1! n_2! ... n_C!}}

where n is the total number of capture histories and n_1 ... n_C 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

{ \prod_{g=1}^{G} {{n_g!} \over {n_{g1}! n_{g2}! ... n_{gC_g}}!}}

where n_g is the number of capture histories of group g and n_{g1} ... n_{gC_g} are the frequencies with which each of the C_g 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.

Value

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.

See Also

stoatDNA

Examples


## no groups
logmultinom(stoatCH)


[Package secr version 5.0.0 Index]