Learn R Programming

AICcmodavg (version 2.1-1)

countDist: 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, …)

# S3 method for unmarkedFrameDS countDist(object, plot.freq = TRUE, plot.distance = TRUE, …)

# S3 method for unmarkedFitDS countDist(object, plot.freq = TRUE, plot.distance = TRUE, …)

# S3 method for unmarkedFrameGDS countDist(object, plot.freq = TRUE, plot.distance = TRUE, …)

# S3 method for unmarkedFitGDS countDist(object, plot.freq = TRUE, plot.distance = TRUE, …)

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 should be plotted.

additional arguments passed to the function.

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.

hist.table.seasons

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

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.

Details

This function computes a number of summary statistics in data sets used for the distance sampling models of Royle et al. (2004) and Chandler et al. (2011).

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

References

Chandler, R. B., Royle, J. A., King, D. I. (2011) Inference about density and temporary emigration in unmarked populations. Ecology 92, 1429--1435.

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

See Also

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

Examples

Run this code
# NOT RUN {
##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)
}
# }

Run the code above in your browser using DataLab