This function extracts various summary statistics from distance sampling
data of various `unmarkedFrame`

and `unmarkedFit`

classes.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
countDist(object, plot.freq = TRUE, plot.distance = TRUE, ...)
## S3 method for class 'unmarkedFrameDS'
countDist(object, plot.freq = TRUE,
plot.distance = TRUE, ...)
## S3 method for class 'unmarkedFitDS'
countDist(object, plot.freq = TRUE,
plot.distance = TRUE, ...)
## S3 method for class 'unmarkedFrameGDS'
countDist(object, plot.freq = TRUE,
plot.distance = TRUE, ...)
## S3 method for class 'unmarkedFitGDS'
countDist(object, plot.freq = TRUE,
plot.distance = TRUE, ...)
``` |

`object` |
an object of various |

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

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.

`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 |

`out.props` |
a matrix where the rows correspond to each sampling
season and where columns consist of the proportion of sites in
season |

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

Marc J. Mazerolle

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.

`covDiag`

, `detHist`

, `countHist`

,
`Nmix.chisq`

, `Nmix.gof.test`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
##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)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.