logmultinom(capthist, grp = NULL)
capthist
objectsecr.fit
includes this component.
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.stoatDNA
data(stoatDNA)
## no groups
logmultinom(stoatCH)
Run the code above in your browser using DataLab