autoDistSamp: Automated classical distance analysis

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Perform automated classical detection function selection and estimation of abundance.

Usage

1
2
3
4
5
6
autoDistSamp(formula, detectionData, siteData, w.lo = 0, w.hi = NULL,
  likelihoods = c("halfnorm", "hazrate", "uniform", "negexp", "Gamma"),
  series = c("cosine", "hermite", "simple"), expansions = 0:3,
  pointSurvey = FALSE, warn = TRUE, area = 1, ci = 0.95, R = 500,
  bySite = FALSE, plot.bs = FALSE, showProgress = TRUE,
  plot = TRUE, criterion = "AICc", ...)

Arguments

formula

This parameter is passed to dfuncEstim. See dfuncEstim documentation for definition.

detectionData

This parameter is passed to dfuncEstim and abundEstim. See abundEstim documentation for definition.

siteData

This parameter is passed to abundEstim. See abundEstim documentation for definition.

w.lo

This parameter is passed to dfuncEstim. See dfuncEstim documentation for definition.

w.hi

This parameter is passed to dfuncEstim. See dfuncEstim documentation for definition.

likelihoods

Vector of strings specifying the likelihoods to consider during model selection. Valid values at present are "uniform", "halfnorm", "hazrate", "negexp", and "Gamma". See Details for the models this routine considers.

series

Vector of series types to consider during model selection. Valid values are 'simple', 'hermite', and 'cosine'. See Details for the models this routine considers.

expansions

Vector of the number of expansion terms to consider during model selection. Valid values are 0 through 3. See Details for the models this routine considers. Note, expansion terms are not currently allowed in models with covariates.

pointSurvey

This parameter is passed to dfuncEstim. See dfuncEstim documentation for definition.

warn

This parameter is passed to dfuncEstim. dfuncEstim documentation for definition.

area

This parameter is passed to abundEstim. See abundEstim documentation for definition.

ci

This parameter is passed to abundEstim. See abundEstim documentation for definition.

R

This parameter is passed to abundEstim. See abundEstim documentation for definition.

bySite

This parameter is passed to abundEstim. See abundEstim documentation for definition.

plot.bs

Logical for whether to plot bootstrap iterations after the top model has been selected and during final estimation of confidence intervals. This parameter is passed unchanged to abundEstim. See abundEstim help for additional information.

showProgress

Logical for whether to suppress intermediate output. If showProgress=TRUE, a table of model fitting results appears in the console as they are estimated, and a progress bar shows progress through the bootstrap iterations at the end. If showProgress=FALSE, all intermediate output is suppressed which is handy for programming and simulations.

plot

Logical scalar specifying whether to plot models during model selection. If TRUE, a histogram with fitted distance function is plotted for every fitted model. The function pauses between each plot and prompts the user for whether they want to continue or not. For completely automated estimation, set plot = FALSE.

criterion

A string specifying the criterion to use when assessing model fit. The best fitting model from this routine is the one with lowest value of this fit criterion. This must be one of "AICc" (the default), "AIC", or "BIC". See AIC.dfunc for formulas.

...

Additional parameters passed to dfuncEstim, which in turn are passed to F.gx.estim. These include x.scl, g.x.scl, and observer for estimating double observer probabilities.

Details

During model selection, each series and number of expansions is crossed with each of the likelihoods. For example, if likelihoods has 3 elements, series has 2 elements, and expansions has 4 elements, the total number of models fitted is 3 (likelihoods) * 2 (series) * 4 (expansions) = 24 models. The default specification fits 41 detection functions from the "halfnorm", "hazrate", "uniform", "negexp", and "Gamma" likelihoods (note that Gamma does not currently implement expansions, see Gamma.like). Note, expansion terms are not currently allowed in models with covariates. The model with lowest AIC is selected as 'best', and estimation of abundance proceeds using that model.

Suppress all intermediate output using plot.bs=FALSE, showProgress=FALSE, and plot=FALSE.

Value

If bySite==FALSE, an 'abundance estimate' object is returned. See abundEstim and dfuncEstim for an explanation of components. Returned abundance estimates are based on the best fitting distance function among those fitted. A fit table, sorted by the criterion, is returned as component $fitTable. The fit table component contains columns like (likelihood), series, expansions, converge (0=converged,1=not), scale (1=passed scale check,0=did not pass), and aic (the criterion used).

