# Partition of partial capture histories according to equivalence classes of numerical quantification corresponding to supplied intervals

### Description

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`

.

### Usage

1 2 | ```
partition.ch(quantify.ch.fun, t, breaks, include.lowest = T,
type = c("list", "index"), ...)
``` |

### Arguments

`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 |

`...` |
additional arguments to be passed to |

### Details

It is useful in conjunction with `LBRecap.custom.part`

. See examples.

### Value

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`

### Author(s)

Danilo Alunni Fegatelli and Luca Tardella

### See Also

`LBRecap.custom.part`

, `BBRecap.custom.part`

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
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!
``` |