This function extracts various summary statistics from count data of
various unmarkedFrame
and unmarkedFit
classes.
countHist(object, plot.freq = TRUE, cex.axis = 1, cex.lab = 1,
cex.main = 1, ...) # S3 method for unmarkedFramePCount
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1, ...)
# S3 method for unmarkedFitPCount
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1, ...)
# S3 method for unmarkedFrameGPC
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1, ...)
# S3 method for unmarkedFitGPC
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1, ...)
# S3 method for unmarkedFrameMPois
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1, ...)
# S3 method for unmarkedFitMPois
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1, ...)
# S3 method for unmarkedFramePCO
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1,
plot.seasons = FALSE, ...)
# S3 method for unmarkedFitPCO
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1,
plot.seasons = FALSE, ...)
# S3 method for unmarkedFrameGMM
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1,
plot.seasons = FALSE, ...)
# S3 method for unmarkedFitGMM
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1,
plot.seasons = FALSE, ...)
# S3 method for unmarkedFrameMMO
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1,
plot.seasons = FALSE, ...)
# S3 method for unmarkedFitMMO
countHist(object, plot.freq = TRUE,
cex.axis = 1, cex.lab = 1, cex.main = 1,
plot.seasons = FALSE, ...)
countHist
returns a list with the following components:
a table with the frequency of each observed count.
a list of tables with the frequency of each season-specific count.
a table with the frequency of each count history across the entire sampling period.
a list of tables with the frequency of each count history for each primary period (season).
a matrix where the rows correspond to each sampling
season and where columns consist of the number of sites sampled in
season \(t\) (sampled
) and the number of sites with at
least one detection in season \(t\) (detected
). For
multiseason data, the matrix includes the number of sites sampled in
season \(t - 1\) with colonizations observed in season \(t\)
(colonized
), the number of sites sampled in season \(t -
1\) with extinctions observed in season \(t\) (extinct
), the
number of sites sampled in season \(t - 1\) without changes
observed in season \(t\) (static
), and the number of sites
sampled in season \(t\) that were also sampled in season \(t -
1\) (common
).
a matrix where the rows correspond to each sampling
season and where columns consist of the proportion of sites in
season t with at least one detection (naive.occ
). For
multiseason data, the matrix includes the proportion of sites
sampled in season \(t - 1\) with colonizations observed in season
\(t\) (naive.colonization
), the proportion of sites
sampled in season \(t - 1\) with extinctions observed in season
\(t\) (naive.extinction
), and the proportion of sites
sampled in season \(t - 1\) with no changes observed in season
\(t\).
the number of seasons (primary periods) in the data set.
the maximum number of visits per season in the data set.
logical vector indicating whether data were
collected or not during a given season (primary period), where
TRUE
indicates that no data were collected during the season.
an object of various unmarkedFrame
or unmarkedFit
classes containing count history data.
logical. Specifies if the count data (pooled across seasons) should be plotted.
expansion factor influencing the size of axis annotations on plots produced by the function.
expansion factor influencing the size of axis labels on plots produced by the function.
expansion factor influencing the size of the main title above plots produced by the function.
logical. Specifies if the count data should be plotted for each season separately. This argument is only relevant for data collected across more than a single season.
additional arguments passed to the function.
Marc J. Mazerolle
This function computes a number of summary statistics in data sets used for various N-mixture models including those of Royle (2004a, b), Dail and Madsen (2011), and Chandler et al. (2011).
countHist
can take data frames of the
unmarkedFramePCount
, unmarkedFrameGPC
,
unmarkedFrameMPois
, unmarkedFramePCO
,
unmarkedFrameGMM
, unmarkedFrameMMO
classes as input.
For convenience, the function can also extract the raw data from model
objects of classes unmarkedFitPCount
, unmarkedFitGPC
,
unmarkedFitMPois
, unmarkedFitPCO
, unmarkedFitGMM
,
and unmarkedFitMMO
. Note that different model objects using the
same data set will have identical values.
Chandler, R. B., Royle, J. A., King, D. I. (2011) Inference about density and temporary emigration in unmarked populations. Ecology 92, 1429--1435.
Dail, D., Madsen, L. (2011) Models for estimating abundance from repeated counts of an open population. Biometrics 67, 577--587.
Royle, J. A. (2004a) N-mixture models for estimating population size from spatially replicated counts. Biometrics 60, 108--115.
Royle, J. A. (2004b) Generalized estimators of avian abundance from count survey data. Animal Biodiversity and Conservation 27, 375--386.
covDiag
, detHist
, detTime
,
countDist
, Nmix.chisq
,
Nmix.gof.test
##modified example from ?pcount
if (FALSE) {
if(require(unmarked)){
data(mallard)
mallardUMF <- unmarkedFramePCount(mallard.y, siteCovs = mallard.site,
obsCovs = mallard.obs)
##compute descriptive stats from data object
countHist(mallardUMF)
##run single season model
fm.mallard <- pcount(~ ivel+ date + I(date^2) ~ length + elev +
forest, mallardUMF, K=30)
##compute descriptive stats from model object
countHist(fm.mallard)
}
}
Run the code above in your browser using DataLab