If bySite==TRUE, a data frame containing site-level abundance based on the best-fitting detection function is returned. See abundEstim for description of columns in the data frame. The best-fitting likelihood form, series, and number of expansions are returned as attributes of the data frame (e.g., best-fitting likelihood is attr(out,"like.form")).

Author(s)

Trent McDonald, WEST Inc., tmcdonald@west-inc.com
Aidan McDonald, WEST Inc., aidan@mcdcentral.org
Jason Carlisle, University of Wyoming and WEST Inc., jcarlisle@west-inc.com

See Also

dfuncEstim, abundEstim.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Load example sparrow data (line transect survey type)
data(sparrowDetectionData)
data(sparrowSiteData)

# Automate fitting multiple detection functions, and estimate abundance
# (density per ha in this case), given the 'best' detection function
# Note, area=10000 converts to density per ha (for distances measured in m)
# Note, users should do more than R=20 iterations of the bootstrap
autoDistSamp(formula=dist ~ 1,
             detectionData=sparrowDetectionData, siteData=sparrowSiteData,
             likelihood=c("halfnorm", "hazrate"), w.hi=100,
             series=c("cosine", "simple"), expansions=c(0, 1),
             area=10000, R=20, ci=0.95, bySite=FALSE,
             plot.bs=TRUE, plot=FALSE, pointSurvey=FALSE)

Example output

Rdistance (version 2.1.3)
Likelihood	Series	Expans	Converged?	Scale?	AICc
halfnorm	cosine	0	Yes		Ok	2970.6052
halfnorm	cosine	1	Yes		Ok	2970.6774
halfnorm	simple	1	Yes		Ok	2970.6186
hazrate		cosine	0	Yes		Ok	2972.5328
hazrate		cosine	1	Yes		Ok	2972.7198
hazrate		simple	1	Yes		Ok	2973.0355
Computing bootstrap confidence interval on N...

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |=======                                                               |  11%
  |                                                                            
  |===========                                                           |  16%
  |                                                                            
  |===============                                                       |  21%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |=====================================                                 |  53%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |=======================================================               |  79%
  |                                                                            
  |===========================================================           |  84%
  |                                                                            
  |===============================================================       |  89%
  |                                                                            
  |==================================================================    |  95%
  |                                                                            
  |======================================================================| 100%


------------ Abundance Estimate Based on Top-Ranked Detection Function ------------
Call: dfuncEstim(formula = formula, detectionData = detectionData,
   siteData = siteData, likelihood = fit.table$like[1], pointSurvey =
   pointSurvey, w.lo = w.lo, w.hi = w.hi, expansions =
   fit.table$expansions[1], series = fit.table$series[1])
Coefficients:
       Estimate  SE        z        p(>|z|)     
Sigma  46.3587   2.549913  18.1805  7.365789e-74

Convergence: Success
Function: HALFNORM  
Strip: 0 to 100 
Effective strip width (ESW): 56.30084 
Probability of detection: 0.5630084 
Scaling: g(0) = 1
Log likelihood: 1484.297 
AICc: 2970.605

Abundance estimate:  0.8634171 ;  95% CI=( 0.7595291 to 1.025431 )

Call: dfuncEstim(formula = formula, detectionData = detectionData,
   siteData = siteData, likelihood = fit.table$like[1], pointSurvey =
   pointSurvey, w.lo = w.lo, w.hi = w.hi, expansions =
   fit.table$expansions[1], series = fit.table$series[1])
Coefficients:
       Estimate  SE        z        p(>|z|)     
Sigma  46.3587   2.549913  18.1805  7.365789e-74

Convergence: Success
Function: HALFNORM  
Strip: 0 to 100 
Effective strip width (ESW): 56.30084 
Probability of detection: 0.5630084 
Scaling: g(0) = 1
Log likelihood: 1484.297 
AICc: 2970.605

Abundance estimate:  0.8634171 ;  95% CI=( 0.7595291 to 1.025431 )

Rdistance documentation built on May 2, 2019, 3:49 a.m.