partition.ch: Partition of partial capture histories according to...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/partition.ch.R

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. t is number of trapping occasions

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 "list" or "index". See examples.

...

additional arguments to be passed to quantify.ch.fun

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!

BBRecapture documentation built on May 19, 2017, 11:53 p.m.

Search within the BBRecapture package
Search all R packages, documentation and source code