partition.ch {BBRecapture} | R Documentation |
All the possible partial capture histories observable during a capture-recapture experiment with t sampling occasions can be partitioned according to numerical values corresponding to some meaningful covariate (quantification of binary sequences corresponding to partial capture histories). Each subset of the partition corresponds to all partial capture histories which returns numerical values of the quantification within one of the intervals represented by two consecutive values in the optional argument vector breaks
.
partition.ch(quantify.ch.fun, t, breaks, include.lowest = T, type = c("list", "index"), ...)
quantify.ch.fun |
a function which returns a numerical value for each possible partial capture history |
t |
an integer. |
breaks |
a vector of numerical values which are used as bounds for the interval of numerical values corresponding to partial capture histories that belongs to the same partition |
include.lowest |
a logical, indicating if an x[i] equal to the lowest (or highest, when right = FALSE) breaks value should be included |
type |
a character string. It can be either |
\dots |
additional arguments to be passed to |
It is useful in conjunction with LBRecap.custom.part
. See examples.
If the argument type="list"
a list is returned. If type="index"
a numerical index corresponding to the numeric integer equivalent of the consecutive interval according to the convention used in objects of class factor
Danilo Alunni Fegatelli and Luca Tardella
REFERENCES
LBRecap.custom.part
, BBRecap.custom.part
data(mouse) head(mouse) t=ncol(mouse) Mc1.partition=partition.ch(quantify.ch.fun=quant.binary,t=t,breaks=c(0,0.5,1)) Mc1.partition mod.Mc1.cust=BBRecap.custom.part(mouse,partition=Mc1.partition) mod.Mc1.cust mod.Mc1.easy=BBRecap(mouse,mod="Mc",markov.ord=1,output="complete") mod.Mc1.easy$N.hat.RMSE mod.Mc1.easy$HPD.N mod.Mc1.easy$log.marginal.likelihood # the two functions give the same results!