countDist: Compute Summary Statistics from Distance Sampling Data

View source: R/countDist.R

countDistR Documentation

Compute Summary Statistics from Distance Sampling Data

Description

This function extracts various summary statistics from distance sampling data of various unmarkedFrame and unmarkedFit classes.

Usage

countDist(object, plot.freq = TRUE, plot.distance = TRUE, cex.axis = 1,
          cex.lab = 1, cex.main = 1, ...)

## S3 method for class 'unmarkedFrameDS'
countDist(object, plot.freq = TRUE,
                   plot.distance = TRUE, cex.axis = 1, cex.lab = 1,
                   cex.main = 1, ...)

## S3 method for class 'unmarkedFitDS'
countDist(object, plot.freq = TRUE,
                   plot.distance = TRUE, cex.axis = 1, cex.lab = 1,
                   cex.main = 1, ...)

## S3 method for class 'unmarkedFrameGDS'
countDist(object, plot.freq = TRUE,
                   plot.distance = TRUE, cex.axis = 1,
                   cex.lab = 1, cex.main = 1, ...)

## S3 method for class 'unmarkedFitGDS'
countDist(object, plot.freq = TRUE,
                   plot.distance = TRUE, cex.axis = 1,
                   cex.lab = 1, cex.main = 1, ...)

## S3 method for class 'unmarkedFrameDSO'
countDist(object, plot.freq = TRUE,
                   plot.distance = TRUE, cex.axis = 1,
                   cex.lab = 1, cex.main = 1, plot.seasons = FALSE,
                   ...)

## S3 method for class 'unmarkedFitDSO'
countDist(object, plot.freq = TRUE,
                   plot.distance = TRUE, cex.axis = 1,
                   cex.lab = 1, cex.main = 1, plot.seasons = FALSE,
                   ...)

Arguments

object

an object of various unmarkedFrame or unmarkedFit classes containing distance sampling data.

plot.freq

logical. Specifies if the count data (pooled across seasons and distance classes) should be plotted.

plot.distance

logical. Specifies if the counts in each distance class (pooled across seasons) should be plotted.

cex.axis

expansion factor influencing the size of axis annotations on plots produced by the function.

cex.lab

expansion factor influencing the size of axis labels on plots produced by the function.

cex.main

expansion factor influencing the size of the main title above plots produced by the function.

plot.seasons

logical. Specifies if the count data should be plotted for each distance class and season separately. This argument is only relevant for data collected across more than a single season.

...

additional arguments passed to the function.

Details

This function computes a number of summary statistics in data sets used for the distance sampling models of Royle et al. (2004), Chandler et al. (2011), and distance-sampling versions of models of Dail and Madsen (2011) and Hostetler and Chandler (2015) based on Sollmann et al. (2015).

countDist can take data frames of the unmarkedFrameDS, unmarkedFrameGDS, unmarkedFrameDSO classes as input. For convenience, the function can also extract the raw data from model objects of classes unmarkedFitDS, unmarkedFitGDS, and unmarkedFitDSO. Note that different model objects using the same data set will have identical values.

Value

countDist returns a list with the following components:

count.table.full

a table with the frequency of each observed count pooled across distances classes.

count.table.seasons

a list of tables with the frequency of each season-specific count pooled across distance classes.

dist.sums.full

a table with the frequency of counts in each distance class across the entire sampling seasons.

dist.table.seasons

a list of tables with the frequency of counts in each distance class for each primary period.

dist.names

a character string of labels for the distance classes.

n.dist.classes

the number of distance classes.

out.freqs

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).

out.props

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.

n.seasons

the number of seasons (primary periods) in the data set.

n.visits.season

the maximum number of visits per season in the data set.

missing.seasons

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.

Author(s)

Marc J. Mazerolle

References

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.

Hostetler, J. A., Chandler, R. B. (2015) Improved state-space models for inference about spatial and temporal variation in abundance from count data. Ecology 96, 1713–1723.

Royle, J. A., Dawson, D. K., Bates, S. (2004) Modeling abundance effects in distance sampling. Ecology 85, 1591–1597.

Sollmann, R., Gardner, B., Chandler, R. B., Royle, J. A., Sillett, T. S. (2015) An open-population hierarchical distance sampling model. Ecology 96, 325–331.

See Also

covDiag, detHist, detTime, countHist, Nmix.chisq, Nmix.gof.test

Examples

##modified example from ?distsamp
## Not run: 
if(require(unmarked)){
data(linetran)
##format data
ltUMF <- with(linetran, {
              unmarkedFrameDS(y = cbind(dc1, dc2, dc3, dc4),
              siteCovs = data.frame(Length, area, habitat),
              dist.breaks = c(0, 5, 10, 15, 20),
              tlength = linetran$Length * 1000, survey = "line",
              unitsIn = "m") 
             })

##compute descriptive stats from data object
countDist(ltUMF)
     
##Half-normal detection function
fm1 <- distsamp(~ 1 ~ 1, ltUMF)
##compute descriptive stats from model object
countDist(fm1)
}

## End(Not run)

AICcmodavg documentation built on Nov. 17, 2023, 1:08 a.m.