capHistSum {FSA}R Documentation

Summarize capture histories in individual fish format.

Description

Use to summarize a capture history data file that is in the “individual” fish format (see capHistConvert for a discussion of data file format types). Summarized capture history results may be used in the Lincoln-Petersen, Schnabel, Schumacher-Eschmeyer, or Jolly-Seber methods for estimating population abundance (see mrClosed and mrOpen).

Usage

capHistSum(df, cols2use = NULL, cols2ignore = NULL)

is.CapHist(x)

## S3 method for class 'CapHist'
plot(x, what = c("u", "f"), pch = 19, cex.pch = 0.7, lwd = 1, ...)

Arguments

df

A data.frame that contains the capture histories (and, perhaps, other information) in “individual” fish format. See details.

cols2use

A string or numeric vector that indicates columns in df that contain the capture histories. Negative numeric values will not use those columns. Cannot use both cols2use and col2ignore. See details.

cols2ignore

A string or numeric vector that indicates columns in df that do not contain the capture histories and should be ignored. Cannot use both cols2use and col2ignore.

x

An object from capHistSum.

what

A string that indicates what type of diagnostic plot to construct with plot. See details.

pch

A numeric that indicates the plotting character for the diagnostic plot.

cex.pch

A numeric that indicates the character expansion value for the plotting characters in the diagnostic plot. The default is to be “slightly smaller” (i.e., cex.pch=0.7).

lwd

A numeric that indicates the line width in the diagnostic plot.

...

Optional arguments to send to plot.

Details

This function requires the capture history data file to be in the “individual” fish format. See capHistConvert for a description of this (and other) formats and for methods to convert from other formats to the “individual” fish format. In addition, this function requires only the capture history portion of the data file. Thus, if df contains columns with non-capture history information (e.g., fish ID, length, location, etc.) then use cols2use= to identify which columns contain only the capture history information. Columns to use can be identified by listing the column numbers (e.g., columns 2 through 7 could be included with cols2use=2:7). In many instances it may be easier to identify columns to exclude which can be done by preceding the column number by a negative sign (e.g., columns 1 through 3 are excluded with cols2use=-(1:3)).

The object returned from this function can be used directly in mrClosed and mrOpen. See examples of this functionality on the help pages for those functions.

The plot function can be used to construct the two diagnostic plots described by Baillargeon and Rivest (2007). The what="f" plot will plot the log of the number of fish seen i times divided by choose(t,i) against i. The what="u" plot will plot the log of the number of fish seen for the first time on event i against i. Baillargeon and Rivest (2007) provide a table that can be used to diagnosed types of heterogeneities in capture probabilities from these plots.

Value

If the capture history data file represents only two samples, then a list with the following two components is returned.

If the capture history data file represents more than two samples, then a list with the following five components is returned

IFAR Chapter

9-Abundance from Capture-Recapture Data.

Note

This function assumes that all unmarked captured fish are marked and returned to the population (i.e., no losses at the time of marking are allowed).

Author(s)

Derek H. Ogle, DerekOgle51@gmail.com

References

Ogle, D.H. 2016. Introductory Fisheries Analyses with R. Chapman & Hall/CRC, Boca Raton, FL.

Baillargeon, S. and Rivest, L.-P. (2007). Rcapture: Loglinear models for capture-recapture in R. Journal of Statistical Software, 19(5):1-31.

See Also

See descriptive in Rcapture for m.array and some of the same values in sum. See capHistConvert for a descriptions of capture history data file formats and how to convert between them. See mrClosed and mrOpen for how to estimate abundance from the summarized capture history information.

Examples

# data.frame with IDs in the first column
head(PikeNYPartial1)

# Three ways to ignore first column of ID numbers
( ch1 <- capHistSum(PikeNYPartial1,cols2use=-1) )
( ch1 <- capHistSum(PikeNYPartial1,cols2ignore=1) )
( ch1 <- capHistSum(PikeNYPartial1,cols2ignore="id") )

# diagnostic plots
plot(ch1)
plot(ch1,what="f")
plot(ch1,what="u")

# An examle with only two sample events (for demonstration only)
( ch2 <- capHistSum(PikeNYPartial1,cols2use=-c(1,4:5)) )
( ch2 <- capHistSum(PikeNYPartial1,cols2use=2:3) )
( ch2 <- capHistSum(PikeNYPartial1,cols2ignore=c(1,4:5)) )


[Package FSA version 0.9.5 Index]