Last data update: 2014.03.03

R: Quantification of binary capture histories
quant.binaryR Documentation

Quantification of binary capture histories

Description

The quant.binary family of functions allow to quantify binary capture histories (partial or complete) in terms of a meaningful quantity which can be interpreted as a possibly meaningful behavioral covariate (like memory persistence of previous capture history)

Usage

quant.binary(x)
quant.binary.markov(x, markov.ord)
quant.binary.integer(x)
quant.binary.counts(x)
quant.binary.counts.integer(x)

Arguments

x

either a character string or a numeric vector exclusively made by binary entries 0 or 1.

markov.ord

a positive integer representing the order of the Markovian structure which one is willing to reproduce with suitable partition of the unit interval and the quantification of capture history standardized in the unit interval

Details

For a more detailed description of instances of meaningful behavioral covariates see Alunni Fegatelli and Tardella (2012) and Alunni Fegatelli (2013)[PhD Thesis]

Value

For quant.binary it returns a numeric value within the unit interval [0,1] and
quant.binary.markov. For quant.binary.integer it returns an integer value .

Author(s)

Danilo Alunni Fegatelli and Luca Tardella

References

Alunni Fegatelli, D. and Tardella, L. (2012) Improved inference on capture recapture models with behavioural effects. Statistical Methods & Applications Applications Volume 22, Issue 1, pp 45-66 10.1007/s10260-012-0221-4

Alunni Fegatelli, D. (2013) New methods for capture-recapture modelling with behavioural response and individual heterogeneity. PhD Thesis. http://padis.uniroma1.it/bitstream/10805/2085/1/TesiDottorato-AlunniFegatelliDanilo.pdf

Examples

## Example of quantification with character input

capt.hist="0110"

quant.binary(capt.hist)
quant.binary.markov(capt.hist,markov.ord=2)
quant.binary.integer(capt.hist)
quant.binary.counts(capt.hist)
quant.binary.counts.integer(capt.hist)

## Example of quantification with numeric input

ch=c(0,1,1,0)

quant.binary(ch)
quant.binary.markov(ch,markov.ord=2)
quant.binary.integer(ch)
quant.binary.counts(ch)
quant.binary.counts.integer(ch)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(BBRecapture)
Loading required package: HI
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: lme4
Loading required package: Matrix
Loading required package: secr
This is secr 2.10.3. For overview type ?secr
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/BBRecapture/quant.binary.Rd_%03d_medium.png", width=480, height=480)
> ### Name: quant.binary
> ### Title: Quantification of binary capture histories
> ### Aliases: quant.binary quant.binary.markov quant.binary.integer
> ###   quant.binary.counts quant.binary.counts.integer
> ### Keywords: Partial capture history quantification
> 
> ### ** Examples
> 
> ## Example of quantification with character input
> 
> capt.hist="0110"
> 
> quant.binary(capt.hist)
[1] 0.4
> quant.binary.markov(capt.hist,markov.ord=2)
[1] 0.3870968
> quant.binary.integer(capt.hist)
[1] 6
> quant.binary.counts(capt.hist)
[1] 0.5
> quant.binary.counts.integer(capt.hist)
[1] 2
> 
> ## Example of quantification with numeric input
> 
> ch=c(0,1,1,0)
> 
> quant.binary(ch)
[1] 0.4
> quant.binary.markov(ch,markov.ord=2)
[1] 0.3870968
> quant.binary.integer(ch)
[1] 6
> quant.binary.counts(ch)
[1] 0.5
> quant.binary.counts.integer(ch)
[1] 2
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>