diff --git a/.Rbuildignore b/.Rbuildignore
index 9b6ce103..65149673 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -14,3 +14,5 @@ cran-comments.md
^_pkgdown\.yml$
^docs$
^pkgdown$
+Clarity.txt
+^vignettes
\ No newline at end of file
diff --git a/DESCRIPTION b/DESCRIPTION
index 9cfb92b0..306d29e3 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -18,18 +18,19 @@ Description: Animal abundance estimation via conventional, multiple covariate
fitting is performed via maximum likelihood. Also included are diagnostics
and plotting for fitted detection functions. Abundance estimation is via a
Horvitz-Thompson-like estimator.
-Version: 3.0.0.9004
+Version: 3.0.0.9006
URL: https://github.com/DistanceDevelopment/mrds/
BugReports: https://github.com/DistanceDevelopment/mrds/issues
Depends:
- R (>= 3.0)
+ R (>= 4.1.0)
Imports:
optimx (>= 2013.8.6),
mgcv,
methods,
numDeriv,
nloptr,
- Rsolnp
+ Rsolnp,
+ Rdpack
Suggests:
Distance,
testthat,
@@ -38,4 +39,5 @@ Suggests:
rmarkdown,
bookdown
RoxygenNote: 7.3.2
+RdMacros: Rdpack
Encoding: UTF-8
diff --git a/NAMESPACE b/NAMESPACE
index 507a4dc3..25f8a9e3 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -72,6 +72,7 @@ import(Rsolnp)
import(mgcv)
import(nloptr)
import(optimx)
+importFrom(Rdpack,reprompt)
importFrom(grDevices,dev.interactive)
importFrom(grDevices,dev.new)
importFrom(grDevices,devAskNewPage)
diff --git a/NEWS.md b/NEWS.md
index 7c632173..fdd00ccb 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -5,6 +5,7 @@ Bug Fixes
* Fixed formatting issue in flnl.grad help
* Now displays a warning if the user tries to fit a detection function with covariates using MCDS.exe which is not either a half-normal or a hazard rate model. (Issue #113)
* Fixed so that the MCDS.exe does not try to fit a negative exponential in place of a gamme key function. (Issue #113)
+* Now issues warnings when there is only a single transect and varflag option is 1 or 2. (Issue #115)
# mrds 3.0.0
diff --git a/R/ddf.R b/R/ddf.R
index 856e1084..dce55b30 100644
--- a/R/ddf.R
+++ b/R/ddf.R
@@ -71,7 +71,7 @@
#' for the log of the scale parameter of the key function (e.g., the equivalent
#' of the standard deviation in the half-normal). The variable \code{distance}
#' should not be included in the formula because the scale is for distance.
-#' See Marques, F.F.C. and S.T. Buckland (2004) for more details on the
+#' See \insertCite{marques2004;textual}{mrds} for more details on the
#' representation of the scale formula. For the hazard rate and gamma
#' functions, an additional \code{shape.formula} can be specified for the model
#' of the shape parameter. The default will be ~1.
@@ -91,7 +91,7 @@
#' functions are \code{formula} and \code{link}. At present, only \code{glm}
#' is allowed and it is restricted to \code{link=logit}. Thus, currently the
#' only form for the conditional detection functions is logistic as expressed
-#' in eq 6.32 of Laake and Borchers (2004). In contrast to \code{dsmodel}, the
+#' in eq 6.32 of \insertCite{laake2004;textual}{mrds}. In contrast to \code{dsmodel}, the
#' argument \code{formula} will typically include \code{distance} and all other
#' covariates that affect detection probability. For example,
#' \code{mrmodel=~glm(formula=~distance+size+sex)} constructs a conditional
@@ -209,7 +209,7 @@
#' }
#'
#' Examples of distance sampling analyses are available at
-#' \url{https://examples.distancesampling.org/}.
+#' \url{https://distancesampling.org/resources/vignettes.html}.
#'
#' Hints and tips on fitting (particularly optimisation issues) are on the
#' \code{\link{mrds_opt}} manual page.
@@ -228,15 +228,8 @@
#' \code{\link{ddf.io.fi}}, \code{\link{ddf.trial}},
#' \code{\link{ddf.trial.fi}}, \code{\link{ddf.rem}}, \code{\link{ddf.rem.fi}},
#' \code{\link{mrds_opt}}
-#' @references Laake, J.L. and D.L. Borchers. 2004. Methods for incomplete
-#' detection at distance zero. In: Advanced Distance Sampling, eds. S.T.
-#' Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L.
-#' Thomas. Oxford University Press.
-#'
-#' Marques, F.F.C. and S.T. Buckland. 2004. Covariate models for the detection
-#' function. In: Advanced Distance Sampling, eds. S.T. Buckland,
-#' D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas.
-#' Oxford University Press.
+#' @references
+#' \insertAllCited{}
#' @keywords ~Statistical Models
#' @examples
#' # load data
diff --git a/R/dht.R b/R/dht.R
index 89bcbd07..ada18b89 100644
--- a/R/dht.R
+++ b/R/dht.R
@@ -10,8 +10,7 @@
#' samples within any regional stratification. For clustered populations,
#' \eqn{E(s)} and its standard error are also output.
#'
-#' Abundance is estimated with a Horvitz-Thompson-like estimator (Huggins 1989,
-#' 1991; Borchers et al 1998; Borchers and Burnham 2004). The abundance in the
+#' Abundance is estimated with a Horvitz-Thompson-like estimator (\insertCite{huggins1989;nobrackets}{mrds}; \insertCite{huggins1991;nobrackets}{mrds}; \insertCite{borchers1998;nobrackets}{mrds}; \insertCite{borchers2004;nobrackets}{mrds}). The abundance in the
#' sampled region is simply \eqn{1/p_1 + 1/p_2 + ... + 1/p_n} where \eqn{p_i}
#' is the estimated detection probability for the \eqn{i}th detection of
#' \eqn{n} total observations. It is not strictly a Horvitz-Thompson estimator
@@ -78,7 +77,7 @@
#' If the argument \code{se=TRUE}, standard errors for density and abundance is
#' computed. Coefficient of variation and log-normal confidence intervals are
#' constructed using a Satterthwaite approximation for degrees of freedom
-#' (Buckland et al. 2001 p. 90). The function \code{\link{dht.se}} computes the
+#' (\insertCite{buckland2001;nobrackets}{mrds} p 90). The function \code{\link{dht.se}} computes the
#' variance and interval estimates.
#'
#' The variance has two components:
@@ -88,7 +87,7 @@
#' \item variation in abundance due to random sample selection;
#' }
#' The first component (model parameter uncertainty) is computed using a delta
-#' method estimate of variance (Huggins 1989, 1991, Borchers et al. 1998) in
+#' method estimate of variance (\insertCite{huggins1989;nobrackets}{mrds}; \insertCite{huggins1991;nobrackets}{mrds}; \insertCite{borchers1998;nobrackets}{mrds}) in
#' which the first derivatives of the abundance estimator with respect to the
#' parameters in the detection function are computed numerically (see
#' \code{\link{DeltaMethod}}).
@@ -99,17 +98,16 @@
#' to calculate encounter rate:
#' \itemize{
#' \item \code{0} uses a binomial variance for the number of observations
-#' (equation 13 of Borchers et al. 1998). This estimator is only useful if the
+#' (equation 13 of \insertCite{borchers1998;nobrackets}{mrds}. This estimator is only useful if the
#' sampled region is the survey region and the objects are not clustered; this
#' situation will not occur very often;
#' \item \code{1} uses the encounter rate \eqn{n/L} (objects observed per unit
-#' transect) from Buckland et al. (2001) pg 78-79 (equation 3.78) for line
-#' transects (see also Fewster et al, 2009 estimator R2). This variance
+#' transect) from \insertCite{buckland2001;textual}{mrds} pg 78-79 (equation 3.78) for line
+#' transects (see also \insertCite{fewster2009;nobrackets}{mrds} estimator R2). This variance
#' estimator is not appropriate if \code{size} or a derivative of \code{size}
#' is used in the detection function;
#' \item \code{2} is the default and uses the encounter rate estimator
-#' \eqn{\hat{N}/L} (estimated abundance per unit transect) suggested by Innes
-#' et al (2002) and Marques & Buckland (2004).
+#' \eqn{\hat{N}/L} (estimated abundance per unit transect) suggested by \insertCite{innes2002;textual}{mrds} and \insertCite{marques2004;textual}{mrds}
#' }
#'
#' In general if any covariates are used in the models, the default
@@ -118,13 +116,14 @@
#' the mean group size and standard error is also reported.
#'
#' For options \code{1} and \code{2}, it is then possible to choose one of the
-#' estimator forms given in Fewster et al (2009) for line transects:
+#' estimator forms given in \insertCite{fewster2009;textual}{mrds}
+#' for line transects:
#' \code{"R2"}, \code{"R3"}, \code{"R4"}, \code{"S1"}, \code{"S2"},
-#' \code{"O1"}, \code{"O2"} or \code{"O3"} by specifying the \code{ervar=}
-#' option (default \code{"R2"}). For points, either the \code{"P2"} or
+#' \code{"O1"}, \code{"O2"} or \code{"O3"} can be used by specifying \code{ervar}
+#' in the list of options provided by the \code{options} argument
+#' (default \code{"R2"}). For points, either the \code{"P2"} or
#' \code{"P3"} estimator can be selected (>=mrds 2.3.0 default \code{"P2"},
-#' <= mrds 2.2.9 default \code{"P3"}). See \code{\link{varn}} and Fewster
-#' et al (2009) for further details on these estimators.
+#' <= mrds 2.2.9 default \code{"P3"}). See \code{\link{varn}} and \insertCite{fewster2009;textual}{mrds} for further details on these estimators.
#'
#' @param model ddf model object
#' @param region.table \code{data.frame} of region records. Two columns:
@@ -187,42 +186,12 @@
#'}
#'
#' @author Jeff Laake, David L Miller
-#' @seealso print.dht dht.se
+#' @seealso \code{\link{print.dht}} \code{\link{dht.se}}
#' @references
-#'
-#' Borchers, D.L., S.T. Buckland, P.W. Goedhart, E.D. Clarke, and S.L. Hedley.
-#' 1998. Horvitz-Thompson estimators for double-platform line transect
-#' surveys. Biometrics 54: 1221-1237.
-#'
-#' Borchers, D.L. and K.P. Burnham. General formulation for distance sampling
-#' pp 10-11 In: Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson,
-#' K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas. Oxford University
-#' Press.
-#'
-#' Buckland, S.T., D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and
-#' L. Thomas. 2001. Introduction to Distance Sampling: Estimating Abundance
-#' of Biological Populations. Oxford University Press.
-#'
-#' Fewster, R.M., S.T. Buckland, K.P. Burnham, D.L. Borchers, P.E. Jupp, J.L.
-#' Laake and L. Thomas. 2009. Estimating the encounter rate variance in
-#' distance sampling. Biometrics 65: 225-236.
-#'
-#' Huggins, R.M. 1989. On the statistical analysis of capture experiments.
-#' Biometrika 76:133-140.
-#'
-#' Huggins, R.M. 1991. Some practical aspects of a conditional likelihood
-#' approach to capture experiments. Biometrics 47: 725-732.
-#'
-#' Innes, S., M.P. Heide-Jorgensen, J.L. Laake, K.L. Laidre, H.J. Cleator, P.
-#' Richard, and R.E.A. Stewart. 2002. Surveys of belugas and narwhals in the
-#' Canadian High Arctic in 1996. NAMMCO Scientific Publications 4: 169-190.
-#'
-#' Marques, F.F.C. and S.T. Buckland. 2004. Covariate models for the detection
-#' function. In: Advanced Distance Sampling, eds. S.T. Buckland,
-#' D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas.
-#' Oxford University Press.
+#' \insertAllCited{}
#' @keywords utility
#' @importFrom stats aggregate
+#' @importFrom Rdpack reprompt
#' @export
dht <- function(model, region.table, sample.table, obs.table=NULL, subset=NULL,
se=TRUE, options=list()){
@@ -626,6 +595,28 @@ dht <- function(model, region.table, sample.table, obs.table=NULL, subset=NULL,
}
result <- list(individuals=individuals)
}
+
+ # Check to see if need to issue user with a warning if there were any strata with only one sample.
+ if(any(result$individuals$summary$k == 1)){
+ # if there is only one strata
+ if(nrow(result$individuals$summary) == 1){
+ if(options$varflag == 1){
+ warning("Only one sample, assuming variance of n is Poisson. See help on dht.se for recommendations.", immediate. = TRUE, call. = FALSE)
+ }else if(options$varflag == 2){
+ warning("Only one sample, assuming abundance in the covered region is Poisson. See help on dht.se for recommendations.", immediate. = TRUE, call. = FALSE)
+ }
+ }else{
+ # if there are multiple strata
+ # find which strata have only one sample
+ strat.names <- result$individuals$summary$Region[result$individuals$summary$k == 1]
+ strat.txt <- ifelse(length(strat.names) > 1, ". For these strata, ", ". For this stratum, ")
+ if(options$varflag == 1){
+ warning(paste("Only one sample in the following strata: ", paste(strat.names, collapse = ", "), strat.txt, "it is assumed variance of n is Poisson. See help on dht.se.", sep = ""), immediate. = TRUE, call. = FALSE)
+ }else if(options$varflag == 2){
+ warning("Only one sample in the following strata: ", paste(strat.names, collapse = ", "), strat.txt, "it is assumed abundance in the covered region is Poisson. See help on dht.se.", immediate. = TRUE, call. = FALSE)
+ }
+ }
+ }
# add some meta data
# save enounter rate variance information
diff --git a/R/dht.se.R b/R/dht.se.R
index d467e2a7..819830ee 100644
--- a/R/dht.se.R
+++ b/R/dht.se.R
@@ -12,7 +12,7 @@
#' \item variation in abundance due to random sample selection;
#' }
#' The first component (model parameter uncertainty) is computed using a delta
-#' method estimate of variance (Huggins 1989, 1991, Borchers et al. 1998) in
+#' method estimate of variance (\insertCite{huggins1989;nobrackets}{mrds}; \insertCite{huggins1991;nobrackets}{mrds}; \insertCite{borchers1998;nobrackets}{mrds}) in
#' which the first derivatives of the abundance estimator with respect to the
#' parameters in the detection function are computed numerically (see
#' \code{\link{DeltaMethod}}).
@@ -22,18 +22,19 @@
#' estimator used. To begin with there three possible values for \code{varflag}
#' to calculate encounter rate:
#' \itemize{
-#' \item \code{0} uses a binomial variance for the number of observations
-#' (equation 13 of Borchers et al. 1998). This estimator is only useful if the
-#' sampled region is the survey region and the objects are not clustered; this
-#' situation will not occur very often;
+#' \item \code{0} uses a negative binomial variance for the number of
+#' observations (equation 13 of \insertCite{borchers1998;nobrackets}{mrds}).
+#' This estimator is only
+#' useful if the sampled region is the survey region and the objects are not
+#' clustered; this situation will not occur very often;
#' \item \code{1} uses the encounter rate \eqn{n/L} (objects observed per unit
-#' transect) from Buckland et al. (2001) pg 78-79 (equation 3.78) for line
-#' transects (see also Fewster et al, 2009 estimator R2). This variance
+#' transect) from \insertCite{buckland2001;textual}{mrds} pg 78-79 (equation 3.78) for line
+#' transects (see also \insertCite{fewster2009;nobrackets}{mrds} estimator R2). This variance
#' estimator is not appropriate if \code{size} or a derivative of \code{size}
#' is used in the detection function;
#' \item \code{2} is the default and uses the encounter rate estimator
-#' \eqn{\hat{N}/L} (estimated abundance per unit transect) suggested by Innes
-#' et al (2002) and Marques & Buckland (2004).
+#' \eqn{\hat{N}/L} (estimated abundance per unit transect) suggested by
+#' \insertCite{innes2002;textual}{mrds} and \insertCite{marques2004;textual}{mrds}
#' }
#'
#' In general if any covariates are used in the models, the default
@@ -42,21 +43,25 @@
#' the mean group size and standard error is also reported.
#'
#' For options \code{1} and \code{2}, it is then possible to choose one of the
-#' estimator forms given in Fewster et al (2009). For line transects:
+#' estimator forms given in \insertCite{fewster2009;textual}{mrds}. For line transects:
#' \code{"R2"}, \code{"R3"}, \code{"R4"}, \code{"S1"}, \code{"S2"},
-#' \code{"O1"}, \code{"O2"} or \code{"O3"} can be used by specifying the
-#' \code{ervar=} option (default \code{"R2"}). For points, either the
+#' \code{"O1"}, \code{"O2"} or \code{"O3"} can be used by specifying \code{ervar}
+#' in the list of options provided by the \code{options} argument
+#' (default \code{"R2"}). For points, either the
#' \code{"P2"} or \code{"P3"} estimator can be selected (>=mrds 2.3.0
#' default \code{"P2"}, <= mrds 2.2.9 default \code{"P3"}). See
-#' \code{\link{varn}} and Fewster et al (2009) for further details
-#' on these estimators.
+#' \code{\link{varn}} and \insertCite{fewster2009;textual}{mrds}
+#' for further details on these estimators.
#'
#' Exceptions to the above occur if there is only one sample in a stratum. In
-#' that case it uses Poisson assumption (\eqn{Var(x)=x}) and it assumes a known
-#' variance so \eqn{z=1.96} is used for critical value. In all other cases the
-#' degrees of freedom for the \eqn{t}-distribution assumed for the
+#' this situation, \code{varflag=0} continues to use a negative binomial
+#' variance while the other options assume a Poisson variance (\eqn{Var(x)=x}),
+#' where when \code{varflag=1} x is number of detections in the covered region and
+#' when \code{varflag=2} x is the abundance in the covered region. It also assumes
+#' a known variance so \eqn{z=1.96} is used for critical value. In all other cases
+#' the degrees of freedom for the \eqn{t}-distribution assumed for the
#' log(abundance) or log(density) is based on the Satterthwaite approximation
-#' (Buckland et al. 2001 pg 90) for the degrees of freedom (df). The df are
+#' (\insertCite{buckland2001;nobrackets}{mrds} pg 90) for the degrees of freedom (df). The df are
#' weighted by the squared cv in combining the two sources of variation because
#' of the assumed log-normal distribution because the components are
#' multiplicative. For combining df for the sampling variance across regions
@@ -84,9 +89,11 @@
#' their own code.
#' @author Jeff Laake
#' @seealso \code{\link{dht}}, \code{\link{print.dht}}
-#' @references see \code{\link{dht}}
+#' @references
+#' \insertAllCited{}
#' @keywords utility
#' @importFrom stats qnorm qt var
+#' @importFrom Rdpack reprompt
dht.se <- function(model, region.table, samples, obs, options, numRegions,
estimate.table, Nhat.by.sample){
# Functions Used: DeltaMethod, dht.deriv (in DeltaMethod), varn
@@ -127,8 +134,9 @@ dht.se <- function(model, region.table, samples, obs, options, numRegions,
# Next compute the component due to sampling of both lines and of the
# detection process itself
# There are 3 different options here:
- # 1) varflag=0; Binomial variance of detection process - only applicable if
- # survey region=covered region although it will scale up but it would be
+ # 1) varflag=0; Negative binomial variance of detection process - only
+ # applicable if survey region=covered region although it will scale up
+ # but it would be
# a poor estimator
# 2) varflag=1; delta method, with varn based on Fewster et al (2009)
# estimator R2 (var(n/L))
@@ -228,10 +236,14 @@ dht.se <- function(model, region.table, samples, obs, options, numRegions,
if (options$group) vars <- 0
+ # if there is only one sample assume Poisson variance
if(length(stratum.data$Effort.y) == 1){
if (options$varflag == 1){
+ # Assuming variance of n is Poisson: var(x) = x
vc2[i] <- Ni^2 * 1/stratum.data$n
}else{
+ # varflag = 2
+ # Assuming abundance in covered region is Poisson: var(x) = x
vc2[i] <- Ni^2 * 1/Ni
}
}else if (options$varflag == 1){
diff --git a/R/mcds_tools.R b/R/mcds_tools.R
index 628783af..2290161b 100644
--- a/R/mcds_tools.R
+++ b/R/mcds_tools.R
@@ -19,7 +19,7 @@
#' choose to use only the R-based algorithm by setting \code{control=list(optimizer='R')}.
#'
#' For more information and examples comparing the R-based and `MCDS.exe` algorithms,
-#' see our examples pages at https://examples.distancesampling.org/
+#' see our examples pages at https://distancesampling.org/resources/vignettes.html
#'
#' If you are running a non-Windows operating system, you can follow the
#' instructions below to have `MCDS.exe` run using `wine`.
diff --git a/R/mrds-package.R b/R/mrds-package.R
index a27237d2..2c50fc02 100644
--- a/R/mrds-package.R
+++ b/R/mrds-package.R
@@ -1,20 +1,14 @@
#' Mark-Recapture Distance Sampling (mrds)
#'
-#' This package implements mark-recapture distance sampling
-#' methods as described in D.L. Borchers, W. Zucchini and Fewster,
-#' R.M. (1988), "Mark-recapture models for line transect surveys",
-#' Biometrics 54: 1207-1220. and Laake, J.L. (1999) "Distance sampling
-#' with independent observers: Reducing bias from heterogeneity by
-#' weakening the conditional independence assumption." in Amstrup,
-#' G.W., Garner, S.C., Laake, J.L., Manly, B.F.J., McDonald, L.L. and
-#' Robertson, D.G. (eds) "Marine mammal survey and assessment
-#' methods", Balkema, Rotterdam: 137-148 and Borchers, D.L., Laake,
-#' J.L., Southwell, C. and Paxton, C.L.G. "Accommodating unmodelled
-#' heterogeneity in double-observer distance sampling surveys". 2006.
-#' Biometrics 62:372-378.)
+#' This package implements both conventional distance sampling
+#' analysis and mark-recapture distance sampling methods for when
+#' detection on the transect is not certain. Mark-recapture distance sampling methods are described in
+#' \insertCite{borchers1988;textual}{mrds}, \insertCite{laake1999;textual}{mrds}
+#' and \insertCite{borchers2006;textual}{mrds}
+#'
#'
#' Examples of distance sampling analyses are available at
-#' \url{http://examples.distancesampling.org/}.
+#' \url{https://distancesampling.org/resources/vignettes.html}.
#'
#' For help with distance sampling and this package, there is a Google Group
#' \url{https://groups.google.com/forum/#!forum/distance-sampling}.
@@ -27,6 +21,9 @@
#' David L. Miller ,
#' Jon Bishop ,
#' Felix Petersma
+#' @importFrom Rdpack reprompt
+#' @references
+#' \insertAllCited{}
#' @keywords package
#' "_PACKAGE"
#'
diff --git a/R/varn.R b/R/varn.R
index ce87eb79..330c80f4 100644
--- a/R/varn.R
+++ b/R/varn.R
@@ -4,7 +4,7 @@
#' encounter rate for a set of sample measurements (e.g., line lengths) and
#' number of observations per sample.
#'
-#' The choice of type follows the notation of Fewster et al. (2009) in that there are 8 choices of encounter rate variance that can be computed for lines and one for points:
+#' The choice of type follows the notation of \insertCite{fewster2009;textual}{mrds} in that there are 8 choices of encounter rate variance that can be computed for lines and one for points:
#'
#' \describe{
#' \item{\code{R2}}{random line placement with unequal line lengths
@@ -30,9 +30,9 @@
#' visits per point, model-based estimator}
#' }
#'
-#' Default value is \code{"R2"}, shown in Fewster et al. (2009) to have good
+#' Default value is \code{"R2"}, shown in \insertCite{fewster2009;textual}{mrds} to have good
#' performance for completely random designs for lines. For systematic parallel
-#' line transect designs, Fewster et al. recommend \code{"O2"}. For point
+#' line transect designs, \insertCite{fewster2009;textual}{mrds} recommend \code{"O2"}. For point
#' transects the default is \code{"P2"} (but \code{"P3"} is also available).
#'
#' For the systematic estimators, pairs are assigned in the order they are
@@ -49,13 +49,12 @@
#' @param type choice of variance estimator to use for encounter rate
#' @return Variance of encounter rate as defined by arguments
#' @note This function is also used with different calling arguments to compute
-#' Innes et al variance of the estimated abundances/length rather than
+#' \insertCite{innes2002;textual}{mrds} variance of the estimated abundances/length rather than
#' observation encounter rate. The function covn is probably only valid for R3
#' and R2. Currently, the R2 form is used for all types other than R3.
#' @author Jeff Laake, David L Miller
-#' @references Fewster, R.M., S.T. Buckland, K.P. Burnham, D.L. Borchers, P.E.
-#' Jupp, J.L. Laake and L. Thomas. 2009. Estimating the encounter rate
-#' variance in distance sampling. Biometrics 65: 225-236.
+#' @references
+#' \insertAllCited{}
#' @keywords utility
#' @export
varn <- function(lvec, nvec, type){
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 5e0319c6..ca8c9e67 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -1,6 +1,7 @@
url: ~
template:
bootstrap: 5
+ math-rendering: mathjax
bslib:
bg: "#fcfaf2"
fg: "#14059e"
@@ -15,12 +16,7 @@ reference:
navbar:
bg: primary
structure:
- right: [twitter, github]
- components:
- twitter:
- icon: fa-twitter
- href: https://twitter.com/distancesamp
- aria-label: Twitter
+ right: [github]
left:
- text: Function reference
href: reference/index.html
diff --git a/docs/404.html b/docs/404.html
index eea0e2c6..ea4b0fee 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -6,9 +6,15 @@
Page not found (404) • mrds
-
+
-
+
@@ -22,7 +28,7 @@
mrds
- 3.0.0
+ 3.0.0.9006
Hints and tips on fitting (particularly optimisation issues) are on the
mrds_opt manual page.
References
-
Laake, J.L. and D.L. Borchers. 2004. Methods for incomplete
- detection at distance zero. In: Advanced Distance Sampling, eds. S.T.
- Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L.
- Thomas. Oxford University Press.
-
Marques, F.F.C. and S.T. Buckland. 2004. Covariate models for the detection
- function. In: Advanced Distance Sampling, eds. S.T. Buckland,
- D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas.
- Oxford University Press.
+
Laake JL, Borchers DL (2004).
+“Advanced distance sampling: estimating abundance of biological population.”
+In chapter Methods for incomplete detection at distance zero.
+Oxford University Press.
Marques FFC, Buckland ST (2004).
+“Advanced distance sampling.”
+In chapter Covariate models for the detection function, 31-47.
+Oxford University Press.
Uncertaintydht.se computes the
+(Buckland et al. 2001
+ p 90). The function dht.se computes the
variance and interval estimates.
The variance has two components:
variation due to uncertainty from estimation of the detection
function parameters;
variation in abundance due to random sample selection;
The first component (model parameter uncertainty) is computed using a delta
-method estimate of variance (Huggins 1989, 1991, Borchers et al. 1998) in
+method estimate of variance (Huggins 1989
+; Huggins 1991
+; Borchers et al. 1998
+) in
which the first derivatives of the abundance estimator with respect to the
parameters in the detection function are computed numerically (see
DeltaMethod).
Borchers, D.L., S.T. Buckland, P.W. Goedhart, E.D. Clarke, and S.L. Hedley.
- 1998. Horvitz-Thompson estimators for double-platform line transect
- surveys. Biometrics 54: 1221-1237.
-
Borchers, D.L. and K.P. Burnham. General formulation for distance sampling
- pp 10-11 In: Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson,
- K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas. Oxford University
- Press.
-
Buckland, S.T., D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and
- L. Thomas. 2001. Introduction to Distance Sampling: Estimating Abundance
- of Biological Populations. Oxford University Press.
-
Fewster, R.M., S.T. Buckland, K.P. Burnham, D.L. Borchers, P.E. Jupp, J.L.
- Laake and L. Thomas. 2009. Estimating the encounter rate variance in
- distance sampling. Biometrics 65: 225-236.
-
Huggins, R.M. 1989. On the statistical analysis of capture experiments.
- Biometrika 76:133-140.
-
Huggins, R.M. 1991. Some practical aspects of a conditional likelihood
- approach to capture experiments. Biometrics 47: 725-732.
-
Innes, S., M.P. Heide-Jorgensen, J.L. Laake, K.L. Laidre, H.J. Cleator, P.
- Richard, and R.E.A. Stewart. 2002. Surveys of belugas and narwhals in the
- Canadian High Arctic in 1996. NAMMCO Scientific Publications 4: 169-190.
-
Marques, F.F.C. and S.T. Buckland. 2004. Covariate models for the detection
- function. In: Advanced Distance Sampling, eds. S.T. Buckland,
- D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas.
- Oxford University Press.
Borchers DL, Burnham KP (2004).
+“Advanced distance sampling: estimating abundance of biological population.”
+In chapter General formulation for distance sampling, 10-11.
+Oxford University Press.
Buckland ST, Anderson DR, Burnham KP, Laake JL, Borchers DL, Thomas L (2001).
+Introduction to distance sampling: estimating abundance of biological populations.
+Oxford university press.
Fewster RM, Buckland ST, Burnham KP, Borchers DL, Jupp PE, Laake JL, Thomas L (2009).
+“Estimating the encounter rate variance in distance sampling.”
+Biometrics, 65(1), 225-236.
Huggins RM (1989).
+“On the statistical analysis of capture experiments.”
+Biometrika, 76(1), 133-140.
+doi:10.1093/biomet/76.1.133
+.
Huggins RM (1991).
+“Some practical aspects of a conditional likelihood approach to capture experiments.”
+Biometrics, 47(1), 725-732.
+doi:10.1093/biomet/76.1.133
+.
Innes S, Heide-Jørgensen MP, Laake JL, Laidre KL, Cleator HJ, Richard P, Stewart RE (2002).
+“Surveys of belugas and narwhals in the Canadian High Arctic in 1996.”
+NAMMCO Scientific Publications, 4, 169-190.
Marques FFC, Buckland ST (2004).
+“Advanced distance sampling.”
+In chapter Covariate models for the detection function, 31-47.
+Oxford University Press.
The second component (encounter rate variance) can be computed in one of
several ways depending on the form taken for the encounter rate and the
estimator used. To begin with there three possible values for varflag
-to calculate encounter rate:
0 uses a binomial variance for the number of observations
- (equation 13 of Borchers et al. 1998). This estimator is only useful if the
- sampled region is the survey region and the objects are not clustered; this
- situation will not occur very often;
+to calculate encounter rate:
0 uses a negative binomial variance for the number of
+ observations (equation 13 of Borchers et al. 1998
+).
+ This estimator is only
+ useful if the sampled region is the survey region and the objects are not
+ clustered; this situation will not occur very often;
1 uses the encounter rate \(n/L\) (objects observed per unit
- transect) from Buckland et al. (2001) pg 78-79 (equation 3.78) for line
- transects (see also Fewster et al, 2009 estimator R2). This variance
+ transect) from Buckland et al. (2001)
+ pg 78-79 (equation 3.78) for line
+ transects (see also Fewster et al. 2009
+ estimator R2). This variance
estimator is not appropriate if size or a derivative of size
is used in the detection function;
2 is the default and uses the encounter rate estimator
- \(\hat{N}/L\) (estimated abundance per unit transect) suggested by Innes
- et al (2002) and Marques & Buckland (2004).
+ \(\hat{N}/L\) (estimated abundance per unit transect) suggested by
+ Innes et al. (2002)
+ and Marques and Buckland (2004)
In general if any covariates are used in the models, the default
varflag=2 is preferable as the estimated abundance will take into
account variability due to covariate effects. If the population is clustered
the mean group size and standard error is also reported.
For options 1 and 2, it is then possible to choose one of the
-estimator forms given in Fewster et al (2009). For line transects:
+estimator forms given in Fewster et al. (2009)
+. For line transects:
"R2", "R3", "R4", "S1", "S2",
-"O1", "O2" or "O3" can be used by specifying the
-ervar= option (default "R2"). For points, either the
+"O1", "O2" or "O3" can be used by specifying ervar
+in the list of options provided by the options argument
+(default "R2"). For points, either the
"P2" or "P3" estimator can be selected (>=mrds 2.3.0
default "P2", <= mrds 2.2.9 default "P3"). See
-varn and Fewster et al (2009) for further details
-on these estimators.
+varn and Fewster et al. (2009)
+
+ for further details on these estimators.
Exceptions to the above occur if there is only one sample in a stratum. In
-that case it uses Poisson assumption (\(Var(x)=x\)) and it assumes a known
-variance so \(z=1.96\) is used for critical value. In all other cases the
-degrees of freedom for the \(t\)-distribution assumed for the
+this situation, varflag=0 continues to use a negative binomial
+variance while the other options assume a Poisson variance (\(Var(x)=x\)),
+where when varflag=1 x is number of detections in the covered region and
+when varflag=2 x is the abundance in the covered region. It also assumes
+a known variance so \(z=1.96\) is used for critical value. In all other cases
+the degrees of freedom for the \(t\)-distribution assumed for the
log(abundance) or log(density) is based on the Satterthwaite approximation
-(Buckland et al. 2001 pg 90) for the degrees of freedom (df). The df are
+(Buckland et al. 2001
+ pg 90) for the degrees of freedom (df). The df are
weighted by the squared cv in combining the two sources of variation because
of the assumed log-normal distribution because the components are
multiplicative. For combining df for the sampling variance across regions
@@ -171,7 +191,28 @@
Buckland ST, Anderson DR, Burnham KP, Laake JL, Borchers DL, Thomas L (2001).
+Introduction to distance sampling: estimating abundance of biological populations.
+Oxford university press.
Fewster RM, Buckland ST, Burnham KP, Borchers DL, Jupp PE, Laake JL, Thomas L (2009).
+“Estimating the encounter rate variance in distance sampling.”
+Biometrics, 65(1), 225-236.
Huggins RM (1989).
+“On the statistical analysis of capture experiments.”
+Biometrika, 76(1), 133-140.
+doi:10.1093/biomet/76.1.133
+.
Huggins RM (1991).
+“Some practical aspects of a conditional likelihood approach to capture experiments.”
+Biometrics, 47(1), 725-732.
+doi:10.1093/biomet/76.1.133
+.
Innes S, Heide-Jørgensen MP, Laake JL, Laidre KL, Cleator HJ, Richard P, Stewart RE (2002).
+“Surveys of belugas and narwhals in the Canadian High Arctic in 1996.”
+NAMMCO Scientific Publications, 4, 169-190.
Marques FFC, Buckland ST (2004).
+“Advanced distance sampling.”
+In chapter Covariate models for the detection function, 31-47.
+Oxford University Press.
See also
diff --git a/docs/reference/distpdf.grad.html b/docs/reference/distpdf.grad.html
index e74db4f7..9637a96f 100644
--- a/docs/reference/distpdf.grad.html
+++ b/docs/reference/distpdf.grad.html
@@ -1,5 +1,11 @@
-Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad • mrdsGradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -25,8 +31,7 @@
diff --git a/docs/reference/flnl.grad.html b/docs/reference/flnl.grad.html
index cdd2dae4..dc28a110 100644
--- a/docs/reference/flnl.grad.html
+++ b/docs/reference/flnl.grad.html
@@ -1,10 +1,16 @@
-This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet. — flnl.grad • mrdsGradient of the negative log likelihood function — flnl.grad • mrdsmrds
This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet.
This function derives the gradients of the negative log likelihood function,
Introduction to Distance Sampling (2001) and Distance Sampling: Methods and
Applications (2015). It is not meant to be called by users of the mrds
and Distance packages directly but rather by the gradient-based
-solver. This solver is use when our distance sampling model is for
+solver. This solver is used when our distance sampling model is for
single-observer data coming from either line or point transect and only when
the detection function contains an adjustment series but no covariates. It is
implement for the following key + adjustment series combinations for the
diff --git a/docs/reference/flnl.html b/docs/reference/flnl.html
index c4b5ccb8..411866d6 100644
--- a/docs/reference/flnl.html
+++ b/docs/reference/flnl.html
@@ -1,5 +1,11 @@
-Log-likelihood computation for distance sampling data — flnl • mrdsLog-likelihood computation for distance sampling data — flnl • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -29,8 +35,7 @@
This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet.
+
Gradient of the negative log likelihood function
flnl()
diff --git a/docs/reference/integratedetfct.logistic.html b/docs/reference/integratedetfct.logistic.html
index 3dea74cc..2e30bbe1 100644
--- a/docs/reference/integratedetfct.logistic.html
+++ b/docs/reference/integratedetfct.logistic.html
@@ -1,5 +1,11 @@
-Integrate a logistic detection function — integratedetfct.logistic • mrdsIntegrate a logistic detection function — integratedetfct.logistic • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -27,8 +33,7 @@
diff --git a/docs/reference/integratepdf.grad.html b/docs/reference/integratepdf.grad.html
index 6f038ec2..313e077a 100644
--- a/docs/reference/integratepdf.grad.html
+++ b/docs/reference/integratepdf.grad.html
@@ -1,5 +1,11 @@
-Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad • mrdsNumerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -25,8 +31,7 @@
diff --git a/docs/reference/logisticbyx.html b/docs/reference/logisticbyx.html
index e1431897..74cb490b 100644
--- a/docs/reference/logisticbyx.html
+++ b/docs/reference/logisticbyx.html
@@ -1,5 +1,11 @@
-Logistic as a function of covariates — logisticbyx • mrdsLogistic as a function of covariates — logisticbyx • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -25,8 +31,7 @@
diff --git a/docs/reference/logisticbyz.html b/docs/reference/logisticbyz.html
index 48bd4101..b4f80128 100644
--- a/docs/reference/logisticbyz.html
+++ b/docs/reference/logisticbyz.html
@@ -1,5 +1,11 @@
-Logistic as a function of distance — logisticbyz • mrdsLogistic as a function of distance — logisticbyz • mrdsSkip to contents
@@ -9,7 +15,7 @@
mrds
- 3.0.0
+ 3.0.0.9006
@@ -23,8 +29,7 @@
diff --git a/docs/reference/logisticdupbyx.html b/docs/reference/logisticdupbyx.html
index 1a571b79..b8bfc0d1 100644
--- a/docs/reference/logisticdupbyx.html
+++ b/docs/reference/logisticdupbyx.html
@@ -1,5 +1,11 @@
-Logistic for duplicates as a function of covariates — logisticdupbyx • mrdsLogistic for duplicates as a function of covariates — logisticdupbyx • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -25,8 +31,7 @@
diff --git a/docs/reference/logisticdupbyx_fast.html b/docs/reference/logisticdupbyx_fast.html
index a8287aa6..d3da2f81 100644
--- a/docs/reference/logisticdupbyx_fast.html
+++ b/docs/reference/logisticdupbyx_fast.html
@@ -1,5 +1,11 @@
-Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast • mrdsLogistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast • mrdsSkip to contents
@@ -9,7 +15,7 @@
mrds
- 3.0.0
+ 3.0.0.9006
@@ -23,8 +29,7 @@
This package implements mark-recapture distance sampling
- methods as described in D.L. Borchers, W. Zucchini and Fewster,
- R.M. (1988), "Mark-recapture models for line transect surveys",
- Biometrics 54: 1207-1220. and Laake, J.L. (1999) "Distance sampling
- with independent observers: Reducing bias from heterogeneity by
- weakening the conditional independence assumption." in Amstrup,
- G.W., Garner, S.C., Laake, J.L., Manly, B.F.J., McDonald, L.L. and
- Robertson, D.G. (eds) "Marine mammal survey and assessment
- methods", Balkema, Rotterdam: 137-148 and Borchers, D.L., Laake,
- J.L., Southwell, C. and Paxton, C.L.G. "Accommodating unmodelled
- heterogeneity in double-observer distance sampling surveys". 2006.
- Biometrics 62:372-378.)
+
This package implements both conventional distance sampling
+analysis and mark-recapture distance sampling methods for when
+detection on the transect is not certain. Mark-recapture distance sampling methods are described in
+Borchers et al. (1988)
+, Laake (1999)
+
+and Borchers et al. (2006)
diff --git a/docs/reference/pdot.dsr.integrate.logistic.html b/docs/reference/pdot.dsr.integrate.logistic.html
index da02d110..8567aa27 100644
--- a/docs/reference/pdot.dsr.integrate.logistic.html
+++ b/docs/reference/pdot.dsr.integrate.logistic.html
@@ -1,5 +1,11 @@
-Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic • mrdsCompute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -25,8 +31,7 @@
diff --git a/docs/reference/plot.ds.html b/docs/reference/plot.ds.html
index 15ba5121..7e268517 100644
--- a/docs/reference/plot.ds.html
+++ b/docs/reference/plot.ds.html
@@ -1,5 +1,11 @@
-Plot fit of detection functions and histograms of data from distance sampling model — plot.ds • mrdsPlot fit of detection functions and histograms of data from distance sampling model — plot.ds • mrdsSkip to contents
@@ -9,7 +15,7 @@
mrds
- 3.0.0
+ 3.0.0.9006
@@ -23,8 +29,7 @@
diff --git a/docs/reference/plot.io.fi.html b/docs/reference/plot.io.fi.html
index 2b901a21..18c220a7 100644
--- a/docs/reference/plot.io.fi.html
+++ b/docs/reference/plot.io.fi.html
@@ -1,5 +1,11 @@
-Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi • mrdsPlot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -29,8 +35,7 @@
diff --git a/docs/reference/plot.io.html b/docs/reference/plot.io.html
index 584a3fb3..00068fd7 100644
--- a/docs/reference/plot.io.html
+++ b/docs/reference/plot.io.html
@@ -1,5 +1,11 @@
-Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io • mrdsPlot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -29,8 +35,7 @@
diff --git a/docs/reference/plot.rem.fi.html b/docs/reference/plot.rem.fi.html
index 0e9c0612..0bccc13e 100644
--- a/docs/reference/plot.rem.fi.html
+++ b/docs/reference/plot.rem.fi.html
@@ -1,5 +1,11 @@
-Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi • mrdsPlot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -29,8 +35,7 @@
diff --git a/docs/reference/plot.rem.html b/docs/reference/plot.rem.html
index 2c677b11..724e1596 100644
--- a/docs/reference/plot.rem.html
+++ b/docs/reference/plot.rem.html
@@ -1,5 +1,11 @@
-Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem • mrdsPlot fit of detection functions and histograms of data from removal distance sampling model — plot.rem • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -29,8 +35,7 @@
diff --git a/docs/reference/plot.trial.fi.html b/docs/reference/plot.trial.fi.html
index 0d5451ee..f98e9a70 100644
--- a/docs/reference/plot.trial.fi.html
+++ b/docs/reference/plot.trial.fi.html
@@ -1,5 +1,11 @@
-Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi • mrdsPlot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -29,8 +35,7 @@
diff --git a/docs/reference/plot.trial.html b/docs/reference/plot.trial.html
index 98942423..0858a6d2 100644
--- a/docs/reference/plot.trial.html
+++ b/docs/reference/plot.trial.html
@@ -1,5 +1,11 @@
-Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial • mrdsPlot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial • mrdsmrds
- 3.0.0
+ 3.0.0.9006
@@ -29,8 +35,7 @@
diff --git a/docs/reference/predict.ds.html b/docs/reference/predict.ds.html
index f7aae5ec..284cd2bc 100644
--- a/docs/reference/predict.ds.html
+++ b/docs/reference/predict.ds.html
@@ -1,5 +1,11 @@
-Predictions from mrds models — predict.ds • mrdsCalculate the parameter rescaling for parameters associated with covariates — rescale_pars • mrds Golf tee survey analyses","what":"Estimation of p(0): distance only","title":"Double platform analysis","text":"start analysing data assuming Observer 2 generating trials Observer 1 vice versa, .e. trial configuration Observer 1 primary Observer 2 tracker. (data also analysed independent observer configuration - welcome try ). begin assuming full independence (.e. detections observers independent distances): requires mark-recapture (MR) model , start , perpendicular distance included covariate.","code":"# Fit trial configuration with full independence model fi.mr.dist <- ddf(method='trial.fi', mrmodel=~glm(link='logit',formula=~distance), data=detections, meta.data=list(width=4))"},{"path":"/articles/mrds-golftees.html","id":"examining-mrds-output","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses > Estimation of p(0): distance only","what":"Examining mrds output","title":"Double platform analysis","text":"fitted model, can create tables summarizing detection data. commands , tables created using det.tables function saved detection.tables. information detection summary tables can plotted, , interest space, one (six possible plots) shown (Figure 1). Figure 1: Detection distances observer 1 plot numbers : Histograms distances detections either, , observers. shaded regions show number observer 1. Histograms distances detections either, , observers. shaded regions show number observer 2. Histograms distances duplicates (detected observers). Histogram distances detections either, , observers. shown trial configuration. Histograms distances observer 2. shaded regions indicate number duplicates - example, shaded region number clusters distance bin detected Observer 1 given also detected Observer 2 (“|” symbol plot legend means “given ”). Histograms distances observer 1. shaded regions indicate number duplicates plot 5. shown trial configuration. Note independent observer configuration chosen, plots available. summary detection function model available using summary function. Q-Q plot interpretation Q-Q plot conventional, single platform analysis (Figure 2). Figure 2: Fitted detection function full independence, trial mode. Abbreviated \\(\\chi^2\\) goodness--fit assessment shows \\(\\chi^2\\) contribution distance sampling model 11.5 \\(\\chi^2\\) contribution mark-recapture model 3.4. combination elements produces total \\(\\chi^2\\) 14.9 17 degrees freedom, resulting \\(p\\)-value 0.604 (two) detection functions can plotted (Figure 3). Figure 3: Observer 1 detection function (left) conditional detection probabilty plot (right). plot labelled “Observer=1 detections” shows histogram Observer 1 detections estimated Observer 1 detection function overlaid adjusted p(0). dots show estimated detection probability Observer 1 detections. “Conditional detection probability” shows proportion Obs 2’s detections detected Obs 1 (also see detection tables). fitted line estimated detection probability function Obs 1 (given detection Obs 2) - MR model. Dots estimated detection probabilities Obs 1 detection. evidence unmodelled heterogeneity fitted line left-hand plot declines slowly histogram distance increases.","code":"# Create a set of tables summarizing the double observer data detection.tables <- det.tables(fi.mr.dist) # Print these detection tables print(detection.tables) ## ## Observer 1 detections ## Detected ## Missed Detected ## [0,0.4] 1 25 ## (0.4,0.8] 2 16 ## (0.8,1.2] 2 16 ## (1.2,1.6] 6 22 ## (1.6,2] 5 9 ## (2,2.4] 2 10 ## (2.4,2.8] 6 12 ## (2.8,3.2] 6 9 ## (3.2,3.6] 2 3 ## (3.6,4] 6 2 ## ## Observer 2 detections ## Detected ## Missed Detected ## [0,0.4] 4 22 ## (0.4,0.8] 1 17 ## (0.8,1.2] 0 18 ## (1.2,1.6] 2 26 ## (1.6,2] 1 13 ## (2,2.4] 2 10 ## (2.4,2.8] 3 15 ## (2.8,3.2] 4 11 ## (3.2,3.6] 2 3 ## (3.6,4] 1 7 ## ## Duplicate detections ## ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] (2.8,3.2] ## 21 15 16 20 8 8 9 5 ## (3.2,3.6] (3.6,4] ## 1 1 ## ## Observer 1 detections of those seen by Observer 2 ## Missed Detected Prop. detected ## [0,0.4] 1 21 0.9545455 ## (0.4,0.8] 2 15 0.8823529 ## (0.8,1.2] 2 16 0.8888889 ## (1.2,1.6] 6 20 0.7692308 ## (1.6,2] 5 8 0.6153846 ## (2,2.4] 2 8 0.8000000 ## (2.4,2.8] 6 9 0.6000000 ## (2.8,3.2] 6 5 0.4545455 ## (3.2,3.6] 2 1 0.3333333 ## (3.6,4] 6 1 0.1428571 # Plot detection information, change number to see other plots plot(detection.tables, which=1) # Produce a summary of the fitted detection function object summary(fi.mr.dist) ## ## Summary for trial.fi object ## Number of observations : 162 ## Number seen by primary : 124 ## Number seen by secondary (trials) : 142 ## Number seen by both (detected trials): 104 ## AIC : 452.8094 ## ## ## Conditional detection function parameters: ## estimate se ## (Intercept) 2.900233 0.4876238 ## distance -1.058677 0.2235722 ## ## Estimate SE CV ## Average p 0.6423252 0.04069410 0.06335435 ## Average primary p(0) 0.9478579 0.06109656 0.06445750 ## N in covered region 193.0486185 15.84826582 0.08209469 # Produce goodness of fit statistics and a qq plot gof.result <- ddf.gof(fi.mr.dist, main=\"Full independence, trial configuration\\ngoodness of fit Golf tee data\") # Extract chi-square statistics for reporting chi.distance <- gof.result$chisquare$chi1$chisq chi.markrecap <- gof.result$chisquare$chi2$chisq chi.total <- gof.result$chisquare$pooled.chi par(mfrow=c(1,2)) # Plot detection functions plot(fi.mr.dist) par(mfrow=c(1,1))"},{"path":"/articles/mrds-golftees.html","id":"estimating-abundance","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses > Estimation of p(0): distance only","what":"Estimating abundance","title":"Double platform analysis","text":"Abundance estimated using dht function. function, need supply information transects survey regions. Table 1: Survey summary statistics golftees Table 1: Abundance estimates golftee population two strata estimated abundance 593 (recall true abundance 760) estimate negatively biased. 95% confidence interval include true value.","code":"# Calculate density estimates using the dht function tee.abund <- dht(model=fi.mr.dist, region.table=region, sample.table=samples, obs.table=obs) # Print out results in a nice format knitr::kable(tee.abund$individuals$summary, digits=2, caption=\"Survey summary statistics for golftees\") knitr::kable(tee.abund$individuals$N, digits=2, caption=\"Abundance estimates for golftee population with two strata\")"},{"path":"/articles/mrds-golftees.html","id":"estimation-of-p0-distance-and-other-explanatory-variables","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses","what":"Estimation of p(0): distance and other explanatory variables","title":"Double platform analysis","text":"including covariates, size, sex exposure, MR model? MR model use? command , distance sex included detection function - remember sex defined factor earlier . code , possible models (excluding interaction terms) fitted. see preferred model contains distance + sex + exposure check goodness--fit statistics (Figure 4) detection function plots (Figure 5). Figure 4: Preferred model goodness fit. Figure 5: Detection functions full independence model distance, sex exposure MR component. produce abundance estimates. model incorporates effect variables causing heterogeneity. estimated abundance 651 less biased previous estimate 95% confidence interval (494, 858) contains true value. model reasonable fit data (.e. non-significant \\(\\chi^2\\) Cramer von Mises tests). model lower AIC (405.7) model distance (452.81) preferred.","code":"# Full independence model # Set up list with possible models mr.formula <- c(\"~distance\",\"~distance+size\",\"~distance+sex\",\"~distance+exposure\", \"~distance+size+sex\",\"~distance+size+exposure\",\"~distance+sex+exposure\", \"~distance+size+sex+exposure\") num.mr.models <- length(mr.formula) # Create dataframe to store results fi.results <- data.frame(MRmodel=mr.formula, AIC=rep(NA,num.mr.models)) # Loop through all MR models for (i in 1:num.mr.models) { fi.model <- ddf(method='trial.fi', mrmodel=~glm(link='logit',formula=as.formula(mr.formula[i])), data=detections, meta.data=list(width=4)) fi.results$AIC[i] <- summary(fi.model)$aic } # Calculate delta AIC fi.results$deltaAIC <- fi.results$AIC - min(fi.results$AIC) # Order by delta AIC fi.results <- fi.results[order(fi.results$deltaAIC), ] # Print results in pretty way knitr::kable(fi.results, digits=2) # Fit chosen model fi.mr.dist.sex.exp <- ddf(method='trial.fi', mrmodel=~glm(link='logit',formula=~distance+sex+exposure), data=detections, meta.data=list(width=4)) # Check goodness-of-fit ddf.gof(fi.mr.dist.sex.exp, main=\"FI trial mode\\nMR=dist+sex+exp\") ## ## Goodness of fit results for ddf object ## ## Chi-square tests ## ## Distance sampling component: ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 25.000 16.000 16.000 22.000 9.000 10.000 12.000 ## Expected 20.276 19.341 18.074 16.345 14.083 11.511 9.046 ## Chisquare 1.101 0.577 0.238 1.957 1.834 0.198 0.964 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 9.000 3.000 2.000 124.000 ## Expected 6.915 5.044 3.366 124.000 ## Chisquare 0.629 0.828 0.554 8.881 ## ## No degrees of freedom for test ## ## Mark-recapture component: ## Capture History 01 ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 1 2 2 6 5 2 6 ## Expected 1 2 2 6 4 4 6 ## Chisquare 0 0 0 0 0 1 0 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 6 2 6 38 ## Expected 7 2 5 38 ## Chisquare 0 0 0 2 ## Capture History 11 ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 21 15 16 20 8 8 9 ## Expected 21 15 16 20 9 6 9 ## Chisquare 0 0 0 0 0 1 0 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 5 1 1 104 ## Expected 4 1 2 104 ## Chisquare 0 0 1 2 ## ## ## Total chi-square = 12.205 P = 0.66344 with 15 degrees of freedom ## ## Distance sampling Cramer-von Mises test (unweighted) ## Test statistic = 0.0976947 p-value = 0.596294 par(mfrow=c(1,2)) plot(fi.mr.dist.sex.exp) # Get abundance estimates tee.abund.fi <- dht(model=fi.mr.dist.sex.exp, region.table=region, sample.table=samples, obs.table=obs) # Print results print(tee.abund.fi) ## Abundance and density estimates from distance sampling ## Variance : R2, N/L ## ## Summary statistics ## ## Region Area CoveredArea Effort n k ER se.ER cv.ER ## 1 1 1040 1040 130 72 6 0.5538462 0.02926903 0.05284685 ## 2 2 640 640 80 52 5 0.6500000 0.08292740 0.12758061 ## 3 Total 1680 1680 210 124 11 0.5904762 0.03641856 0.06167659 ## ## Summary for clusters ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 119.28976 14.18666 0.1189260 91.64685 155.2704 10.12494 ## 2 2 98.17731 18.59356 0.1893876 63.58200 151.5961 7.83844 ## 3 Total 217.46707 26.05226 0.1197987 169.90391 278.3451 23.21368 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.1147017 0.01364102 0.1189260 0.08812198 0.1492985 10.12494 ## 2 2 0.1534020 0.02905244 0.1893876 0.09934687 0.2368689 7.83844 ## 3 Total 0.1294447 0.01550730 0.1197987 0.10113328 0.1656816 23.21368 ## ## Summary for individuals ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 371.0397 37.86856 0.1020607 297.1733 463.2666 11.904084 ## 2 2 279.7141 67.25221 0.2404320 154.4960 506.4208 5.482654 ## 3 Total 650.7538 82.72649 0.1271241 493.7469 857.6875 11.907393 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.3567690 0.03641208 0.1020607 0.2857436 0.4454487 11.904084 ## 2 2 0.4370533 0.10508158 0.2404320 0.2414000 0.7912825 5.482654 ## 3 Total 0.3873535 0.04924196 0.1271241 0.2938970 0.5105283 11.907393 ## ## Expected cluster size ## Region Expected.S se.Expected.S cv.Expected.S ## 1 1 3.110407 0.2740170 0.08809682 ## 2 2 2.849071 0.2211204 0.07761141 ## 3 Total 2.992425 0.1758058 0.05875027"},{"path":"/articles/mrds-golftees.html","id":"point-independence","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses","what":"Point independence","title":"Double platform analysis","text":"less restrictive assumption full independence point independence, assumes detections independent transect centre line .e. perpendicular distance zero (Buckland, Laake, & Borchers, 2010). Determine simple point independence model better simple full independence one. requires distance sampling (DS) model specified well MR model. try half-normal key function DS model (Figure 6). Figure 6: Point independence model trial configuration goodness fit. AIC point independence model 452.03 marginally smaller first full independence model fitted hence preferred. results estimated abundance 688. Can better covariates included DS model?","code":"# Fit trial configuration with point independence model pi.mr.dist <- ddf(method='trial', mrmodel=~glm(link='logit', formula=~distance), dsmodel=~cds(key='hn'), data=detections, meta.data=list(width=4)) # Summary pf the model summary(pi.mr.dist) ## ## Summary for trial.fi object ## Number of observations : 162 ## Number seen by primary : 124 ## Number seen by secondary (trials) : 142 ## Number seen by both (detected trials): 104 ## AIC : 140.8887 ## ## ## Conditional detection function parameters: ## estimate se ## (Intercept) 2.900233 0.4876238 ## distance -1.058677 0.2235722 ## ## Estimate SE CV ## Average primary p(0) 0.9478579 0.02409996 0.02542571 ## ## ## ## Summary for ds object ## Number of observations : 124 ## Distance range : 0 - 4 ## AIC : 311.1385 ## Optimisation : mrds (nlminb) ## ## Detection function: ## Half-normal key function ## ## Detection function parameters ## Scale coefficient(s): ## estimate se ## (Intercept) 0.6632435 0.09981249 ## ## Estimate SE CV ## Average p 0.5842744 0.04637627 0.07937412 ## ## ## Summary for trial object ## ## Total AIC value = 452.0272 ## Estimate SE CV ## Average p 0.5538091 0.04615832 0.08334697 ## N in covered region 223.9038534 22.99246338 0.10268900 # Produce goodness of fit statistics and a qq plot gof.results <- ddf.gof(pi.mr.dist, main=\"Point independence, trial configuration\\n goodness of fit Golftee data\") # Get abundance estimates tee.abund.pi <- dht(model=pi.mr.dist, region.table=region, sample.table=samples, obs.table=obs) # Print results print(tee.abund.pi) ## Abundance and density estimates from distance sampling ## Variance : R2, N/L ## ## Summary statistics ## ## Region Area CoveredArea Effort n k ER se.ER cv.ER ## 1 1 1040 1040 130 72 6 0.5538462 0.02926903 0.05284685 ## 2 2 640 640 80 52 5 0.6500000 0.08292740 0.12758061 ## 3 Total 1680 1680 210 124 11 0.5904762 0.03641856 0.06167659 ## ## Summary for clusters ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 130.00869 12.83042 0.09868894 106.66570 158.4601 48.427773 ## 2 2 93.89516 14.30894 0.15239268 66.25307 133.0701 8.094137 ## 3 Total 223.90385 23.21562 0.10368567 181.78333 275.7840 44.038262 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.1250084 0.01233694 0.09868894 0.1025632 0.1523655 48.427773 ## 2 2 0.1467112 0.02235771 0.15239268 0.1035204 0.2079220 8.094137 ## 3 Total 0.1332761 0.01381882 0.10368567 0.1082044 0.1641571 44.038262 ## ## Summary for individuals ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 413.4999 44.00744 0.1064267 332.9536 513.5313 30.289360 ## 2 2 274.4628 53.42626 0.1946576 171.1754 440.0740 5.987499 ## 3 Total 687.9626 79.79844 0.1159924 542.4532 872.5040 25.993175 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.3975960 0.04231485 0.1064267 0.3201477 0.4937801 30.289360 ## 2 2 0.4288481 0.08347854 0.1946576 0.2674615 0.6876156 5.987499 ## 3 Total 0.4095016 0.04749907 0.1159924 0.3228888 0.5193476 25.993175 ## ## Expected cluster size ## Region Expected.S se.Expected.S cv.Expected.S ## 1 1 3.180556 0.2114629 0.06648615 ## 2 2 2.923077 0.1750319 0.05987935 ## 3 Total 3.072581 0.1391365 0.04528327"},{"path":"/articles/mrds-golftees.html","id":"covariates-in-the-ds-model","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses > Point independence","what":"Covariates in the DS model","title":"Double platform analysis","text":"include covariates DS detection function, need specify MCDS model follows: Use summary function check AIC decide going include additional covariates detection function. Now try point independence model preferred MR model full independence analyses. indicates sex included DS model. check goodness fit obtain abundance (Figure 7). Figure 7: Goodness fit point independence model sex covariate distance sampling component distance, sex exposure mr component. model estimated abundance 695, closest true value models - still less true value indicating, perhaps, unmodelled heterogeneity trackline (perhaps just bad luck - remember one survey). complex modelling worthwhile? case, estimated \\(p(0)\\) best model 0.97 (close 1). ran conventional distance sampling analysis, pooling data two observers, get robust estimate true abundance.","code":"# Fit the PI-trial model - DS sex and MR distance pi.mr.dist.ds.sex <- ddf(method='trial', mrmodel=~glm(link='logit',formula=~distance), dsmodel=~mcds(key='hn',formula=~sex), data=detections, meta.data=list(width=4)) # Point independence model, Include covariates in DS model # Use selected MR model, iterate across DS models ds.formula <- c(\"~size\",\"~sex\",\"~exposure\",\"~size+sex\",\"~size+exposure\",\"~sex+exposure\", \"~size+sex+exposure\") num.ds.models <- length(ds.formula) # Create dataframe to store results pi.results <- data.frame(DSmodel=ds.formula, AIC=rep(NA,num.ds.models)) # Loop through ds models - use selected MR model from earlier for (i in 1:num.ds.models) { pi.model <- ddf(method='trial', mrmodel=~glm(link='logit',formula=~distance+sex+exposure), dsmodel=~mcds(key='hn',formula=as.formula(ds.formula[i])), data=detections, meta.data=list(width=4)) pi.results$AIC[i] <- summary(pi.model)$AIC } # Calculate delta AIC pi.results$deltaAIC <- pi.results$AIC - min(pi.results$AIC) # Order by delta AIC pi.results <- pi.results[order(pi.results$deltaAIC), ] knitr::kable(pi.results, digits = 2) # Fit chosen model pi.ds.sex <- ddf(method='trial', mrmodel=~glm(link='logit',formula=~distance+sex+exposure), dsmodel=~mcds(key='hn',formula=~sex), data=detections, meta.data=list(width=4)) summary(pi.ds.sex) ## ## Summary for trial.fi object ## Number of observations : 162 ## Number seen by primary : 124 ## Number seen by secondary (trials) : 142 ## Number seen by both (detected trials): 104 ## AIC : 94.89911 ## ## ## Conditional detection function parameters: ## estimate se ## (Intercept) 0.7870962 0.6774633 ## distance -1.9435496 0.3706866 ## sex1 2.8059863 0.6828331 ## exposure1 3.6094527 0.7332797 ## ## Estimate SE CV ## Average primary p(0) 0.9697357 0.02018875 0.02081882 ## ## ## ## Summary for ds object ## Number of observations : 124 ## Distance range : 0 - 4 ## AIC : 304.3594 ## Optimisation : mrds (nlminb) ## ## Detection function: ## Half-normal key function ## ## Detection function parameters ## Scale coefficient(s): ## estimate se ## (Intercept) 0.2525377 0.1327279 ## sex1 0.5832341 0.2041094 ## ## Estimate SE CV ## Average p 0.5605421 0.04616356 0.0823552 ## ## ## Summary for trial object ## ## Total AIC value = 399.2585 ## Estimate SE CV ## Average p 0.5435777 0.04643912 0.08543235 ## N in covered region 228.1182656 24.21303261 0.10614245 # Check goodness-of-fit ddf.gof(pi.ds.sex, main=\"PI trial configutation\\nGolfTee DS model sex\") ## ## Goodness of fit results for ddf object ## ## Chi-square tests ## ## Distance sampling component: ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 25.000 16.000 16.000 22.000 9.000 10.000 12.000 ## Expected 21.917 20.740 18.630 15.976 13.181 10.553 8.261 ## Chisquare 0.434 1.083 0.371 2.272 1.326 0.029 1.692 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 9.000 3.000 2.000 124.000 ## Expected 6.354 4.810 3.579 124.000 ## Chisquare 1.102 0.681 0.697 9.687 ## ## P = 0.20699 with 7 degrees of freedom ## ## Mark-recapture component: ## Capture History 01 ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 1 2 2 6 5 2 6 ## Expected 1 2 2 6 4 4 6 ## Chisquare 0 0 0 0 0 1 0 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 6 2 6 38 ## Expected 7 2 5 38 ## Chisquare 0 0 0 2 ## Capture History 11 ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 21 15 16 20 8 8 9 ## Expected 21 15 16 20 9 6 9 ## Chisquare 0 0 0 0 0 1 0 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 5 1 1 104 ## Expected 4 1 2 104 ## Chisquare 0 0 1 2 ## ## MR total chi-square = 3.3242 P = 0.76719 with 6 degrees of freedom ## ## ## Total chi-square = 13.012 P = 0.44692 with 13 degrees of freedom ## ## Distance sampling Cramer-von Mises test (unweighted) ## Test statistic = 0.081285 p-value = 0.684457 # Get abundance estimates tee.abund.pi.ds.sex <- dht(model=pi.ds.sex, region.table=region, sample.table=samples, obs.table=obs) print(tee.abund.pi.ds.sex) ## Abundance and density estimates from distance sampling ## Variance : R2, N/L ## ## Summary statistics ## ## Region Area CoveredArea Effort n k ER se.ER cv.ER ## 1 1 1040 1040 130 72 6 0.5538462 0.02926903 0.05284685 ## 2 2 640 640 80 52 5 0.6500000 0.08292740 0.12758061 ## 3 Total 1680 1680 210 124 11 0.5904762 0.03641856 0.06167659 ## ## Summary for clusters ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 125.7678 12.50301 0.0994134 102.97968 153.5987 43.661605 ## 2 2 102.3504 17.53164 0.1712904 68.75816 152.3544 7.394232 ## 3 Total 228.1183 25.15313 0.1102635 182.12587 285.7252 28.045408 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.1209306 0.01202212 0.0994134 0.09901892 0.1476911 43.661605 ## 2 2 0.1599226 0.02739319 0.1712904 0.10743463 0.2380538 7.394232 ## 3 Total 0.1357847 0.01497210 0.1102635 0.10840826 0.1700745 28.045408 ## ## Summary for individuals ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 395.0545 36.33887 0.09198445 329.0893 474.2422 79.293122 ## 2 2 299.7763 65.43246 0.21827099 175.5600 511.8809 5.685162 ## 3 Total 694.8307 84.25522 0.12126006 537.2149 898.6902 15.167148 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.3798601 0.03494122 0.09198445 0.3164320 0.4560021 79.293122 ## 2 2 0.4684004 0.10223822 0.21827099 0.2743125 0.7998140 5.685162 ## 3 Total 0.4135897 0.05015192 0.12126006 0.3197708 0.5349347 15.167148 ## ## Expected cluster size ## Region Expected.S se.Expected.S cv.Expected.S ## 1 1 3.141141 0.2081675 0.06627129 ## 2 2 2.928920 0.1866200 0.06371632 ## 3 Total 3.045923 0.1371508 0.04502767"},{"path":[]},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Laura Marshall. Maintainer. Jeff Laake. Author. David Miller. Author. Felix Petersma. Author. Len Thomas. Contributor. David Borchers. Contributor. Jon Bishop. Contributor. Jonah McArthur. Contributor. Eric Rexstad. Reviewer.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Laake J, Miller D, Petersma F (2024). mrds: Mark-Recapture Distance Sampling. R package version 3.0.0, https://github.com/DistanceDevelopment/mrds/.","code":"@Manual{, title = {mrds: Mark-Recapture Distance Sampling}, author = {Jeff Laake and David Miller and Felix Petersma}, year = {2024}, note = {R package version 3.0.0}, url = {https://github.com/DistanceDevelopment/mrds/}, }"},{"path":[]},{"path":"/index.html","id":"what-is-mrds","dir":"","previous_headings":"","what":"What is mrds?","title":"Mark-Recapture Distance Sampling","text":"package R analyzes single double observer distance sampling data line point sampling. used program DISTANCE one analysis engines. Supported double observer configurations include independent, trial removal. options mrds fully supported via DISTANCE. wish perform conventional multiple covariate distance sampling analysis (CDS/MCDS) (opposed double observer analysis), may want try Distance R package, simplified interface available https://github.com/DistanceDevelopment/Distance.","code":""},{"path":"/index.html","id":"getting-mrds","dir":"","previous_headings":"","what":"Getting mrds","title":"Mark-Recapture Distance Sampling","text":"easiest way ensure latest version mrds, install using remotes package: install mrds github: Otherwise: One can download Windows package binary using “Releases” tab github. install R, R menu, use “Packagesfrom Local Zip file” browse location downloaded zip. , download package source files. Finally current stable version mrds available CRAN, though may month date due CRAN policy.","code":"install.packages(\"remotes\") library(remotes) install_github(\"DistanceDevelopment/mrds\")"},{"path":"/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling","text":"following references methods used package. Burt, M. L., D. L. Borchers, K. J. Jenkins T. . Marques. (2014). “Using mark-recapture distance sampling methods line transect surveys.” Methods Ecology Evolution 5: 1180-1191. Buckland, S. T., J. Laake, et al. (2010). “Double observer line transect methods: levels independence.” Biometrics 66: 169-177. Borchers, D. L., J. L. Laake, et al. (2006). “Accommodating unmodeled heterogeneity double-observer distance sampling surveys.” Biometrics 62(2): 372-378. Buckland, S. T., D. R. Anderson, et al., Eds. (2004). Advanced distance sampling: estimating abundance biological populations. Oxford, UK; New York, Oxford University Press. (see chapter 6).","code":""},{"path":"/reference/add.df.covar.line.html","id":null,"dir":"Reference","previous_headings":"","what":"Add covariate levels detection function plots — add.df.covar.line","title":"Add covariate levels detection function plots — add.df.covar.line","text":"Add line lines plot detection function correspond given covariate combination. can particularly useful small number factor levels quantiles continuous covariate specified.","code":""},{"path":"/reference/add.df.covar.line.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add covariate levels detection function plots — add.df.covar.line","text":"","code":"add.df.covar.line(ddf, data, ndist = 250, pdf = FALSE, breaks = \"Sturges\", ...) add_df_covar_line(ddf, data, ndist = 250, pdf = FALSE, breaks = \"Sturges\", ...)"},{"path":"/reference/add.df.covar.line.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add covariate levels detection function plots — add.df.covar.line","text":"ddf fitted detection function object. data data.frame covariate combination want plot. ndist number distances evaluate detection function. pdf line drawn probability density scale; ignored line transects. breaks required ensure PDF lines right size, match supplied original plot command. Defaults \"Sturges\" breaks, hist. used pdf=TRUE. ... extra arguments give line (lty, lwd, col).","code":""},{"path":"/reference/add.df.covar.line.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add covariate levels detection function plots — add.df.covar.line","text":"invisibly, values detectability truncation range.","code":""},{"path":"/reference/add.df.covar.line.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add covariate levels detection function plots — add.df.covar.line","text":"covariates must specified data. Plots can become quite busy approach used. may useful fix covariates median level plot set values covariate interest. example setting weather (e.g., Beaufort) median plotting levels observer, creating second plot fixed observer levels weather. Arguments lines supplied ... aesthetics like line type (lty), line width (lwd) colour (col) recycled. default lty used distinguish lines. may useful add legend plot (lines plotted order data).","code":""},{"path":"/reference/add.df.covar.line.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add covariate levels detection function plots — add.df.covar.line","text":"David L Miller","code":""},{"path":"/reference/add.df.covar.line.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add covariate levels detection function plots — add.df.covar.line","text":"","code":"if (FALSE) { # \\dontrun{ # fit an example model data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe result <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~sex), data = egdata[egdata$observer==1, ], method = \"ds\", meta.data = list(width = 4)) # make a base plot, showpoints=FALSE makes the plot less busy plot(result, showpoints=FALSE) # add lines for sex one at a time add.df.covar.line(result, data.frame(sex=0), lty=2) add.df.covar.line(result, data.frame(sex=1), lty=3) # add a legend legend(3, 1, c(\"Average\", \"sex==0\", \"sex==1\"), lty=1:3) # alternatively we can add both at once # fixing line type and varying colour plot(result, showpoints=FALSE) add.df.covar.line(result, data.frame(sex=c(0,1)), lty=1, col=c(\"red\", \"green\")) # add a legend legend(3, 1, c(\"Average\", \"sex==0\", \"sex==1\"), lty=1, col=c(\"black\", \"red\", \"green\")) } # }"},{"path":"/reference/adj.check.order.html","id":null,"dir":"Reference","previous_headings":"","what":"Check order of adjustment terms — adj.check.order","title":"Check order of adjustment terms — adj.check.order","text":"'adj.check.order' checks Cosine, Hermite simple polynomials correct order.","code":""},{"path":"/reference/adj.check.order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check order of adjustment terms — adj.check.order","text":"","code":"adj.check.order(adj.series, adj.order, key)"},{"path":"/reference/adj.check.order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check order of adjustment terms — adj.check.order","text":"adj.series Adjustment series used ('cos','herm','poly') adj.order Integer check key key function used adjustment series","code":""},{"path":"/reference/adj.check.order.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check order of adjustment terms — adj.check.order","text":"Nothing! Just calls stop something goes wrong.","code":""},{"path":"/reference/adj.check.order.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check order of adjustment terms — adj.check.order","text":"even functions allowed adjustment terms, per p.47 Buckland et al (2001). incorrect terms supplied error throw via stop.","code":""},{"path":"/reference/adj.check.order.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Check order of adjustment terms — adj.check.order","text":"S.T.Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake. 1993. Robust Models. : Distance Sampling, eds. S.T.Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake. Chapman & Hall.","code":""},{"path":[]},{"path":"/reference/adj.check.order.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check order of adjustment terms — adj.check.order","text":"David Miller","code":""},{"path":"/reference/adj.cos.html","id":null,"dir":"Reference","previous_headings":"","what":"Cosine adjustment term, not the series. — adj.cos","title":"Cosine adjustment term, not the series. — adj.cos","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.cos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cosine adjustment term, not the series. — adj.cos","text":"","code":"adj.cos(distance, scaling, adj.order)"},{"path":"/reference/adj.cos.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cosine adjustment term, not the series. — adj.cos","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order","code":""},{"path":"/reference/adj.cos.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cosine adjustment term, not the series. — adj.cos","text":"scalar vector containing cosine adjustment term every value distance argument","code":""},{"path":"/reference/adj.cos.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cosine adjustment term, not the series. — adj.cos","text":"Felix Petersma","code":""},{"path":"/reference/adj.herm.html","id":null,"dir":"Reference","previous_headings":"","what":"Hermite polynomial adjustment term, not the series. — adj.herm","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.herm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"","code":"adj.herm(distance, scaling, adj.order)"},{"path":"/reference/adj.herm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order","code":""},{"path":"/reference/adj.herm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"scalar vector containing Hermite adjustment term every value distance argument","code":""},{"path":"/reference/adj.herm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"Felix Petersma","code":""},{"path":"/reference/adj.poly.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple polynomial adjustment term, not the series. — adj.poly","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.poly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"","code":"adj.poly(distance, scaling, adj.order)"},{"path":"/reference/adj.poly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order","code":""},{"path":"/reference/adj.poly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"scalar vector containing polynomial adjustment term every value distance argument","code":""},{"path":"/reference/adj.poly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"Felix Petersma","code":""},{"path":"/reference/adj.series.grad.cos.html","id":null,"dir":"Reference","previous_headings":"","what":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.series.grad.cos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"","code":"adj.series.grad.cos( distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp = FALSE )"},{"path":"/reference/adj.series.grad.cos.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order adj.parm vector parameters (a_j) adj.exp boolean, defaults FALSE","code":""},{"path":"/reference/adj.series.grad.cos.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"scalar vector containing gradient cosine adjustment series every value distance argument","code":""},{"path":"/reference/adj.series.grad.cos.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"Felix Petersma","code":""},{"path":"/reference/adj.series.grad.herm.html","id":null,"dir":"Reference","previous_headings":"","what":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.series.grad.herm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"","code":"adj.series.grad.herm( distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp = FALSE )"},{"path":"/reference/adj.series.grad.herm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order adj.parm vector parameters (a_j) adj.exp boolean, defaults FALSE","code":""},{"path":"/reference/adj.series.grad.herm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"scalar vector containing gradient Hermite adjustment series every value distance argument","code":""},{"path":"/reference/adj.series.grad.herm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"Felix Petersma","code":""},{"path":"/reference/adj.series.grad.poly.html","id":null,"dir":"Reference","previous_headings":"","what":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.series.grad.poly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"","code":"adj.series.grad.poly( distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp = FALSE )"},{"path":"/reference/adj.series.grad.poly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order adj.parm vector parameters (a_j) adj.exp boolean, defaults FALSE","code":""},{"path":"/reference/adj.series.grad.poly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"scalar vector containing gradient polynomial adjustment series every value distance argument","code":""},{"path":"/reference/adj.series.grad.poly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"Felix Petersma","code":""},{"path":"/reference/AIC.ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Akaike's An Information Criterion for detection functions — AIC.ddf","title":"Akaike's An Information Criterion for detection functions — AIC.ddf","text":"Extract AIC fitted detection function.","code":""},{"path":"/reference/AIC.ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Akaike's An Information Criterion for detection functions — AIC.ddf","text":"","code":"# S3 method for class 'ddf' AIC(object, ..., k = 2)"},{"path":"/reference/AIC.ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Akaike's An Information Criterion for detection functions — AIC.ddf","text":"object fitted detection function object ... optionally fitted model objects. k penalty per parameter used; default k = 2 \"classical\" AIC","code":""},{"path":"/reference/AIC.ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Akaike's An Information Criterion for detection functions — AIC.ddf","text":"David L Miller","code":""},{"path":"/reference/apex.gamma.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the apex for a gamma detection function — apex.gamma","title":"Get the apex for a gamma detection function — apex.gamma","text":"Get apex gamma detection function","code":""},{"path":"/reference/apex.gamma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the apex for a gamma detection function — apex.gamma","text":"","code":"apex.gamma(ddfobj)"},{"path":"/reference/apex.gamma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the apex for a gamma detection function — apex.gamma","text":"ddfobj ddf object","code":""},{"path":"/reference/apex.gamma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the apex for a gamma detection function — apex.gamma","text":"distance gamma peaks","code":""},{"path":"/reference/apex.gamma.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get the apex for a gamma detection function — apex.gamma","text":"Jeff Laake","code":""},{"path":"/reference/assign.default.values.html","id":null,"dir":"Reference","previous_headings":"","what":"Assign default values to list elements that have not been already assigned — assign.default.values","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"Assigns default values argument list x argument=value pairs ... x$argument already exist","code":""},{"path":"/reference/assign.default.values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"","code":"assign.default.values(x, ...)"},{"path":"/reference/assign.default.values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"x generic list ... unspecified list argument=value pairs used assign values","code":""},{"path":"/reference/assign.default.values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"x - list filled values","code":""},{"path":"/reference/assign.default.values.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"Jeff Laake","code":""},{"path":"/reference/assign.par.html","id":null,"dir":"Reference","previous_headings":"","what":"Extraction and assignment of parameters to vector — assign.par","title":"Extraction and assignment of parameters to vector — assign.par","text":"Assigns parameters particular type (scale, shape, adjustments g0 (p(0))) vector parameters ddfobj. parameters kept single vector optimization even though different uses. assign.par parses vector based known structure assigns ddfobj.","code":""},{"path":"/reference/assign.par.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extraction and assignment of parameters to vector — assign.par","text":"","code":"assign.par(ddfobj, fpar)"},{"path":"/reference/assign.par.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extraction and assignment of parameters to vector — assign.par","text":"ddfobj distance sampling object (see create.ddfobj) fpar parameter vector","code":""},{"path":"/reference/assign.par.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extraction and assignment of parameters to vector — assign.par","text":"index==FALSE, vector parameters requested index==TRUE, vector 3 indices scale, shape, adjustment","code":""},{"path":"/reference/assign.par.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extraction and assignment of parameters to vector — assign.par","text":"getpar extracts requested types ddfobj.","code":""},{"path":"/reference/assign.par.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extraction and assignment of parameters to vector — assign.par","text":"Internal functions intended called user.","code":""},{"path":[]},{"path":"/reference/assign.par.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extraction and assignment of parameters to vector — assign.par","text":"Jeff Laake","code":""},{"path":"/reference/average.line.cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Average conditional detection function line for plotting — average.line.cond","title":"Average conditional detection function line for plotting — average.line.cond","text":"models covariates detection probability observation can vary. function computes average value set distances plot average line graphically represent fitted model plots compare histograms scatter individual estimated detection probabilities.","code":""},{"path":"/reference/average.line.cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average conditional detection function line for plotting — average.line.cond","text":"","code":"average.line.cond(finebr, obs, model)"},{"path":"/reference/average.line.cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average conditional detection function line for plotting — average.line.cond","text":"finebr set fine breaks distance detection function values averaged plotted obs value observer averaging (1-2 individual observers) model ddf model object","code":""},{"path":"/reference/average.line.cond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average conditional detection function line for plotting — average.line.cond","text":"list 2 elements:","code":""},{"path":"/reference/average.line.cond.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Average conditional detection function line for plotting — average.line.cond","text":"Internal function called plot functions ddf objects","code":""},{"path":"/reference/average.line.cond.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Average conditional detection function line for plotting — average.line.cond","text":"Jeff Laake","code":""},{"path":"/reference/average.line.html","id":null,"dir":"Reference","previous_headings":"","what":"Average detection function line for plotting — average.line","title":"Average detection function line for plotting — average.line","text":"models covariates detection probability observation can vary. function computes average value set distances plot average line graphically represent fitted model plots compare histograms scatter individual estimated detection probabilities. Averages calculated observed covariate combinations.","code":""},{"path":"/reference/average.line.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average detection function line for plotting — average.line","text":"","code":"average.line(finebr, obs, model)"},{"path":"/reference/average.line.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average detection function line for plotting — average.line","text":"finebr set fine breaks distance detection function values averaged plotted obs value observer averaging (1-2 individual observers; 3 duplicates; 4 pooled observation team) model ddf model object","code":""},{"path":"/reference/average.line.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average detection function line for plotting — average.line","text":"list 2 elements","code":""},{"path":"/reference/average.line.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Average detection function line for plotting — average.line","text":"Internal function called plot functions ddf objects","code":""},{"path":"/reference/average.line.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Average detection function line for plotting — average.line","text":"Jeff Laake","code":""},{"path":"/reference/book.tee.data.html","id":null,"dir":"Reference","previous_headings":"","what":"Golf tee data used in chapter 6 of Advanced Distance Sampling examples — book.tee.data","title":"Golf tee data used in chapter 6 of Advanced Distance Sampling examples — book.tee.data","text":"Double platform data collected line transect survey golf tees 2 observers St. Andrews. Field sex actually colour golf tee: 0 - green; 1 - yellow. Exposure either low (0) high(1) depending height tee ground. size number tees observed cluster.","code":""},{"path":"/reference/book.tee.data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Golf tee data used in chapter 6 of Advanced Distance Sampling examples — book.tee.data","text":"list 4 dataframes, list elements named: book.tee.dataframe, book.tee.region, book.tee.samples book.tee.obs. book.tee.dataframe distance sampling data dataframe. Used call fit detection function ddf. Contains following columns: object numeric object id observer factor representing observer 1 2 detected numeric 1 animal detected 0 otherwise distance numeric value distance animal detected size numeric value group size sex numeric value sex animal exposure numeric value exposure level 0 1 book.tee.region: region table dataframe. Used supply strata areas dht function. Contains following columns: Region.Label factor giving strata labels Area numeric value giving strata areas book.tee.samples samples table dataframe match transect ids region ids supply effort. Used dht function. Contains following columns: Sample.Label numeric giving sample / transect labels Region.Label factor giving strata labels Effort numeric value giving sample / transect lengths book.tee.obs observations table dataframe match object ids distance data transect labels. Used dht function. Contains following columns: object numeric value object id Region.Label factor giving strata labels Sample.Label numeric giving sample / transect labels","code":""},{"path":"/reference/calc.se.Np.html","id":null,"dir":"Reference","previous_headings":"","what":"Find se of average p and N — calc.se.Np","title":"Find se of average p and N — calc.se.Np","text":"Find se average p N","code":""},{"path":"/reference/calc.se.Np.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find se of average p and N — calc.se.Np","text":"","code":"calc.se.Np(model, avgp, n, average.p)"},{"path":"/reference/calc.se.Np.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find se of average p and N — calc.se.Np","text":"model ddf model object avgp average p function n sample size average.p average probability detection model","code":""},{"path":"/reference/calc.se.Np.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find se of average p and N — calc.se.Np","text":"David L. Miller","code":""},{"path":"/reference/cdf.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"Computes cdf values observed distances fitted distribution. set observed x returns integral f(x) range= (inner, x), inner innermost distance observable (either 0 left left truncated). terms g(x) integral g(x) range divided integral g(x) entire range data (inner, W).","code":""},{"path":"/reference/cdf.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"","code":"cdf.ds(model, newdata = NULL)"},{"path":"/reference/cdf.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"model fitted distance sampling model newdata new data values computed values original observations","code":""},{"path":"/reference/cdf.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"vector cdf values observation","code":""},{"path":"/reference/cdf.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"internal function intended invoked directly. called qqplot.ddf compute values Kolmogorov-Smirnov Cramer-von Mises tests Q-Q plot.","code":""},{"path":[]},{"path":"/reference/cdf.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"Jeff Laake","code":""},{"path":"/reference/cds.html","id":null,"dir":"Reference","previous_headings":"","what":"CDS function definition — cds","title":"CDS function definition — cds","text":"Creates model formula list conventional distance sampling using values supplied call ddf","code":""},{"path":"/reference/cds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CDS function definition — cds","text":"","code":"cds( key = NULL, adj.series = NULL, adj.order = NULL, adj.scale = \"width\", adj.exp = FALSE, formula = ~1, shape.formula = ~1 )"},{"path":"/reference/cds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CDS function definition — cds","text":"key string identifying key function (currently either \"hn\" (half-normal),\"hr\" (hazard-rate), \"unif\" (uniform) \"gamma\" (gamma distribution) adj.series string identifying adjustment functions cos (Cosine), herm (Hermite polynomials), poly (simple polynomials) NULL adj.order vector order adjustment terms include adj.scale whether scale adjustment terms \"width\" \"scale\" adj.exp TRUE uses exp(adj) adjustment keep f(x)>0 formula formula scale function (included completeness formula=~1 cds) shape.formula formula shape function","code":""},{"path":"/reference/cds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CDS function definition — cds","text":"formula list used define detection function model fct string \"cds\" key key function string adj.series adjustment function string adj.order adjustment function orders adj.scale adjustment function scale type formula formula scale function shape.formula formula shape function","code":""},{"path":"/reference/cds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"CDS function definition — cds","text":"Jeff Laake; Dave Miller","code":""},{"path":"/reference/check.bounds.html","id":null,"dir":"Reference","previous_headings":"","what":"Check parameters bounds during optimisations — check.bounds","title":"Check parameters bounds during optimisations — check.bounds","text":"Simple internal function check optimisation hit bounds. Based code used live detfct.fit.opt.","code":""},{"path":"/reference/check.bounds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check parameters bounds during optimisations — check.bounds","text":"","code":"check.bounds(lt, lowerbounds, upperbounds, ddfobj, showit, setlower, setupper)"},{"path":"/reference/check.bounds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check parameters bounds during optimisations — check.bounds","text":"lt optimisation object lowerbounds current lower bounds upperbounds current upper bounds ddfobj ddf object showit debug level setlower lower bounds set user setupper upper bounds set user","code":""},{"path":"/reference/check.bounds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check parameters bounds during optimisations — check.bounds","text":"TRUE parameters close bound, else FALSE","code":""},{"path":"/reference/check.bounds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check parameters bounds during optimisations — check.bounds","text":"Dave Miller; Jeff Laake","code":""},{"path":"/reference/check.mono.html","id":null,"dir":"Reference","previous_headings":"","what":"Check that a detection function is monotone — check.mono","title":"Check that a detection function is monotone — check.mono","text":"Check fitted detection function monotone non-increasing.","code":""},{"path":"/reference/check.mono.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check that a detection function is monotone — check.mono","text":"","code":"check.mono( df, strict = TRUE, n.pts = 100, tolerance = 1e-08, plot = FALSE, max.plots = 6 )"},{"path":"/reference/check.mono.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check that a detection function is monotone — check.mono","text":"df fitted detection function object strict TRUE (default) detection function must \"strictly\" monotone, (g(x[])<=g(x[-1])) whole range (left right truncation points). n.pts number equally-spaced points left right truncation evaluate detection function (default 100) tolerance numerical tolerance monotonicity checks (default 1e-8) plot plot diagnostic highlighting non-monotonic areas (default FALSE) max.plots plot=TRUE, maximum number plots non-monotone covariate combinations plotted? Plotted combinations random sample non-monotonic subset evaluations. effect non-covariate models.","code":""},{"path":"/reference/check.mono.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check that a detection function is monotone — check.mono","text":"TRUE detection function monotone, FALSE . warnings issued warn user function non-monotonic.","code":""},{"path":"/reference/check.mono.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check that a detection function is monotone — check.mono","text":"Evaluates series points range detection function (left right truncation) determines: 1. detection function always less equal value left truncation (g(x)<=g(left), usually g(x)<=g(0)). 2. (Optionally) detection function always monotone decreasing (g(x[])<=g(x[-1])). check performed strict=TRUE (default). 3. detection function never less 0 (g(x)>=0). 4. detection function never greater 1 (g(x)<=1). models covariates scale parameter detection function evaluated observed covariate combinations. Currently covariates shape parameter supported.","code":""},{"path":"/reference/check.mono.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check that a detection function is monotone — check.mono","text":"David L. Miller, Felix Petersma","code":""},{"path":"/reference/coef.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract coefficients — coef.ds","title":"Extract coefficients — coef.ds","text":"Extract coefficients provide summary parameters estimates output ddf model objects.","code":""},{"path":"/reference/coef.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract coefficients — coef.ds","text":"","code":"# S3 method for class 'ds' coef(object,...) # S3 method for class 'io' coef(object,...) # S3 method for class 'io.fi' coef(object,...) # S3 method for class 'trial' coef(object,...) # S3 method for class 'trial.fi' coef(object,...) # S3 method for class 'rem' coef(object,...) # S3 method for class 'rem.fi' coef(object,...)"},{"path":"/reference/coef.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract coefficients — coef.ds","text":"object ddf model object class ds, io, io.fi, trial, trial.fi, rem, rem.fi. ... unspecified arguments unused present","code":""},{"path":"/reference/coef.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract coefficients — coef.ds","text":"coef.ds List data frames coefficients (scale exponent (hazard)) scale dataframe scale coefficient estimates standard errors exponent dataframe exponent estimate standard error hazard detection function others Data frame containing coefficient standard error","code":""},{"path":"/reference/coef.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extract coefficients — coef.ds","text":"functions called generic function coef ddf model object. can called directly user, typically safest use coef calls appropriate function based type model.","code":""},{"path":"/reference/coef.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract coefficients — coef.ds","text":"Jeff Laake","code":""},{"path":"/reference/compute.Nht.html","id":null,"dir":"Reference","previous_headings":"","what":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"Compute individual components Horvitz-Thompson abundance estimate covered region particular subset data depending value group = TRUE (group abundance); FALSE(individual abundance)","code":""},{"path":"/reference/compute.Nht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"","code":"compute.Nht(pdot, group = TRUE, size = NULL)"},{"path":"/reference/compute.Nht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"pdot vector estimated detection probabilities group TRUE (group abundance); FALSE(individual abundance) size vector group size values clustered populations","code":""},{"path":"/reference/compute.Nht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"vector H-T components abundance estimate","code":""},{"path":"/reference/compute.Nht.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"Internal function called covered.region.dht","code":""},{"path":"/reference/compute.Nht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"Jeff Laake","code":""},{"path":"/reference/covered.region.dht.html","id":null,"dir":"Reference","previous_headings":"","what":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"Computes H-T abundance within covered region sample.","code":""},{"path":"/reference/covered.region.dht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"","code":"covered.region.dht(obs, samples, group)"},{"path":"/reference/covered.region.dht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"obs observations table samples samples table group TRUE compute abundance group otherwise abundance individuals","code":""},{"path":"/reference/covered.region.dht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"Nhat..sample - dataframe abundance sample","code":""},{"path":"/reference/covered.region.dht.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"Internal function called dht related functions","code":""},{"path":"/reference/covered.region.dht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"Jeff Laake","code":""},{"path":"/reference/create.bins.html","id":null,"dir":"Reference","previous_headings":"","what":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"internal routine necessary normal analyses.","code":""},{"path":"/reference/create.bins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"","code":"create.bins(data, cutpoints)"},{"path":"/reference/create.bins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"data `data.frame` least column `distance`. cutpoints vector cutpoints bins","code":""},{"path":"/reference/create.bins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"argument `data` two extra columns `distbegin` `distend`.","code":""},{"path":"/reference/create.bins.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"David L. Miller","code":""},{"path":"/reference/create.command.file.html","id":null,"dir":"Reference","previous_headings":"","what":"create.command.file — create.command.file","title":"create.command.file — create.command.file","text":"create.command.file","code":""},{"path":"/reference/create.command.file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"create.command.file — create.command.file","text":"","code":"create.command.file(dsmodel = call(), data, method, meta.data, control)"},{"path":"/reference/create.command.file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"create.command.file — create.command.file","text":"dsmodel distance sampling model specification data dataframe containing data analyzed method analysis method meta.data list containing settings controlling data structure control list containing settings controlling model fitting","code":""},{"path":"/reference/create.command.file.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"create.command.file — create.command.file","text":"Jonah McArthur","code":""},{"path":"/reference/create.ddfobj.html","id":null,"dir":"Reference","previous_headings":"","what":"Create detection function object — create.ddfobj","title":"Create detection function object — create.ddfobj","text":"Creates populates specific list structure define detection function object data. ddfobj used throughout package calling argument various functions.","code":""},{"path":"/reference/create.ddfobj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create detection function object — create.ddfobj","text":"","code":"create.ddfobj(model, xmat, meta.data, initial)"},{"path":"/reference/create.ddfobj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create detection function object — create.ddfobj","text":"model model list key function possibly adjustment functions, scale formula, shape formula xmat model data frame meta.data list options describing data like width, etc initial named list initial values parameters detection function (least \"scale\", maybe also \"shape\" \"adjustments\")","code":""},{"path":"/reference/create.ddfobj.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create detection function object — create.ddfobj","text":"Distance sampling function object list elements can null except type: type type detection function hn, hr, gamma, unif, logistic xmat model data frame intercept.TRUE scale = ~1 shape formula =~1 scale sublist elements (can NULL .e., unif key):formula, parameters, design matrix (dm) shape sublist elements (power hazard rate gamma) (can NULL .e., unif hn key):formula, parameters, design matrix (dm) adjustment sublist elements (NULL adjustments used):series,order,scale,parameters g0 sublist elements (used present):formula,parameters, design matrix(dm), link","code":""},{"path":"/reference/create.ddfobj.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create detection function object — create.ddfobj","text":"Internal function meant called user","code":""},{"path":[]},{"path":"/reference/create.ddfobj.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create detection function object — create.ddfobj","text":"Jeff Laake","code":""},{"path":"/reference/create.model.frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a model frame for ddf fitting — create.model.frame","title":"Create a model frame for ddf fitting — create.model.frame","text":"Creates model.frame distance detection function fitting. includes pre-specified computed variables included model specified user (formula)","code":""},{"path":"/reference/create.model.frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a model frame for ddf fitting — create.model.frame","text":"","code":"create.model.frame(xmat, scale.formula, meta.data, shape.formula = NULL)"},{"path":"/reference/create.model.frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a model frame for ddf fitting — create.model.frame","text":"xmat dataframe ddf scale.formula user specified formula scale distance detection function meta.data user-specified meta.data (see ddf shape.formula user specified formula shape parameter distance detection function","code":""},{"path":"/reference/create.model.frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a model frame for ddf fitting — create.model.frame","text":"model frame analysis","code":""},{"path":"/reference/create.model.frame.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a model frame for ddf fitting — create.model.frame","text":"following fields always included: detected, observer, binned, optionally distance (unless null), timesdetected (present data). distance data binned, include distbegin distend point fields. integration width varies also include int.begin int.end include offset field iterative glm, used. Beyond fields fields used model formula included.","code":""},{"path":"/reference/create.model.frame.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a model frame for ddf fitting — create.model.frame","text":"Internal function called user","code":""},{"path":"/reference/create.model.frame.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a model frame for ddf fitting — create.model.frame","text":"Jeff Laake","code":""},{"path":"/reference/create.varstructure.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates structures needed to compute abundance and variance — create.varstructure","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"Creates samples obs dataframes used compute abundance variance based structure geographic regions samples within region. intent generalize routine work sampling structures.","code":""},{"path":"/reference/create.varstructure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"","code":"create.varstructure(model, region, sample, obs, dht.se)"},{"path":"/reference/create.varstructure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"model fitted ddf object region region table sample sample table obs table object #'s links sample region table dht.se uncertainty going calculated later?","code":""},{"path":"/reference/create.varstructure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"List 2 elements: samples merged dataframe containing region sample info - one record per sample obs merged observation data links region samples","code":""},{"path":"/reference/create.varstructure.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"function performs following tasks: 1)tests make sure region labels unique, 2) merges sample region tables samples table issue warning samples used, 3) regions samples values Area valid areas given issue error stop, error given code stops, 4) creates unique region/sample label samples obs, 5) merges observations sample issues warning observations used, 6) sorts regions label merges values predictions fitted model based object number limits data appropriate fitted detection function.","code":""},{"path":"/reference/create.varstructure.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"Internal function called dht","code":""},{"path":"/reference/create.varstructure.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"Jeff Laake","code":""},{"path":"/reference/ddf.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"Fits conventional distance sampling (CDS) (likelihood eq 6.6 Laake Borchers 2004) multi-covariate distance sampling (MCDS)(likelihood eq 6.14 Laake Borchers 2004) model detection function observed distance data. uses key functions incorporate adjustment functions CDS/MCDS analysis engines DISTANCE (Marques Buckland 2004). Distance can grouped (binned), ungrouped (unbinned) mixture two. function called directly user called ddf,ddf.io, ddf.trial.","code":""},{"path":"/reference/ddf.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"","code":"# S3 method for class 'ds' ddf( dsmodel, mrmodel = NULL, data, method = \"ds\", meta.data = list(), control = list(), call )"},{"path":"/reference/ddf.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"dsmodel model list key function scale formula mrmodel used data data.frame; see ddf details method analysis method; needed function called ddf.io ddf.trial meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call function called directly ddf (e.g., called via ddf.io)","code":""},{"path":"/reference/ddf.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"result: ds model object","code":""},{"path":"/reference/ddf.ds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"complete description calling arguments, see ddf. argument model function dsmodel ddf. argument dataname name dataframe specified argument data ddf. arguments control,meta.data,method defined ddf.","code":""},{"path":"/reference/ddf.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"mixture binned unbinned distance, width must set >= largest interval endpoint; changed complicated analysis; likewise, binned bins overlap, must also hold; bins overlap, width must one interval endpoints; holds left truncation Although mixture analysis works principle tested via simulation.","code":""},{"path":"/reference/ddf.ds.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R. Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press. Marques, F.F.C. S.T. Buckland. 2004. Covariate models detection function. : Advanced Distance Sampling, eds. S.T. Buckland, D.R. Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"Jeff Laake","code":""},{"path":"/reference/ddf.ds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"","code":"# ddf.ds is called when ddf is called with method=\"ds\" # \\donttest{ data(book.tee.data) region <- book.tee.data$book.tee.region egdata <- book.tee.data$book.tee.dataframe samples <- book.tee.data$book.tee.samples obs <- book.tee.data$book.tee.obs result <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~1), data = egdata[egdata$observer==1, ], method = \"ds\", meta.data = list(width = 4)) summary(result,se=TRUE) #> #> Summary for ds object #> Number of observations : 124 #> Distance range : 0 - 4 #> AIC : 311.1385 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 0.6632435 0.09981249 #> #> Estimate SE CV #> Average p 0.5842744 0.04637627 0.07937412 #> N in covered region 212.2290462 20.85130344 0.09824906 plot(result,main=\"cds - observer 1\") print(dht(result,region,samples,obs,options=list(varflag=0,group=TRUE), se=TRUE)) #> Abundance and density estimates from distance sampling #> Variance : R2, binomial #> #> Summary statistics #> #> Region Area CoveredArea Effort n k ER se.ER cv.ER #> 1 1 1040 1040 130 72 6 0.5538462 0.02926903 0.05284685 #> 2 2 640 640 80 52 5 0.6500000 0.08292740 0.12758061 #> 3 Total 1680 1680 210 124 11 0.5904762 0.03641856 0.06167659 #> #> Summary for clusters #> #> Abundance: #> Region Estimate se cv lcl ucl df #> 1 1 123.22977 13.54083 0.10988275 99.41771 152.7452 0 #> 2 2 88.99928 10.64090 0.11956159 70.46547 112.4078 0 #> 3 Total 212.22905 20.85130 0.09824906 175.13617 257.1780 0 #> #> Density: #> Region Estimate se cv lcl ucl df #> 1 1 0.1184902 0.01302002 0.10988275 0.09559396 0.1468704 0 #> 2 2 0.1390614 0.01662640 0.11956159 0.11010230 0.1756372 0 #> 3 Total 0.1263268 0.01241149 0.09824906 0.10424772 0.1530821 0 #> #> Summary for individuals #> #> Abundance: #> Region Estimate se cv lcl ucl df #> 1 1 391.9391 46.10793 0.1176405 311.4775 493.1858 0 #> 2 2 260.1517 33.65581 0.1293699 202.0987 334.8806 0 #> 3 Total 652.0909 67.40510 0.1033677 532.7888 798.1070 0 #> #> Density: #> Region Estimate se cv lcl ucl df #> 1 1 0.3768645 0.04433455 0.1176405 0.2994976 0.4742171 0 #> 2 2 0.4064871 0.05258720 0.1293699 0.3157792 0.5232509 0 #> 3 Total 0.3881493 0.04012208 0.1033677 0.3171362 0.4750637 0 #> #> Expected cluster size #> Region Expected.S se.Expected.S cv.Expected.S #> 1 1 3.180556 0.13362415 0.04201283 #> 2 2 2.923077 0.14443673 0.04941257 #> 3 Total 3.072581 0.09870565 0.03212467 print(ddf.gof(result)) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> [0,0.364] (0.364,0.727] (0.727,1.09] (1.09,1.45] (1.45,1.82] #> Observed 25.000 13.000 12.000 22.000 12.000 #> Expected 19.181 18.522 17.270 15.549 13.518 #> Chisquare 1.765 1.646 1.608 2.677 0.170 #> (1.82,2.18] (2.18,2.55] (2.55,2.91] (2.91,3.27] (3.27,3.64] (3.64,4] #> Observed 8.000 12.000 7.000 8.000 4.000 1.000 #> Expected 11.348 9.199 7.200 5.442 3.972 2.799 #> Chisquare 0.988 0.853 0.006 1.202 0.000 1.156 #> Total #> Observed 124.000 #> Expected 124.000 #> Chisquare 12.071 #> #> P = 0.20932 with 9 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.0655753 p-value = 0.77897 # }"},{"path":"/reference/ddf.gof.html","id":null,"dir":"Reference","previous_headings":"","what":"Goodness of fit tests for distance sampling models — ddf.gof","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"Generic function computes chi-square goodness fit test detection function models binned data Cramer-von Mises Kolmogorov-Smirnov (ks=TRUE)tests exact distance data. default Q-Q plot generated exact data (can suppressed using qq=FALSE argument).","code":""},{"path":"/reference/ddf.gof.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"","code":"ddf.gof( model, breaks = NULL, nc = NULL, qq = TRUE, nboot = 100, ks = FALSE, ... )"},{"path":"/reference/ddf.gof.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"model model object breaks Cutpoints use binning data nc Number distance classes qq Flag indicate whether quantile-quantile plot desired nboot number replicates use calculate p-values Kolmogorov-Smirnov goodness fit test statistics ks perform Kolmogorov-Smirnov test (involves many bootstraps can take ) ... Graphics parameters pass qqplot function","code":""},{"path":"/reference/ddf.gof.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"List class ddf.gof containing chi-square Goodness fit test statistic df Degrees freedom associated test statistic p-value Significance level test statistic","code":""},{"path":"/reference/ddf.gof.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"Formal goodness fit testing detection function models using Kolmogorov-Smirnov Cramer-von Mises tests. tests based looking quantile-quantile plot produced qqplot.ddf deviations line x=y. Kolmogorov-Smirnov test asks question \"largest vertical distance point y=x line?\" uses distance statistic test null hypothesis samples (EDF CDF case) distribution (hence model fits well). deviation y=x line points large reject null hypothesis say model good fit. Rather looking single biggest difference y=x line points Q-Q plot, might prefer think differences line points, since may many smaller differences want take account rather looking one large deviation. null hypothesis , statistic uses sum deviations point line. Note bootstrap procedure required Kolmogorov-Smirnov test ensure p-values procedure correct comparing cumulative distribution function (CDF) empirical distribution function (EDF) estimated parameters detection function. nboot parameter controls number bootstraps use. Set 0 avoid computing bootstraps (much faster Kolmogorov-Smirnov results, course). One can change precision printed values using print.ddf.gof method's digits argument.","code":""},{"path":[]},{"path":"/reference/ddf.gof.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"Jeff Laake","code":""},{"path":"/reference/ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance Detection Function Fitting — ddf","title":"Distance Detection Function Fitting — ddf","text":"Generic function fitting detection functions distance sampling single double observer configurations. Independent observer, trial dependent observer (removal) configurations included. generic function little validate calling arguments methods calls appropriate method specific function analysis.","code":""},{"path":"/reference/ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance Detection Function Fitting — ddf","text":"","code":"ddf( dsmodel = call(), mrmodel = call(), data, method = \"ds\", meta.data = list(), control = list(), call = NULL )"},{"path":"/reference/ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distance Detection Function Fitting — ddf","text":"dsmodel distance sampling model specification mrmodel mark-recapture model specification data dataframe containing data analyzed method analysis method meta.data list containing settings controlling data structure control list containing settings controlling model fitting call implemented top level ddf function, set ddf passed ddf generics.","code":""},{"path":"/reference/ddf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distance Detection Function Fitting — ddf","text":"model object class=(method, \"ddf\")","code":""},{"path":"/reference/ddf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Distance Detection Function Fitting — ddf","text":"fitting code certain expectations data. dataframe least following fields named defined follows: data clustered objects, dataframe also contain field named size gives observed number cluster. data double observer survey, two records observation object number. code assumes observations listed order observer data subsetted observer number records subset object order. addition predefined pre-named fields, dataframe can number type fields used covariates dsmodel mrmodel. present, discrepancies observations distance, size user-specified covariates assimilated uncertainty estimate. code presumes values fields records (observer=1 observer=2) uses value observer 1. Thus makes sense make values records pair even detect object observer 1 detect object data taken observer 2 consistent. Five different fitting methods currently available turn define whether dsmodel mrmodel need defined. Methods suffix \".fi\" use assumption full independence use distance sampling portion likelihood dsmodel needed. mrmodel needed double observer surveys thus needed method ds. dsmodel specifies detection function g(y) distance sampling data models restrict g(0)=1. single observer data g(y) detection function single observer double observer survey relative detection function (assuming g(0)=1) observers team (unique observations observers). double observer surveys, detection function p(y)=p(0)g(y) p(0)<1. detection function g(y) specified dsmodel p(0) estimated conditional detection functions (see mrmodel ). value dsmodel specified using hybrid formula/function notation. model definition prefixed ~ remainder function definition specified arguments. present two different functions, cds mcds, conventional distance sampling multi-covariate distance sampling. functions required arguments (key,formula). first specifies key function can half-normal (\"hn\"), hazard-rate (\"hr\"), gamma (\"gamma\") uniform (\"unif\"). argument formula specifies formula log scale parameter key function (e.g., equivalent standard deviation half-normal). variable distance included formula scale distance. See Marques, F.F.C. S.T. Buckland (2004) details representation scale formula. hazard rate gamma functions, additional shape.formula can specified model shape parameter. default ~1. Adjustment terms can specified setting adj.series can values: \"none\", \"cos\" (cosine), \"poly\" (polynomials), \"herm\" (Hermite polynomials). One must also specify vector orders adjustment terms (adj.order) scaling (adj.scale) may \"width\" \"scale\" (scaling scale parameter). Note uniform key can used adjustments (usually cosine adjustments Fourier-type analysis). mrmodel specifies form conditional detection functions (.e.,probability seen observer j given seen observer 3-j) observer (j=1,2) double observer survey. value specified using mix formula/function notation case functions glm gam. arguments functions formula link. present, glm allowed restricted link=logit. Thus, currently form conditional detection functions logistic expressed eq 6.32 Laake Borchers (2004). contrast dsmodel, argument formula typically include distance covariates affect detection probability. example, mrmodel=~glm(formula=~distance+size+sex) constructs conditional detection function based logistic form additive factors, distance, size, sex. another example, mrmodel=~glm(formula=~distance*size+sex) constructs model added interaction distance size. argument meta.data list enables various options data set. options include: point TRUE data point counts FALSE (default) implies line transect data width distance specifying half-width transect left distance specifying inner truncation value binned TRUE FALSE specify whether distances binned analysis breaks binned=TRUE, required sequence break points used plotting/gof. match distbegin, distend values bins fixed int.range integration range detection probability; either vector 2 matrix 2 columns mono constrain detection function weakly monotonically decreasing (applicable covariates detection function) mono.strict TRUE constrain detection function strictly monotonically decreasing (, applicable covariates detection function) Using meta.data=list(int.range=c(1,10)) meta.data=list(left=1,width=10). meta.data=list(binned=TRUE) used, dataframe needs contain fields distbegin distend observation specify left right hand end points distance interval containing observation. general data structure allows intervals change rather fixed standard distance analysis tools. Typically, intervals changing integration range. example, assume distance bins generated using fixed angular measurements aircraft altitude varying. analyses truncated (.e., last interval go infinity), transect width (left truncation point blindspot aircraft) can potentially change observation. argument int.range can also entered matrix 2 columns (left width) row observation. argument control list enables various analysis options set. necessary set analyses. provided user can optionally see intermediate fitting output control fitting algorithm converge happens infrequently. list values include: showit Integer (0-3, default 0) controls (increasing)amount information printed fitting. 0 - none, >=1 - information refitting bound changes printed, >=2 - information adjustment term fitting printed, ==3 -per-iteration parameter estimates log-likelihood printed. estimate FALSE fits model estimate predicted probabilities refit TRUE algorithm attempt multiple optimizations different starting values converge nrefits number refitting attempts initial named list starting values dsmodel parameters (e.g. $scale, $shape, $adjustment) lowerbounds vector lowerbounds dsmodel parameters order ds parameters appear par element ddf object, .e. fit.ddf$par fit.ddf fitted ddf model. upperbounds vector upperbounds dsmodel parameters order ds parameters appear par element ddf object, .e. fit.ddf$par fit.ddf fitted ddf model. limit TRUE restrict analysis observations detected=1 debug TRUE, fitting fails, return object fitting information nofit TRUE fit model, use starting values generate object based values optimx.method one (vector ) string(s) giving optimisation method use. one supplied, results one used starting values next. See optimx optimx.maxit maximum number iterations use optimisation. mono.random.start default monotonicity constraints enforced, grid starting values tested. Instead random starting values can used (uniformly distributed upper lower bounds). Set TRUE random start, FALSE (default) uses grid method mono.method optimiser method used (strict) monotonicity enforced. Can either slsqp solnp. Default slsqp. mono.startvals Controls mono.optimiser find better starting values first fitting key function without adjustments, use start values key function parameters fitting key + adjustment series detection function. Defaults FALSE mono.outer.iter Number outer iterations used solnp fitting monotonic model solnp selected. Default 200. silent silences warnings within ds fitting method (helpful running many times without generating many warning/error messages). optimizer default set '' single observer analyses 'R' double observer analyses. single observer analyses optimizer = '', R optimizer used present MCDS optimizer also used. result best likelihood value selected. run specified optimizer set value either 'R' 'MCDS'. MCDS optimizer currently used detection function fitting double observer analyses. See mcds_dot_exe information. winebin Location wine binary used run MCDS.exe. See mcds_dot_exe information. Examples distance sampling analyses available https://examples.distancesampling.org/. Hints tips fitting (particularly optimisation issues) mrds_opt manual page.","code":""},{"path":"/reference/ddf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Distance Detection Function Fitting — ddf","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press. Marques, F.F.C. S.T. Buckland. 2004. Covariate models detection function. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Distance Detection Function Fitting — ddf","text":"Jeff Laake","code":""},{"path":"/reference/ddf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Distance Detection Function Fitting — ddf","text":"","code":"# load data data(book.tee.data) region <- book.tee.data$book.tee.region egdata <- book.tee.data$book.tee.dataframe samples <- book.tee.data$book.tee.samples obs <- book.tee.data$book.tee.obs # fit a half-normal detection function result <- ddf(dsmodel=~mcds(key=\"hn\", formula=~1), data=egdata, method=\"ds\", meta.data=list(width=4)) # fit an independent observer model with full independence result.io.fi <- ddf(mrmodel=~glm(~distance), data=egdata, method=\"io.fi\", meta.data=list(width = 4)) # fit an independent observer model with point independence result.io <- ddf(dsmodel=~cds(key = \"hn\"), mrmodel=~glm(~distance), data=egdata, method=\"io\", meta.data=list(width=4)) if (FALSE) { # \\dontrun{ # simulated single observer point count data (see ?ptdata.single) data(ptdata.single) ptdata.single$distbegin <- (as.numeric(cut(ptdata.single$distance, 10*(0:10)))-1)*10 ptdata.single$distend <- (as.numeric(cut(ptdata.single$distance, 10*(0:10))))*10 model <- ddf(data=ptdata.single, dsmodel=~cds(key=\"hn\"), meta.data=list(point=TRUE,binned=TRUE,breaks=10*(0:10))) summary(model) plot(model,main=\"Single observer binned point data - half normal\") model <- ddf(data=ptdata.single, dsmodel=~cds(key=\"hr\"), meta.data=list(point=TRUE, binned=TRUE, breaks=10*(0:10))) summary(model) plot(model, main=\"Single observer binned point data - hazard rate\") dev.new() # simulated double observer point count data (see ?ptdata.dual) # setup data data(ptdata.dual) ptdata.dual$distbegin <- (as.numeric(cut(ptdata.dual$distance, 10*(0:10)))-1)*10 ptdata.dual$distend <- (as.numeric(cut(ptdata.dual$distance, 10*(0:10))))*10 model <- ddf(method=\"io\", data=ptdata.dual, dsmodel=~cds(key=\"hn\"), mrmodel=~glm(formula=~distance*observer), meta.data=list(point=TRUE, binned=TRUE, breaks=10*(0:10))) summary(model) plot(model, main=\"Dual observer binned point data\", new=FALSE, pages=1) model <- ddf(method=\"io\", data=ptdata.dual, dsmodel=~cds(key=\"unif\", adj.series=\"cos\", adj.order=1), mrmodel=~glm(formula=~distance*observer), meta.data=list(point=TRUE, binned=TRUE, breaks=10*(0:10))) summary(model) par(mfrow=c(2,3)) plot(model,main=\"Dual observer binned point data\",new=FALSE) } # }"},{"path":"/reference/ddf.io.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"Mark-Recapture Analysis Independent Observer Configuration Full Independence","code":""},{"path":"/reference/ddf.io.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"","code":"# S3 method for class 'io.fi' ddf( dsmodel = NULL, mrmodel, data, method, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.io.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"dsmodel used mrmodel mark-recapture model specification data analysis dataframe method analysis method; needed function called ddf.io meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.io.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"result: io.fi model object","code":""},{"path":"/reference/ddf.io.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"mark-recapture data derived independent observer distance sampling survey can used derive conditional detection functions (p_j(y)) observers (j=1,2). conditional detection functions detection probability observer j based seeing seeing observations made observer 3-j. Thus, p_1(y) estimated p_1|2(y). detections observers independent (full independence) p_1(y)=p_1|2(y),p_2(y)=p_2|1(y) union, full independence means p(y)=p_1(y) + p_2(y) - p_1(y)*p_2(y) distance y. fitting detection functions likelihood given eq 6.8 6.16 Laake Borchers (2004) used. analysis require usual distance sampling assumption perpendicular distances uniformly distributed based line placement random relative animal distribution. However, assumption used computing predicted detection probability averaged based uniform distribution (see eq 6.11 Laake Borchers 2004). complete description calling arguments, see ddf. argument model function mrmodel ddf. argument dataname name dataframe specified argument data ddf. arguments control,meta.data,method defined ddf.","code":""},{"path":"/reference/ddf.io.fi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.io.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"Jeff Laake","code":""},{"path":"/reference/ddf.io.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"Mark-Recapture Distance Sampling (MRDS) Analysis Independent Observer Configuration Point Independence","code":""},{"path":"/reference/ddf.io.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"","code":"# S3 method for class 'io' ddf( dsmodel, mrmodel, data, method = NULL, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.io.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"dsmodel distance sampling model specification; model list key function scale formula mrmodel mark-recapture model specification; model list formula link data analysis dataframe method used meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.io.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"result: io model object composed io.fi ds model objects","code":""},{"path":"/reference/ddf.io.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"MRDS analysis based point independence involves two separate independent analyses mark-recapture data distance sampling data. independent observer configuration, mark-recapture data analysed call ddf.io.fi (see likelihood eq 6.8 6.16 Laake Borchers 2004) fit conditional distance sampling detection functions estimate p(0), detection probability distance zero independent observer team based independence zero (eq 6.22 Laake Borchers 2004). Independently, distance data, union observations independent observers, used fit conventional distance sampling (CDS) (likelihood eq 6.6) multi-covariate distance sampling (MCDS) (likelihood eq 6.14) model detection function, g(y), g(0)=1. detection function observer team created p(y)=p(0)*g(y) (eq 6.28 Laake Borchers 2004) predictions made. ddf.io called directly user called ddf method=\"io\". complete description calling arguments, see ddf. argument dataname name dataframe specified argument data ddf. arguments dsmodel, mrmodel, control meta.data defined ddf.","code":""},{"path":"/reference/ddf.io.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.io.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"Jeff Laake","code":""},{"path":"/reference/ddf.rem.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"Mark-Recapture Distance Sampling (MRDS) Analysis Removal Observer Configuration Full Independence","code":""},{"path":"/reference/ddf.rem.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"","code":"# S3 method for class 'rem.fi' ddf( dsmodel = NULL, mrmodel, data, method, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.rem.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"dsmodel used mrmodel mark-recapture model specification data analysis dataframe method analysis method; needed function called ddf.io meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.rem.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"result: rem.fi model object","code":""},{"path":"/reference/ddf.rem.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"mark-recapture data derived removal observer distance sampling survey can derive conditional detection functions (p_j(y)) observers (j=1) technically assumes detection probability vary occasion (observer case). conditional detection function detection probability observer 1 conditional observations seen either observers. Thus, p_1(y) estimated p_1|2(y). detections observers independent (full independence) p_1(y)=p_1|2(y) union, full independence means p(y)=p_1(y) + p_2(y) - p_1(y)*p_2(y) distance y. fitting detection functions likelihood Laake Borchers (2004) used. analysis require usual distance sampling assumption perpendicular distances uniformly distributed based line placement random relative animal distribution. However, assumption used computing predicted detection probability averaged based uniform distribution (see eq 6.11 Laake Borchers 2004). complete description calling arguments, see ddf. argument model function mrmodel ddf. argument dataname name dataframe specified argument data ddf. arguments control,meta.data,method defined ddf.","code":""},{"path":"/reference/ddf.rem.fi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.rem.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"Jeff Laake","code":""},{"path":"/reference/ddf.rem.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"Mark-Recapture Distance Sampling (MRDS) Analysis Removal Observer Configuration Point Independence","code":""},{"path":"/reference/ddf.rem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"","code":"# S3 method for class 'rem' ddf( dsmodel, mrmodel, data, method = NULL, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.rem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"dsmodel distance sampling model specification; model list key function scale formula mrmodel mark-recapture model specification; model list formula link data analysis dataframe method used meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.rem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"result: rem model object composed rem.fi ds model objects","code":""},{"path":"/reference/ddf.rem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"MRDS analysis based point independence involves two separate independent analyses mark-recapture data distance sampling data. removal observer configuration, mark-recapture data analysed call ddf.rem.fi (see Laake Borchers 2004) fit conditional distance sampling detection functions estimate p(0), detection probability distance zero primary observer based independence zero (eq 6.22 Laake Borchers 2004). Independently, distance data, observations primary observer, used fit conventional distance sampling (CDS) (likelihood eq 6.6) multi-covariate distance sampling (MCDS) (likelihood eq 6.14) model detection function, g(y), g(0)=1. detection function primary observer created p(y)=p(0)*g(y) (eq 6.28 Laake Borchers 2004) predictions made. ddf.rem called directly user called ddf method=\"rem\". complete description calling arguments, see ddf. argument data dataframe specified argument data ddf. arguments dsmodel, mrmodel, control meta.data defined ddf.","code":""},{"path":"/reference/ddf.rem.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.rem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"Jeff Laake","code":""},{"path":"/reference/ddf.trial.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"Mark-Recapture Analysis Trial Observer Configuration Full Independence","code":""},{"path":"/reference/ddf.trial.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"","code":"# S3 method for class 'trial.fi' ddf( dsmodel = NULL, mrmodel, data, method, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.trial.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"dsmodel used mrmodel mark-recapture model specification data analysis dataframe method analysis method; needed function called ddf.trial meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.trial.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"result: trial.fi model object","code":""},{"path":"/reference/ddf.trial.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"mark-recapture data derived trial observer distance sampling survey can used derive conditional detection function (p_1(y)) observer 1 based trials (observations) observer 2. conditional detection function detection probability observer 1 based seeing seeing observations made observer 2. Thus, p_1(y) estimated p_1|2(y). detections observers independent (full independence) p_1(y)=p_1|2(y) distance y. fitting detection functions likelihood given eq 6.12 6.17 Laake Borchers (2004) used. analysis require usual distance sampling assumption perpendicular distances uniformly distributed based line placement random relative animal distribution. However, assumption used computing predicted detection probability averaged based uniform distribution (see eq 6.13 Laake Borchers 2004). complete description calling arguments, see ddf. argument model function mrmodel ddf. argument dataname name dataframe specified argument data ddf. arguments control,meta.data,method defined ddf.","code":""},{"path":"/reference/ddf.trial.fi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.trial.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"Jeff Laake","code":""},{"path":"/reference/ddf.trial.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"Mark-Recapture Distance Sampling (MRDS) Analysis Trial Observer Configuration Point Independence","code":""},{"path":"/reference/ddf.trial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"","code":"# S3 method for class 'trial' ddf( dsmodel, mrmodel, data, method = NULL, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.trial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"dsmodel distance sampling model specification; model list key function scale formula mrmodel mark-recapture model specification; model list formula link data analysis data.frame method used meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.trial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"result: trial model object composed trial.fi ds model objects","code":""},{"path":"/reference/ddf.trial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"MRDS analysis based point independence involves two separate independent analyses mark-recapture data distance sampling data. trial configuration, mark-recapture data analysed call ddf.trial.fi (see likelihood eq 6.12 6.17 Laake Borchers 2004) fit conditional distance sampling detection function observer 1 based trials (observations) observer 2 estimate p_1(0), detection probability distance zero observer 1. Independently, distance data observer 1 used fit conventional distance sampling (CDS) (likelihood eq 6.6) multi-covariate distance sampling (MCDS) (likelihood eq 6.14) model detection function, g(y), g(0)=1. detection function observer 1 created p_1(y)=p_1(0)*g(y) (eq 6.28 Laake Borchers 2004) predictions made. ddf.trial called directly user called ddf method=\"trial\". complete description calling arguments, see ddf. argument dataname name dataframe specified argument data ddf. arguments dsmodel, mrmodel, control meta.data defined ddf.","code":""},{"path":"/reference/ddf.trial.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.trial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"Jeff Laake","code":""},{"path":"/reference/DeltaMethod.html","id":null,"dir":"Reference","previous_headings":"","what":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"Computes delta method variance-covariance matrix results generic function fct computes vector estimates function set estimated parameters par.","code":""},{"path":"/reference/DeltaMethod.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"","code":"DeltaMethod(par, fct, vcov, delta, ...)"},{"path":"/reference/DeltaMethod.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"par vector parameter values estimates constructed fct function constructs estimates parameters par vcov variance-covariance matrix parameters delta proportional change parameters used numerically estimate first derivative central-difference formula (ignored) ... additional arguments needed fct","code":""},{"path":"/reference/DeltaMethod.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"list values variance estimated variance-covariance matrix estimates derived fct partial matrix (vector) partial derivatives fct respect parameters par","code":""},{"path":"/reference/DeltaMethod.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"delta method (aka propagation errors based Taylor series approximation - see Seber's book Estimation Animal Abundance). uses first derivative fct respect par. also uses variance-covariance matrix estimated parameters derived estimating parameters input argument. first argument fct par vector parameter estimates. return single value (vector) estimate(s). remaining arguments fct can passed fct including end call DeltaMethod name=value pairs.","code":""},{"path":"/reference/DeltaMethod.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"generic function can used setting beyond mrds package. However internal function mrds user need call explicitly.","code":""},{"path":"/reference/DeltaMethod.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/det.tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Observation detection tables — det.tables","title":"Observation detection tables — det.tables","text":"Creates series tables dual observer data shows number missed detected observer within defined distance classes.","code":""},{"path":"/reference/det.tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Observation detection tables — det.tables","text":"","code":"det.tables(model, nc = NULL, breaks = NULL)"},{"path":"/reference/det.tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Observation detection tables — det.tables","text":"model fitted model ddf nc number equal-width bins histogram breaks user define breakpoints","code":""},{"path":"/reference/det.tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Observation detection tables — det.tables","text":"list object class \"det.tables\" Observer1 table observer 1 Observer2 table observer 2 Duplicates histogram counts duplicates Pooled histogram counts observations either observer Obs1_2 table observer 1 within subset seen observer 2 Obs2_1 table observer 2 within subset seen observer 1","code":""},{"path":"/reference/det.tables.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Observation detection tables — det.tables","text":"Jeff Laake","code":""},{"path":"/reference/det.tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Observation detection tables — det.tables","text":"","code":"# \\donttest{ data(book.tee.data) region <- book.tee.data$book.tee.region egdata <- book.tee.data$book.tee.dataframe samples <- book.tee.data$book.tee.samples obs <- book.tee.data$book.tee.obs xx <- ddf(mrmodel=~glm(formula=~distance*observer), dsmodel=~mcds(key=\"hn\", formula=~sex), data=egdata, method=\"io\", meta.data=list(width=4)) tabs <- det.tables(xx, breaks=c(0, 0.5, 1, 2, 3, 4)) par(mfrow=c(2, 2)) plot(tabs, new=FALSE, which=c(1, 2, 5, 6)) # }"},{"path":"/reference/detfct.fit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit detection function using key-adjustment functions — detfct.fit","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"Fit detection function observed distances using key-adjustment function approach. adjustment functions included alternate fitting parameters key adjustment functions parameters much like approach CDS MCDS Distance FORTRAN code. calls detfct.fit.opt uses R optim function allow non-linear constraints inclusion adjustments allow detection function non-monotone.","code":""},{"path":"/reference/detfct.fit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"","code":"detfct.fit(ddfobj, optim.options, bounds, misc.options)"},{"path":"/reference/detfct.fit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"ddfobj detection function object optim.options control options optim bounds bounds parameters misc.options miscellaneous options","code":""},{"path":"/reference/detfct.fit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"fitted detection function model object following list structure par final parameter vector value final negative log likelihood value counts number function evaluations convergence see codes optim message string convergence hessian hessian evaluated final parameter values aux list 20 elements maxit: maximum number iterations allowed optimization lower: lower bound values parameters upper: upper bound values parameters setlower: TRUE user set bounds setupper: TRUE user set bounds point: TRUE point counts FALSE line transect int.range: integration range values showit: integer value determines information printed iteration silent: option silence errors detfct.fit.opt integral.numeric TRUE compute logistic integrals numerically breaks: breaks distance defined fixed bins analysis maxiter: maximum iterations used refit: TRUE, detection function fitted parameters boundary convergence achieved nrefits: number refittings mono: TRUE monotonicity enforced mono.strict: TRUE, strict monotonicity enforced; otherwise weak width: radius point count half-width strip standardize: TRUE, detection function scaled g(0)=1 ddfobj: distance detection function object; see create.ddfobj bounded: TRUE parameters ended boundary (think) model: list formulas detection function model (probably can remove )","code":""},{"path":"/reference/detfct.fit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"Dave Miller; Jeff Laake","code":""},{"path":"/reference/detfct.fit.opt.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit detection function using key-adjustment functions — detfct.fit.opt","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"Fit detection function observed distances using key-adjustment function approach. adjustment functions included alternate fitting parameters key adjustment functions parameters much like approach CDS MCDS Distance FORTRAN code. function called driver function detfct.fit, calls relevant optimisation routine, slsqp, solnp optimx.","code":""},{"path":"/reference/detfct.fit.opt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"","code":"detfct.fit.opt(ddfobj, optim.options, bounds, misc.options, fitting = \"all\")"},{"path":"/reference/detfct.fit.opt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"ddfobj detection function object optim.options control options optim bounds bounds parameters misc.options miscellaneous options fitting character string values \"\",\"key\",\"adjust\" determine parameters allowed vary fitting","code":""},{"path":"/reference/detfct.fit.opt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"fitted detection function model object following list structure par final parameter vector value final negative log likelihood value counts number function evaluations convergence see codes optim message string convergence hessian hessian evaluated final parameter values aux list 20 elements maxit: maximum number iterations allowed optimization lower: lower bound values parameters upper: upper bound values parameters setlower: TRUE user set bounds setupper: TRUE user set bounds point: TRUE point counts FALSE line transect int.range: integration range values showit: integer value determines information printed iteration integral.numeric TRUE compute logistic integrals numerically breaks: breaks distance defined fixed bins analysis maxiter: maximum iterations used refit: TRUE, detection function fitted parameters boundary convergence achieved nrefits: number refittings mono: TRUE, monotonicity enforced mono.strict: TRUE, strict monotonicity enforced; otherwise weak width: radius point count half-width strip standardize: TRUE, detection function scaled g(0)=1 ddfobj: distance detection function object; see create.ddfobj bounded: TRUE estimated parameters bounds model: list formulas detection function model (probably can remove )","code":""},{"path":"/reference/detfct.fit.opt.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"Dave Miller; Jeff Laake; Lorenzo Milazzo; Felix Petersma","code":""},{"path":"/reference/dht.deriv.html","id":null,"dir":"Reference","previous_headings":"","what":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"Computes abundance specified values parameters numerical computation first derivative respect parameters detection function. internal function called DeltaMethod invoked dht.se","code":""},{"path":"/reference/dht.deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"","code":"dht.deriv(par, model, obs, samples, options = list())"},{"path":"/reference/dht.deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"par detection function parameter values model ddf model object obs observations table samples samples table options list options specified dht","code":""},{"path":"/reference/dht.deriv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"vector abundance estimates values parameters specified par","code":""},{"path":"/reference/dht.deriv.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"Internal function; intended called user","code":""},{"path":[]},{"path":"/reference/dht.deriv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"Jeff Laake","code":""},{"path":"/reference/dht.html","id":null,"dir":"Reference","previous_headings":"","what":"Density and abundance estimates and variances — dht","title":"Density and abundance estimates and variances — dht","text":"Compute density abundance estimates variances based Horvitz-Thompson-like estimator.","code":""},{"path":"/reference/dht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Density and abundance estimates and variances — dht","text":"","code":"dht( model, region.table, sample.table, obs.table = NULL, subset = NULL, se = TRUE, options = list() )"},{"path":"/reference/dht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Density and abundance estimates and variances — dht","text":"model ddf model object region.table data.frame region records. Two columns: Region.Label Area. density required, one can set Area=0 regions. sample.table data.frame sample records. Three columns: Region.Label, Sample.Label, Effort. obs.table data.frame observation records fields: object, Region.Label, Sample.Label give links sample.table, region.table data records used model. necessary data.frame used create model contains Region.Label, Sample.Label columns. subset subset statement create obs.table se TRUE computes standard errors, coefficient variation confidence intervals (based log-normal approximation). See \"Uncertainty\" . options list options can set, see \"dht options\", .","code":""},{"path":"/reference/dht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Density and abundance estimates and variances — dht","text":"list object class dht elements: clusters result list object clusters individuals result list individuals Expected.S data.frame estimates expected cluster size fields Region, Expected.S se.Expected.S cluster size=1, result includes individuals clusters Expected.S. list structure clusters individuals : bysample data.frame giving results sample; Nchat estimated abundance within sample Nhat scaled surveyed area/covered area within region summary data.frame summary statistics region total N data.frame estimates abundance region total D data.frame estimates density region total average.p average detection probability estimate cormat correlation matrix regional abundance/density estimates total (one region) vc list 3: total variance-covariance matrix, detection function component variance encounter rate component variance. detection v-c matrix partial vector returned Nhat..sample another summary Nhat sample used dht.se","code":""},{"path":"/reference/dht.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Density and abundance estimates and variances — dht","text":"Density abundance within sampled region computed based Horvitz-Thompson-like estimator groups individuals (clustered population) extrapolated entire survey region based defined regional stratification. variance based replicate samples within regional stratification. clustered populations, \\(E(s)\\) standard error also output. Abundance estimated Horvitz-Thompson-like estimator (Huggins 1989, 1991; Borchers et al 1998; Borchers Burnham 2004). abundance sampled region simply \\(1/p_1 + 1/p_2 + ... + 1/p_n\\) \\(p_i\\) estimated detection probability \\(\\)th detection \\(n\\) total observations. strictly Horvitz-Thompson estimator \\(p_i\\) estimated known. animals observed tight clusters, estimator gives abundance groups (group=TRUE options) abundance individuals estimated \\(s_1/p_1 + s_2/p_2 + ... + s_n/p_n\\), \\(s_i\\) size (e.g., number animals group) observation (group=FALSE options). Extrapolation estimation abundance entire survey region based either random sampling design stratified random sampling design. Replicate samples (lines) specified within regional strata region.table, . stratification, region.table contain single record Area entire survey region. sample.table linked region.table Region.Label. obs.table linked sample.table Sample.Label Region.Label. Abundance can restricted subset (e.g., particular species) population limiting list observations obs.table desired subset. Alternatively, Sample.Label Region.Label data.frame used fit model, subset argument can given place obs.table. use subset argument include observations, use subset=1==1 avoid creating obs.table. extrapolating entire survey region important unit measurements consistent converted consistency. conversion factor can specified convert.units variable options list. values Area region.table, must made consistent units Effort sample.table units distance data.frame analyzed. easiest units Area square units Effort necessary convert units distance units Effort. example, Effort entered kilometres Area square kilometres distance metres using options=list(convert.units=0.001) convert metres kilometres, density expressed square kilometres consistent units Area. However, can different units long appropriate composite value convert.units chosen. Abundance survey region can expressed : *N/Area survey region, N abundance covered (sampled) region, area sampled region units Effort * distance. sampled region multiplied convert.units, chosen result units Area. example, Effort entered kilometres, Area hectares (100m x 100m) distance metres, using options=list(convert.units=10) convert units hectares (100 convert metres 100 metres distance .1 convert km 100m units). argument options list variable=value pairs set options analysis. two described . pdelta need changed included completeness. controls precision first derivative calculation delta method variance. option areas.supplied TRUE covered area assumed supplied CoveredArea column sample data.frame.","code":""},{"path":"/reference/dht.html","id":"uncertainty","dir":"Reference","previous_headings":"","what":"Uncertainty","title":"Density and abundance estimates and variances — dht","text":"argument se=TRUE, standard errors density abundance computed. Coefficient variation log-normal confidence intervals constructed using Satterthwaite approximation degrees freedom (Buckland et al. 2001 p. 90). function dht.se computes variance interval estimates. variance two components: variation due uncertainty estimation detection function parameters; variation abundance due random sample selection; first component (model parameter uncertainty) computed using delta method estimate variance (Huggins 1989, 1991, Borchers et al. 1998) first derivatives abundance estimator respect parameters detection function computed numerically (see DeltaMethod). second component (encounter rate variance) can computed one several ways depending form taken encounter rate estimator used. begin three possible values varflag calculate encounter rate: 0 uses binomial variance number observations (equation 13 Borchers et al. 1998). estimator useful sampled region survey region objects clustered; situation occur often; 1 uses encounter rate \\(n/L\\) (objects observed per unit transect) Buckland et al. (2001) pg 78-79 (equation 3.78) line transects (see also Fewster et al, 2009 estimator R2). variance estimator appropriate size derivative size used detection function; 2 default uses encounter rate estimator \\(\\hat{N}/L\\) (estimated abundance per unit transect) suggested Innes et al (2002) Marques & Buckland (2004). general covariates used models, default varflag=2 preferable estimated abundance take account variability due covariate effects. population clustered mean group size standard error also reported. options 1 2, possible choose one estimator forms given Fewster et al (2009) line transects: \"R2\", \"R3\", \"R4\", \"S1\", \"S2\", \"O1\", \"O2\" \"O3\" specifying ervar= option (default \"R2\"). points, either \"P2\" \"P3\" estimator can selected (>=mrds 2.3.0 default \"P2\", <= mrds 2.2.9 default \"P3\"). See varn Fewster et al (2009) details estimators.","code":""},{"path":"/reference/dht.html","id":"dht-options","dir":"Reference","previous_headings":"","what":"dht options","title":"Density and abundance estimates and variances — dht","text":"Several options available control calculations output: ci.width Confidence interval width, expressed decimal 0 1 (default 0.95, giving 95% CI) pdelta delta value computing numerical first derivatives (Default: 0.001) varflag 0,1,2 (see \"Uncertainty\") (Default: 2) convert.units multiplier width convert units length (Default: 1) ervar encounter rate variance type (see \"Uncertainty\" type argument varn). (Default: \"R2\" lines \"P2\" points)","code":""},{"path":"/reference/dht.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Density and abundance estimates and variances — dht","text":"Borchers, D.L., S.T. Buckland, P.W. Goedhart, E.D. Clarke, S.L. Hedley. 1998. Horvitz-Thompson estimators double-platform line transect surveys. Biometrics 54: 1221-1237. Borchers, D.L. K.P. Burnham. General formulation distance sampling pp 10-11 : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press. Buckland, S.T., D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. 2001. Introduction Distance Sampling: Estimating Abundance Biological Populations. Oxford University Press. Fewster, R.M., S.T. Buckland, K.P. Burnham, D.L. Borchers, P.E. Jupp, J.L. Laake L. Thomas. 2009. Estimating encounter rate variance distance sampling. Biometrics 65: 225-236. Huggins, R.M. 1989. statistical analysis capture experiments. Biometrika 76:133-140. Huggins, R.M. 1991. practical aspects conditional likelihood approach capture experiments. Biometrics 47: 725-732. Innes, S., M.P. Heide-Jorgensen, J.L. Laake, K.L. Laidre, H.J. Cleator, P. Richard, R.E.. Stewart. 2002. Surveys belugas narwhals Canadian High Arctic 1996. NAMMCO Scientific Publications 4: 169-190. Marques, F.F.C. S.T. Buckland. 2004. Covariate models detection function. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/dht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Density and abundance estimates and variances — dht","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/dht.se.html","id":null,"dir":"Reference","previous_headings":"","what":"Variance and confidence intervals for density and abundance estimates — dht.se","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"Computes standard error, cv, log-normal confidence intervals abundance density within region () total regions. also produces correlation matrix regional total estimates.","code":""},{"path":"/reference/dht.se.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"","code":"dht.se( model, region.table, samples, obs, options, numRegions, estimate.table, Nhat.by.sample )"},{"path":"/reference/dht.se.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"model ddf model object region.table table region values samples table samples(replicates) obs table observations options list options can set (see dht) numRegions number regions estimate.table table estimate values Nhat..sample estimated abundances sample","code":""},{"path":"/reference/dht.se.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"List 2 elements: estimate.table completed table se, cv confidence limits vc correlation matrix estimates","code":""},{"path":"/reference/dht.se.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"variance two components: variation due uncertainty estimation detection function parameters; variation abundance due random sample selection; first component (model parameter uncertainty) computed using delta method estimate variance (Huggins 1989, 1991, Borchers et al. 1998) first derivatives abundance estimator respect parameters detection function computed numerically (see DeltaMethod). second component (encounter rate variance) can computed one several ways depending form taken encounter rate estimator used. begin three possible values varflag calculate encounter rate: 0 uses binomial variance number observations (equation 13 Borchers et al. 1998). estimator useful sampled region survey region objects clustered; situation occur often; 1 uses encounter rate \\(n/L\\) (objects observed per unit transect) Buckland et al. (2001) pg 78-79 (equation 3.78) line transects (see also Fewster et al, 2009 estimator R2). variance estimator appropriate size derivative size used detection function; 2 default uses encounter rate estimator \\(\\hat{N}/L\\) (estimated abundance per unit transect) suggested Innes et al (2002) Marques & Buckland (2004). general covariates used models, default varflag=2 preferable estimated abundance take account variability due covariate effects. population clustered mean group size standard error also reported. options 1 2, possible choose one estimator forms given Fewster et al (2009). line transects: \"R2\", \"R3\", \"R4\", \"S1\", \"S2\", \"O1\", \"O2\" \"O3\" can used specifying ervar= option (default \"R2\"). points, either \"P2\" \"P3\" estimator can selected (>=mrds 2.3.0 default \"P2\", <= mrds 2.2.9 default \"P3\"). See varn Fewster et al (2009) details estimators. Exceptions occur one sample stratum. case uses Poisson assumption (\\(Var(x)=x\\)) assumes known variance \\(z=1.96\\) used critical value. cases degrees freedom \\(t\\)-distribution assumed log(abundance) log(density) based Satterthwaite approximation (Buckland et al. 2001 pg 90) degrees freedom (df). df weighted squared cv combining two sources variation assumed log-normal distribution components multiplicative. combining df sampling variance across regions weighted variance sum across regions. non-zero correlation regional estimates can occur using common detection function across regions. reflected correlation matrix regional total estimates given value list. needed subtotals regional estimates needed.","code":""},{"path":"/reference/dht.se.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"function called dht expected user call function directly documented completeness anyone expanding code using function code.","code":""},{"path":"/reference/dht.se.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"see dht","code":""},{"path":[]},{"path":"/reference/dht.se.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"Jeff Laake","code":""},{"path":"/reference/distpdf.grad.html","id":null,"dir":"Reference","previous_headings":"","what":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"function updated match distpdf closely, flexibility. Effectively, gives gradient distpdf detfct, whichever one specified.","code":""},{"path":"/reference/distpdf.grad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"","code":"distpdf.grad( distance, par.index, ddfobj, standardize = FALSE, width, point, left = 0, pdf.based = TRUE )"},{"path":"/reference/distpdf.grad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"distance vector distances par.index index parameter interest ddfobj ddf object standardize whether function return gradient standardized detection function g(x)/g(0) (TRUE), simply g(0) (FALSE). Currently implemented standardize = FALSE. width truncation width point data point transects (TRUE) line transects (FALSE). left left truncation (default 0) pdf.based gradient non-normalised pdf (TRUE) detection function (FALSE)? Default TRUE.","code":""},{"path":"/reference/distpdf.grad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"gradient non-normalised pdf detection w.r.t. parameter parameter index par.index.","code":""},{"path":"/reference/distpdf.grad.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"Various functions used specify key adjustment functions gradients detection functions. far, developed half-normal, hazard-rate uniform key functions combination cosine, simple polynomial Hermite polynomial adjustments. called gradient-based solver called general user. distpdf.grad call either half-normal, hazard-rate uniform function adjustment terms fit data better, returning gradient detection distance w.r.t. parameters. adjustments either cosine, Hermite simple polynomial.","code":""},{"path":"/reference/distpdf.grad.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"Felix Petersma","code":""},{"path":"/reference/distpdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Detection functions — distpdf","title":"Detection functions — distpdf","text":"Various functions used specify key adjustment functions detection functions.","code":""},{"path":"/reference/distpdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detection functions — distpdf","text":"","code":"detfct(distance, ddfobj, select=NULL, index=NULL, width=NULL, standardize = TRUE, stdint=FALSE, left=0) adjfct.cos(distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp=FALSE) adjfct.poly(distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp=FALSE) adjfct.herm(distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp=FALSE) scalevalue(key.scale, z) keyfct.hn(distance, key.scale) keyfct.hz(distance, key.scale, key.shape) keyfct.gamma(distance, key.scale, key.shape) fx(distance,ddfobj,select=NULL,index=NULL,width=NULL, standardize=TRUE,stdint=FALSE, left=0) fr(distance,ddfobj,select=NULL,index=NULL,width=NULL, standardize=TRUE,stdint=FALSE) distpdf(distance,ddfobj,select=NULL,index=NULL,width=NULL,standardize=TRUE, stdint=FALSE,point=FALSE, left=0)"},{"path":"/reference/distpdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detection functions — distpdf","text":"distance vector distances ddfobj distance sampling object (see create.ddfobj) select logical vector selection data values index specific data row index width (right) truncation width standardize logical used decide whether divide function evaluated 0 stdint logical used decide whether integral standardized point TRUE, point counts; otherwise line transects left (left) truncation distance z design matrix scale function key.scale vector scale values key.shape vector shape values adj.order vector adjustment orders adj.parm vector adjustment parameters scaling scaling adjustment terms adj.exp TRUE uses exp(adj) adjustment keep f(x)>0","code":""},{"path":"/reference/distpdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detection functions — distpdf","text":"detfct, value vector detection probabilities keyfct.*, vector key function evaluations adjfct.*, vector adjustment series evaluations scalevalue, vector scale parameters.","code":""},{"path":"/reference/distpdf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Detection functions — distpdf","text":"Multi-covariate detection functions (MCDS) represented function \\(g(x,w,\\theta)\\) x distance, z set covariates \\(\\theta\\) parameter vector. functions defined \\(g(0,w,\\theta)=1\\) covariates modify scale \\((x/\\sigma)\\) log link used relate \\(\\sigma\\) covariates, \\(\\sigma=exp(\\theta*w)\\). CDS function obtained constant \\(\\sigma\\) equivalent intercept design matrix, z. detfct call either gamma, half-normal, hazard-rate uniform function returning probability detection distance. addition simple model , may specify adjustment terms fit data better. adjustments either Cosine, Hermite simple polynomials. specified arguments detfct, detailed . detfct function calls others assembles final result using either key(x)[1+series(x)] (key(x)[1+series(x)])/(key(0)[1+series(0)]) (depending value standardize). keyfct.* functions calculate key function values adjfct.* calculate adjustment term values. scalevalue either detection function computes scale log link using parameters covariate design matrix fx, fr non-normalized probability density line transects point counts respectively","code":""},{"path":"/reference/distpdf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Detection functions — distpdf","text":"Marques, F. F. C., & Buckland, S. T. (2003). Incorporating covariates standard line transect analyses. Biometrics, 59(4), 924-935. Buckland, S. T., Anderson, D. R., Burnham, K. P., Laake, J. L., Borchers, D. L., & Thomas, L. (2004). Advanced Distance Sampling. Oxford University Press, Oxford, UK. Becker, E. F. P. X. Quang. 2009. gamma-shaped detection function line transect surveys mark-recapture covariate data. Journal Agricultural Biological Environmental Statistics 14:207-223.","code":""},{"path":[]},{"path":"/reference/distpdf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detection functions — distpdf","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/ds.function.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance Sampling Functions — ds.function","title":"Distance Sampling Functions — ds.function","text":"Computes values conditional unconditional detection functions probability density functions line/point data single observer dual observer 3 configurations (io,trial,rem).","code":""},{"path":"/reference/ds.function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance Sampling Functions — ds.function","text":"","code":"ds.function( model, newdata = NULL, obs = \"All\", conditional = FALSE, pdf = TRUE, finebr )"},{"path":"/reference/ds.function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distance Sampling Functions — ds.function","text":"model model object newdata dataframe compute values; NULL uses fitting data obs 1 2 observer 1 2, 3 duplicates, \".\" combined \"\" return values conditional FALSE, computes p(x) based distance detection function TRUE based mr detection function pdf FALSE, returns p(x) TRUE, returns p(x)*pi(x)/integral p(x)*pi(x) finebr fine break values line averaged","code":""},{"path":"/reference/ds.function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distance Sampling Functions — ds.function","text":"List containing xgrid grid distance values values average detection fct values xgrid values","code":""},{"path":"/reference/ds.function.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Distance Sampling Functions — ds.function","text":"Placeholder – functional —-","code":""},{"path":"/reference/ds.function.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Distance Sampling Functions — ds.function","text":"Jeff Laake","code":""},{"path":"/reference/flnl.constr.grad.neg.html","id":null,"dir":"Reference","previous_headings":"","what":"(Negative) gradients of constraint function — flnl.constr.grad.neg","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"function derives gradients constraint function model parameters, following order: 1. Scale parameter (part key function) 2. Shape parameter (part key function) 3. Adjustment parameter 1 4. Adjustment parameter 2 5. Etc.","code":""},{"path":"/reference/flnl.constr.grad.neg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"","code":"flnl.constr.grad.neg(pars, ddfobj, misc.options, fitting = \"all\")"},{"path":"/reference/flnl.constr.grad.neg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"pars vector parameter values detection function gradients negative log-likelihood evaluated ddfobj distance sampling object misc.options list object containing additional information type optimiser truncation width, created within ddf.ds fitting character string values \"\", \"key\", \"adjust\" determine parameters allowed vary fitting. actually used. Defaults \"\".","code":""},{"path":"/reference/flnl.constr.grad.neg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"matrix gradients constraints (rows) w.r.t every parameters (columns)","code":""},{"path":"/reference/flnl.constr.grad.neg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"constraint function formed specified number non-linear constraints, defaults 20 specified misc.options$mono.points. constraint function checks whether standardised detection function 1) weakly/strictly monotonic points 2) non-negative points. flnl.constr.grad returns gradients constraints w.r.t. parameters detection function, .e., 2 times mono.points gradients every parameter. function mostly follows structure flnl.constr detfct.fit.mono.R.","code":""},{"path":"/reference/flnl.grad.html","id":null,"dir":"Reference","previous_headings":"","what":"This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet. — flnl.grad","title":"This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet. — flnl.grad","text":"function derives gradients negative log likelihood function, respect parameters. based theory presented Introduction Distance Sampling (2001) Distance Sampling: Methods Applications (2015). meant called users mrds Distance packages directly rather gradient-based solver. solver use distance sampling model single-observer data coming either line point transect detection function contains adjustment series covariates. implement following key + adjustment series combinations detections function: key function can half-normal, hazard-rate uniform, adjustment series can cosine, simple polynomial Hermite polynomial. Data can either binned exact, combination two implemented yet.","code":""},{"path":"/reference/flnl.grad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet. — flnl.grad","text":"","code":"flnl.grad(pars, ddfobj, misc.options, fitting = \"all\")"},{"path":"/reference/flnl.grad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet. — flnl.grad","text":"pars vector parameter values detection function gradients negative log-likelihood evaluated ddfobj distance sampling object misc.options list object containing additional information type optimiser truncation width, created ddf.ds fitting character string values \"\", \"key\", \"adjust\" determine parameters allowed vary fitting. actually used. Defaults \"\".","code":""},{"path":"/reference/flnl.grad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet. — flnl.grad","text":"gradients negative log-likelihood w.r.t. parameters","code":""},{"path":"/reference/flnl.grad.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"This function derives the gradients of the negative log likelihood function, with respect to all parameters. It is based on the theory presented in Introduction to Distance Sampling (2001) and Distance Sampling: Methods and Applications (2015). It is not meant to be called by users of the mrds and Distance packages directly but rather by the gradient-based solver. This solver is use when our distance sampling model is for single-observer data coming from either line or point transect and only when the detection function contains an adjustment series but no covariates. It is implement for the following key + adjustment series combinations for the detections function: the key function can be half-normal, hazard-rate or uniform, and the adjustment series can be cosine, simple polynomial or Hermite polynomial. Data can be either binned or exact, but a combination of the two has not been implemented yet. — flnl.grad","text":"Felix Petersma","code":""},{"path":"/reference/flnl.html","id":null,"dir":"Reference","previous_headings":"","what":"Log-likelihood computation for distance sampling data — flnl","title":"Log-likelihood computation for distance sampling data — flnl","text":"specific set parameter values, computes returns negative log-likelihood distance sampling likelihood distances unbinned, binned mixture . function flnl function minimized using optim within ddf.ds.","code":""},{"path":"/reference/flnl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Log-likelihood computation for distance sampling data — flnl","text":"","code":"flnl(fpar, ddfobj, misc.options, fitting = \"all\")"},{"path":"/reference/flnl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Log-likelihood computation for distance sampling data — flnl","text":"fpar parameter values detection function negative log-likelihood evaluated ddfobj distance sampling object misc.options list following elements: width transect width; int.range integration range observations; showit 0 3 controls level debug output; integral.numeric TRUE integral computed numerically rather analytically; point point transect? fitting character \"key\" fitting key function parameters, \"adjust\" fitting adjustment parameters \"\" fit ","code":""},{"path":"/reference/flnl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Log-likelihood computation for distance sampling data — flnl","text":"negative log-likelihood value parameter values specified fpar","code":""},{"path":"/reference/flnl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Log-likelihood computation for distance sampling data — flnl","text":"computation flpt.lnl negative log-likelihood computed observation. flnl wrapper optionally outputs intermediate results sums individual log-likelihood values. flnl main routine manipulates parameters using getpar handle fitting key, adjustment parameters. calls flpt.lnl actual computation likelihood. probability density function point counts fr line transects fx. fx=g(x)/mu (g(x) detection function); whereas, f(r)=r*g(r)/mu mu cases normalizing constant. functions source code file link{detfct} called distpdf integral calculations made integratepdf.","code":""},{"path":"/reference/flnl.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Log-likelihood computation for distance sampling data — flnl","text":"internal functions used ddf.ds fit distance sampling detection functions. intended user invoke functions documented completeness.","code":""},{"path":[]},{"path":"/reference/flnl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Log-likelihood computation for distance sampling data — flnl","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/flt.var.html","id":null,"dir":"Reference","previous_headings":"","what":"Hessian computation for fitted distance detection function model parameters — flt.var","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"Computes hessian used variance-covariance matrix. hessian outer product vector first partials (see pg 62 Buckland et al 2002).","code":""},{"path":"/reference/flt.var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"","code":"flt.var(ddfobj, misc.options)"},{"path":"/reference/flt.var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"ddfobj distance sampling object misc.options width-transect width (W); int.range-integration range observations; showit-0 3 controls level iteration printing; integral.numeric-TRUE integral computed numerically rather analytically","code":""},{"path":"/reference/flt.var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"variance-covariance matrix parameters detection function","code":""},{"path":"/reference/flt.var.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"internal function used ddf.ds fit distance sampling detection functions. intended user invoke function documented completeness.","code":""},{"path":"/reference/flt.var.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"Buckland et al. 2002","code":""},{"path":[]},{"path":"/reference/flt.var.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/g0.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute value of p(0) using a logit formulation — g0","title":"Compute value of p(0) using a logit formulation — g0","text":"Compute value p(0) using logit formulation","code":""},{"path":"/reference/g0.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute value of p(0) using a logit formulation — g0","text":"","code":"g0(beta, z)"},{"path":"/reference/g0.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute value of p(0) using a logit formulation — g0","text":"beta logistic parameters z design matrix covariate values","code":""},{"path":"/reference/g0.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute value of p(0) using a logit formulation — g0","text":"vector p(0) values","code":""},{"path":"/reference/g0.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute value of p(0) using a logit formulation — g0","text":"Jeff Laake","code":""},{"path":"/reference/getpar.html","id":null,"dir":"Reference","previous_headings":"","what":"Extraction and assignment of parameters to vector — getpar","title":"Extraction and assignment of parameters to vector — getpar","text":"Extracts parameters particular type (scale, shape, adjustments g0 (p(0))) vector parameters ddfobj. parameters kept single vector optimization even though different uses. assign.par parses vector based known structure assigns ddfobj. getpar extracts requested types extracted ddfobj.","code":""},{"path":"/reference/getpar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extraction and assignment of parameters to vector — getpar","text":"","code":"getpar(ddfobj, fitting = \"all\", index = FALSE)"},{"path":"/reference/getpar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extraction and assignment of parameters to vector — getpar","text":"ddfobj distance sampling object (see create.ddfobj) fitting character string either \"\",\"key\",\"adjust\" determines parameters retrieved index logical determines whether parameters returned (FALSE) starting indices parameter vector scale, shape, adjustment parameters","code":""},{"path":"/reference/getpar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extraction and assignment of parameters to vector — getpar","text":"index==FALSE, vector parameters requested index==TRUE, vector 3 indices shape, scale, adjustment","code":""},{"path":"/reference/getpar.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extraction and assignment of parameters to vector — getpar","text":"Internal functions intended called user.","code":""},{"path":[]},{"path":"/reference/getpar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extraction and assignment of parameters to vector — getpar","text":"Jeff Laake","code":""},{"path":"/reference/gof.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute chi-square goodness-of-fit test for ds models — gof.ds","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"Compute chi-square goodness--fit test ds models","code":""},{"path":"/reference/gof.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"","code":"gof.ds(model, breaks = NULL, nc = NULL)"},{"path":"/reference/gof.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"model ddf model object breaks distance cut points nc number distance classes","code":""},{"path":"/reference/gof.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"list chi-square value, df p-value","code":""},{"path":[]},{"path":"/reference/gof.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"Jeff Laake","code":""},{"path":"/reference/gstdint.html","id":null,"dir":"Reference","previous_headings":"","what":"Integral of pdf of distances — gstdint","title":"Integral of pdf of distances — gstdint","text":"Computes integral distpdf scale=1 (stdint=TRUE) specified scale (stdint=FALSE).","code":""},{"path":"/reference/gstdint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Integral of pdf of distances — gstdint","text":"","code":"gstdint( x, ddfobj, index = NULL, select = NULL, width, standardize = TRUE, point = FALSE, stdint = TRUE, doeachint = FALSE, left = left )"},{"path":"/reference/gstdint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Integral of pdf of distances — gstdint","text":"x lower, upper value integration ddfobj distance detection function specification index specific data row index select logical vector selection data values width truncation width standardize TRUE, divide function evaluated 0 point logical determine point (TRUE) line transect(FALSE) stdint TRUE, scale=1 otherwise specified scale used doeachint TRUE perform integration using integrate left left truncation width","code":""},{"path":"/reference/gstdint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Integral of pdf of distances — gstdint","text":"vector integral values detection function","code":""},{"path":"/reference/gstdint.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Integral of pdf of distances — gstdint","text":"internal function intended invoked directly.","code":""},{"path":"/reference/gstdint.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Integral of pdf of distances — gstdint","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/histline.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot histogram line — histline","title":"Plot histogram line — histline","text":"Takes bar heights (height) cutpoints (breaks), constructs line-histogram using function plot() (lineonly==FALSE) lines() (lineonly==TRUE).","code":""},{"path":"/reference/histline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot histogram line — histline","text":"","code":"histline( height, breaks, lineonly = FALSE, outline = FALSE, ylim = range(height), xlab = \"x\", ylab = \"y\", det.plot = FALSE, add = FALSE, ... )"},{"path":"/reference/histline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot histogram line — histline","text":"height heights histogram bars breaks cutpoints x lineonly TRUE, drawn plot; otherwise lines allow addition current plot outline TRUE, outline histogram plotted ylim limits y axis xlab label x axis ylab label y axis det.plot TRUE, plot detection yaxis limited unit interval add plot add previous window ... Additional unspecified arguments plot","code":""},{"path":"/reference/histline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot histogram line — histline","text":"None","code":""},{"path":"/reference/histline.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot histogram line — histline","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/integratedetfct.logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Integrate a logistic detection function — integratedetfct.logistic","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"Integrates logistic detection function; separate function used certain cases integral can solved analytically also scale trick used half-normal hazard rate work logistic.","code":""},{"path":"/reference/integratedetfct.logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"","code":"integratedetfct.logistic(x, scalemodel, width, theta1, integral.numeric, w)"},{"path":"/reference/integratedetfct.logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"x logistic design matrix values scalemodel scale model logistic width transect width theta1 parameters logistic integral.numeric TRUE computes numerical integral value w design covariates","code":""},{"path":"/reference/integratedetfct.logistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"vector integral values","code":""},{"path":"/reference/integratedetfct.logistic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"Jeff Laake","code":""},{"path":"/reference/integratelogistic.analytic.html","id":null,"dir":"Reference","previous_headings":"","what":"Analytically integrate logistic detection function — integratelogistic.analytic","title":"Analytically integrate logistic detection function — integratelogistic.analytic","text":"Computes integral (analytically) x 0 width logistic detection function; reference see integral #526 CRC Std Math Table 24th ed","code":""},{"path":"/reference/integratelogistic.analytic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analytically integrate logistic detection function — integratelogistic.analytic","text":"","code":"integratelogistic.analytic(x, models, beta, width)"},{"path":"/reference/integratelogistic.analytic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analytically integrate logistic detection function — integratelogistic.analytic","text":"x matrix data models list model formulae beta parameters logistic detection function width transect half-width","code":""},{"path":"/reference/integratelogistic.analytic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Analytically integrate logistic detection function — integratelogistic.analytic","text":"Jeff Laake","code":""},{"path":"/reference/integratepdf.grad.html","id":null,"dir":"Reference","previous_headings":"","what":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"Gradient integral detection function, .e., d beta/d theta documentation. gradient integral integral gradient, thanks Leibniz integral rule.","code":""},{"path":"/reference/integratepdf.grad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"","code":"integratepdf.grad( par.index, ddfobj, int.range, width, standardize = FALSE, point = FALSE, left = 0, pdf.based = TRUE )"},{"path":"/reference/integratepdf.grad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"par.index index parameter interest ddfobj ddf object int.range vector lower upper bound integration width truncation width standardize TRUE non-standardised detection function integrated. implemented standardize = FALSE, users touch argument can probably removed. point data point transects (TRUE) line transects (FALSE). left left truncation. Defaults zero. pdf.based evaluate non-normalised pdf detection function? Default TRUE.","code":""},{"path":"/reference/integratepdf.grad.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"internal use – called mrds Distance users directly.","code":""},{"path":"/reference/integratepdf.grad.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"Felix Petersma","code":""},{"path":"/reference/integratepdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"Computes integral pdf observed distances x observation. method computation depends argument switches set type detection function.","code":""},{"path":"/reference/integratepdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"","code":"integratepdf( ddfobj, select, width, int.range, standardize = TRUE, point = FALSE, left = 0, doeachint = FALSE )"},{"path":"/reference/integratepdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"ddfobj distance detection function specification select logical vector selection data values width truncation width int.range integration range matrix; vector converted matrix standardize logical used decide whether divide function evaluated 0 point logical determine point count (TRUE) line transect (FALSE) left left truncation width doeachint calculate integral numerically","code":""},{"path":"/reference/integratepdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"vector integral values - one observation","code":""},{"path":"/reference/integratepdf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"Jeff Laake & Dave Miller","code":""},{"path":"/reference/io.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Iterative offset GLM/GAM for fitting detection function — io.glm","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"Provides iterative algorithm finding MLEs detection (capture) probabilities two-occasion (double observer) mark-recapture experiment using standard algorithms GLM/GAM offset compensate conditioning set observations. likelihood can formulated solved numerically, use GLM/GAM provides available tools fitting, predictions, plotting etc without development.","code":""},{"path":"/reference/io.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"","code":"io.glm( datavec, fitformula, eps = 1e-05, iterlimit = 500, GAM = FALSE, gamplot = TRUE )"},{"path":"/reference/io.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"datavec dataframe fitformula logit link formula eps convergence criterion iterlimit maximum number iterations allowed GAM uses GAM instead GLM fitting gamplot set TRUE get gam plot object GAM=TRUE","code":""},{"path":"/reference/io.glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"list class(\"ioglm\",\"glm\",\"lm\") class(\"ioglm\",\"gam\") glmobj GLM GAM object offsetvalue offsetvalues iterative fit plotobj gam plot object (GAM & gamplot==TRUE, else NULL)","code":""},{"path":"/reference/io.glm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"Note currently code function GAMs commented remainder mrds package work GAMs. internal function used ddf.io.fi fit mark-recapture models 2 occasions. argument mrmodel used fitformula.","code":""},{"path":"/reference/io.glm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"Buckland, S.T., J.M. breiwick, K.L. Cattanach, J.L. Laake. 1993. Estimated population size California gray whale. Marine Mammal Science, 9:235-249. Burnham, K.P., S.T. Buckland, J.L. Laake, D.L. Borchers, T.. Marques, J.R.B. Bishop, L. Thomas. 2004. topics distance sampling. pp: 360-363. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":"/reference/io.glm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"Jeff Laake, David Borchers, Charles Paxton","code":""},{"path":"/reference/is.linear.logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Collection of functions for logistic detection functions — is.linear.logistic","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"functions used test whether logistic detection function linear function distance (.linear.logistic) constant (varies distance covariates) .logistic.constant). Based tests, appropriate manner integrating detection function respect distance chosen. integrals needed estimate average detection probability given set covariates.","code":""},{"path":"/reference/is.linear.logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"","code":"is.linear.logistic(xmat, g0model, zdim, width)"},{"path":"/reference/is.linear.logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"xmat data matrix g0model logit model zdim number columns design matrix width transect width","code":""},{"path":"/reference/is.linear.logistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"Logical TRUE condition holds FALSE otherwise","code":""},{"path":"/reference/is.linear.logistic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"logit linear distance integral can computed analytically. logit constant varies distance one integral needs computed rather integral observation.","code":""},{"path":"/reference/is.linear.logistic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"Jeff Laake","code":""},{"path":"/reference/is.logistic.constant.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a logit model constant for all observations? — is.logistic.constant","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"Determines whether specified logit model constant observations. constant one integral needs computed.","code":""},{"path":"/reference/is.logistic.constant.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"","code":"is.logistic.constant(xmat, g0model, width)"},{"path":"/reference/is.logistic.constant.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"xmat data g0model logit model width transect width","code":""},{"path":"/reference/is.logistic.constant.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"logical value","code":""},{"path":"/reference/is.logistic.constant.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"Jeff Laake","code":""},{"path":"/reference/keyfct.grad.hn.html","id":null,"dir":"Reference","previous_headings":"","what":"The gradient of the half-normal key function — keyfct.grad.hn","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"key function contains one parameter, scale. Current implementation assumes scaled dist x/scale, x/width","code":""},{"path":"/reference/keyfct.grad.hn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"","code":"keyfct.grad.hn(distance, key.scale)"},{"path":"/reference/keyfct.grad.hn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"distance perpendicular distance vector key.scale vector scale values","code":""},{"path":"/reference/keyfct.grad.hn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"vector derivatives half-normal key function w.r.t. scale parameter","code":""},{"path":"/reference/keyfct.grad.hn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"d key / d scale = exp(-y ^ 2 / (2 scale ^ 2)) * (y ^ 2 / scale ^ 3)","code":""},{"path":"/reference/keyfct.grad.hz.html","id":null,"dir":"Reference","previous_headings":"","what":"The gradient of the hazard-rate key function — keyfct.grad.hz","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"key function contains two parameters, scale shape, gradient two-dimensional. Current implementation assumes scaled dist x/scale, x/width","code":""},{"path":"/reference/keyfct.grad.hz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"","code":"keyfct.grad.hz(distance, key.scale, key.shape, shape = FALSE)"},{"path":"/reference/keyfct.grad.hz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"distance perpendicular distance vector key.scale vector scale values key.shape vector shape values shape gradient parameter shape parameter? Defaults FALSE","code":""},{"path":"/reference/keyfct.grad.hz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"matrix derivatives hazard rate key function w.r.t. scale parameter shape parameter.","code":""},{"path":"/reference/keyfct.grad.hz.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"d key / d scale = (shape * exp(-(1/ (x/scale) ^ shape)) / ((x/scale) ^ shape ) * scale) d key / d shape = - ((log(x / scale) * exp(-(1/ (x/scale) ^ shape))) / (x/scale) ^ shape) distance = 0, gradients also zero. However, equation result NaN (-)Inf due operations log(0) division zero. correct line 33.","code":""},{"path":"/reference/keyfct.th1.html","id":null,"dir":"Reference","previous_headings":"","what":"Threshold key function — keyfct.th1","title":"Threshold key function — keyfct.th1","text":"Threshold key function","code":""},{"path":"/reference/keyfct.th1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Threshold key function — keyfct.th1","text":"","code":"keyfct.th1(distance, key.scale, key.shape)"},{"path":"/reference/keyfct.th1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Threshold key function — keyfct.th1","text":"distance perpendicular distance vector key.scale vector scale values key.shape vector shape values","code":""},{"path":"/reference/keyfct.th1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Threshold key function — keyfct.th1","text":"vector probabilities","code":""},{"path":"/reference/keyfct.th2.html","id":null,"dir":"Reference","previous_headings":"","what":"Threshold key function — keyfct.th2","title":"Threshold key function — keyfct.th2","text":"Threshold key function","code":""},{"path":"/reference/keyfct.th2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Threshold key function — keyfct.th2","text":"","code":"keyfct.th2(distance, key.scale, key.shape)"},{"path":"/reference/keyfct.th2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Threshold key function — keyfct.th2","text":"distance perpendicular distance vector key.scale vector scale values key.shape vector shape values","code":""},{"path":"/reference/keyfct.th2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Threshold key function — keyfct.th2","text":"vector probabilities","code":""},{"path":"/reference/keyfct.tpn.html","id":null,"dir":"Reference","previous_headings":"","what":"Two-part normal key function — keyfct.tpn","title":"Two-part normal key function — keyfct.tpn","text":"two-part normal detection function Becker Christ (2015). Either side estimated apex distance histogram half-normal distribution, differing scale parameters. Covariates may included affect sides function.","code":""},{"path":"/reference/keyfct.tpn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Two-part normal key function — keyfct.tpn","text":"","code":"keyfct.tpn(distance, ddfobj)"},{"path":"/reference/keyfct.tpn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Two-part normal key function — keyfct.tpn","text":"distance perpendicular distance vector ddfobj meta object containing parameters, design matrices etc","code":""},{"path":"/reference/keyfct.tpn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Two-part normal key function — keyfct.tpn","text":"vector probabilities observation detected given specified distance assuming g(mu)=1","code":""},{"path":"/reference/keyfct.tpn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Two-part normal key function — keyfct.tpn","text":"Two-part normal models 2 important parameters: apex, estimates peak detection function ( g(x)=1). log apex reported summary results, taking exponential value give peak plotted function (see examples). parameter controls difference sides .dummy_apex_side, automatically added formula two-part normal model. One can add interactions variable normal, need add main effect automatically added.","code":""},{"path":"/reference/keyfct.tpn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Two-part normal key function — keyfct.tpn","text":"Becker, E. F., & Christ, . M. (2015). Unimodal Model Double Observer Distance Sampling Surveys. PLOS ONE, 10(8), e0136403. doi:10.1371/journal.pone.0136403","code":""},{"path":"/reference/keyfct.tpn.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Two-part normal key function — keyfct.tpn","text":"Earl F Becker, David L Miller","code":""},{"path":"/reference/lfbcvi.html","id":null,"dir":"Reference","previous_headings":"","what":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"data represent avian point count surveys conducted 453 point sample survey locations 24,000 (approx) live-fire region Fort Hood central Texas. Surveys conducted independent double observers (2 per survey occasion) maximum 3 paired survey histories, giving maximum 6 sample occasions (see MacKenzie et al. 2006, MacKenzie Royle 2005, Laake et al. 2011 various sample survey design details). point, surveyed 5 minutes (technically broken 3 time intervals 2, 2, 1 minutes; used ) noted detections observer collected distance observation within set distance bins (0-25, 25-50, 50-75, 75-100m) target species (Black-capped vireo's case) surveyor. primary focus use mark-recapture distance sampling methods estimate density Black-capped vireo's, estimate detection rates mark-recapture, distance, composite model.","code":""},{"path":"/reference/lfbcvi.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"format data frame following covariate metrics. VisitNumber Visit number point Species Species designation, either Golden-cheeked warbler (GW) Black-capped Vireo (BV) Distance Distance measure, either NA (representing detection), median binned detection distances PairNumber ID value indicating observers paired sampling occasion Observer Observer ID, either primary(1), secondary (2) Detected Detection bird, either 1 = detected, 0 = detected Date Date survey since 15 march 2011 Pred Predicted occupancy value survey hexagon based Farrell et al. (2013) Category Region.Label categorization, see mrds help file details data structure Effort Amount survey effort point Day Number days since 15 March 2011 ObjectID Unique ID paired observations","code":""},{"path":"/reference/lfbcvi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"addition detailing analysis used Collier et al. (2013, Review), example documents use mrds avian point count surveys shows density models can incorporated occupancy models develop spatially explicit density surface maps. interested, distance sampling portion analysis, used conventional distance sampling (cds) multiple covariate distance sampling (mcds) uniform half-normal key functions. mark-recapture portion analysis, tended use covariates distance (median bin width), observer, date survey (days since 15 March 2011). combined mrds density estimates via Horvitz-Thompson styled estimator resource selection function gradient developed Farrell et al. (2013) estimated density ~3.14ha hexagonal grid across study area, provided density gradient Fort Hood military installation. considerable data manipulation needed analysis structure data appropriately use mrds, rather wrap analysis single function, provided Golden-cheeked warbler Black-capped vireo analyses full detail. primary differences see changes model structures model outputs two species.","code":""},{"path":"/reference/lfbcvi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"Farrell, S.F., B.. Collier, K.L. Skow, .M. Long, .J. Campomizzi, M.L. Morrison, B. Hays, R.N. Wilkins. 2013. Using LiDAR-derived structural vegetation characteristics develop high-resolution, small-scale, species distribution models conservation planning. Ecosphere 43(3): 42. http://dx.doi.org/10.1890/ES12-000352.1 Laake, J.L., B.. Collier, M.L. Morrison, R.N. Wilkins. 2011. Point-based mark recapture distance sampling. Journal Agricultural, Biological Environmental Statistics 16: 389-408. Collier, B.., S.L. Farrell, K.L. Skow, . M. Long, .J. Campomizzi, K.B. Hays, J.L. Laake, M.L. Morrison, R.N. Wilkins. 2013. Spatially explicit density endangered avian species disturbed landscape. Auk, Review.","code":""},{"path":"/reference/lfbcvi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"Bret Collier Jeff Laake","code":""},{"path":[]},{"path":"/reference/lfgcwa.html","id":null,"dir":"Reference","previous_headings":"","what":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"data represent avian point count surveys conducted 453 point sample survey locations 24,000 (approx) live-fire region Fort Hood central Texas. Surveys conducted independent double observers (2 per survey occasion) maximum 3 paired survey histories, giving maximum 6 sample occasions (see MacKenzie et al. 2006, MacKenzie Royle 2005, Laake et al. 2011 various sample survey design details). point, surveyed 5 minutes (technically broken 3 time intervals 2, 2, 1 minutes; used ) noted detections observer collected distance observation within set distance bins (0-50, 50-100m; Laake et al. 2011) target species (Golden-cheeked warblers case) surveyor. primary focus use mark-recapture distance sampling methods estimate density Golden-cheeked warblers, estimate detection rates mark-recapture, distance, composite model.","code":""},{"path":"/reference/lfgcwa.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"format data frame following covariate metrics. VisitNumber Visit number point Species Species designation, either Golden-cheeked warbler (GW) Black-capped Vireo (BV) Distance Distance measure, either NA (representing detection), median binned detection distances PairNumber ID value indicating observers paired sampling occasion Observer Observer ID, either primary(1), secondary (2) Detected Detection bird, either 1 = detected, 0 = detected Date Date survey since 15 March 2011, numeric value Pred Predicted occupancy value survey hexagon based Farrell et al. (2013) Category Region.Label categorization, see R package mrds help file details data structure Effort Amount survey effort point Day Number days since 15 March 2011, numeric value ObjectID Unique ID paired observations","code":""},{"path":"/reference/lfgcwa.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"addition detailing analysis used Collier et al. (2013, Review), example documents use mrds avian point count surveys shows density models can incorporated occupancy models develop spatially explicit density surface maps. interested, distance sampling portion analysis, used conventional distance sampling (cds) multiple covariate distance sampling (mcds) uniform half-normal key functions. mark-recapture portion analysis, tended use covariates distance (median bin width), observer, date survey (days since 15 March 2011). combined mrds density estimates via Horvitz-Thompson styled estimator resource selection function gradient developed Farrell et al. (2013) estimated density ~3.14ha hexagonal grid across study area, provided density gradient Fort Hood. considerable data manipulation needed analysis structure data appropriately use mrds, rather wrap analysis single function, provided Golden-cheeked warbler Black-capped vireo analyses full detail. primary differences see changes model structures model outputs two species.","code":""},{"path":"/reference/lfgcwa.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"Farrell, S.F., B.. Collier, K.L. Skow, .M. Long, .J. Campomizzi, M.L. Morrison, B. Hays, R.N. Wilkins. 2013. Using LiDAR-derived structural vegetation characteristics develop high-resolution, small-scale, species distribution models conservation planning. Ecosphere 43(3): 42. http://dx.doi.org/10.1890/ES12-000352.1 Laake, J.L., B.. Collier, M.L. Morrison, R.N. Wilkins. 2011. Point-based mark recapture distance sampling. Journal Agricultural, Biological Environmental Statistics 16: 389-408. Collier, B.., S.L. Farrell, K.L. Skow, .M. Long, .J. Campomizzi, K.B. Hays, J.L. Laake, M.L. Morrison, R.N. Wilkins. 2013. Spatially explicit density endangered avian species disturbed landscape. Auk, Review.","code":""},{"path":"/reference/lfgcwa.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"Bret Collier Jeff Laake","code":""},{"path":[]},{"path":"/reference/logisticbyx.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic as a function of covariates — logisticbyx","title":"Logistic as a function of covariates — logisticbyx","text":"treats logistic function covariates; given covariate combination computes function covariate values range distances","code":""},{"path":"/reference/logisticbyx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic as a function of covariates — logisticbyx","text":"","code":"logisticbyx(distance, x, models, beta, point)"},{"path":"/reference/logisticbyx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic as a function of covariates — logisticbyx","text":"distance vector distance values x covariate data models model list beta logistic parameters point TRUE point transect model","code":""},{"path":"/reference/logisticbyx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logistic as a function of covariates — logisticbyx","text":"vector probabilities","code":""},{"path":"/reference/logisticbyx.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logistic as a function of covariates — logisticbyx","text":"Jeff Laake","code":""},{"path":"/reference/logisticbyz.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic as a function of distance — logisticbyz","title":"Logistic as a function of distance — logisticbyz","text":"Treats logistic function distance; given distance computes function covariate values data.","code":""},{"path":"/reference/logisticbyz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic as a function of distance — logisticbyz","text":"","code":"logisticbyz(x, distance, models, beta)"},{"path":"/reference/logisticbyz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic as a function of distance — logisticbyz","text":"x covariate data distance single distance value models model list beta logistic parameters","code":""},{"path":"/reference/logisticbyz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logistic as a function of distance — logisticbyz","text":"vector probabilities","code":""},{"path":"/reference/logisticbyz.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logistic as a function of distance — logisticbyz","text":"Jeff Laake","code":""},{"path":"/reference/logisticdetfct.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic detection function — logisticdetfct","title":"Logistic detection function — logisticdetfct","text":"Logistic detection function","code":""},{"path":"/reference/logisticdetfct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic detection function — logisticdetfct","text":"","code":"logisticdetfct(distance, theta, w, std = FALSE)"},{"path":"/reference/logisticdetfct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic detection function — logisticdetfct","text":"distance perpendicular distance vector theta scale parameters w scale covariate matrix std TRUE uses scale=1 routine returns vector probabilities observation detected given specified distance assuming g(0)=1 (ie standard line transect detection function).","code":""},{"path":"/reference/logisticdupbyx.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic for duplicates as a function of covariates — logisticdupbyx","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"Treats logistic duplicates function covariate z; given z computes function covariate values range distances.","code":""},{"path":"/reference/logisticdupbyx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"","code":"logisticdupbyx(distance, x1, x2, models, beta, point)"},{"path":"/reference/logisticdupbyx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"distance vector distance values x1 covariate data fct 1 x2 covariate data fct 2 models model list beta logistic parameters point TRUE point transect data","code":""},{"path":"/reference/logisticdupbyx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"vector probabilities","code":""},{"path":"/reference/logisticdupbyx.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"Jeff Laake","code":""},{"path":"/reference/logisticdupbyx_fast.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","title":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","text":"logisticdupbyx, faster distance covariate (interactions distance occur.","code":""},{"path":"/reference/logisticdupbyx_fast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","text":"","code":"logisticdupbyx_fast(distance, x1, x2, models, beta, point, beta_distance)"},{"path":"/reference/logisticdupbyx_fast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","text":"distance vector distance values x1 linear predictor 1, without distance x2 linear predictor 2, without distance models model list beta logistic parameters point TRUE point transect data beta_distance parameter distance","code":""},{"path":"/reference/logisticdupbyx_fast.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","text":"David L Miller","code":""},{"path":"/reference/logit.html","id":null,"dir":"Reference","previous_headings":"","what":"Logit function — logit","title":"Logit function — logit","text":"Computes logit transformation.","code":""},{"path":"/reference/logit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logit function — logit","text":"","code":"logit(p)"},{"path":"/reference/logit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logit function — logit","text":"p probability","code":""},{"path":"/reference/logit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logit function — logit","text":"logit(p) returns [log(p/(1-p)]","code":""},{"path":"/reference/logit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logit function — logit","text":"Jeff Laake","code":""},{"path":"/reference/logLik.ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"log-likelihood value for a fitted detection function — logLik.ddf","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"Extract log-likelihood fitted detection function.","code":""},{"path":"/reference/logLik.ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"","code":"# S3 method for class 'ddf' logLik(object, ...)"},{"path":"/reference/logLik.ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"object fitted detection function model object ... included S3 completeness, ignored","code":""},{"path":"/reference/logLik.ddf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"numeric value giving log-likelihood two attributes: \"df\" \"degrees freedom\" model (number parameters) \"nobs\" number observations used fit model","code":""},{"path":"/reference/logLik.ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"David L Miller","code":""},{"path":"/reference/mcds.html","id":null,"dir":"Reference","previous_headings":"","what":"MCDS function definition — mcds","title":"MCDS function definition — mcds","text":"Creates model formula list multiple covariate distance sampling using values supplied call ddf","code":""},{"path":"/reference/mcds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"MCDS function definition — mcds","text":"","code":"mcds( formula = NULL, key = NULL, adj.series = NULL, adj.order = c(NULL), adj.scale = \"width\", adj.exp = FALSE, shape.formula = ~1 )"},{"path":"/reference/mcds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"MCDS function definition — mcds","text":"formula formula scale function key string identifying key function (currently either \"hn\" (half-normal),\"hr\" (hazard-rate), \"unif\" (uniform) \"gamma\" (gamma distribution) adj.series string identifying adjustment functions cos (Cosine), herm (Hermite polynomials), poly (simple polynomials) NULL adj.order vector order adjustment terms include adj.scale whether scale adjustment terms \"width\" \"scale\" adj.exp TRUE uses exp(adj) adjustment keep f(x)>0 shape.formula formula shape function","code":""},{"path":"/reference/mcds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"MCDS function definition — mcds","text":"formula list used define detection function model fct string \"mcds\" key key function string adj.series adjustment function string adj.order adjustment function orders adj.scale adjustment function scale type formula formula scale function shape.formula formula shape function","code":""},{"path":"/reference/mcds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"MCDS function definition — mcds","text":"Jeff Laake; Dave Miller","code":""},{"path":"/reference/mcds_dot_exe.html","id":null,"dir":"Reference","previous_headings":"","what":"Run MCDS.exe as a backend for mrds — MCDS.exe","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"Rather use R-based detection function fitting algorithms provided `mrds`, one can also use algorithm used Distance Windows, implemented binary file `MCDS.exe`. Note changes R-based optimizer introduced `mrds` version 3.0.0 unlikely result better estimates. option remains available, although may deprecated future release. make use facility, one must first download `MCDS.exe` binary, laid `Obtaining MCDS.exe`. binary installed, calls `ddf` , default, result using model fit using `MCDS.exe` R-based algorithm, one lower negative log-likelihood selected. almost cases, algorithms produce results, found edge one fails find likelihood maximum hence trying useful.","code":""},{"path":"/reference/mcds_dot_exe.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"may also cases `MCDS.exe` algorithm faster R-based one. circumstance, can choose run `MCDS.exe` algorithm via setting `ddf` argument control=list(optimizer='MCDS'). completeness, one can also choose use R-based algorithm setting control=list(optimizer='R'). information examples comparing R-based `MCDS.exe` algorithms, see examples pages https://examples.distancesampling.org/ running non-Windows operating system, can follow instructions `MCDS.exe` run using `wine`.","code":""},{"path":"/reference/mcds_dot_exe.html","id":"obtaining-mcds-exe","dir":"Reference","previous_headings":"","what":"Obtaining MCDS.exe","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"following code can used download `MCDS.exe` distance sampling website: download.file(\"http://distancesampling.org/R/MCDS.exe\", paste0(system.file(package=\"mrds\"),\"/MCDS.exe\"), mode = \"wb\") MCDS binary installed main directory local R mrds library. Alternatively, can copy `MCDS.exe` local Distance Windows installation prefer. location local mrds library main directory can found running following R: system.file(\"MCDS.exe\", package=\"mrds\").","code":""},{"path":"/reference/mcds_dot_exe.html","id":"running-mcds-exe-on-non-windows-platforms","dir":"Reference","previous_headings":"","what":"Running MCDS.exe on non-Windows platforms","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"tentatively tested mac currently considered largely experimental. One can still use MCDS.exe even running mac computer. one need install `wine` Windows emulator. important use version `wine` can run 32-bit programs. package attempt work `wine` binary use (detect installed), always work. case, location `wine` binary can specified `control` `list` provided `ddf` using `winebin` element supply `winebin` argument `ds` function. example, `wine` installed `/usr/bin/local/wine` can set `control$winebin` location use binary. macOS, can achieved using `homebrew` package management system installing `wine-crossover` package. may need change control$winebin `wine`, `wine64` `wine32on64`, depending system's setup. package tries work , likely handle corner cases. Currently untested Mac M1 systems.","code":""},{"path":"/reference/mcds_dot_exe.html","id":"stopping-using-mcds-exe","dir":"Reference","previous_headings":"","what":"Stopping using MCDS.exe","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"feature enabled, using `ddf` default run built-R optimizer `MCDS.exe`. disable behaviour, specify wish use via optimizer= option described . Alternatively, wish permanently stop using MCDS.exe, remove `MCDS.exe` binary file. can find folder running following R: system.file(\"MCDS.exe\", package=\"mrds\").","code":""},{"path":"/reference/mcds_dot_exe.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"David L Miller Jonah McArthur","code":""},{"path":"/reference/mrds-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (mrds) — mrds-package","title":"Mark-Recapture Distance Sampling (mrds) — mrds-package","text":"package implements mark-recapture distance sampling methods described D.L. Borchers, W. Zucchini Fewster, R.M. (1988), \"Mark-recapture models line transect surveys\", Biometrics 54: 1207-1220. Laake, J.L. (1999) \"Distance sampling independent observers: Reducing bias heterogeneity weakening conditional independence assumption.\" Amstrup, G.W., Garner, S.C., Laake, J.L., Manly, B.F.J., McDonald, L.L. Robertson, D.G. (eds) \"Marine mammal survey assessment methods\", Balkema, Rotterdam: 137-148 Borchers, D.L., Laake, J.L., Southwell, C. Paxton, C.L.G. \"Accommodating unmodelled heterogeneity double-observer distance sampling surveys\". 2006. Biometrics 62:372-378.)","code":""},{"path":"/reference/mrds-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (mrds) — mrds-package","text":"Examples distance sampling analyses available http://examples.distancesampling.org/. help distance sampling package, Google Group https://groups.google.com/forum/#!forum/distance-sampling.","code":""},{"path":"/reference/mrds-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (mrds) — mrds-package","text":"Jeff Laake , David Borchers , Len Thomas , David L. Miller , Jon Bishop , Felix Petersma ","code":""},{"path":"/reference/mrds_opt.html","id":null,"dir":"Reference","previous_headings":"","what":"Tips on optimisation issues in mrds models — mrds_opt","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"Occasionally fitting `mrds` model one can run optimisation issues. general problems can quite complex \"quick fixes\" may work. come problems fixed tips, feel results dubious please go ahead contact package authors.","code":""},{"path":"/reference/mrds_opt.html","id":"debug-mode","dir":"Reference","previous_headings":"","what":"Debug mode","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"One can obtain debug output stage optimisation using showit option. set via control, adding control=list(showit=3) gives highest level debug output (setting showit 1 2 gives less output).","code":""},{"path":"/reference/mrds_opt.html","id":"re-scaling-covariates","dir":"Reference","previous_headings":"","what":"Re-scaling covariates","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"Sometimes convergence issues covariate (MCDS) models caused values covariate large, rescaling covariate necessary. Simply scaling standard deviation covariate can help (e.g. dat$size.scaled <- dat$scale/sd(dat$scale) covariate size, including size.scaled model instead size). important note one needs use original covariate (size) computing Horvitz-Thompson estimates population size group size used estimate. .e. use unscaled size numerator H-T estimator.","code":""},{"path":"/reference/mrds_opt.html","id":"factor-levels","dir":"Reference","previous_headings":"","what":"Factor levels","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"default R set base factor level label comes first alphabetically. Sometimes can issue factor level corresponds subset data observations. can lead large uncertainty estimates (CVs) model parameters. One way around use relevel set base level level observations.","code":""},{"path":"/reference/mrds_opt.html","id":"initial-values","dir":"Reference","previous_headings":"","what":"Initial values","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"Initial (starting) values dsmodel can set via initial element control list. initial list elements scale, shape adjustment, corresponding associated parameters. model covariates scale shape elements vectors parameter initial values order specific model formula (using showit good check correct order). Adjustment starting values order order term (cosine order 2 cosine order 3 terms). One way obtaining starting values fit simpler model first (say fewer covariates adjustments) use starting values simpler model corresponding parameters. Another alternative obtain starting values fit model (submodel) using Distance Windows. Note Distance reports scale parameter (intercept covariate model) exponential scale, one must log supplying ddf.","code":""},{"path":"/reference/mrds_opt.html","id":"bounds","dir":"Reference","previous_headings":"","what":"Bounds","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"One can change upper lower bounds dsmodel parameters. specify largest smallest values individual parameters can . placing constraints parameters, possible \"temper\" optimisation problem, making fitting possible. , one uses control list, elements upperbounds lowerbounds. case, upperbounds lowerbounds vectors, one can think vectors shape, scale adjustment \"Initial values\" section , concatenated order. one occur (e.g. shape parameter) simple omitted vector.","code":""},{"path":"/reference/mrds_opt.html","id":"conventional-distance-sampling-optimizer-choice","dir":"Reference","previous_headings":"","what":"Conventional distance sampling optimizer choice","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"key function plus adjustment approach Conventional Distance Sampling (CDS) can sometimes run issues sensible constrain fitted detection function monotonic non-increasing (.e., flat going ) increasing distance - finding maximum constrained likelihood difficult task without constraints. several options within `ddf` control argument may help difficulties encountered. documented ddf manual page, mentioned . One potential strategy (mentioned ) use better starting values optimization. mono.startvals set TRUE detection function first fit without adjustments resulting scale (shape) estimates used starting values model adjustments. even finer control, initial option can used documented . Another potential thing change constraint solver used. `mrds` v 3.0.0 new constraint solver, `slsqp`, included default. found work better solver previously used (`solnp`) needed solver can specified using mono.method option control argument `ddf`. also possible use optimizer implemented Distance Windows downloading separate binary - see manual page mcds_dot_exe. specified, also used Multiple Covariate Distance Sampling (MCDS) analyses.","code":""},{"path":"/reference/mrds_opt.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"David L. Miller ","code":""},{"path":"/reference/NCovered.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute estimated abundance in covered (sampled) region — NCovered","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"Generic function computes abundance within covered region. calls method (class) specific functions computation.","code":""},{"path":"/reference/NCovered.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"","code":"NCovered(par, model = NULL, group = TRUE)"},{"path":"/reference/NCovered.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"par parameter values (used computing derivatives wrt parameter uncertainty); NULL parameter values model used model ddf model object group TRUE computes group abundance FALSE individual abundance","code":""},{"path":"/reference/NCovered.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"abundance estimate","code":""},{"path":"/reference/NCovered.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"Jeff Laake","code":""},{"path":"/reference/nlminb_wrapper.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper around nlminb — nlminb_wrapper","title":"Wrapper around nlminb — nlminb_wrapper","text":"wrapper around nlminb use scaling, available optimx.","code":""},{"path":"/reference/nlminb_wrapper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper around nlminb — nlminb_wrapper","text":"","code":"nlminb_wrapper( par, ll, ugr = NULL, lower = NULL, upper = NULL, mcontrol, hess = NULL, ddfobj, data, ... )"},{"path":"/reference/nlminb_wrapper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper around nlminb — nlminb_wrapper","text":"par starting parameters ll log likelihood function ugr gradient function lower lower bounds parameters upper upper bounds parameters mcontrol control options hess hessian function ddfobj detection function specification object data data ... anything else pass ll","code":""},{"path":"/reference/nlminb_wrapper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper around nlminb — nlminb_wrapper","text":"optimx object","code":""},{"path":"/reference/nlminb_wrapper.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper around nlminb — nlminb_wrapper","text":"David L Miller, modified optimx.run JC Nash, R Varadhan, G Grothendieck.","code":""},{"path":"/reference/p.det.html","id":null,"dir":"Reference","previous_headings":"","what":"Double-platform detection probability — p.det","title":"Double-platform detection probability — p.det","text":"Computes detection probability detection function computed mark-recapture data possibly different link functions.","code":""},{"path":"/reference/p.det.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Double-platform detection probability — p.det","text":"","code":"p.det(dpformula, dplink, dppars, dpdata)"},{"path":"/reference/p.det.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Double-platform detection probability — p.det","text":"dpformula formula detection function dplink link function (\"logit\",\"loglog\",\"cloglog\") dppars parameter vector dpdata double platform data","code":""},{"path":"/reference/p.det.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Double-platform detection probability — p.det","text":"vector predicted detection probabilities","code":""},{"path":"/reference/p.det.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Double-platform detection probability — p.det","text":"?????","code":""},{"path":"/reference/p.dist.table.html","id":null,"dir":"Reference","previous_headings":"","what":"Distribution of probabilities of detection — p.dist.table","title":"Distribution of probabilities of detection — p.dist.table","text":"Generate table frequencies probability detection detection function model. particularly useful employing covariates, can indicate detections small detection probabilities can unduly influential calculating abundance estimates.","code":""},{"path":"/reference/p.dist.table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distribution of probabilities of detection — p.dist.table","text":"","code":"p.dist.table(object, bins = seq(0, 1, by = 0.1), proportion = FALSE) p_dist_table(object, bins = seq(0, 1, by = 0.1), proportion = FALSE)"},{"path":"/reference/p.dist.table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distribution of probabilities of detection — p.dist.table","text":"object fitted detection function bins results binned proportion proportions returned well counts?","code":""},{"path":"/reference/p.dist.table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distribution of probabilities of detection — p.dist.table","text":"data.frame probability bins, counts (optionally) proportions. object attribute p_range contains range estimated detection probabilities","code":""},{"path":"/reference/p.dist.table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Distribution of probabilities of detection — p.dist.table","text":"dht uses Horvitz-Thompson-like estimator, abundance estimates can sensitive errors estimated probabilities. estimator based \\(\\sum 1/ \\hat{P}_a(z_i)\\), means sensitivity greater smaller detection probabilities. rough guide, recommend method used say 5% \\(\\hat{P}_a(z_i)\\) less 0.2, less 0.1. conditions violated, truncation distance w can reduced. causes loss precision relative standard distance sampling without covariates.","code":""},{"path":"/reference/p.dist.table.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Distribution of probabilities of detection — p.dist.table","text":"Marques, F.F.C. S.T. Buckland. 2004. Covariate models detection function. : Advanced Distance Sampling, eds. S.T. Buckland, D.R. Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":"/reference/p.dist.table.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Distribution of probabilities of detection — p.dist.table","text":"David L Miller","code":""},{"path":"/reference/p.dist.table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Distribution of probabilities of detection — p.dist.table","text":"","code":"if (FALSE) { # \\dontrun{ # try out the tee data data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe # fit model with covariates result <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~sex+size), data = egdata[egdata$observer==1, ], method = \"ds\", meta.data = list(width = 4)) # print table p.dist.table(result) # with proportions p.dist.table(result, proportion=TRUE) } # }"},{"path":"/reference/parse.optimx.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse optimx results and present a nice object — parse.optimx","title":"Parse optimx results and present a nice object — parse.optimx","text":"Take resulting object call optimx make object mrds wants talk .","code":""},{"path":"/reference/parse.optimx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse optimx results and present a nice object — parse.optimx","text":"","code":"parse.optimx(lt, lnl.last, par.last)"},{"path":"/reference/parse.optimx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse optimx results and present a nice object — parse.optimx","text":"lt optimx object lnl.last last value log likelihood par.last last value parameters","code":""},{"path":"/reference/parse.optimx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse optimx results and present a nice object — parse.optimx","text":"lt object can used later ","code":""},{"path":"/reference/pdot.dsr.integrate.logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","title":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","text":"Computes probability object detected least one observer (pdot p_.) logistic detection function contains distance.","code":""},{"path":"/reference/pdot.dsr.integrate.logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","text":"","code":"pdot.dsr.integrate.logistic( right, width, beta, x, integral.numeric, BT, models, GAM = FALSE, rem = FALSE, point = FALSE )"},{"path":"/reference/pdot.dsr.integrate.logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","text":"right either integration range binned data (vector 2) rightmost value integration (0 right) width transect width beta parameters logistic detection function x data matrix integral.numeric set TRUE unless data binned (done fct) model distance linear (eg distance^2), integral.numeric FALSE compute integral analytically. FALSE .linear.logistic function TRUE. BT FALSE except trial configuration; BT stands Buckland-Turnock initially proposed trial configuration dual observers models list models including g0model GAM used present. idea able use GAM g(0) portion detection function; always F rem TRUE removal configuration used removed pulled function calls. Originally thought pdot integral differ io formula. thing differs removal p(2|1)=1. Observer 2 sees everything seen observer 1, point TRUE point transects","code":""},{"path":"/reference/pdot.dsr.integrate.logistic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","text":"Jeff Laake","code":""},{"path":"/reference/plot.det.tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Observation detection tables — plot.det.tables","title":"Observation detection tables — plot.det.tables","text":"Plot tables created det.tables. Produces series tables dual observer data shows number missed detected observer within defined distance classes.","code":""},{"path":"/reference/plot.det.tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Observation detection tables — plot.det.tables","text":"","code":"# S3 method for class 'det.tables' plot( x, which = 1:6, angle = NULL, density = NULL, col1 = \"white\", col2 = \"lightgrey\", new = TRUE, ... )"},{"path":"/reference/plot.det.tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Observation detection tables — plot.det.tables","text":"x object returned det.tables items x plot (vector values 1:6) angle shading angle hatching density shading density hatching col1 plotting colour total histogram bars. col2 plotting colour subset histogram bars. new TRUE new plotting window plot ... graphical parameters, passed plotting functions","code":""},{"path":"/reference/plot.det.tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Observation detection tables — plot.det.tables","text":"Just plots.","code":""},{"path":"/reference/plot.det.tables.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Observation detection tables — plot.det.tables","text":"Plots produced follows (controlled argument): 1 Detected either observer/Detected observer 1 2 Detected either observer/Detected observer 2 3 Seen observers 4 Seen either observer 5 Detected observer 2/Detected observer 1 | 2 6 Detected observer 1/Detected observer 2 | 1","code":""},{"path":"/reference/plot.det.tables.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Observation detection tables — plot.det.tables","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/plot.det.tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Observation detection tables — plot.det.tables","text":"","code":"# \\donttest{ data(book.tee.data) region <- book.tee.data$book.tee.region egdata <- book.tee.data$book.tee.dataframe samples <- book.tee.data$book.tee.samples obs <- book.tee.data$book.tee.obs xx <- ddf(mrmodel=~glm(formula=~distance*observer), dsmodel = ~mcds(key = \"hn\", formula = ~sex), data = egdata, method = \"io\", meta.data = list(width = 4)) tabs <- det.tables(xx,breaks=c(0,.5,1,2,3,4)) par(mfrow=c(2,3)) plot(tabs,which=1:6,new=FALSE) # }"},{"path":"/reference/plot.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"Plots fitted detection function(s) histogram observed distances compare visually fitted model data.","code":""},{"path":"/reference/plot.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"","code":"# S3 method for class 'ds' plot( x, which = 2, breaks = NULL, nc = NULL, jitter.v = rep(0, 3), showpoints = TRUE, subset = NULL, pl.col = \"lightgrey\", pl.den = NULL, pl.ang = NULL, main = NULL, pages = 0, pdf = FALSE, ylim = NULL, xlab = \"Distance\", ylab = NULL, ... )"},{"path":"/reference/plot.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"x fitted model ddf. index specify plots produced: breaks user defined breakpoints nc number equal width bins histogram jitter.v apply jitter points multiplying fitted value random draw normal distribution mean 1 sd jitter.v. showpoints logical variable; TRUE plots predicted value observation (conditional observed distance). subset subset data plot. pl.col colour histogram bars. pl.den shading density histogram bars. pl.ang shading angle histogram bars. main plot title. pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. pdf plot histogram distances PDF probability detection overlaid. Ignored (warning) line transect models. ylim vertical axis limits. xlab horizontal axis label (defaults \"Distance\"). ylab vertical axis label (default automatically set depending plot type). ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc).","code":""},{"path":"/reference/plot.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"Just plots.","code":""},{"path":"/reference/plot.ds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.ds arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":[]},{"path":"/reference/plot.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.ds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"","code":"# \\donttest{ # fit a model to the tee data data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe xx <- ddf(dsmodel=~mcds(key=\"hn\", formula=~sex), data=egdata[egdata$observer==1, ], method=\"ds\", meta.data=list(width=4)) # not showing predicted probabilities plot(xx, breaks=c(0, 0.5, 1, 2, 3, 4), showpoints=FALSE) # two subsets plot(xx, breaks=c(0, 0.5, 1, 2, 3, 4), subset=sex==0) plot(xx, breaks=c(0, 0.5, 1, 2, 3, 4), subset=sex==1) # put both plots on one page plot(xx, breaks=c(0, 0.5, 1, 2, 3, 4), pages=1, which=1:2) # }"},{"path":"/reference/plot.io.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.io.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"","code":"# S3 method for class 'io.fi' plot( x, which = 1:6, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.io.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"x fitted model ddf index specify plots produced. Note order ignored plots produced order. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.io.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"Just plots.","code":""},{"path":"/reference/plot.io.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.io.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.io.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.io.fi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"","code":"# \\donttest{ library(mrds) data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe result.io.fi <- ddf(mrmodel=~glm(~distance), data = egdata, method = \"io.fi\", meta.data = list(width = 4)) # just plot everything plot(result.io.fi) # Plot primary and secondary unconditional detection functions on one page # and primary and secondary conditional detection functions on another plot(result.io.fi,which=c(1,2,5,6),pages=2) # }"},{"path":"/reference/plot.io.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.io.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"","code":"# S3 method for class 'io' plot( x, which = 1:6, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.io.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"x fitted model ddf index specify plots produced. Note order ignored plots produced order. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.io.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"Just plots","code":""},{"path":"/reference/plot.io.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.io.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.io.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.io.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"","code":"# \\donttest{ library(mrds) data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe result.io <- ddf(dsmodel=~cds(key = \"hn\"), mrmodel=~glm(~distance), data=egdata, method=\"io\", meta.data=list(width=4)) # just plot everything plot(result.io) # Plot primary and secondary unconditional detection functions on one page # and primary and secondary conditional detection functions on another plot(result.io,which=c(1,2,5,6),pages=2) # }"},{"path":"/reference/plot.rem.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.rem.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"","code":"# S3 method for class 'rem.fi' plot( x, which = 1:3, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.rem.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"x fitted model ddf index specify plots produced. breaks user defined breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.rem.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.rem.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.rem.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.rem.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.rem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"","code":"# S3 method for class 'rem' plot( x, which = 1:3, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.rem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"x fitted model ddf index specify plots produced. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.rem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.rem arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.rem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.trial.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.trial.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"","code":"# S3 method for class 'trial.fi' plot( x, which = 1:2, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.trial.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"x fitted model ddf index specify plots produced. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.trial.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.io.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.trial.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"Jeff Laake, Jon Bishop, David Borchers","code":""},{"path":"/reference/plot.trial.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.trial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"","code":"# S3 method for class 'trial' plot( x, which = 1:2, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.trial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"x fitted model ddf index specify plots produced. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.trial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.io.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.trial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"Jeff Laake, Jon Bishop, David Borchers","code":""},{"path":"/reference/plot_cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot conditional detection function from distance sampling model — plot_cond","title":"Plot conditional detection function from distance sampling model — plot_cond","text":"Plot proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data. Internal function called plot methods.","code":""},{"path":"/reference/plot_cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot conditional detection function from distance sampling model — plot_cond","text":"","code":"plot_cond( obs, xmat, gxvalues, model, nc, breaks, finebr, showpoints, showlines, maintitle, ylim, angle = -45, density = 20, col = \"black\", jitter = NULL, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot_cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot conditional detection function from distance sampling model — plot_cond","text":"obs observer code xmat processed data gxvalues detection function values observation model fitted model ddf nc number equal-width bins histogram breaks user define breakpoints finebr fine break values line averaged showpoints logical variable; TRUE plots predicted value observation showlines logical variable; TRUE plots average predicted value line maintitle main title line plot ylim range y axis (default c(0,1)) angle shading angle hatching density shading density hatching col plotting colour jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot_cond.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot conditional detection function from distance sampling model — plot_cond","text":"Jeff Laake, Jon Bishop, David Borchers","code":""},{"path":"/reference/plot_layout.html","id":null,"dir":"Reference","previous_headings":"","what":"Layout for plot methods in mrds — plot_layout","title":"Layout for plot methods in mrds — plot_layout","text":"function paging, using devAskNewPage(). means can just call plots R make prompt us Warning, function side effects! modifies devAskNewPage!","code":""},{"path":"/reference/plot_layout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Layout for plot methods in mrds — plot_layout","text":"","code":"plot_layout(which, pages)"},{"path":"/reference/plot_layout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Layout for plot methods in mrds — plot_layout","text":"plots created pages number pages span plots across","code":""},{"path":"/reference/plot_layout.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Layout for plot methods in mrds — plot_layout","text":"Code stolen modified plot.R mgcv Simon Wood","code":""},{"path":"/reference/plot_layout.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Layout for plot methods in mrds — plot_layout","text":"David L. Miller, based code Simon N. Wood","code":""},{"path":"/reference/plot_uncond.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot unconditional detection function from distance sampling model — plot_uncond","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"Plots unconditional detection function observer=obs observations overlays histogram, average detection function values individual observations data. Internal function called plot methods.","code":""},{"path":"/reference/plot_uncond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"","code":"plot_uncond( model, obs, xmat, gxvalues, nc, finebr, breaks, showpoints, showlines, maintitle, ylim, return.lines = FALSE, angle = -45, density = 20, col = \"black\", jitter = NULL, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot_uncond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"model fitted model ddf obs value observer plot xmat processed data gxvalues detection function values observation nc number equal-width bins histogram finebr fine break values line averaged breaks user define breakpoints showpoints logical variable; TRUE plots predicted value observation showlines logical variable; TRUE plots average predicted value line maintitle main title line plot ylim range y axis; defaults (0,1) return.lines TRUE, returns values line angle shading angle hatching density shading density hatching col plotting colour jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot_uncond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"return.lines==TRUE returns dataframe average.line otherwise just plots","code":""},{"path":"/reference/plot_uncond.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"Jeff Laake, Jon Bishop, David Borchers","code":""},{"path":"/reference/predict.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Predictions from mrds models — predict.ds","title":"Predictions from mrds models — predict.ds","text":"Predict detection probabilities (effective strip widths/effective areas detection) fitted distance sampling model using either original data (.e. \"fitted\" values) using new data.","code":""},{"path":"/reference/predict.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predictions from mrds models — predict.ds","text":"","code":"# S3 method for class 'ds' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, esw=FALSE, se.fit=FALSE, ...) # S3 method for class 'io.fi' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, integrate=FALSE, ...) # S3 method for class 'io' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, ...) # S3 method for class 'trial' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, ...) # S3 method for class 'trial.fi' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, integrate=FALSE, ...) # S3 method for class 'rem' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, ...) # S3 method for class 'rem.fi' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, integrate=FALSE, ...)"},{"path":"/reference/predict.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predictions from mrds models — predict.ds","text":"object ddf model object. newdata new data.frame prediction, must include column called \"distance\". compute TRUE compute values use fitted values stored model object. int.range integration range variable range analysis; either vector 2 column matrix. esw TRUE, returns effective strip half-width (effective area detection point transect models) integral 0 truncation distance (width) \\(p(y)dy\\); otherwise returns integral 0 truncation width \\(p(y)\\pi(y)\\) \\(\\pi(y)=1/w\\) lines \\(\\pi(y)=2r/w^2\\) points. se.fit *.ds models , generate standard errors predicted probabilities detection (ESW esw=TRUE), stored se.fit element ... S3 consistency integrate *.fi methods, see Details .","code":""},{"path":"/reference/predict.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predictions from mrds models — predict.ds","text":"exceptions , value list single element: fitted, vector average detection probabilities esw values observation original data ornewdata predict.ds, se.fit=TRUE additional element $se.fit, contains standard errors probabilities detection ESW. predict.io.fi,predict.trial.fi,predict.rem.fi integrate=TRUE, value list one element: fitted, vector integrated (average) detection probabilities observation original data newdata. predict.io.fi, predict.trial.fi, predict.rem.fi integrate=FALSE, value list following elements: fitted \\(p(y)\\) values p1 \\(p_{1|2}(y)\\), conditional detection probability observer 1 p2 \\(p_{2|1}(y)\\), conditional detection probability observer 2 fitted \\(p_.(y) = p_{1|2}(y) + p_{2|1}(y) - p_{1|2}(y) * p_{2|1}(y)\\), conditional detection probability seen either observer","code":""},{"path":"/reference/predict.ds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Predictions from mrds models — predict.ds","text":"first 4 arguments predict function. latter 2 specific certain functions. line transects, effective strip half-width (esw=TRUE) integral fitted detection function either 0 W specified int.range. predicted detection probability average probability simply integral divided distance range. point transect models, esw=TRUE calculates effective area detection (commonly referred \"nu\", integral 2/width^2 * rg(r). Fitted detection probabilities stored model object returned unless compute=TRUE newdata specified. compute=TRUE used estimate numerical derivatives use delta method approximations variance. method=\"io.fi\" method=\"trial.fi\" integrate=FALSE, predict returns value conditional detection probability integrate=TRUE, returns average conditional detection probability integrating x (distance) respect uniform distribution. Note ordering returned results new data supplied (\"fitted\" values) necessarily data supplied ddf, data (hence results predict) sorted object ID (object) observer ID (observer).","code":""},{"path":"/reference/predict.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Predictions from mrds models — predict.ds","text":"function called generic function predict appropriate ddf model object. can called directly user, typically safest use predict calls appropriate function based type model.","code":""},{"path":[]},{"path":"/reference/predict.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Predictions from mrds models — predict.ds","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/print.ddf.gof.html","id":null,"dir":"Reference","previous_headings":"","what":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"Provides formatted output results goodness fit tests: chi-square, Kolmogorv-Smirnov Cramer-von Mises test appropriate.","code":""},{"path":"/reference/print.ddf.gof.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"","code":"# S3 method for class 'ddf.gof' print(x, digits = 3, ...)"},{"path":"/reference/print.ddf.gof.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"x result call ddf.gof digits number digits round chi-squared table values ... unused unspecified arguments generic print","code":""},{"path":"/reference/print.ddf.gof.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"None","code":""},{"path":[]},{"path":"/reference/print.ddf.gof.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"Jeff Laake","code":""},{"path":"/reference/print.ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple pretty printer for distance sampling analyses — print.ddf","title":"Simple pretty printer for distance sampling analyses — print.ddf","text":"Simply prints summary model fitted. detailed information see summary.","code":""},{"path":"/reference/print.ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple pretty printer for distance sampling analyses — print.ddf","text":"","code":"# S3 method for class 'ddf' print(x, ...)"},{"path":"/reference/print.ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple pretty printer for distance sampling analyses — print.ddf","text":"x ddf object ... passed , just S3 compatibility.","code":""},{"path":"/reference/print.ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple pretty printer for distance sampling analyses — print.ddf","text":"David L. Miller","code":""},{"path":"/reference/print.det.tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Print results of observer detection tables — print.det.tables","title":"Print results of observer detection tables — print.det.tables","text":"Provides formatted output detection tables","code":""},{"path":"/reference/print.det.tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print results of observer detection tables — print.det.tables","text":"","code":"# S3 method for class 'det.tables' print(x, ...)"},{"path":"/reference/print.det.tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print results of observer detection tables — print.det.tables","text":"x result call ddf ... unused unspecified arguments generic print","code":""},{"path":"/reference/print.det.tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print results of observer detection tables — print.det.tables","text":"None","code":""},{"path":[]},{"path":"/reference/print.det.tables.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print results of observer detection tables — print.det.tables","text":"Jeff Laake","code":""},{"path":"/reference/print.dht.html","id":null,"dir":"Reference","previous_headings":"","what":"Prints density and abundance estimates — print.dht","title":"Prints density and abundance estimates — print.dht","text":"Outputs summary statistics, abundance density region () optionally correlation matrix one region.","code":""},{"path":"/reference/print.dht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prints density and abundance estimates — print.dht","text":"","code":"# S3 method for class 'dht' print(x, cor = FALSE, bysample = FALSE, vcmatrices = FALSE, ...)"},{"path":"/reference/print.dht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prints density and abundance estimates — print.dht","text":"x dht object results call dht specific ddf object cor TRUE outputs correlation matrix estimates bysample TRUE, prints results sample vcmatrices TRUE, prints variance-covariance matrices ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/print.dht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prints density and abundance estimates — print.dht","text":"None","code":""},{"path":[]},{"path":"/reference/print.dht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Prints density and abundance estimates — print.dht","text":"Jeff Laake","code":""},{"path":"/reference/print.p_dist_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Print distribution of probabilities of detection — print.p_dist_table","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"Just pretty printer table probabilities detection.","code":""},{"path":"/reference/print.p_dist_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"","code":"# S3 method for class 'p_dist_table' print(x, digits = 2, ...)"},{"path":"/reference/print.p_dist_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"x output p_dist_table digits number significant digits print ... arguments passed print.data.frame","code":""},{"path":"/reference/print.p_dist_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"just prints table range ps","code":""},{"path":"/reference/print.p_dist_table.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"David L Miller","code":""},{"path":"/reference/print.summary.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.ds","title":"Print summary of distance detection function model object — print.summary.ds","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.ds","text":"","code":"# S3 method for class 'summary.ds' print(x, ...)"},{"path":"/reference/print.summary.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.ds","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.ds","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.io.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.io.fi","title":"Print summary of distance detection function model object — print.summary.io.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.io.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.io.fi","text":"","code":"# S3 method for class 'summary.io.fi' print(x, ...)"},{"path":"/reference/print.summary.io.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.io.fi","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.io.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.io.fi","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.io.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.io","title":"Print summary of distance detection function model object — print.summary.io","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.io.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.io","text":"","code":"# S3 method for class 'summary.io' print(x, ...)"},{"path":"/reference/print.summary.io.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.io","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.io.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.io","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.rem.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.rem.fi","title":"Print summary of distance detection function model object — print.summary.rem.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.rem.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.rem.fi","text":"","code":"# S3 method for class 'summary.rem.fi' print(x, ...)"},{"path":"/reference/print.summary.rem.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.rem.fi","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.rem.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.rem.fi","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.rem.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.rem","title":"Print summary of distance detection function model object — print.summary.rem","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.rem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.rem","text":"","code":"# S3 method for class 'summary.rem' print(x, ...)"},{"path":"/reference/print.summary.rem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.rem","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.rem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.rem","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.trial.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.trial.fi","title":"Print summary of distance detection function model object — print.summary.trial.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.trial.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.trial.fi","text":"","code":"# S3 method for class 'summary.trial.fi' print(x, ...)"},{"path":"/reference/print.summary.trial.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.trial.fi","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.trial.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.trial.fi","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.trial.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.trial","title":"Print summary of distance detection function model object — print.summary.trial","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.trial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.trial","text":"","code":"# S3 method for class 'summary.trial' print(x, ...)"},{"path":"/reference/print.summary.trial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.trial","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.trial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.trial","text":"Jeff Laake","code":""},{"path":"/reference/prob.deriv.html","id":null,"dir":"Reference","previous_headings":"","what":"Derivatives for variance of average p and average p(0) variance — prob.deriv","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"Used call DeltaMethod prob.se get first derivatives","code":""},{"path":"/reference/prob.deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"","code":"prob.deriv(par, model, parfct, observer = NULL, fittedmodel = NULL)"},{"path":"/reference/prob.deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"par detection function parameter values model ddf model object parfct function detection probabilities; currently average (covariates) detection probability p integrated distance average (covariates) detection probability distance 0; p(0) observer 1,2,3 primary, secondary, duplicates average p(0); passed fct fittedmodel full fitted ddf model trial.fi io.fi called trial io respectively","code":""},{"path":"/reference/prob.deriv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"Vector values fct specified parameter values","code":""},{"path":"/reference/prob.deriv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"Need add equations think exist texts. probably checked simulation.","code":""},{"path":[]},{"path":"/reference/prob.deriv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"Jeff Laake","code":""},{"path":"/reference/prob.se.html","id":null,"dir":"Reference","previous_headings":"","what":"Average p and average p(0) variance — prob.se","title":"Average p and average p(0) variance — prob.se","text":"Computes components variance average p=n/N average p(0) weights based empirical covariate distribution, contains covariates.","code":""},{"path":"/reference/prob.se.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average p and average p(0) variance — prob.se","text":"","code":"prob.se(model, fct, vcov, observer = NULL, fittedmodel = NULL)"},{"path":"/reference/prob.se.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average p and average p(0) variance — prob.se","text":"model ddf model object fct function detection probabilities; currently average (covariates) detection probability p integrated distance average (covariates) detection probability distance 0; p(0) vcov variance-covariance matrix parameter estimates observer 1,2,3 primary, secondary, duplicates average p(0); passed fct fittedmodel full fitted ddf model trial.fi io.fi called trial io respectively","code":""},{"path":"/reference/prob.se.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average p and average p(0) variance — prob.se","text":"var variance partial partial derivatives parameters respect fct covar covariance n average p p(0)","code":""},{"path":"/reference/prob.se.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Average p and average p(0) variance — prob.se","text":"Need add equations think exist texts. probably checked simulation.","code":""},{"path":[]},{"path":"/reference/prob.se.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Average p and average p(0) variance — prob.se","text":"Jeff Laake","code":""},{"path":"/reference/process.data.html","id":null,"dir":"Reference","previous_headings":"","what":"Process data for fitting distance sampling detection function — process.data","title":"Process data for fitting distance sampling detection function — process.data","text":"Sets dataframe basic error checking. Adds needed fields dataframe meta.data.","code":""},{"path":"/reference/process.data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process data for fitting distance sampling detection function — process.data","text":"","code":"process.data(data, meta.data = list(), check = TRUE)"},{"path":"/reference/process.data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process data for fitting distance sampling detection function — process.data","text":"data dataframe object meta.data meta.data options; see ddf description check TRUE check data errors mrds structure; method=\"ds\" check=FALSE","code":""},{"path":"/reference/process.data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process data for fitting distance sampling detection function — process.data","text":"xmat processed data.frame added fields meta.data meta.data list","code":""},{"path":"/reference/process.data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process data for fitting distance sampling detection function — process.data","text":"function number error checking tasks, creating fields adding meta.data including: 1) check=TRUE, check make sure record structure okay mrds data. number primary records (observer=1) must equal number secondary records (observer=2). Also, field dataframe created timesseen counts number times object detected 0,1,2; timesseen=0 record tossed analysis. Also differences data (distance, size, covariates) observer 1 2 warning issued analysis may fail. code assumes values observers. 2) Based presence fields distbegin distend, determination made whether data analysis based binned distances field binned created, TRUE distance observation binned. assigning observation allows analysis mixture binned unbinned distances. 4) Data restricted distances greater width less left values specified meta.data. specified left defaults 0 width defaults largest distance measurement. 5) Determine integration range (int.begin int.end specified observations. , add structure meta.data. integration range typically used aerial surveys altitude varies strip width (left width) changes change altitude. 6) Fields defined factors cleaned unused levels eliminated. 7) restrictions placed data, eliminated data, function stops error message","code":""},{"path":"/reference/process.data.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Process data for fitting distance sampling detection function — process.data","text":"Jeff Laake","code":""},{"path":"/reference/pronghorn.html","id":null,"dir":"Reference","previous_headings":"","what":"Pronghorn aerial survey data from Wyoming — pronghorn","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"Detections pronghorn fixed-wing aerial surveys Southeastern Wyoming using four angular bins defined strut marks. Illustrates data altitude ground level (AGL) varies survey.","code":""},{"path":"/reference/pronghorn.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"data frame 660 observations following 5 variables. STRATUM numeric vector direction factor levels N S representing survey direction AGL height ground level Band factor levels B C D represent angular bands breaks 35.42,44.56,51.52,61.02,70.97 degrees. angles set based selected distance bins based target AGL. cluster number pronghorn observed cluster","code":""},{"path":"/reference/pronghorn.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"Data provided courtesy Rich Guenzel Wyoming Game Fish.","code":""},{"path":"/reference/pronghorn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"record observed cluster pronghorn. data provide stratum observation, direction travel, AGL time observation, angular bin contained center pronghorn cluster(group), number pronghorn group. angular bins defined combination two window five wing strut marks define bin cutpoints perpendicular ground distances 0-65, 65-90, 90-115, 115-165 165-265 meters plane 300' (91.4 meters) ground level. inner band considered blind region due obstruction view beneath plane; thus th line offset 65 meters underneath plane.","code":""},{"path":"/reference/pronghorn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"Laake, J., R. J. Guenzel, J. L. Bengtson, P. Boveng, M. Cameron, M. B. Hanson. 2008. Coping variation aerial survey protocol line-transect sampling. Wildlife Research 35:289-298.","code":""},{"path":"/reference/ptdata.distance.html","id":null,"dir":"Reference","previous_headings":"","what":"Single observer point count data example from Distance — ptdata.distance","title":"Single observer point count data example from Distance — ptdata.distance","text":"Single observer point count data example Distance","code":""},{"path":"/reference/ptdata.distance.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Single observer point count data example from Distance — ptdata.distance","text":"format 144 obs 6 variables: distance: numeric distance center observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... detected: numeric 0/1 object: sequential object number Sample.Label: point label Region.Label: single region label","code":""},{"path":"/reference/ptdata.distance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single observer point count data example from Distance — ptdata.distance","text":"","code":"# \\donttest{ data(ptdata.distance) xx <- ddf(dsmodel = ~cds(key=\"hn\", formula = ~1), data = ptdata.distance, method = \"ds\", meta.data = list(point=TRUE)) #> Warning: no truncation distance specified; using largest observed distance summary(xx) #> #> Summary for ds object #> Number of observations : 144 #> Distance range : 0 - 34.16 #> AIC : 919.1403 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 2.283007 0.04523359 #> #> Estimate SE CV #> Average p 0.1644301 0.01466592 0.08919244 #> N in covered region 875.7520203 102.72037375 0.11729390 #> EDR 13.8518741 0.61774122 0.04459622 plot(xx,main=\"Distance point count data\") ddf.gof(xx) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> [0,2.85] (2.85,5.69] (5.69,8.54] (8.54,11.4] (11.4,14.2] (14.2,17.1] #> Observed 5.000 19.000 16.000 25.000 28.000 23.000 #> Expected 5.955 16.432 23.166 25.232 23.213 18.671 #> Chisquare 0.153 0.401 2.217 0.002 0.987 1.004 #> (17.1,19.9] (19.9,22.8] (22.8,25.6] (25.6,28.5] (28.5,31.3] #> Observed 14.000 5.000 5.000 3.000 0.000 #> Expected 13.356 8.578 4.978 2.620 1.254 #> Chisquare 0.031 1.493 0.000 0.055 1.254 #> (31.3,34.2] Total #> Observed 1.000 144.000 #> Expected 0.547 144.000 #> Chisquare 0.375 7.973 #> #> P = 0.6315 with 10 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.0954697 p-value = 0.607543 Regions <- data.frame(Region.Label=1,Area=1) Samples <- data.frame(Sample.Label=1:30, Region.Label=rep(1,30), Effort=rep(1,30)) print(dht(xx,sample.table=Samples,region.table=Regions)) #> Abundance and density estimates from distance sampling #> Variance : P2, N/L #> #> Summary statistics #> #> Region Area CoveredArea Effort n k ER se.ER cv.ER #> 1 1 1 109978.3 30 144 30 4.8 0.4245349 0.08844477 #> #> Abundance: #> Region Estimate se cv lcl ucl df #> 1 Total 0.007962956 0.001000224 0.1256096 0.006212055 0.01020736 97.52316 #> #> Density: #> Region Estimate se cv lcl ucl df #> 1 Total 0.007962956 0.001000224 0.1256096 0.006212055 0.01020736 97.52316 # }"},{"path":"/reference/ptdata.dual.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulated dual observer point count data — ptdata.dual","title":"Simulated dual observer point count data — ptdata.dual","text":"Simulated dual observer point count data detection p(0)=0.8; hn sigma=30; w=100 observers dependency y>0, gamma=0.1","code":""},{"path":"/reference/ptdata.dual.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulated dual observer point count data — ptdata.dual","text":"format 420 obs 6 variables: distance: numeric distance center observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... detected: numeric 0/1 person: Factor 2 levels ,B pair: Factor 2 levels \"AB\" BA\" $ object : sequential object number","code":""},{"path":"/reference/ptdata.dual.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulated dual observer point count data — ptdata.dual","text":"","code":"# \\donttest{ data(ptdata.dual) xx <- ddf(mrmodel=~glm(formula=~distance), dsmodel = ~cds(key=\"hn\", formula = ~1), data = ptdata.dual, method = \"io\", meta.data = list(point=TRUE)) #> Warning: no truncation distance specified; using largest observed distance summary(xx) #> #> Summary for io.fi object #> Number of observations : 210 #> Number seen by primary : 199 #> Number seen by secondary : 193 #> Number seen by both : 182 #> AIC : 192.4567 #> #> #> Conditional detection function parameters: #> estimate se #> (Intercept) 1.06437933 0.41946692 #> distance 0.04904523 0.01408653 #> #> Estimate SE CV #> Average primary p(0) 0.7435266 0.07999017 0.10758213 #> Average secondary p(0) 0.7435266 0.07999017 0.10758213 #> Average combined p(0) 0.9342214 0.04103071 0.04391969 #> #> #> Summary for ds object #> Number of observations : 210 #> Distance range : 0 - 96.32036 #> AIC : 1817.79 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 3.38454 0.03661838 #> #> Estimate SE CV #> Average p 0.1867483 0.01332166 0.07133485 #> EDR 41.6242555 1.48462997 0.03566742 #> #> #> Summary for io object #> Total AIC value : 2010.247 #> #> Estimate SE CV #> Average p 0.1744643 0.01461507 0.08377111 #> N in covered region 1203.6847617 125.94892721 0.10463614 plot(xx,main=\"Simulated point count data\") # }"},{"path":"/reference/ptdata.removal.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulated removal observer point count data — ptdata.removal","title":"Simulated removal observer point count data — ptdata.removal","text":"Simulated removal observer point count data detection p(0)=0.8; hn sigma=30; w=100 observers dependency y>0, gamma=0.1","code":""},{"path":"/reference/ptdata.removal.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulated removal observer point count data — ptdata.removal","text":"format 408 obs 6 variables: distance: numeric distance center observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... detected: numeric 0/1 person: Factor 2 levels ,B pair: Factor 2 levels \"AB\" BA\" object: sequential object number","code":""},{"path":"/reference/ptdata.removal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulated removal observer point count data — ptdata.removal","text":"","code":"# \\donttest{ data(ptdata.removal) xx <- ddf(mrmodel=~glm(formula=~distance), dsmodel = ~cds(key=\"hn\", formula = ~1), data = ptdata.removal, method = \"rem\", meta.data = list(point=TRUE)) #> Warning: no truncation distance specified; using largest observed distance summary(xx) #> #> Summary for rem.fi object #> Number of observations : 204 #> Number seen by primary : 195 #> Number additional seen by secondary : 9 #> AIC : 69.33598 #> #> #> Conditional detection function parameters: #> estimate se #> (Intercept) 1.19813958 0.7821458 #> distance 0.07245812 0.0327875 #> #> Estimate SE CV #> Average primary p(0) 0.9462658 0.06457123 0.06823794 #> #> #> #> Summary for ds object #> Number of observations : 204 #> Distance range : 0 - 83.04828 #> AIC : 1744.474 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 3.366348 0.0383046 #> #> Estimate SE CV #> Average p 0.2394111 0.01708192 0.07134975 #> EDR 40.6352360 1.44965694 0.03567487 #> #> #> Summary for rem object #> #> Total AIC value = 1813.81 #> Estimate SE CV #> Average p 0.2265465 0.02236647 0.09872793 #> N in covered region 900.4772670 104.77563511 0.11635567 plot(xx,main=\"Simulated point count data\") # }"},{"path":"/reference/ptdata.single.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulated single observer point count data — ptdata.single","title":"Simulated single observer point count data — ptdata.single","text":"Simulated single observer point count data detection p(0)=1; hn sigma=30; w=100","code":""},{"path":"/reference/ptdata.single.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulated single observer point count data — ptdata.single","text":"format 341 obs 4 variables: ..$ distance: numeric distance center $ observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... ..$ detected: numeric 0/1 $ object : sequential object number","code":""},{"path":"/reference/ptdata.single.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulated single observer point count data — ptdata.single","text":"","code":"# \\donttest{ data(ptdata.single) xx=ddf(dsmodel = ~cds(key=\"hn\", formula = ~1), data = ptdata.single, method = \"ds\", meta.data = list(point=TRUE)) #> Warning: no truncation distance specified; using largest observed distance summary(xx) #> #> Summary for ds object #> Number of observations : 341 #> Distance range : 0 - 95.62823 #> AIC : 2928.884 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 3.397033 0.02984984 #> #> Estimate SE CV #> Average p 0.1940384 0.0112283 0.05786639 #> N in covered region 1757.3842381 132.8196911 0.07557806 #> EDR 42.1240314 1.2187829 0.02893320 plot(xx,main=\"Simulated point count data\") # }"},{"path":"/reference/qqplot.ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Constructs quantile-quantile (Q-Q) plot fitted model graphical check goodness fit. Formal goodness fit testing detection function models using Kolmogorov-Smirnov Cramer-von Mises tests. tests based looking quantile-quantile plot produced qqplot.ddf deviations line x=y.","code":""},{"path":"/reference/qqplot.ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"","code":"qqplot.ddf(model, plot = TRUE, nboot = 100, ks = FALSE, ...)"},{"path":"/reference/qqplot.ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"model fitted distance detection function model object plot Q-Q plot plotted just report statistics? nboot number replicates use calculate p-values goodness fit test statistics ks perform Kolmogorov-Smirnov test (involves many bootstraps can take ) ... additional arguments passed plot","code":""},{"path":"/reference/qqplot.ddf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"list goodness fit related values: edf matrix lower upper empirical distribution function values cdf fitted cumulative distribution function values ks list K-S statistic (Dn) p-value (p) CvM list CvM statistic (W) p-value (p)","code":""},{"path":"/reference/qqplot.ddf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Kolmogorov-Smirnov test asks question \"largest vertical distance point y=x line?\" uses distance statistic test null hypothesis samples (EDF CDF case) distribution (hence model fits well). deviation y=x line points large reject null hypothesis say model good fit. Rather looking single biggest difference y=x line points Q-Q plot, might prefer think differences line points, since may many smaller differences want take account rather looking one large deviation. null hypothesis , statistic uses sum deviations point line.","code":""},{"path":"/reference/qqplot.ddf.html","id":"details-1","dir":"Reference","previous_headings":"","what":"Details","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Note bootstrap procedure required ensure p-values procedure correct comparing cumulative distribution function (CDF) empirical distribution function (EDF) estimated parameters detection function.","code":""},{"path":"/reference/qqplot.ddf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Burnham, K.P., S.T. Buckland, J.L. Laake, D.L. Borchers, T.. Marques, J.R.B. Bishop, L. Thomas. 2004. topics distance sampling. pp: 385-389. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/qqplot.ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/rem.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"Detection function fitting mark-recapture data removal configuration secondary observer knows primary observer detects detects objects missed primary observer. iterative offset glm/gam uses offset compensate conditioning set objects seen either observer (eg 00 missed observers included analysis. function similar io.glm.","code":""},{"path":"/reference/rem.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"","code":"rem.glm( datavec, fitformula, eps = 1e-05, iterlimit = 500, GAM = FALSE, gamplot = TRUE, datavec2 )"},{"path":"/reference/rem.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"datavec dataframe containing records seen either observer 1 2 fitformula logit link formula eps convergence criterion iterlimit maximum number iterations allowed GAM uses GAM instead GLM fitting gamplot set TRUE get gam plot object GAM=TRUE datavec2 dataframe containing records observer 1 observer 2 io.glm form; used case observer(platform effect)","code":""},{"path":"/reference/rem.glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"list class(\"remglm\",\"glm\",\"lm\") class(\"remglm\",\"gam\") glmobj GLM GAM object offsetvalue offsetvalues iterative fit plotobj gam plot object (GAM & gamplot==TRUE, else NULL)","code":""},{"path":"/reference/rem.glm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"difference function io.glm offset data construction one detection function estimated primary observer. two functions merged.","code":""},{"path":"/reference/rem.glm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"currently code function GAMs commented remainder mrds package work GAMs.","code":""},{"path":"/reference/rem.glm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"Buckland, S.T., J.M. breiwick, K.L. Cattanach, J.L. Laake. 1993. Estimated population size California gray whale. Marine Mammal Science, 9:235-249. Burnham, K.P., S.T. Buckland, J.L. Laake, D.L. Borchers, T.. Marques, J.R.B. Bishop, L. Thomas. 2004. topics distance sampling. pp: 360-363. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":"/reference/rem.glm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"Jeff Laake","code":""},{"path":"/reference/rescale_pars.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"calculate rescaling needed covariates included scale detection function \"big\". Based code optimx.","code":""},{"path":"/reference/rescale_pars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"","code":"rescale_pars(initialvalues, ddfobj)"},{"path":"/reference/rescale_pars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"initialvalues starting values optimisation ddfobj detection function object","code":""},{"path":"/reference/rescale_pars.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"Derivative-free methods like nlminb sensitive parameters poorly scaled. can also cause problems quasi-Newton methods (least, bad scaling _help_ optimisation). rescale parameters necessary (unless already got scaling control)","code":""},{"path":"/reference/rescale_pars.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"David L Miller","code":""},{"path":"/reference/sample_ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate data from a fitted detection function and refit the model — sample_ddf","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"Generate data fitted detection function refit model","code":""},{"path":"/reference/sample_ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"","code":"sample_ddf(ds.object)"},{"path":"/reference/sample_ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"ds.object fitted detection function object","code":""},{"path":"/reference/sample_ddf.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"function changes random number generator seed. avoid potential side-effects, use something like: seed <- get(\".Random.seed\",envir=.GlobalEnv) running code assign(\".Random.seed\",seed,envir=.GlobalEnv) .","code":""},{"path":"/reference/sample_ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"David L. Miller","code":""},{"path":"/reference/setbounds.html","id":null,"dir":"Reference","previous_headings":"","what":"Set parameter bounds — setbounds","title":"Set parameter bounds — setbounds","text":"Set values lower upper bounds check lengths user-specified values","code":""},{"path":"/reference/setbounds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set parameter bounds — setbounds","text":"","code":"setbounds(lowerbounds, upperbounds, initialvalues, ddfobj, width, left)"},{"path":"/reference/setbounds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set parameter bounds — setbounds","text":"lowerbounds vector lower bounds upperbounds vector upper bounds initialvalues vector initial parameter estimates ddfobj distance detection function object width truncation distance left left truncation distance","code":""},{"path":"/reference/setbounds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set parameter bounds — setbounds","text":"lower vector lower bounds upper vector upper bounds setlower logical indicating whether user set lower bounds setupper logical indicating whether user set upper bounds","code":""},{"path":"/reference/setbounds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set parameter bounds — setbounds","text":"Jeff Laake","code":""},{"path":"/reference/setcov.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates design matrix for covariates in detection function — setcov","title":"Creates design matrix for covariates in detection function — setcov","text":"function creates design matrix g(0) scale covariates using input model formula. returns list contains 2 elements: 1) dim: dimension (number columns) design matrix, 2) cov: constructed design matrix. function relatively simple uses built-function model.matrix majority work. function handles 2 exceptions \"~.\", null model 0 columns \"~1\" intercept model - column 1s. model 2 exceptions provided, calls model.matrix construct columns. columns design matrix 0's column removed. occurs data particular factor.","code":""},{"path":"/reference/setcov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates design matrix for covariates in detection function — setcov","text":"","code":"setcov(dmat, model)"},{"path":"/reference/setcov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates design matrix for covariates in detection function — setcov","text":"dmat data matrix model model formula","code":""},{"path":"/reference/setcov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates design matrix for covariates in detection function — setcov","text":"design matrix specified data model","code":""},{"path":"/reference/setcov.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creates design matrix for covariates in detection function — setcov","text":"Jeff Laake","code":""},{"path":"/reference/setinitial.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Set initial values for detection function based on distance sampling — setinitial.ds","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"given detection function, computes initial values parameters including scale shape parameters adjustment function parameters . user-defined initial values parameters specified user computed.","code":""},{"path":"/reference/setinitial.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"","code":"setinitial.ds(ddfobj, width, initial, point, left) sethazard(ddfobj, dmat, width, left, point)"},{"path":"/reference/setinitial.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"ddfobj distance detection function object width half-width transect radius point count initial list user-defined initial values possible elements: scale, shape, adjustment point TRUE, point count data; otherwise, line transect data left left truncation dmat xmat ddfobj","code":""},{"path":"/reference/setinitial.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"scale vector initial scale parameter values shape vector initial shape parameter values adjustment vector initial adjustment function parameter values","code":""},{"path":"/reference/setinitial.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/sim.mix.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"Simulation distance sampling data via mixture models Allows one simulate line transect distance sampling data using mixture half-normal detection functions.","code":""},{"path":"/reference/sim.mix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"","code":"sim.mix(n, sigma, mix.prop, width, means = 0)"},{"path":"/reference/sim.mix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"n number samples generate sigma vector scale parameters mix.prop vector mixture proportions (length sigma) width truncation means vector means (used generate wacky, non-monotonic data)","code":""},{"path":"/reference/sim.mix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"distances vector distances","code":""},{"path":"/reference/sim.mix.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"moment TOTALLY UNSUPPORTED! Please use anything important!","code":""},{"path":"/reference/sim.mix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"David Lawrence Miller","code":""},{"path":"/reference/solvecov.html","id":null,"dir":"Reference","previous_headings":"","what":"Invert of covariance matrices — solvecov","title":"Invert of covariance matrices — solvecov","text":"Tries invert matrix solve. fails singularity, eigenvector decomposition computed, eigenvalues 1/cmax replaced 1/cmax, .e., cmax corresponding eigenvalue inverted matrix.","code":""},{"path":"/reference/solvecov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Invert of covariance matrices — solvecov","text":"","code":"solvecov(m, cmax = 1e+10)"},{"path":"/reference/solvecov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Invert of covariance matrices — solvecov","text":"m numeric symmetric matrix. cmax positive value, see .","code":""},{"path":"/reference/solvecov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Invert of covariance matrices — solvecov","text":"list following components: inv inverted matrix, coll TRUE solve failed singularity.","code":""},{"path":"/reference/solvecov.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Invert of covariance matrices — solvecov","text":"solvecov code taken package fpc: Christian Hennig","code":""},{"path":[]},{"path":"/reference/solvecov.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Invert of covariance matrices — solvecov","text":"Christian Hennig","code":""},{"path":"/reference/stake77.html","id":null,"dir":"Reference","previous_headings":"","what":"Wooden stake data from 1977 survey — stake77","title":"Wooden stake data from 1977 survey — stake77","text":"Multiple surveys different observers single 1km transect containing 150 wooden stakes placed randomly throughout 40 m strip (20m either side).","code":""},{"path":"/reference/stake77.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Wooden stake data from 1977 survey — stake77","text":"data frame 150 observations following 10 variables. StakeNo unique number stake 1-150 PD perpendicular distance stake placed line Obs1 0/1 whether missed/seen observer 1 Obs2 0/1 whether missed/seen observer 2 Obs3 0/1 whether missed/seen observer 3 Obs4 0/1 whether missed/seen observer 4 Obs5 0/1 whether missed/seen observer 5 Obs6 0/1 whether missed/seen observer 6 Obs7 0/1 whether missed/seen observer 7 Obs8 0/1 whether missed/seen observer 8","code":""},{"path":"/reference/stake77.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Wooden stake data from 1977 survey — stake77","text":"Laake, J. 1978. Line transect estimators robust animal movement. M.S. Thesis. Utah State University, Logan, Utah. 55p.","code":""},{"path":"/reference/stake77.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Wooden stake data from 1977 survey — stake77","text":"Burnham, K. P., D. R. Anderson, J. L. Laake. 1980. Estimation Density Line Transect Sampling Biological Populations. Wildlife Monographs:7-202.","code":""},{"path":"/reference/stake77.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wooden stake data from 1977 survey — stake77","text":"","code":"# \\donttest{ data(stake77) # Extract functions for stake data and put in the mrds format extract.stake <- function(stake,obs){ extract.obs <- function(obs){ example <- subset(stake,eval(parse(text=paste(\"Obs\",obs,\"==1\",sep=\"\"))), select=\"PD\") example$distance <- example$PD example$object <- 1:nrow(example) example$PD <- NULL return(example) } if(obs!=\"all\"){ return(extract.obs(obs=obs)) }else{ example <- NULL for(i in 1:(ncol(stake)-2)){ df <- extract.obs(obs=i) df$person <- i example <- rbind(example,df) } example$person <- factor(example$person) example$object <- 1:nrow(example) return(example) } } extract.stake.pairs <- function(stake,obs1,obs2,removal=FALSE){ obs1 <- paste(\"Obs\",obs1,sep=\"\") obs2 <- paste(\"Obs\",obs2,sep=\"\") example <- subset(stake,eval(parse(text=paste(obs1,\"==1 |\",obs2,\"==1 \", sep=\"\"))),select=c(\"PD\",obs1,obs2)) names(example) <- c(\"distance\",\"obs1\",\"obs2\") detected <- c(example$obs1,example$obs2) example <- data.frame(object = rep(1:nrow(example),2), distance = rep(example$distance,2), detected = detected, observer = c(rep(1,nrow(example)), rep(2,nrow(example)))) if(removal) example$detected[example$observer==2] <- 1 return(example) } # extract data for observer 1 and fit a single observer model stakes <- extract.stake(stake77,1) ds.model <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~1), data = stakes, method = \"ds\", meta.data = list(width = 20)) plot(ds.model,breaks=seq(0,20,2),showpoints=TRUE) ddf.gof(ds.model) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> [0,2.22] (2.22,4.44] (4.44,6.67] (6.67,8.89] (8.89,11.1] (11.1,13.3] #> Observed 13.000 17.000 14.000 12.000 11.000 5.000 #> Expected 16.023 15.107 13.430 11.256 8.894 6.627 #> Chisquare 0.570 0.237 0.024 0.049 0.498 0.399 #> (13.3,15.6] (15.6,17.8] (17.8,20] Total #> Observed 3.000 3.000 3.000 81.00 #> Expected 4.655 3.083 1.925 81.00 #> Chisquare 0.588 0.002 0.600 2.97 #> #> P = 0.8878 with 7 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.051489 p-value = 0.867184 # extract data from observers 1 and 3 and fit an io model stkpairs <- extract.stake.pairs(stake77,1,3,removal=FALSE) io.model <- ddf(dsmodel = ~mcds(key = \"hn\", formula=~1), mrmodel=~glm(formula=~distance), data = stkpairs, method = \"io\") #> Warning: no truncation distance specified; using largest observed distance summary(io.model) #> #> Summary for io.fi object #> Number of observations : 89 #> Number seen by primary : 81 #> Number seen by secondary : 68 #> Number seen by both : 60 #> AIC : 137.046 #> #> #> Conditional detection function parameters: #> estimate se #> (Intercept) 3.105418 0.52079895 #> distance -0.228405 0.05957038 #> #> Estimate SE CV #> Average primary p(0) 0.9571157 0.021376325 0.022334108 #> Average secondary p(0) 0.9571157 0.021376325 0.022334108 #> Average combined p(0) 0.9981609 0.001833418 0.001836796 #> #> #> Summary for ds object #> Number of observations : 89 #> Distance range : 0 - 19.39 #> AIC : 504.1853 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 2.233369 0.1031155 #> #> Estimate SE CV #> Average p 0.5803993 0.04794403 0.08260525 #> #> #> Summary for io object #> Total AIC value : 641.2313 #> #> Estimate SE CV #> Average p 0.5793319 0.04786769 0.08262567 #> N in covered region 153.6252334 16.51282572 0.10748772 par(mfrow=c(3,2)) plot(io.model,breaks=seq(0,20,2),showpoints=TRUE,new=FALSE) dev.new() ddf.gof(io.model) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> #> Distance sampling component: #> [0,2.42] (2.42,4.85] (4.85,7.27] (7.27,9.7] (9.7,12.1] (12.1,14.5] #> Observed 17.000 21.000 16.000 14.000 9.000 4.000 #> Expected 18.954 17.725 15.499 12.673 9.690 6.929 #> Chisquare 0.202 0.605 0.016 0.139 0.049 1.238 #> (14.5,17] (17,19.4] Total #> Observed 4.000 4.000 89.000 #> Expected 4.633 2.897 89.000 #> Chisquare 0.086 0.420 2.756 #> #> P = 0.8388 with 6 degrees of freedom #> #> Mark-recapture component: #> Capture History 10 #> [0,2.42] (2.42,4.85] (4.85,7.27] (7.27,9.7] (9.7,12.1] (12.1,14.5] #> Observed 2 0 1 3 6 3 #> Expected 1 2 2 3 2 1 #> Chisquare 1 2 1 0 6 2 #> (14.5,17] (17,19.4] Total #> Observed 4 2 21 #> Expected 2 2 14 #> Chisquare 4 0 16 #> Capture History 01 #> [0,2.42] (2.42,4.85] (4.85,7.27] (7.27,9.7] (9.7,12.1] (12.1,14.5] #> Observed 3 1 2 1 0 0 #> Expected 1 2 2 3 2 1 #> Chisquare 5 0 0 1 2 1 #> (14.5,17] (17,19.4] Total #> Observed 0 1 8 #> Expected 2 2 14 #> Chisquare 2 0 12 #> Capture History 11 #> [0,2.42] (2.42,4.85] (4.85,7.27] (7.27,9.7] (9.7,12.1] (12.1,14.5] #> Observed 12 20 13 10 3 1 #> Expected 15 17 12 9 4 1 #> Chisquare 1 0 0 0 0 0 #> (14.5,17] (17,19.4] Total #> Observed 0 1 60 #> Expected 1 1 60 #> Chisquare 1 0 3 #> #> MR total chi-square = 31.176 P = 0.0052374 with 14 degrees of freedom #> #> #> Total chi-square = 33.932 P = 0.026589 with 20 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.0468697 p-value = 0.895003 # }"},{"path":"/reference/stake78.html","id":null,"dir":"Reference","previous_headings":"","what":"Wooden stake data from 1978 survey — stake78","title":"Wooden stake data from 1978 survey — stake78","text":"Multiple surveys different observers single 1km transect containing 150 wooden stakes placed based expected uniform distribution throughout 40 m strip (20m either side).","code":""},{"path":"/reference/stake78.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Wooden stake data from 1978 survey — stake78","text":"data frame 150 observations following 13 variables. StakeNo unique number stake 1-150 PD perpendicular distance stake placed line Obs1 0/1 whether missed/seen observer 1 Obs2 0/1 whether missed/seen observer 2 Obs3 0/1 whether missed/seen observer 3 Obs4 0/1 whether missed/seen observer 4 Obs5 0/1 whether missed/seen observer 5 Obs6 0/1 whether missed/seen observer 6 Obs7 0/1 whether missed/seen observer 7 Obs8 0/1 whether missed/seen observer 8 Obs9 0/1 whether missed/seen observer 9 Obs10 0/1 whether missed/seen observer 10 Obs11 0/1 whether missed/seen observer 11","code":""},{"path":"/reference/stake78.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Wooden stake data from 1978 survey — stake78","text":"Laake, J. 1978. Line transect estimators robust animal movement. M.S. Thesis. Utah State University, Logan, Utah. 55p.","code":""},{"path":"/reference/stake78.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wooden stake data from 1978 survey — stake78","text":"1997 survey based single realization uniform distribution. single transect randomization distances survey, repeated experiment used distances provided uniform distribution randomly sorted positions along line pattern obvious observer.","code":""},{"path":"/reference/stake78.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Wooden stake data from 1978 survey — stake78","text":"Burnham, K. P., D. R. Anderson, J. L. Laake. 1980. Estimation Density Line Transect Sampling Biological Populations. Wildlife Monographs:7-202.","code":""},{"path":"/reference/stake78.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wooden stake data from 1978 survey — stake78","text":"","code":"# \\donttest{ data(stake78) data(stake77) # compare distribution of distances for all stakes hist(stake77$PD) hist(stake78$PD) # Extract stake data and put in the mrds format for model fitting. extract.stake <- function(stake,obs){ extract.obs <- function(obs){ example <- subset(stake,eval(parse(text=paste(\"Obs\",obs,\"==1\",sep=\"\"))), select=\"PD\") example$distance <- example$PD example$object <- 1:nrow(example) example$PD <- NULL return(example) } if(obs!=\"all\"){ return(extract.obs(obs=obs)) }else{ example <- NULL for(i in 1:(ncol(stake)-2)){ df <- extract.obs(obs=i) df$person <- i example <- rbind(example,df) } example$person <- factor(example$person) example$object <- 1:nrow(example) return(example) } } extract.stake.pairs <- function(stake,obs1,obs2,removal=FALSE){ obs1 <- paste(\"Obs\",obs1,sep=\"\") obs2 <- paste(\"Obs\",obs2,sep=\"\") example <- subset(stake,eval(parse(text=paste(obs1,\"==1 |\",obs2,\"==1 \", sep=\"\"))), select=c(\"PD\",obs1,obs2)) names(example) <- c(\"distance\",\"obs1\",\"obs2\") detected <- c(example$obs1,example$obs2) example <- data.frame(object=rep(1:nrow(example),2), distance=rep(example$distance,2), detected = detected, observer=c(rep(1,nrow(example)), rep(2,nrow(example)))) if(removal) example$detected[example$observer==2] <- 1 return(example) } # extract data for observer 10 and fit a single observer model stakes <- extract.stake(stake78,10) ds.model <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~1), data = stakes, method = \"ds\", meta.data = list(width = 20)) plot(ds.model,breaks=seq(0,20,2),showpoints=TRUE) ddf.gof(ds.model) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> [0,3.33] (3.33,6.67] (6.67,10] (10,13.3] (13.3,16.7] (16.7,20] Total #> Observed 20.000 8.000 4.000 3.000 4.000 1.000 40.000 #> Expected 13.254 11.113 7.812 4.604 2.275 0.942 40.000 #> Chisquare 3.433 0.872 1.860 0.559 1.308 0.004 8.036 #> #> P = 0.090283 with 4 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.342811 p-value = 0.10286 # extract data from observers 5 and 7 and fit an io model stkpairs <- extract.stake.pairs(stake78,5,7,removal=FALSE) io.model <- ddf(dsmodel = ~mcds(key = \"hn\", formula=~1), mrmodel=~glm(formula=~distance), data = stkpairs, method = \"io\") #> Warning: no truncation distance specified; using largest observed distance summary(io.model) #> #> Summary for io.fi object #> Number of observations : 68 #> Number seen by primary : 60 #> Number seen by secondary : 55 #> Number seen by both : 47 #> AIC : 116.2709 #> #> #> Conditional detection function parameters: #> estimate se #> (Intercept) 1.81859268 0.43467528 #> distance -0.04485342 0.04688151 #> #> Estimate SE CV #> Average primary p(0) 0.8603972 0.05221053 0.06068190 #> Average secondary p(0) 0.8603972 0.05221053 0.06068190 #> Average combined p(0) 0.9805111 0.01457748 0.01486722 #> #> #> Summary for ds object #> Number of observations : 68 #> Distance range : 0 - 19.34 #> AIC : 391.1836 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 2.340436 0.1284981 #> #> Estimate SE CV #> Average p 0.6309225 0.05837871 0.09252913 #> #> #> Summary for io object #> Total AIC value : 507.4545 #> #> Estimate SE CV #> Average p 0.6186265 0.05797515 0.09371592 #> N in covered region 109.9209291 13.18643833 0.11996294 par(mfrow=c(3,2)) plot(io.model,breaks=seq(0,20,2),showpoints=TRUE,new=FALSE) ddf.gof(io.model) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> #> Distance sampling component: #> [0,2.76] (2.76,5.53] (5.53,8.29] (8.29,11.1] (11.1,13.8] (13.8,16.6] #> Observed 19.000 16.000 12.000 5.000 4.000 7.000 #> Expected 15.217 14.183 12.322 9.977 7.530 5.297 #> Chisquare 0.940 0.233 0.008 2.483 1.655 0.548 #> (16.6,19.3] Total #> Observed 5.000 68.000 #> Expected 3.473 68.000 #> Chisquare 0.671 6.538 #> #> P = 0.25731 with 5 degrees of freedom #> #> Mark-recapture component: #> Capture History 10 #> [0,2.76] (2.76,5.53] (5.53,8.29] (8.29,11.1] (11.1,13.8] (13.8,16.6] #> Observed 1 4 2 3 1 2 #> Expected 2 2 2 1 1 1 #> Chisquare 1 1 0 6 0 0 #> (16.6,19.3] Total #> Observed 0 13 #> Expected 1 10 #> Chisquare 1 9 #> Capture History 01 #> [0,2.76] (2.76,5.53] (5.53,8.29] (8.29,11.1] (11.1,13.8] (13.8,16.6] #> Observed 4 0 2 0 0 0 #> Expected 2 2 2 1 1 1 #> Chisquare 1 2 0 1 1 1 #> (16.6,19.3] Total #> Observed 2 8 #> Expected 1 10 #> Chisquare 1 7 #> Capture History 11 #> [0,2.76] (2.76,5.53] (5.53,8.29] (8.29,11.1] (11.1,13.8] (13.8,16.6] #> Observed 14 12 8 2 3 5 #> Expected 14 12 8 3 3 4 #> Chisquare 0 0 0 1 0 0 #> (16.6,19.3] Total #> Observed 3 47 #> Expected 3 47 #> Chisquare 0 1 #> #> MR total chi-square = 17.108 P = 0.1456 with 12 degrees of freedom #> #> #> Total chi-square = 23.646 P = 0.12938 with 17 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.246294 p-value = 0.19319 # }"},{"path":"/reference/summary.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.ds","title":"Summary of distance detection function model object — summary.ds","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.ds","text":"","code":"# S3 method for class 'ds' summary(object, se = TRUE, N = TRUE, ...)"},{"path":"/reference/summary.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.ds","text":"object ddf model object se TRUE, computes standard errors N TRUE, computes abundance covered (sampled) region ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.ds","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.ds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.ds","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.ds","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.ds","text":"Jeff Laake","code":""},{"path":"/reference/summary.io.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.io.fi","title":"Summary of distance detection function model object — summary.io.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.io.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.io.fi","text":"","code":"# S3 method for class 'io.fi' summary(object, se = TRUE, N = TRUE, fittedmodel = NULL, ddfobj = NULL, ...)"},{"path":"/reference/summary.io.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.io.fi","text":"object ddf model object se TRUE, computes standard errors N TRUE, computes abundance covered (sampled) region fittedmodel full fitted model called trial io ddfobj distance sampling object description ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.io.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.io.fi","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.io.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.io.fi","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.io.fi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.io.fi","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.io.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.io.fi","text":"Jeff Laake","code":""},{"path":"/reference/summary.io.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.io","title":"Summary of distance detection function model object — summary.io","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.io.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.io","text":"","code":"# S3 method for class 'io' summary(object, se = TRUE, ...)"},{"path":"/reference/summary.io.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.io","text":"object ddf model object se TRUE, computes standard errors ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.io.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.io","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.io.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.io","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.io.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.io","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.io.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.io","text":"Jeff Laake","code":""},{"path":"/reference/summary.rem.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.rem.fi","title":"Summary of distance detection function model object — summary.rem.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.rem.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.rem.fi","text":"","code":"# S3 method for class 'rem.fi' summary(object, se = TRUE, N = TRUE, fittedmodel = NULL, ...)"},{"path":"/reference/summary.rem.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.rem.fi","text":"object ddf model object se TRUE, computes standard errors N TRUE, computes abundance covered (sampled) region fittedmodel full fitted model called trial io ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.rem.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.rem.fi","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.rem.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.rem.fi","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.rem.fi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.rem.fi","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.rem.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.rem.fi","text":"Jeff Laake","code":""},{"path":"/reference/summary.rem.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.rem","title":"Summary of distance detection function model object — summary.rem","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.rem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.rem","text":"","code":"# S3 method for class 'rem' summary(object, se = TRUE, ...)"},{"path":"/reference/summary.rem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.rem","text":"object ddf model object se TRUE, computes standard errors ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.rem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.rem","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.rem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.rem","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.rem.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.rem","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.rem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.rem","text":"Jeff Laake","code":""},{"path":"/reference/summary.trial.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.trial.fi","title":"Summary of distance detection function model object — summary.trial.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.trial.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.trial.fi","text":"","code":"# S3 method for class 'trial.fi' summary(object, se = TRUE, N = TRUE, fittedmodel = NULL, ...)"},{"path":"/reference/summary.trial.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.trial.fi","text":"object ddf model object se TRUE, computes standard errors N TRUE, computes abundance covered (sampled) region fittedmodel full fitted model called trial io ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.trial.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.trial.fi","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.trial.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.trial.fi","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.trial.fi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.trial.fi","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.trial.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.trial.fi","text":"Jeff Laake","code":""},{"path":"/reference/summary.trial.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.trial","title":"Summary of distance detection function model object — summary.trial","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.trial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.trial","text":"","code":"# S3 method for class 'trial' summary(object, se = TRUE, ...)"},{"path":"/reference/summary.trial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.trial","text":"object ddf model object se TRUE, computes standard errors ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.trial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.trial","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.trial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.trial","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.trial.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.trial","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.trial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.trial","text":"Jeff Laake","code":""},{"path":"/reference/survey.region.dht.html","id":null,"dir":"Reference","previous_headings":"","what":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Extrapolate Horvitz-Thompson abundance estimates entire surveyed region","code":""},{"path":"/reference/survey.region.dht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"","code":"survey.region.dht(Nhat.by.sample, samples, width, left, point, areas.supplied)"},{"path":"/reference/survey.region.dht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Nhat..sample dataframe abundance sample samples samples table width truncation width left left truncation point TRUE point count otherwise line transect areas.supplied TRUE, covered area extracted CoveredArea column Nhat..sample","code":""},{"path":"/reference/survey.region.dht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Revised Nhat..sample dataframe containing estimates extrapolated survey region","code":""},{"path":"/reference/survey.region.dht.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Internal function called dht related functions.","code":""},{"path":"/reference/survey.region.dht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/test.breaks.html","id":null,"dir":"Reference","previous_headings":"","what":"Test validity for histogram breaks(cutpoints) — test.breaks","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"Determines whether user specified breaks histograms properly ordered match left right truncation.","code":""},{"path":"/reference/test.breaks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"","code":"test.breaks(breaks, left, width)"},{"path":"/reference/test.breaks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"breaks vector cutpoints (breaks) distance histogram left left truncation value width right truncation value; either radius point count half-width transect","code":""},{"path":"/reference/test.breaks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"vector breaks modified valid necessary","code":""},{"path":"/reference/test.breaks.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"Jeff Laake","code":""},{"path":"/reference/varn.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute empirical variance of encounter rate — varn","title":"Compute empirical variance of encounter rate — varn","text":"Computes one series possible variance estimates observed encounter rate set sample measurements (e.g., line lengths) number observations per sample.","code":""},{"path":"/reference/varn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute empirical variance of encounter rate — varn","text":"","code":"varn(lvec,nvec,type) covn(lvec, groups1, groups2, type)"},{"path":"/reference/varn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute empirical variance of encounter rate — varn","text":"lvec vector sample measurements (e.g., line lengths) nvec vector number observed type choice variance estimator use encounter rate groups1 vector number groups observed groups2 vector number individuals observed","code":""},{"path":"/reference/varn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute empirical variance of encounter rate — varn","text":"Variance encounter rate defined arguments","code":""},{"path":"/reference/varn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute empirical variance of encounter rate — varn","text":"choice type follows notation Fewster et al. (2009) 8 choices encounter rate variance can computed lines one points: R2 random line placement unequal line lengths (design-assisted estimator) R3 random line placement, model-assisted estimator, based true contagion process R4 random line placement, model-assisted estimator, based apparent contagion process S1 systematic line placement, post-stratification strata overlap S2 systematic line placement, post-stratification strata overlap, variances weighted line length per stratum O1 systematic line placement, post-stratification overlapping strata (akin S1) O2 systematic line placement, post-stratification overlapping strata (weighted line length per stratum, akin S2) O3 systematic line placement, post-stratification overlapping strata, model-assisted estimator trend encounter rate line length P2 random point placement, potentially unequal number visits per point, design-based estimator P3 random point placement, potentially unequal number visits per point, model-based estimator Default value \"R2\", shown Fewster et al. (2009) good performance completely random designs lines. systematic parallel line transect designs, Fewster et al. recommend \"O2\". point transects default \"P2\" (\"P3\" also available). systematic estimators, pairs assigned order given lengths groups vectors.","code":""},{"path":"/reference/varn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Compute empirical variance of encounter rate — varn","text":"function also used different calling arguments compute Innes et al variance estimated abundances/length rather observation encounter rate. function covn probably valid R3 R2. Currently, R2 form used types R3.","code":""},{"path":"/reference/varn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute empirical variance of encounter rate — varn","text":"Fewster, R.M., S.T. Buckland, K.P. Burnham, D.L. Borchers, P.E. Jupp, J.L. Laake L. Thomas. 2009. Estimating encounter rate variance distance sampling. Biometrics 65: 225-236.","code":""},{"path":"/reference/varn.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute empirical variance of encounter rate — varn","text":"Jeff Laake, David L Miller","code":""},{"path":"/news/index.html","id":"mrds-300","dir":"Changelog","previous_headings":"","what":"mrds 3.0.0","title":"mrds 3.0.0","text":"CRAN release: 2024-10-23 New features default R optimiser (strict) monotonicity detection function enforced improved. Monotonicity enforced detection function adjustment terms include covariates. new optimiser Sequential Least Squares Programming (SLSQP) algorithm included ‘nloptr’-package. optimiser uses analytical gradients rather approximate gradients therefore robust improved runtime. Users can still make ddf() use previous default R optimiser specifying mono.method = ‘solnp’ ‘control’ argument. default mono.method ‘slsqp’. small improvements bug fixes monotonic optimiser, results ddf() might change even using old solnp optimiser. cases, however, expect significant changes estimates. Bug Fixes summary fitting object now correctly prints optimiser used monotonicity enforced (‘slsqp’ ‘solnp’). check.mono() now uses point locations optimiser. also uses tolerance optimiser (1e-8) applies tolerance checking (strict) monotonicity, checking 0 <= g(x) <= 1.","code":""},{"path":"/news/index.html","id":"mrds-230","dir":"Changelog","previous_headings":"","what":"mrds 2.3.0","title":"mrds 2.3.0","text":"CRAN release: 2023-12-18 New Features ‘P2’ estimator now default estimating encounter rate variance point transect surveys. (Issue #65) Bug Fixes Re-formatted format section documentation book.tee.data (Issue #91) Ensure MCDS optimizer used double observer models generating errors. (Issue #89) Improved documentation initial values, lower upper bounds ddf mrds_opt documentation (mrds_opt renamed mrds-opt accessible via ?mrds-opt). (Issue #90)","code":""},{"path":"/news/index.html","id":"mrds-229","dir":"Changelog","previous_headings":"","what":"mrds 2.2.9","title":"mrds 2.2.9","text":"CRAN release: 2023-07-06 New Features Users can now download fortran MCDS.exe optimiser used Distance Windows fit single observer models optimisers R via # mrds also MCDS.exe. datasets optimisation MCDS.exe superior (giving better likelihood) optimiser R used mrds. See ?MCDS details. Bug Fixes fix bug (true, 2nd derivative) hessian calculated optimisation. lead weird errors later (summary doesn’t work etc). Hessians now calculated case. Thanks Anne Provencher St-Pierre reporting issue Fix prediction bug (Issue #84) predicting hazard rate model covariates se.fit= TRUE. Note may issues predicting instance binned data - check results expected. Fix bug uniform model fitted adjustments. caused error looking hessian. also required covariance set 0 estimating cluster size standard errors (Issue #79). fix bug using binned data via cutpoints prediction (#73)","code":""},{"path":"/news/index.html","id":"mrds-228","dir":"Changelog","previous_headings":"","what":"mrds 2.2.8","title":"mrds 2.2.8","text":"CRAN release: 2022-11-16 Fix bug plotting rem.fi models truncation used lead error thrown. (#58) Fix bugs uniform fitted adjustments (#59) Fix bug plotting left truncation used points didn’t match detection function line (Distance #134) Fix bug debug reporting uniform models used (Distance #136) Fix bug adjustment term fitting width scaling defined right minus left truncation, rather just right truncation value (Distance #133) Use (0,width) interval monotonicity checks, rather (left, width) causing issues consistent Distance Windows (Distance #135) Expose mono.outer.iter option control number outer iterations used fit monotonic model. Default 200. Make dht output tables consistent. Now always refers Region display (rather Region summary Label N/D tables). Note display change won’t break code looks extract values based column names dht object unchanged. Fixed bug leading erroneous zero totals individuals N/D tables sightings one strata. Bug apparent data sightings clusters varflag 1 option (er_method = 1 Distance ds function) selected dht function.","code":""},{"path":"/news/index.html","id":"mrds-227","dir":"Changelog","previous_headings":"","what":"mrds 2.2.7","title":"mrds 2.2.7","text":"CRAN release: 2022-08-20 Fix bug check # parameters < # data. Thanks Anne Provencher St-Pierre. longer display errors caused solnp/gosolnp constrained optimisation, can seen showit>0 necessary. EXPERIMENTAL change use fixed grid starting values using monotonicity constraints, set control$mono.random.start=TRUE get old behaviour Scale covariates absolutely rather relatively optimisation. Expected.S element dht return now data.frame list Fix total encounter rate variance stratified analysis","code":""},{"path":"/news/index.html","id":"mrds-226","dir":"Changelog","previous_headings":"","what":"mrds 2.2.6","title":"mrds 2.2.6","text":"CRAN release: 2022-03-17 Individuals summary table dht now includes k (number transects) Add effective detection radius (EDR) uncertainty summary output Change default rounding chi-squared test tables. can customized using print(ddf.gof(…), digits=?) e.g., printing knitr::kable New detection function: two-part normal (“tpn”), useful aerial surveys mountainous terrain, see Becker EF, Christ (2015) Unimodal Model Double Observer Distance Sampling Surveys. PLOS ONE 10(8): e0136403. https://doi.org/10.1371/journal.pone.0136403 ?“two-part-normal”. add_df_covar_line -> add.df.covar.line p_dist_table -> p.dist.table Variable strip widths now supported dht. Users supply additional column sample data.frame (“CoveredArea”) giving total area covered given transect set options=list(areas.supplied=TRUE). Thanks Megan Ferguson providing example, code feedback.","code":""},{"path":"/news/index.html","id":"mrds-225","dir":"Changelog","previous_headings":"","what":"mrds 2.2.5","title":"mrds 2.2.5","text":"CRAN release: 2021-07-01 use “probabalists” definition Hermite polynomials, Distance. numerically stable remove setting Hermite parameter 1 (unclear case!) refinement adjustment-key-outer optimisation, optimization now subset parameters, rather holding one parameter constant refine outer optimization, using best previous values (likelihood) rather last values. Use optimizer’s convergence diagnostic assess outer convergence. Refinement “inner” optimization (detfct.fit.opt): (1) simplification stopping rules (one () loop rather two), (2) parameters nudged bounds hit, bounds hit expanded Rescaling covariate models’ parameters (scaling difference large) inverted, causing kinds issues. Made scaling kick-smaller scales. Removed inner (detfct.fit.opt) () loop dependence bounded status, since didn’t seem make sense Stop “correcting” infinite/NaN integrals small numbers misleading optimizer think “good” values Refine constrained optimisation use actual starting values , use random start points compare two. handle case model failed AIC adjustment term selection, montonicity check throw error assign g(x)=0 g(x)<0 integrating detection function (check post-optimisation problem!) fix bug predict.ds uniform key used binned data (Thanks Noémie Cappelle reporting issue!) dht now prints additional information variance estimators used errors now thrown parameters data (either unique distance values bins)","code":""},{"path":"/news/index.html","id":"mrds-224","dir":"Changelog","previous_headings":"","what":"mrds 2.2.4","title":"mrds 2.2.4","text":"CRAN release: 2020-12-01 add_df_covar_line now plots probability density functions point transect case warning longer raised truncation set bins specified binned data (’s assumed furthest cutpoint truncation) AIC/logLik functions now work methods","code":""},{"path":"/news/index.html","id":"mrds-223","dir":"Changelog","previous_headings":"","what":"mrds 2.2.3","title":"mrds 2.2.3","text":"CRAN release: 2020-07-31 fix bug region areas duplicated properly density estimated (using Area=0 data) fix bug getting starting values hazard-rate detection functions point transect data used fix issue left truncation estimating abundance/density dht","code":""},{"path":"/news/index.html","id":"mrds-222","dir":"Changelog","previous_headings":"","what":"mrds 2.2.2","title":"mrds 2.2.2","text":"CRAN release: 2020-05-12 fix issue predict() uniform key functions used new data. new function p_dist_table() show distribution estimated probabilities detection. Useful covariate models determine issues small ps. new function add_df_covar_line(), can used add lines plots showing detection function given covariate combination. Thanks various members distance sampling mailing list suggestion. plots produced plot.ds/plot.rem/plot.rem.fi/plot.trial/plot.trial.fi/plot.io/plot.io.fi/plot.det.tables now use defaults R 4.0.0 (“lightgrey” bars histograms). deprecated arguments plot.ds removed.","code":""},{"path":"/news/index.html","id":"mrds-221","dir":"Changelog","previous_headings":"","what":"mrds 2.2.1","title":"mrds 2.2.1","text":"CRAN release: 2020-01-22 hessian now returned solnp (constrained optimisation) used fit detection function Check NA covariate values, thanks Ana Cañadas highlighting issue. enable P2 variance estimator points Corrected handling NA covariates new option se.fit predict.ds obtain standard errors probability detection ESW Fixed bug dht left truncation used. Previously left truncation ignored. See https://github.com/DistanceDevelopment/mrds/issues/22 thanks Carl Schwarz finding bug. Fix bug two objects missing observer error thrown. Thanks Ainars Aunins reporting bug Eric Rexstad diagnosing.","code":""},{"path":"/news/index.html","id":"mrds-220","dir":"Changelog","previous_headings":"","what":"mrds 2.2.0","title":"mrds 2.2.0","text":"CRAN release: 2018-06-27 fixed bug calculation Kolmogorov-Smirnov p-values. Previous methods take account parameters detection function estimated, new bootstrap-based approach implemented. time-consuming, Kolmogorov-Smirnov test longer performed default (use ks=TRUE get test). Encounter rate variance point transects points sampled equal number times incorrect. # mrds now uses P3 estimator Fewster et al (2009) point transect encounter rate variance. Bug predicting left truncation used. Previously distance column new data set zero left truncation > 0 predictions discarded, particularly problematic io, etc # mrds models. Thanks Natalie Kelly spotting suggesting fix. Add errors “P3” used encounter rate variance estimator non-point transect data, throws warning switches P3 points ’s specified.","code":""},{"path":"/news/index.html","id":"mrds-2118","dir":"Changelog","previous_headings":"","what":"mrds 2.1.18","title":"mrds 2.1.18","text":"CRAN release: 2017-07-04 fixed bug parameter rescaling scales incorrectly entered 1 due indexing bug Quantile-quantile plots now use aspect ratio 1 Bug half-normal integration code adjustments used lead likelohood evaluated incorrectly models binned (grouped) distances. effected AIC comparisons models parameter estimates . Thanks Olivier Devineau spotting ! Fix bug predict.ds() didn’t work uniform keys. Thanks Jason Roberts reporting bug. Correctly specify distbegin/distend predictions binned data, thanks Jason Roberts spotting bug. Let user know int.range set summary() results","code":""},{"path":"/news/index.html","id":"mrds-2117","dir":"Changelog","previous_headings":"","what":"mrds 2.1.17","title":"mrds 2.1.17","text":"CRAN release: 2016-10-03 fixed starting value bug hazard-rate models distances binned. Thanks Natalia Schroeder Eric Rexstad discovering . predict.ds now uses numerical integration calculate integrals (rather approximation). Thanks Eric Rexstad spotting issue goodness fit testing highlighted . plot.ds() now accepts xlab=“” argument change x axis label. Thanks Steve Ahlswede suggesting .","code":""},{"path":"/news/index.html","id":"mrds-2116","dir":"Changelog","previous_headings":"","what":"mrds 2.1.16","title":"mrds 2.1.16","text":"CRAN release: 2016-08-10 improved predict() method now Right Thing factors Fixed bug scaling histograms point transect pdf plots points plots. Thanks Erics Howe Rexstad reporting issues. can now set y axis limits using plot.ds, defaults sensible pt+point models. Thanks Eric Howe suggestion. Fixed bug setting initial values threw many errors. Thanks Laura Marshall spotting .","code":""},{"path":"/news/index.html","id":"mrds-2115","dir":"Changelog","previous_headings":"","what":"mrds 2.1.15","title":"mrds 2.1.15","text":"rescaling parameters correct, now fixed. Thanks Laura Marshall spotting . coefficients called coefficients (mixture coefficients parameters) summary() results speed-io.fi models (thanks Winston Chang’s profvis, showing many unecessary calls model.matrix) plot.ds now pdf= option plot probability density function (point transect models ) assign.par, create.ddfobj detfct now exported, can used dsm (though shouldn’t used anything else!) fixed bug left truncation probability detection calculated correctly. Thanks Jason Roberts pointing !","code":""},{"path":"/news/index.html","id":"mrds-2114","dir":"Changelog","previous_headings":"","what":"mrds 2.1.14","title":"mrds 2.1.14","text":"CRAN release: 2015-07-29 updated initialvalues calculation hazard-rate – now uses Beavers & Ramsay method scale parameters hazard-rate automatic parameter rescaling covariate models covariates poorly scaled. Now default nlminb method minor speed-logistic code distance covariate","code":""},{"path":"/news/index.html","id":"mrds-2113","dir":"Changelog","previous_headings":"","what":"mrds 2.1.13","title":"mrds 2.1.13","text":"link distance sampling Google Groups help duplicate non-convergence warning/error removed warning singular Hessian now warning() re-wrote debug output easier read dht now option (ci.width) specify confidence interval width output (thanks David Pavlacky suggestion) monotonicity now operates left->right truncation models left truncated fail error message many integration intervals used. Thanks Tiago Marques highlighting issue.","code":""},{"path":"/news/index.html","id":"mrds-2112","dir":"Changelog","previous_headings":"","what":"mrds 2.1.12","title":"mrds 2.1.12","text":"CRAN release: 2015-02-05 examples now .","code":""},{"path":"/news/index.html","id":"mrds-2111","dir":"Changelog","previous_headings":"","what":"mrds 2.1.11","title":"mrds 2.1.11","text":"Bug unif+cos(1) models using monotonicity constraints randomised starting points. Since model 1 parameter, bug selecting columns Rsolnp starting value code makes result vector, doesn’t work apply later. Workaround using randomised starting values # mrds model. Thanks Nathalie Cavada finding bug. Fixed bug pdot.dsr.integrate.logistic giving incorrect AIC values FI models binned data points lines. Fixed issue returned optimisation obejct got accessed without checked see ’s result error, causing problems encapsulating ddf functions.","code":""},{"path":"/news/index.html","id":"mrds-2110","dir":"Changelog","previous_headings":"","what":"mrds 2.1.10","title":"mrds 2.1.10","text":"CRAN release: 2014-09-27 added testing directory .Rbuildignore, tests now included built packages run CRAN. tests use source packages github.","code":""},{"path":"/news/index.html","id":"mrds-219","dir":"Changelog","previous_headings":"","what":"mrds 2.1.9","title":"mrds 2.1.9","text":"BUG FIXES removed test failed CRAN’s testing","code":""},{"path":"/news/index.html","id":"mrds-218","dir":"Changelog","previous_headings":"","what":"mrds 2.1.8","title":"mrds 2.1.8","text":"CRAN release: 2014-09-16 CHANGES * removed doeachint/cgftab code, used spline approximation effective strip width/effective area half-normal detection function used. replaced exact calculation via error function (erf). * tests updated accordingly * monotonically constrained models now use bunch random start points – uses gosolnp() Rsolnp * re-fitting jiggling parameters refined multiply uniform variable limits set upper lower bounds (+/-1) jiggling can go either way, approximately scale parameters * corrected documentation predict methods, incorrectly stated returned point transect models. Thanks Thibault Dieuleveut spotting . BUG FIXES fixed 2 bugs create.varstructure; first removal method treated trial method. second obs.table specified (Region sample labels dataframe obs) dual observers. case doubling number observations. fixed bug dht.deriv setup removal; thanks John Boulanger noticing reporting bugs","code":""},{"path":"/news/index.html","id":"mrds-217","dir":"Changelog","previous_headings":"","what":"mrds 2.1.7","title":"mrds 2.1.7","text":"BUG FIXES Standardisation applied detection functions (g(0)=1) adjustments (uneccesary) also caused issues using gamma detection functions calculated g(apex) instead. Standardisation code removed adjustments correct scaling used gamma . Thanks Thomas Doniol-Valcroze alerting us bug. Partial name-matching dht fixed. Produced warning error. NEW FEATURES Tests gamma detection functions Observations automatically ordered object observer fields (included) ddf expected double observer analysis. erroneous error message can created ordered correctly worse. Thanks Ainars Aunins bringing attention. Added function create_document() run shiny application interface # mrds create knitr document template. template currently single observer analysis behind features app fairly complete.","code":""},{"path":"/news/index.html","id":"mrds-216","dir":"Changelog","previous_headings":"","what":"mrds 2.1.6","title":"mrds 2.1.6","text":"CRAN release: 2014-06-11 BUG FIXES key+adjustment models failed converge due bugs optimisation code (mainly unif+cosine models) NEW FEATURES optimisation tips help page ?“mrds-opt”","code":""},{"path":"/news/index.html","id":"mrds-215","dir":"Changelog","previous_headings":"","what":"mrds 2.1.5","title":"mrds 2.1.5","text":"CRAN release: 2014-04-22 CHANGES * models adjustment terms covariates now allowed * mono.check function checks detection function monotonic range (observed covariate combinations covariates included)","code":""},{"path":"/news/index.html","id":"mrds-214-5","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-5","title":"mrds 2.1.4-5","text":"CHANGES new testthat changes test locations etc, sorted . = argument plot.* now sorts first, plots always order plot.ds now friendly par() users, thanks Jason Roberts pointer BUG FIXES uniform+cosine detection functions ignored using monotonicity constraints, now can used together mono.strict=TRUE didn’t automatically turn mono=TRUE, extra logic correct montonicity constraints use standardised (g(x)/g(0) detection functions, g(x)>1 monotonicity constraints voilated. Now standardised detection functions used. Thanks Len Thomas noticing bug.","code":""},{"path":"/news/index.html","id":"mrds-214-3","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-3","title":"mrds 2.1.4-3","text":"BUG FIX predict.io.fi work new data (thanks Len Thomas Phil Hammond pointing ) CHANGES general documentation updates simplication re-structuring internals","code":""},{"path":"/news/index.html","id":"mrds-214-3-1","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-3","title":"mrds 2.1.4-3","text":"CHANGES internal re-structuring summary methods tests","code":""},{"path":"/news/index.html","id":"mrds-214-2","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-2","title":"mrds 2.1.4-2","text":"CHANGES plot.ds now new argument, TRUE (default) create new window plot. general janitorial work inside plotting methods, removing simplifying old code; (hopefully) new features.","code":""},{"path":"/news/index.html","id":"mrds-214-1","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-1","title":"mrds 2.1.4-1","text":"CHANGES Warning now issued truncation set largest distance default. updated dht documentation","code":""},{"path":"/news/index.html","id":"mrds-214","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4","title":"mrds 2.1.4","text":"CRAN release: 2013-09-23 CHANGES modified det.tables plot.det.tables create plot tables depending observer configuration (io,trial,removal). plot functions (plot.ds) added argument subtitle=TRUE (default). can either TRUE, FALSE. TRUE shows sub-titles plot type. FALSE, subtitles shown. argument possible get subtitles without main title. set iterlimit=1 call rem.glm ddf.rem.fi prevent convergence issues getting starting values. created average.line.cond now used place calcp.# mrds computing average line conditional detection function weighting values estimated population proportions covariate value. now weighted sample proportions (mean value).","code":""},{"path":"/news/index.html","id":"mrds-213-1","dir":"Changelog","previous_headings":"","what":"mrds 2.1.3-1","title":"mrds 2.1.3-1","text":"BUG FIXES patched dht.se vc1=NA fail patched plot.ds issue dev.new using another graphics device plays nice Distance.","code":""},{"path":"/news/index.html","id":"mrds-213","dir":"Changelog","previous_headings":"","what":"mrds 2.1.3","title":"mrds 2.1.3","text":"CRAN release: 2013-08-13 BUG FIXES patched bug dht returning incorrect values bysample sample.area Dhat. patched code dht.se skip variance component p key=unif p=1. CHANGES modified code detfct.fit.opt io rem functions adapt changes optimx removed old depends statements optimx Rsolnp; uses import","code":""},{"path":"/news/index.html","id":"mrds-212","dir":"Changelog","previous_headings":"","what":"mrds 2.1.2","title":"mrds 2.1.2","text":"CRAN release: 2013-06-26 BUG FIXES fixed usage example lines long","code":""},{"path":"/news/index.html","id":"mrds-211","dir":"Changelog","previous_headings":"","what":"mrds 2.1.1","title":"mrds 2.1.1","text":"BUG FIXES full independence methods, calculation distance sampling component unbinned data . Code added compute component correctly binned data. required changes ddf.x.fi routines logistic integration routines. CHANGES Modified flpt.lnl code set integrals 1E-25 <=0 integrate.pdf vector argument integration range converted matrix length 2. ddf.gof now use breaks set binned data unless others specified. NEW FEATURES Added threshold detection functions (“th1” “th2”) required minor changes functions summary/print. Added xlab ylab arguments plot functions -ride default labels","code":""},{"path":"/news/index.html","id":"mrds-210","dir":"Changelog","previous_headings":"","what":"mrds 2.1.0","title":"mrds 2.1.0","text":"CRAN release: 2012-12-11 CHANGES Modified DESCRIPTION R 2.15 greater allowed. Needed optimHess jll(12/10/2012)","code":""},{"path":"/news/index.html","id":"mrds-209","dir":"Changelog","previous_headings":"","what":"mrds 2.0.9","title":"mrds 2.0.9","text":"CRAN release: 2012-12-04 NEW FEATURES New option plot=TRUE/FALSE qqplot.ddf(), want K-S CvM test statistics, plotting. dlm(11/13/2012) BUG FIXES Fixed problem obs dataframe call dht (links observations samples regions) contained fields also observation dataframe. Now fields needed obs selected merge. dlm(11/13/2012)","code":""},{"path":"/news/index.html","id":"mrds-208","dir":"Changelog","previous_headings":"","what":"mrds 2.0.8","title":"mrds 2.0.8","text":"Unchanged version sent Distance summer 2012","code":""},{"path":"/news/index.html","id":"mrds-207","dir":"Changelog","previous_headings":"","what":"mrds 2.0.7","title":"mrds 2.0.7","text":"NEW FEATURES Restructured likelihood/integration code fitting ds models Adjustment functions now work binned data. Code added assure fields distbegin distend available binned=TRUE breaks set well. Added argument adj.exp set TRUE use keyexp(adj) rather keyadj keep f(x)>0 Added following restrictions adjustments: uniform key, adj.scale must “width”; non-uniform key adj.scale=“width”, doeachint set TRUE scale integration work. Changed code several functions uniform key adjustment functions used. New option plot=TRUE/FALSE qqplot.ddf(), want K-S CvM test statistics, plotting. BUG FIXES Fixed inconsistencies use documentation showit argument Fixed bug groups recognised dht() size column occurred model data observation table. (Thanks Darren Kidney spotting .)","code":""},{"path":"/news/index.html","id":"mrds-206","dir":"Changelog","previous_headings":"","what":"mrds 2.0.6","title":"mrds 2.0.6","text":"NEW FEATURES Example code binned point count data added help ddf Modified ddf.rem.fi ddf.io.fi use starting values iterative offset glm make optimization robust Added restriction one attempts fitting adjustment functions covariates. Added code assure necessary fields available binned data (binned=TRUE). BUG FIXES Patched create.ddfobj point counts binned data work properly Patched ddf.ds stored data object$data detected=1 Patched ddf.io.fi throw error optimx() converge Patched ddf.io.fi ddf.rem.fi inclusion factor(observer) work formula Patched dht, dht.se covered.region.dht handle 0 observations Suppress package messages optimx Patched fpt.lnl, flt.lnl, print.ddf, model.description, summary.ds, print.summary.ds coef.io, coef.trial, coef.rem, plot.io, plot.trial, plot.rem handle uniform key function.","code":""},{"path":"/news/index.html","id":"mrds-205","dir":"Changelog","previous_headings":"","what":"mrds 2.0.5","title":"mrds 2.0.5","text":"CRAN release: 2012-03-27 NEW FEATURES First version submitted CRAN BUG FIXES Fixed code dht.se uses sample size detection model Satterthwaite approximation rather size selected subset observations. Fixed coef functions return parameter estimates adjustment functions .","code":""},{"path":"/news/index.html","id":"mrds-204","dir":"Changelog","previous_headings":"","what":"mrds 2.0.4","title":"mrds 2.0.4","text":"BUG FIXES Changed flt.var compute variance average p correctly point transects. Numerous changes dlm optimization code Changes documentation remove non-ASCII characters","code":""},{"path":"/news/index.html","id":"mrds-203","dir":"Changelog","previous_headings":"","what":"mrds 2.0.3","title":"mrds 2.0.3","text":"NEW FEATURES Major rewrite ddf summary functions handle adjustment functions BUG FIXES Changes det.tables gof functions use include.lowest=TRUE calls cut function Changed usage T F TRUE FALSE","code":""},{"path":"/news/index.html","id":"mrds-202","dir":"Changelog","previous_headings":"","what":"mrds 2.0.2","title":"mrds 2.0.2","text":"changes 2.0.2 earlier see ONEWS","code":""}]
+[{"path":"/articles/mrds-golftees.html","id":"aims","dir":"Articles","previous_headings":"","what":"Aims","title":"Double platform analysis","text":"aims practical learn model trial independent-observer configuration full point independence assumptions, include covariates detection function(s) select competing models.","code":""},{"path":"/articles/mrds-golftees.html","id":"golf-tee-data","dir":"Articles","previous_headings":"Aims","what":"Golf tee data","title":"Double platform analysis","text":"data come survey golf tees conducted statistics students University St Andrews. data collected along transect lines, 210 metres total. distance 4 metres centre line searched , purposes exercise, assume comprised total study area, divided two strata. 250 clusters tees total 760 individual tees total. population independently surveyed two observer teams. following data recorded detected group: perpendicular distance, cluster size, observer (team 1 2), ‘sex’ (males yellow females green golf tees occur single-sex clusters) ‘exposure’. Exposure subjective judgment whether cluster substantially obscured grass (exposure=0) (exposure=1). lengths grass varied along transect line grass slightly yellow along one part line compared rest. golf tee dataset provided part mrds package. Open R load mrds package golf tee dataset (called book.tee.data). elements required MRDS analysis contained within object dataset. data hierarchical structure (rather ‘flat file’ format) separate elements observations, samples regions. code , tables extracted avoid typing long names. Examine columns detections data particular structure. structure detection follows: detected object (case object group cluster golf tees) given unique number object column, object occurs twice - observer 1 observer 2, detected column indicates whether object seen (detected=1) seen (detected=0) observer, perpendicular distance distance column cluster size size column (default names ds function). ensure variables sex exposure treated correctly, define factor variables.","code":"library(knitr) library(mrds) # Access the golf tee data data(book.tee.data) # Investigate the structure of the dataset str(book.tee.data) ## List of 4 ## $ book.tee.dataframe:'data.frame': 324 obs. of 7 variables: ## ..$ object : num [1:324] 1 1 2 2 3 3 4 4 5 5 ... ## ..$ observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... ## ..$ detected: num [1:324] 1 0 1 0 1 0 1 0 1 0 ... ## ..$ distance: num [1:324] 2.68 2.68 3.33 3.33 0.34 0.34 2.53 2.53 1.46 1.46 ... ## ..$ size : num [1:324] 2 2 2 2 1 1 2 2 2 2 ... ## ..$ sex : num [1:324] 1 1 1 1 0 0 1 1 1 1 ... ## ..$ exposure: num [1:324] 1 1 0 0 0 0 1 1 0 0 ... ## $ book.tee.region :'data.frame': 2 obs. of 2 variables: ## ..$ Region.Label: Factor w/ 2 levels \"1\",\"2\": 1 2 ## ..$ Area : num [1:2] 1040 640 ## $ book.tee.samples :'data.frame': 11 obs. of 3 variables: ## ..$ Sample.Label: num [1:11] 1 2 3 4 5 6 7 8 9 10 ... ## ..$ Region.Label: Factor w/ 2 levels \"1\",\"2\": 1 1 1 1 1 1 2 2 2 2 ... ## ..$ Effort : num [1:11] 10 30 30 27 21 12 23 23 15 12 ... ## $ book.tee.obs :'data.frame': 162 obs. of 3 variables: ## ..$ object : int [1:162] 1 2 3 21 22 23 24 59 60 61 ... ## ..$ Region.Label: int [1:162] 1 1 1 1 1 1 1 1 1 1 ... ## ..$ Sample.Label: int [1:162] 1 1 1 1 1 1 1 1 1 1 ... # Extract the list elements from the dataset into easy-to-access objects detections <- book.tee.data$book.tee.dataframe # detection information region <- book.tee.data$book.tee.region # region info samples <- book.tee.data$book.tee.samples # transect info obs <- book.tee.data$book.tee.obs # links detections to transects and regions # Check detections head(detections) ## object observer detected distance size sex exposure ## 1 1 1 1 2.68 2 1 1 ## 21 1 2 0 2.68 2 1 1 ## 2 2 1 1 3.33 2 1 0 ## 22 2 2 0 3.33 2 1 0 ## 3 3 1 1 0.34 1 0 0 ## 23 3 2 0 0.34 1 0 0 # Define sex and exposure as factor variables detections$sex <- as.factor(detections$sex) detections$exposure <- as.factor(detections$exposure)"},{"path":[]},{"path":"/articles/mrds-golftees.html","id":"estimation-of-p0-distance-only","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses","what":"Estimation of p(0): distance only","title":"Double platform analysis","text":"start analysing data assuming Observer 2 generating trials Observer 1 vice versa, .e. trial configuration Observer 1 primary Observer 2 tracker. (data also analysed independent observer configuration - welcome try ). begin assuming full independence (.e. detections observers independent distances): requires mark-recapture (MR) model , start , perpendicular distance included covariate.","code":"# Fit trial configuration with full independence model fi.mr.dist <- ddf(method='trial.fi', mrmodel=~glm(link='logit',formula=~distance), data=detections, meta.data=list(width=4))"},{"path":"/articles/mrds-golftees.html","id":"examining-mrds-output","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses > Estimation of p(0): distance only","what":"Examining mrds output","title":"Double platform analysis","text":"fitted model, can create tables summarizing detection data. commands , tables created using det.tables function saved detection.tables. information detection summary tables can plotted, , interest space, one (six possible plots) shown (Figure 1). Figure 1: Detection distances observer 1 plot numbers : Histograms distances detections either, , observers. shaded regions show number observer 1. Histograms distances detections either, , observers. shaded regions show number observer 2. Histograms distances duplicates (detected observers). Histogram distances detections either, , observers. shown trial configuration. Histograms distances observer 2. shaded regions indicate number duplicates - example, shaded region number clusters distance bin detected Observer 1 given also detected Observer 2 (“|” symbol plot legend means “given ”). Histograms distances observer 1. shaded regions indicate number duplicates plot 5. shown trial configuration. Note independent observer configuration chosen, plots available. summary detection function model available using summary function. Q-Q plot interpretation Q-Q plot conventional, single platform analysis (Figure 2). Figure 2: Fitted detection function full independence, trial mode. Abbreviated \\(\\chi^2\\) goodness--fit assessment shows \\(\\chi^2\\) contribution distance sampling model 11.5 \\(\\chi^2\\) contribution mark-recapture model 3.4. combination elements produces total \\(\\chi^2\\) 14.9 17 degrees freedom, resulting \\(p\\)-value 0.604 (two) detection functions can plotted (Figure 3). Figure 3: Observer 1 detection function (left) conditional detection probabilty plot (right). plot labelled “Observer=1 detections” shows histogram Observer 1 detections estimated Observer 1 detection function overlaid adjusted p(0). dots show estimated detection probability Observer 1 detections. “Conditional detection probability” shows proportion Obs 2’s detections detected Obs 1 (also see detection tables). fitted line estimated detection probability function Obs 1 (given detection Obs 2) - MR model. Dots estimated detection probabilities Obs 1 detection. evidence unmodelled heterogeneity fitted line left-hand plot declines slowly histogram distance increases.","code":"# Create a set of tables summarizing the double observer data detection.tables <- det.tables(fi.mr.dist) # Print these detection tables print(detection.tables) ## ## Observer 1 detections ## Detected ## Missed Detected ## [0,0.4] 1 25 ## (0.4,0.8] 2 16 ## (0.8,1.2] 2 16 ## (1.2,1.6] 6 22 ## (1.6,2] 5 9 ## (2,2.4] 2 10 ## (2.4,2.8] 6 12 ## (2.8,3.2] 6 9 ## (3.2,3.6] 2 3 ## (3.6,4] 6 2 ## ## Observer 2 detections ## Detected ## Missed Detected ## [0,0.4] 4 22 ## (0.4,0.8] 1 17 ## (0.8,1.2] 0 18 ## (1.2,1.6] 2 26 ## (1.6,2] 1 13 ## (2,2.4] 2 10 ## (2.4,2.8] 3 15 ## (2.8,3.2] 4 11 ## (3.2,3.6] 2 3 ## (3.6,4] 1 7 ## ## Duplicate detections ## ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] (2.8,3.2] ## 21 15 16 20 8 8 9 5 ## (3.2,3.6] (3.6,4] ## 1 1 ## ## Observer 1 detections of those seen by Observer 2 ## Missed Detected Prop. detected ## [0,0.4] 1 21 0.9545455 ## (0.4,0.8] 2 15 0.8823529 ## (0.8,1.2] 2 16 0.8888889 ## (1.2,1.6] 6 20 0.7692308 ## (1.6,2] 5 8 0.6153846 ## (2,2.4] 2 8 0.8000000 ## (2.4,2.8] 6 9 0.6000000 ## (2.8,3.2] 6 5 0.4545455 ## (3.2,3.6] 2 1 0.3333333 ## (3.6,4] 6 1 0.1428571 # Plot detection information, change number to see other plots plot(detection.tables, which=1) # Produce a summary of the fitted detection function object summary(fi.mr.dist) ## ## Summary for trial.fi object ## Number of observations : 162 ## Number seen by primary : 124 ## Number seen by secondary (trials) : 142 ## Number seen by both (detected trials): 104 ## AIC : 452.8094 ## ## ## Conditional detection function parameters: ## estimate se ## (Intercept) 2.900233 0.4876238 ## distance -1.058677 0.2235722 ## ## Estimate SE CV ## Average p 0.6423252 0.04069410 0.06335435 ## Average primary p(0) 0.9478579 0.06109656 0.06445750 ## N in covered region 193.0486185 15.84826582 0.08209469 # Produce goodness of fit statistics and a qq plot gof.result <- ddf.gof(fi.mr.dist, main=\"Full independence, trial configuration\\ngoodness of fit Golf tee data\") # Extract chi-square statistics for reporting chi.distance <- gof.result$chisquare$chi1$chisq chi.markrecap <- gof.result$chisquare$chi2$chisq chi.total <- gof.result$chisquare$pooled.chi par(mfrow=c(1,2)) # Plot detection functions plot(fi.mr.dist) par(mfrow=c(1,1))"},{"path":"/articles/mrds-golftees.html","id":"estimating-abundance","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses > Estimation of p(0): distance only","what":"Estimating abundance","title":"Double platform analysis","text":"Abundance estimated using dht function. function, need supply information transects survey regions. Table 1: Survey summary statistics golftees Table 1: Abundance estimates golftee population two strata estimated abundance 593 (recall true abundance 760) estimate negatively biased. 95% confidence interval include true value.","code":"# Calculate density estimates using the dht function tee.abund <- dht(model=fi.mr.dist, region.table=region, sample.table=samples, obs.table=obs) # Print out results in a nice format knitr::kable(tee.abund$individuals$summary, digits=2, caption=\"Survey summary statistics for golftees\") knitr::kable(tee.abund$individuals$N, digits=2, caption=\"Abundance estimates for golftee population with two strata\")"},{"path":"/articles/mrds-golftees.html","id":"estimation-of-p0-distance-and-other-explanatory-variables","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses","what":"Estimation of p(0): distance and other explanatory variables","title":"Double platform analysis","text":"including covariates, size, sex exposure, MR model? MR model use? command , distance sex included detection function - remember sex defined factor earlier . code , possible models (excluding interaction terms) fitted. see preferred model contains distance + sex + exposure check goodness--fit statistics (Figure 4) detection function plots (Figure 5). Figure 4: Preferred model goodness fit. Figure 5: Detection functions full independence model distance, sex exposure MR component. produce abundance estimates. model incorporates effect variables causing heterogeneity. estimated abundance 651 less biased previous estimate 95% confidence interval (494, 858) contains true value. model reasonable fit data (.e. non-significant \\(\\chi^2\\) Cramer von Mises tests). model lower AIC (405.7) model distance (452.81) preferred.","code":"# Full independence model # Set up list with possible models mr.formula <- c(\"~distance\",\"~distance+size\",\"~distance+sex\",\"~distance+exposure\", \"~distance+size+sex\",\"~distance+size+exposure\",\"~distance+sex+exposure\", \"~distance+size+sex+exposure\") num.mr.models <- length(mr.formula) # Create dataframe to store results fi.results <- data.frame(MRmodel=mr.formula, AIC=rep(NA,num.mr.models)) # Loop through all MR models for (i in 1:num.mr.models) { fi.model <- ddf(method='trial.fi', mrmodel=~glm(link='logit',formula=as.formula(mr.formula[i])), data=detections, meta.data=list(width=4)) fi.results$AIC[i] <- summary(fi.model)$aic } # Calculate delta AIC fi.results$deltaAIC <- fi.results$AIC - min(fi.results$AIC) # Order by delta AIC fi.results <- fi.results[order(fi.results$deltaAIC), ] # Print results in pretty way knitr::kable(fi.results, digits=2) # Fit chosen model fi.mr.dist.sex.exp <- ddf(method='trial.fi', mrmodel=~glm(link='logit',formula=~distance+sex+exposure), data=detections, meta.data=list(width=4)) # Check goodness-of-fit ddf.gof(fi.mr.dist.sex.exp, main=\"FI trial mode\\nMR=dist+sex+exp\") ## ## Goodness of fit results for ddf object ## ## Chi-square tests ## ## Distance sampling component: ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 25.000 16.000 16.000 22.000 9.000 10.000 12.000 ## Expected 20.276 19.341 18.074 16.345 14.083 11.511 9.046 ## Chisquare 1.101 0.577 0.238 1.957 1.834 0.198 0.964 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 9.000 3.000 2.000 124.000 ## Expected 6.915 5.044 3.366 124.000 ## Chisquare 0.629 0.828 0.554 8.881 ## ## No degrees of freedom for test ## ## Mark-recapture component: ## Capture History 01 ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 1 2 2 6 5 2 6 ## Expected 1 2 2 6 4 4 6 ## Chisquare 0 0 0 0 0 1 0 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 6 2 6 38 ## Expected 7 2 5 38 ## Chisquare 0 0 0 2 ## Capture History 11 ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 21 15 16 20 8 8 9 ## Expected 21 15 16 20 9 6 9 ## Chisquare 0 0 0 0 0 1 0 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 5 1 1 104 ## Expected 4 1 2 104 ## Chisquare 0 0 1 2 ## ## ## Total chi-square = 12.205 P = 0.66344 with 15 degrees of freedom ## ## Distance sampling Cramer-von Mises test (unweighted) ## Test statistic = 0.0976947 p-value = 0.596294 par(mfrow=c(1,2)) plot(fi.mr.dist.sex.exp) # Get abundance estimates tee.abund.fi <- dht(model=fi.mr.dist.sex.exp, region.table=region, sample.table=samples, obs.table=obs) # Print results print(tee.abund.fi) ## Abundance and density estimates from distance sampling ## Variance : R2, N/L ## ## Summary statistics ## ## Region Area CoveredArea Effort n k ER se.ER cv.ER ## 1 1 1040 1040 130 72 6 0.5538462 0.02926903 0.05284685 ## 2 2 640 640 80 52 5 0.6500000 0.08292740 0.12758061 ## 3 Total 1680 1680 210 124 11 0.5904762 0.03641856 0.06167659 ## ## Summary for clusters ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 119.28976 14.18666 0.1189260 91.64685 155.2704 10.12494 ## 2 2 98.17731 18.59356 0.1893876 63.58200 151.5961 7.83844 ## 3 Total 217.46707 26.05226 0.1197987 169.90391 278.3451 23.21368 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.1147017 0.01364102 0.1189260 0.08812198 0.1492985 10.12494 ## 2 2 0.1534020 0.02905244 0.1893876 0.09934687 0.2368689 7.83844 ## 3 Total 0.1294447 0.01550730 0.1197987 0.10113328 0.1656816 23.21368 ## ## Summary for individuals ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 371.0397 37.86856 0.1020607 297.1733 463.2666 11.904084 ## 2 2 279.7141 67.25221 0.2404320 154.4960 506.4208 5.482654 ## 3 Total 650.7538 82.72649 0.1271241 493.7469 857.6875 11.907393 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.3567690 0.03641208 0.1020607 0.2857436 0.4454487 11.904084 ## 2 2 0.4370533 0.10508158 0.2404320 0.2414000 0.7912825 5.482654 ## 3 Total 0.3873535 0.04924196 0.1271241 0.2938970 0.5105283 11.907393 ## ## Expected cluster size ## Region Expected.S se.Expected.S cv.Expected.S ## 1 1 3.110407 0.2740170 0.08809682 ## 2 2 2.849071 0.2211204 0.07761141 ## 3 Total 2.992425 0.1758058 0.05875027"},{"path":"/articles/mrds-golftees.html","id":"point-independence","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses","what":"Point independence","title":"Double platform analysis","text":"less restrictive assumption full independence point independence, assumes detections independent transect centre line .e. perpendicular distance zero (Buckland, Laake, & Borchers, 2010). Determine simple point independence model better simple full independence one. requires distance sampling (DS) model specified well MR model. try half-normal key function DS model (Figure 6). Figure 6: Point independence model trial configuration goodness fit. AIC point independence model 452.03 marginally smaller first full independence model fitted hence preferred. results estimated abundance 688. Can better covariates included DS model?","code":"# Fit trial configuration with point independence model pi.mr.dist <- ddf(method='trial', mrmodel=~glm(link='logit', formula=~distance), dsmodel=~cds(key='hn'), data=detections, meta.data=list(width=4)) # Summary pf the model summary(pi.mr.dist) ## ## Summary for trial.fi object ## Number of observations : 162 ## Number seen by primary : 124 ## Number seen by secondary (trials) : 142 ## Number seen by both (detected trials): 104 ## AIC : 140.8887 ## ## ## Conditional detection function parameters: ## estimate se ## (Intercept) 2.900233 0.4876238 ## distance -1.058677 0.2235722 ## ## Estimate SE CV ## Average primary p(0) 0.9478579 0.02409996 0.02542571 ## ## ## ## Summary for ds object ## Number of observations : 124 ## Distance range : 0 - 4 ## AIC : 311.1385 ## Optimisation : mrds (nlminb) ## ## Detection function: ## Half-normal key function ## ## Detection function parameters ## Scale coefficient(s): ## estimate se ## (Intercept) 0.6632435 0.09981249 ## ## Estimate SE CV ## Average p 0.5842744 0.04637627 0.07937412 ## ## ## Summary for trial object ## ## Total AIC value = 452.0272 ## Estimate SE CV ## Average p 0.5538091 0.04615832 0.08334697 ## N in covered region 223.9038534 22.99246338 0.10268900 # Produce goodness of fit statistics and a qq plot gof.results <- ddf.gof(pi.mr.dist, main=\"Point independence, trial configuration\\n goodness of fit Golftee data\") # Get abundance estimates tee.abund.pi <- dht(model=pi.mr.dist, region.table=region, sample.table=samples, obs.table=obs) # Print results print(tee.abund.pi) ## Abundance and density estimates from distance sampling ## Variance : R2, N/L ## ## Summary statistics ## ## Region Area CoveredArea Effort n k ER se.ER cv.ER ## 1 1 1040 1040 130 72 6 0.5538462 0.02926903 0.05284685 ## 2 2 640 640 80 52 5 0.6500000 0.08292740 0.12758061 ## 3 Total 1680 1680 210 124 11 0.5904762 0.03641856 0.06167659 ## ## Summary for clusters ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 130.00869 12.83042 0.09868894 106.66570 158.4601 48.427773 ## 2 2 93.89516 14.30894 0.15239268 66.25307 133.0701 8.094137 ## 3 Total 223.90385 23.21562 0.10368567 181.78333 275.7840 44.038262 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.1250084 0.01233694 0.09868894 0.1025632 0.1523655 48.427773 ## 2 2 0.1467112 0.02235771 0.15239268 0.1035204 0.2079220 8.094137 ## 3 Total 0.1332761 0.01381882 0.10368567 0.1082044 0.1641571 44.038262 ## ## Summary for individuals ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 413.4999 44.00744 0.1064267 332.9536 513.5313 30.289360 ## 2 2 274.4628 53.42626 0.1946576 171.1754 440.0740 5.987499 ## 3 Total 687.9626 79.79844 0.1159924 542.4532 872.5040 25.993175 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.3975960 0.04231485 0.1064267 0.3201477 0.4937801 30.289360 ## 2 2 0.4288481 0.08347854 0.1946576 0.2674615 0.6876156 5.987499 ## 3 Total 0.4095016 0.04749907 0.1159924 0.3228888 0.5193476 25.993175 ## ## Expected cluster size ## Region Expected.S se.Expected.S cv.Expected.S ## 1 1 3.180556 0.2114629 0.06648615 ## 2 2 2.923077 0.1750319 0.05987935 ## 3 Total 3.072581 0.1391365 0.04528327"},{"path":"/articles/mrds-golftees.html","id":"covariates-in-the-ds-model","dir":"Articles","previous_headings":"Aims > Golf tee survey analyses > Point independence","what":"Covariates in the DS model","title":"Double platform analysis","text":"include covariates DS detection function, need specify MCDS model follows: Use summary function check AIC decide going include additional covariates detection function. Now try point independence model preferred MR model full independence analyses. indicates sex included DS model. check goodness fit obtain abundance (Figure 7). Figure 7: Goodness fit point independence model sex covariate distance sampling component distance, sex exposure mr component. model estimated abundance 695, closest true value models - still less true value indicating, perhaps, unmodelled heterogeneity trackline (perhaps just bad luck - remember one survey). complex modelling worthwhile? case, estimated \\(p(0)\\) best model 0.97 (close 1). ran conventional distance sampling analysis, pooling data two observers, get robust estimate true abundance.","code":"# Fit the PI-trial model - DS sex and MR distance pi.mr.dist.ds.sex <- ddf(method='trial', mrmodel=~glm(link='logit',formula=~distance), dsmodel=~mcds(key='hn',formula=~sex), data=detections, meta.data=list(width=4)) # Point independence model, Include covariates in DS model # Use selected MR model, iterate across DS models ds.formula <- c(\"~size\",\"~sex\",\"~exposure\",\"~size+sex\",\"~size+exposure\",\"~sex+exposure\", \"~size+sex+exposure\") num.ds.models <- length(ds.formula) # Create dataframe to store results pi.results <- data.frame(DSmodel=ds.formula, AIC=rep(NA,num.ds.models)) # Loop through ds models - use selected MR model from earlier for (i in 1:num.ds.models) { pi.model <- ddf(method='trial', mrmodel=~glm(link='logit',formula=~distance+sex+exposure), dsmodel=~mcds(key='hn',formula=as.formula(ds.formula[i])), data=detections, meta.data=list(width=4)) pi.results$AIC[i] <- summary(pi.model)$AIC } # Calculate delta AIC pi.results$deltaAIC <- pi.results$AIC - min(pi.results$AIC) # Order by delta AIC pi.results <- pi.results[order(pi.results$deltaAIC), ] knitr::kable(pi.results, digits = 2) # Fit chosen model pi.ds.sex <- ddf(method='trial', mrmodel=~glm(link='logit',formula=~distance+sex+exposure), dsmodel=~mcds(key='hn',formula=~sex), data=detections, meta.data=list(width=4)) summary(pi.ds.sex) ## ## Summary for trial.fi object ## Number of observations : 162 ## Number seen by primary : 124 ## Number seen by secondary (trials) : 142 ## Number seen by both (detected trials): 104 ## AIC : 94.89911 ## ## ## Conditional detection function parameters: ## estimate se ## (Intercept) 0.7870962 0.6774633 ## distance -1.9435496 0.3706866 ## sex1 2.8059863 0.6828331 ## exposure1 3.6094527 0.7332797 ## ## Estimate SE CV ## Average primary p(0) 0.9697357 0.02018875 0.02081882 ## ## ## ## Summary for ds object ## Number of observations : 124 ## Distance range : 0 - 4 ## AIC : 304.3594 ## Optimisation : mrds (nlminb) ## ## Detection function: ## Half-normal key function ## ## Detection function parameters ## Scale coefficient(s): ## estimate se ## (Intercept) 0.2525377 0.1327279 ## sex1 0.5832341 0.2041094 ## ## Estimate SE CV ## Average p 0.5605421 0.04616356 0.0823552 ## ## ## Summary for trial object ## ## Total AIC value = 399.2585 ## Estimate SE CV ## Average p 0.5435777 0.04643912 0.08543235 ## N in covered region 228.1182656 24.21303261 0.10614245 # Check goodness-of-fit ddf.gof(pi.ds.sex, main=\"PI trial configutation\\nGolfTee DS model sex\") ## ## Goodness of fit results for ddf object ## ## Chi-square tests ## ## Distance sampling component: ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 25.000 16.000 16.000 22.000 9.000 10.000 12.000 ## Expected 21.917 20.740 18.630 15.976 13.181 10.553 8.261 ## Chisquare 0.434 1.083 0.371 2.272 1.326 0.029 1.692 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 9.000 3.000 2.000 124.000 ## Expected 6.354 4.810 3.579 124.000 ## Chisquare 1.102 0.681 0.697 9.687 ## ## P = 0.20699 with 7 degrees of freedom ## ## Mark-recapture component: ## Capture History 01 ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 1 2 2 6 5 2 6 ## Expected 1 2 2 6 4 4 6 ## Chisquare 0 0 0 0 0 1 0 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 6 2 6 38 ## Expected 7 2 5 38 ## Chisquare 0 0 0 2 ## Capture History 11 ## [0,0.4] (0.4,0.8] (0.8,1.2] (1.2,1.6] (1.6,2] (2,2.4] (2.4,2.8] ## Observed 21 15 16 20 8 8 9 ## Expected 21 15 16 20 9 6 9 ## Chisquare 0 0 0 0 0 1 0 ## (2.8,3.2] (3.2,3.6] (3.6,4] Total ## Observed 5 1 1 104 ## Expected 4 1 2 104 ## Chisquare 0 0 1 2 ## ## MR total chi-square = 3.3242 P = 0.76719 with 6 degrees of freedom ## ## ## Total chi-square = 13.012 P = 0.44692 with 13 degrees of freedom ## ## Distance sampling Cramer-von Mises test (unweighted) ## Test statistic = 0.081285 p-value = 0.684457 # Get abundance estimates tee.abund.pi.ds.sex <- dht(model=pi.ds.sex, region.table=region, sample.table=samples, obs.table=obs) print(tee.abund.pi.ds.sex) ## Abundance and density estimates from distance sampling ## Variance : R2, N/L ## ## Summary statistics ## ## Region Area CoveredArea Effort n k ER se.ER cv.ER ## 1 1 1040 1040 130 72 6 0.5538462 0.02926903 0.05284685 ## 2 2 640 640 80 52 5 0.6500000 0.08292740 0.12758061 ## 3 Total 1680 1680 210 124 11 0.5904762 0.03641856 0.06167659 ## ## Summary for clusters ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 125.7678 12.50301 0.0994134 102.97968 153.5987 43.661605 ## 2 2 102.3504 17.53164 0.1712904 68.75816 152.3544 7.394232 ## 3 Total 228.1183 25.15313 0.1102635 182.12587 285.7252 28.045408 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.1209306 0.01202212 0.0994134 0.09901892 0.1476911 43.661605 ## 2 2 0.1599226 0.02739319 0.1712904 0.10743463 0.2380538 7.394232 ## 3 Total 0.1357847 0.01497210 0.1102635 0.10840826 0.1700745 28.045408 ## ## Summary for individuals ## ## Abundance: ## Region Estimate se cv lcl ucl df ## 1 1 395.0545 36.33887 0.09198445 329.0893 474.2422 79.293122 ## 2 2 299.7763 65.43246 0.21827099 175.5600 511.8809 5.685162 ## 3 Total 694.8307 84.25522 0.12126006 537.2149 898.6902 15.167148 ## ## Density: ## Region Estimate se cv lcl ucl df ## 1 1 0.3798601 0.03494122 0.09198445 0.3164320 0.4560021 79.293122 ## 2 2 0.4684004 0.10223822 0.21827099 0.2743125 0.7998140 5.685162 ## 3 Total 0.4135897 0.05015192 0.12126006 0.3197708 0.5349347 15.167148 ## ## Expected cluster size ## Region Expected.S se.Expected.S cv.Expected.S ## 1 1 3.141141 0.2081675 0.06627129 ## 2 2 2.928920 0.1866200 0.06371632 ## 3 Total 3.045923 0.1371508 0.04502767"},{"path":[]},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Laura Marshall. Maintainer. Jeff Laake. Author. David Miller. Author. Felix Petersma. Author. Len Thomas. Contributor. David Borchers. Contributor. Jon Bishop. Contributor. Jonah McArthur. Contributor. Eric Rexstad. Reviewer.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Laake J, Miller D, Petersma F (2025). mrds: Mark-Recapture Distance Sampling. R package version 3.0.0.9006, https://github.com/DistanceDevelopment/mrds/.","code":"@Manual{, title = {mrds: Mark-Recapture Distance Sampling}, author = {Jeff Laake and David Miller and Felix Petersma}, year = {2025}, note = {R package version 3.0.0.9006}, url = {https://github.com/DistanceDevelopment/mrds/}, }"},{"path":[]},{"path":"/index.html","id":"what-is-mrds","dir":"","previous_headings":"","what":"What is mrds?","title":"Mark-Recapture Distance Sampling","text":"package R analyzes single double observer distance sampling data line point sampling. used program DISTANCE one analysis engines. Supported double observer configurations include independent, trial removal. options mrds fully supported via DISTANCE. wish perform conventional multiple covariate distance sampling analysis (CDS/MCDS) (opposed double observer analysis), may want try Distance R package, simplified interface available https://github.com/DistanceDevelopment/Distance.","code":""},{"path":"/index.html","id":"getting-mrds","dir":"","previous_headings":"","what":"Getting mrds","title":"Mark-Recapture Distance Sampling","text":"easiest way ensure latest version mrds, install using remotes package: install mrds github: Otherwise: One can download Windows package binary using “Releases” tab github. install R, R menu, use “Packagesfrom Local Zip file” browse location downloaded zip. , download package source files. Finally current stable version mrds available CRAN, though may month date due CRAN policy.","code":"install.packages(\"remotes\") library(remotes) install_github(\"DistanceDevelopment/mrds\")"},{"path":"/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling","text":"following references methods used package. Burt, M. L., D. L. Borchers, K. J. Jenkins T. . Marques. (2014). “Using mark-recapture distance sampling methods line transect surveys.” Methods Ecology Evolution 5: 1180-1191. Buckland, S. T., J. Laake, et al. (2010). “Double observer line transect methods: levels independence.” Biometrics 66: 169-177. Borchers, D. L., J. L. Laake, et al. (2006). “Accommodating unmodeled heterogeneity double-observer distance sampling surveys.” Biometrics 62(2): 372-378. Buckland, S. T., D. R. Anderson, et al., Eds. (2004). Advanced distance sampling: estimating abundance biological populations. Oxford, UK; New York, Oxford University Press. (see chapter 6).","code":""},{"path":"/reference/add.df.covar.line.html","id":null,"dir":"Reference","previous_headings":"","what":"Add covariate levels detection function plots — add.df.covar.line","title":"Add covariate levels detection function plots — add.df.covar.line","text":"Add line lines plot detection function correspond given covariate combination. can particularly useful small number factor levels quantiles continuous covariate specified.","code":""},{"path":"/reference/add.df.covar.line.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add covariate levels detection function plots — add.df.covar.line","text":"","code":"add.df.covar.line(ddf, data, ndist = 250, pdf = FALSE, breaks = \"Sturges\", ...) add_df_covar_line(ddf, data, ndist = 250, pdf = FALSE, breaks = \"Sturges\", ...)"},{"path":"/reference/add.df.covar.line.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add covariate levels detection function plots — add.df.covar.line","text":"ddf fitted detection function object. data data.frame covariate combination want plot. ndist number distances evaluate detection function. pdf line drawn probability density scale; ignored line transects. breaks required ensure PDF lines right size, match supplied original plot command. Defaults \"Sturges\" breaks, hist. used pdf=TRUE. ... extra arguments give line (lty, lwd, col).","code":""},{"path":"/reference/add.df.covar.line.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add covariate levels detection function plots — add.df.covar.line","text":"invisibly, values detectability truncation range.","code":""},{"path":"/reference/add.df.covar.line.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add covariate levels detection function plots — add.df.covar.line","text":"covariates must specified data. Plots can become quite busy approach used. may useful fix covariates median level plot set values covariate interest. example setting weather (e.g., Beaufort) median plotting levels observer, creating second plot fixed observer levels weather. Arguments lines supplied ... aesthetics like line type (lty), line width (lwd) colour (col) recycled. default lty used distinguish lines. may useful add legend plot (lines plotted order data).","code":""},{"path":"/reference/add.df.covar.line.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add covariate levels detection function plots — add.df.covar.line","text":"David L Miller","code":""},{"path":"/reference/add.df.covar.line.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add covariate levels detection function plots — add.df.covar.line","text":"","code":"if (FALSE) { # \\dontrun{ # fit an example model data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe result <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~sex), data = egdata[egdata$observer==1, ], method = \"ds\", meta.data = list(width = 4)) # make a base plot, showpoints=FALSE makes the plot less busy plot(result, showpoints=FALSE) # add lines for sex one at a time add.df.covar.line(result, data.frame(sex=0), lty=2) add.df.covar.line(result, data.frame(sex=1), lty=3) # add a legend legend(3, 1, c(\"Average\", \"sex==0\", \"sex==1\"), lty=1:3) # alternatively we can add both at once # fixing line type and varying colour plot(result, showpoints=FALSE) add.df.covar.line(result, data.frame(sex=c(0,1)), lty=1, col=c(\"red\", \"green\")) # add a legend legend(3, 1, c(\"Average\", \"sex==0\", \"sex==1\"), lty=1, col=c(\"black\", \"red\", \"green\")) } # }"},{"path":"/reference/adj.check.order.html","id":null,"dir":"Reference","previous_headings":"","what":"Check order of adjustment terms — adj.check.order","title":"Check order of adjustment terms — adj.check.order","text":"'adj.check.order' checks Cosine, Hermite simple polynomials correct order.","code":""},{"path":"/reference/adj.check.order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check order of adjustment terms — adj.check.order","text":"","code":"adj.check.order(adj.series, adj.order, key)"},{"path":"/reference/adj.check.order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check order of adjustment terms — adj.check.order","text":"adj.series Adjustment series used ('cos','herm','poly') adj.order Integer check key key function used adjustment series","code":""},{"path":"/reference/adj.check.order.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check order of adjustment terms — adj.check.order","text":"Nothing! Just calls stop something goes wrong.","code":""},{"path":"/reference/adj.check.order.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check order of adjustment terms — adj.check.order","text":"even functions allowed adjustment terms, per p.47 Buckland et al (2001). incorrect terms supplied error throw via stop.","code":""},{"path":"/reference/adj.check.order.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Check order of adjustment terms — adj.check.order","text":"S.T.Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake. 1993. Robust Models. : Distance Sampling, eds. S.T.Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake. Chapman & Hall.","code":""},{"path":[]},{"path":"/reference/adj.check.order.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check order of adjustment terms — adj.check.order","text":"David Miller","code":""},{"path":"/reference/adj.cos.html","id":null,"dir":"Reference","previous_headings":"","what":"Cosine adjustment term, not the series. — adj.cos","title":"Cosine adjustment term, not the series. — adj.cos","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.cos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cosine adjustment term, not the series. — adj.cos","text":"","code":"adj.cos(distance, scaling, adj.order)"},{"path":"/reference/adj.cos.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cosine adjustment term, not the series. — adj.cos","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order","code":""},{"path":"/reference/adj.cos.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cosine adjustment term, not the series. — adj.cos","text":"scalar vector containing cosine adjustment term every value distance argument","code":""},{"path":"/reference/adj.cos.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cosine adjustment term, not the series. — adj.cos","text":"Felix Petersma","code":""},{"path":"/reference/adj.herm.html","id":null,"dir":"Reference","previous_headings":"","what":"Hermite polynomial adjustment term, not the series. — adj.herm","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.herm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"","code":"adj.herm(distance, scaling, adj.order)"},{"path":"/reference/adj.herm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order","code":""},{"path":"/reference/adj.herm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"scalar vector containing Hermite adjustment term every value distance argument","code":""},{"path":"/reference/adj.herm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Hermite polynomial adjustment term, not the series. — adj.herm","text":"Felix Petersma","code":""},{"path":"/reference/adj.poly.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple polynomial adjustment term, not the series. — adj.poly","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.poly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"","code":"adj.poly(distance, scaling, adj.order)"},{"path":"/reference/adj.poly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order","code":""},{"path":"/reference/adj.poly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"scalar vector containing polynomial adjustment term every value distance argument","code":""},{"path":"/reference/adj.poly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple polynomial adjustment term, not the series. — adj.poly","text":"Felix Petersma","code":""},{"path":"/reference/adj.series.grad.cos.html","id":null,"dir":"Reference","previous_headings":"","what":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.series.grad.cos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"","code":"adj.series.grad.cos( distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp = FALSE )"},{"path":"/reference/adj.series.grad.cos.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order adj.parm vector parameters (a_j) adj.exp boolean, defaults FALSE","code":""},{"path":"/reference/adj.series.grad.cos.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"scalar vector containing gradient cosine adjustment series every value distance argument","code":""},{"path":"/reference/adj.series.grad.cos.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Series of the gradient of the cosine adjustment series w.r.t. the scaled distance. — adj.series.grad.cos","text":"Felix Petersma","code":""},{"path":"/reference/adj.series.grad.herm.html","id":null,"dir":"Reference","previous_headings":"","what":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.series.grad.herm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"","code":"adj.series.grad.herm( distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp = FALSE )"},{"path":"/reference/adj.series.grad.herm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order adj.parm vector parameters (a_j) adj.exp boolean, defaults FALSE","code":""},{"path":"/reference/adj.series.grad.herm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"scalar vector containing gradient Hermite adjustment series every value distance argument","code":""},{"path":"/reference/adj.series.grad.herm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Series of the gradient of the Hermite polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.herm","text":"Felix Petersma","code":""},{"path":"/reference/adj.series.grad.poly.html","id":null,"dir":"Reference","previous_headings":"","what":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"internal use – called 'mrds' 'Distance' users directly.","code":""},{"path":"/reference/adj.series.grad.poly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"","code":"adj.series.grad.poly( distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp = FALSE )"},{"path":"/reference/adj.series.grad.poly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"distance perpendicular distance vector/scalar scaling scale parameter adj.order adjustment order adj.parm vector parameters (a_j) adj.exp boolean, defaults FALSE","code":""},{"path":"/reference/adj.series.grad.poly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"scalar vector containing gradient polynomial adjustment series every value distance argument","code":""},{"path":"/reference/adj.series.grad.poly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Series of the gradient of the simple polynomial adjustment series w.r.t. the scaled distance. — adj.series.grad.poly","text":"Felix Petersma","code":""},{"path":"/reference/AIC.ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Akaike's An Information Criterion for detection functions — AIC.ddf","title":"Akaike's An Information Criterion for detection functions — AIC.ddf","text":"Extract AIC fitted detection function.","code":""},{"path":"/reference/AIC.ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Akaike's An Information Criterion for detection functions — AIC.ddf","text":"","code":"# S3 method for class 'ddf' AIC(object, ..., k = 2)"},{"path":"/reference/AIC.ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Akaike's An Information Criterion for detection functions — AIC.ddf","text":"object fitted detection function object ... optionally fitted model objects. k penalty per parameter used; default k = 2 \"classical\" AIC","code":""},{"path":"/reference/AIC.ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Akaike's An Information Criterion for detection functions — AIC.ddf","text":"David L Miller","code":""},{"path":"/reference/apex.gamma.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the apex for a gamma detection function — apex.gamma","title":"Get the apex for a gamma detection function — apex.gamma","text":"Get apex gamma detection function","code":""},{"path":"/reference/apex.gamma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the apex for a gamma detection function — apex.gamma","text":"","code":"apex.gamma(ddfobj)"},{"path":"/reference/apex.gamma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the apex for a gamma detection function — apex.gamma","text":"ddfobj ddf object","code":""},{"path":"/reference/apex.gamma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the apex for a gamma detection function — apex.gamma","text":"distance gamma peaks","code":""},{"path":"/reference/apex.gamma.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get the apex for a gamma detection function — apex.gamma","text":"Jeff Laake","code":""},{"path":"/reference/assign.default.values.html","id":null,"dir":"Reference","previous_headings":"","what":"Assign default values to list elements that have not been already assigned — assign.default.values","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"Assigns default values argument list x argument=value pairs ... x$argument already exist","code":""},{"path":"/reference/assign.default.values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"","code":"assign.default.values(x, ...)"},{"path":"/reference/assign.default.values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"x generic list ... unspecified list argument=value pairs used assign values","code":""},{"path":"/reference/assign.default.values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"x - list filled values","code":""},{"path":"/reference/assign.default.values.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Assign default values to list elements that have not been already assigned — assign.default.values","text":"Jeff Laake","code":""},{"path":"/reference/assign.par.html","id":null,"dir":"Reference","previous_headings":"","what":"Extraction and assignment of parameters to vector — assign.par","title":"Extraction and assignment of parameters to vector — assign.par","text":"Assigns parameters particular type (scale, shape, adjustments g0 (p(0))) vector parameters ddfobj. parameters kept single vector optimization even though different uses. assign.par parses vector based known structure assigns ddfobj.","code":""},{"path":"/reference/assign.par.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extraction and assignment of parameters to vector — assign.par","text":"","code":"assign.par(ddfobj, fpar)"},{"path":"/reference/assign.par.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extraction and assignment of parameters to vector — assign.par","text":"ddfobj distance sampling object (see create.ddfobj) fpar parameter vector","code":""},{"path":"/reference/assign.par.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extraction and assignment of parameters to vector — assign.par","text":"index==FALSE, vector parameters requested index==TRUE, vector 3 indices scale, shape, adjustment","code":""},{"path":"/reference/assign.par.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extraction and assignment of parameters to vector — assign.par","text":"getpar extracts requested types ddfobj.","code":""},{"path":"/reference/assign.par.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extraction and assignment of parameters to vector — assign.par","text":"Internal functions intended called user.","code":""},{"path":[]},{"path":"/reference/assign.par.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extraction and assignment of parameters to vector — assign.par","text":"Jeff Laake","code":""},{"path":"/reference/average.line.cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Average conditional detection function line for plotting — average.line.cond","title":"Average conditional detection function line for plotting — average.line.cond","text":"models covariates detection probability observation can vary. function computes average value set distances plot average line graphically represent fitted model plots compare histograms scatter individual estimated detection probabilities.","code":""},{"path":"/reference/average.line.cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average conditional detection function line for plotting — average.line.cond","text":"","code":"average.line.cond(finebr, obs, model)"},{"path":"/reference/average.line.cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average conditional detection function line for plotting — average.line.cond","text":"finebr set fine breaks distance detection function values averaged plotted obs value observer averaging (1-2 individual observers) model ddf model object","code":""},{"path":"/reference/average.line.cond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average conditional detection function line for plotting — average.line.cond","text":"list 2 elements:","code":""},{"path":"/reference/average.line.cond.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Average conditional detection function line for plotting — average.line.cond","text":"Internal function called plot functions ddf objects","code":""},{"path":"/reference/average.line.cond.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Average conditional detection function line for plotting — average.line.cond","text":"Jeff Laake","code":""},{"path":"/reference/average.line.html","id":null,"dir":"Reference","previous_headings":"","what":"Average detection function line for plotting — average.line","title":"Average detection function line for plotting — average.line","text":"models covariates detection probability observation can vary. function computes average value set distances plot average line graphically represent fitted model plots compare histograms scatter individual estimated detection probabilities. Averages calculated observed covariate combinations.","code":""},{"path":"/reference/average.line.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average detection function line for plotting — average.line","text":"","code":"average.line(finebr, obs, model)"},{"path":"/reference/average.line.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average detection function line for plotting — average.line","text":"finebr set fine breaks distance detection function values averaged plotted obs value observer averaging (1-2 individual observers; 3 duplicates; 4 pooled observation team) model ddf model object","code":""},{"path":"/reference/average.line.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average detection function line for plotting — average.line","text":"list 2 elements","code":""},{"path":"/reference/average.line.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Average detection function line for plotting — average.line","text":"Internal function called plot functions ddf objects","code":""},{"path":"/reference/average.line.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Average detection function line for plotting — average.line","text":"Jeff Laake","code":""},{"path":"/reference/book.tee.data.html","id":null,"dir":"Reference","previous_headings":"","what":"Golf tee data used in chapter 6 of Advanced Distance Sampling examples — book.tee.data","title":"Golf tee data used in chapter 6 of Advanced Distance Sampling examples — book.tee.data","text":"Double platform data collected line transect survey golf tees 2 observers St. Andrews. Field sex actually colour golf tee: 0 - green; 1 - yellow. Exposure either low (0) high(1) depending height tee ground. size number tees observed cluster.","code":""},{"path":"/reference/book.tee.data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Golf tee data used in chapter 6 of Advanced Distance Sampling examples — book.tee.data","text":"list 4 dataframes, list elements named: book.tee.dataframe, book.tee.region, book.tee.samples book.tee.obs. book.tee.dataframe distance sampling data dataframe. Used call fit detection function ddf. Contains following columns: object numeric object id observer factor representing observer 1 2 detected numeric 1 animal detected 0 otherwise distance numeric value distance animal detected size numeric value group size sex numeric value sex animal exposure numeric value exposure level 0 1 book.tee.region: region table dataframe. Used supply strata areas dht function. Contains following columns: Region.Label factor giving strata labels Area numeric value giving strata areas book.tee.samples samples table dataframe match transect ids region ids supply effort. Used dht function. Contains following columns: Sample.Label numeric giving sample / transect labels Region.Label factor giving strata labels Effort numeric value giving sample / transect lengths book.tee.obs observations table dataframe match object ids distance data transect labels. Used dht function. Contains following columns: object numeric value object id Region.Label factor giving strata labels Sample.Label numeric giving sample / transect labels","code":""},{"path":"/reference/calc.se.Np.html","id":null,"dir":"Reference","previous_headings":"","what":"Find se of average p and N — calc.se.Np","title":"Find se of average p and N — calc.se.Np","text":"Find se average p N","code":""},{"path":"/reference/calc.se.Np.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find se of average p and N — calc.se.Np","text":"","code":"calc.se.Np(model, avgp, n, average.p)"},{"path":"/reference/calc.se.Np.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find se of average p and N — calc.se.Np","text":"model ddf model object avgp average p function n sample size average.p average probability detection model","code":""},{"path":"/reference/calc.se.Np.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Find se of average p and N — calc.se.Np","text":"David L. Miller","code":""},{"path":"/reference/cdf.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"Computes cdf values observed distances fitted distribution. set observed x returns integral f(x) range= (inner, x), inner innermost distance observable (either 0 left left truncated). terms g(x) integral g(x) range divided integral g(x) entire range data (inner, W).","code":""},{"path":"/reference/cdf.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"","code":"cdf.ds(model, newdata = NULL)"},{"path":"/reference/cdf.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"model fitted distance sampling model newdata new data values computed values original observations","code":""},{"path":"/reference/cdf.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"vector cdf values observation","code":""},{"path":"/reference/cdf.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"internal function intended invoked directly. called qqplot.ddf compute values Kolmogorov-Smirnov Cramer-von Mises tests Q-Q plot.","code":""},{"path":[]},{"path":"/reference/cdf.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cumulative distribution function (cdf) for fitted distance sampling detection function — cdf.ds","text":"Jeff Laake","code":""},{"path":"/reference/cds.html","id":null,"dir":"Reference","previous_headings":"","what":"CDS function definition — cds","title":"CDS function definition — cds","text":"Creates model formula list conventional distance sampling using values supplied call ddf","code":""},{"path":"/reference/cds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CDS function definition — cds","text":"","code":"cds( key = NULL, adj.series = NULL, adj.order = NULL, adj.scale = \"width\", adj.exp = FALSE, formula = ~1, shape.formula = ~1 )"},{"path":"/reference/cds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CDS function definition — cds","text":"key string identifying key function (currently either \"hn\" (half-normal),\"hr\" (hazard-rate), \"unif\" (uniform) \"gamma\" (gamma distribution) adj.series string identifying adjustment functions cos (Cosine), herm (Hermite polynomials), poly (simple polynomials) NULL adj.order vector order adjustment terms include adj.scale whether scale adjustment terms \"width\" \"scale\" adj.exp TRUE uses exp(adj) adjustment keep f(x)>0 formula formula scale function (included completeness formula=~1 cds) shape.formula formula shape function","code":""},{"path":"/reference/cds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CDS function definition — cds","text":"formula list used define detection function model fct string \"cds\" key key function string adj.series adjustment function string adj.order adjustment function orders adj.scale adjustment function scale type formula formula scale function shape.formula formula shape function","code":""},{"path":"/reference/cds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"CDS function definition — cds","text":"Jeff Laake; Dave Miller","code":""},{"path":"/reference/check.bounds.html","id":null,"dir":"Reference","previous_headings":"","what":"Check parameters bounds during optimisations — check.bounds","title":"Check parameters bounds during optimisations — check.bounds","text":"Simple internal function check optimisation hit bounds. Based code used live detfct.fit.opt.","code":""},{"path":"/reference/check.bounds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check parameters bounds during optimisations — check.bounds","text":"","code":"check.bounds(lt, lowerbounds, upperbounds, ddfobj, showit, setlower, setupper)"},{"path":"/reference/check.bounds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check parameters bounds during optimisations — check.bounds","text":"lt optimisation object lowerbounds current lower bounds upperbounds current upper bounds ddfobj ddf object showit debug level setlower lower bounds set user setupper upper bounds set user","code":""},{"path":"/reference/check.bounds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check parameters bounds during optimisations — check.bounds","text":"TRUE parameters close bound, else FALSE","code":""},{"path":"/reference/check.bounds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check parameters bounds during optimisations — check.bounds","text":"Dave Miller; Jeff Laake","code":""},{"path":"/reference/check.mono.html","id":null,"dir":"Reference","previous_headings":"","what":"Check that a detection function is monotone — check.mono","title":"Check that a detection function is monotone — check.mono","text":"Check fitted detection function monotone non-increasing.","code":""},{"path":"/reference/check.mono.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check that a detection function is monotone — check.mono","text":"","code":"check.mono( df, strict = TRUE, n.pts = 100, tolerance = 1e-08, plot = FALSE, max.plots = 6 )"},{"path":"/reference/check.mono.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check that a detection function is monotone — check.mono","text":"df fitted detection function object strict TRUE (default) detection function must \"strictly\" monotone, (g(x[])<=g(x[-1])) whole range (left right truncation points). n.pts number equally-spaced points left right truncation evaluate detection function (default 100) tolerance numerical tolerance monotonicity checks (default 1e-8) plot plot diagnostic highlighting non-monotonic areas (default FALSE) max.plots plot=TRUE, maximum number plots non-monotone covariate combinations plotted? Plotted combinations random sample non-monotonic subset evaluations. effect non-covariate models.","code":""},{"path":"/reference/check.mono.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check that a detection function is monotone — check.mono","text":"TRUE detection function monotone, FALSE . warnings issued warn user function non-monotonic.","code":""},{"path":"/reference/check.mono.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Check that a detection function is monotone — check.mono","text":"Evaluates series points range detection function (left right truncation) determines: 1. detection function always less equal value left truncation (g(x)<=g(left), usually g(x)<=g(0)). 2. (Optionally) detection function always monotone decreasing (g(x[])<=g(x[-1])). check performed strict=TRUE (default). 3. detection function never less 0 (g(x)>=0). 4. detection function never greater 1 (g(x)<=1). models covariates scale parameter detection function evaluated observed covariate combinations. Currently covariates shape parameter supported.","code":""},{"path":"/reference/check.mono.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check that a detection function is monotone — check.mono","text":"David L. Miller, Felix Petersma","code":""},{"path":"/reference/coef.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract coefficients — coef.ds","title":"Extract coefficients — coef.ds","text":"Extract coefficients provide summary parameters estimates output ddf model objects.","code":""},{"path":"/reference/coef.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract coefficients — coef.ds","text":"","code":"# S3 method for class 'ds' coef(object,...) # S3 method for class 'io' coef(object,...) # S3 method for class 'io.fi' coef(object,...) # S3 method for class 'trial' coef(object,...) # S3 method for class 'trial.fi' coef(object,...) # S3 method for class 'rem' coef(object,...) # S3 method for class 'rem.fi' coef(object,...)"},{"path":"/reference/coef.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract coefficients — coef.ds","text":"object ddf model object class ds, io, io.fi, trial, trial.fi, rem, rem.fi. ... unspecified arguments unused present","code":""},{"path":"/reference/coef.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract coefficients — coef.ds","text":"coef.ds List data frames coefficients (scale exponent (hazard)) scale dataframe scale coefficient estimates standard errors exponent dataframe exponent estimate standard error hazard detection function others Data frame containing coefficient standard error","code":""},{"path":"/reference/coef.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extract coefficients — coef.ds","text":"functions called generic function coef ddf model object. can called directly user, typically safest use coef calls appropriate function based type model.","code":""},{"path":"/reference/coef.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract coefficients — coef.ds","text":"Jeff Laake","code":""},{"path":"/reference/compute.Nht.html","id":null,"dir":"Reference","previous_headings":"","what":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"Compute individual components Horvitz-Thompson abundance estimate covered region particular subset data depending value group = TRUE (group abundance); FALSE(individual abundance)","code":""},{"path":"/reference/compute.Nht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"","code":"compute.Nht(pdot, group = TRUE, size = NULL)"},{"path":"/reference/compute.Nht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"pdot vector estimated detection probabilities group TRUE (group abundance); FALSE(individual abundance) size vector group size values clustered populations","code":""},{"path":"/reference/compute.Nht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"vector H-T components abundance estimate","code":""},{"path":"/reference/compute.Nht.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"Internal function called covered.region.dht","code":""},{"path":"/reference/compute.Nht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Horvitz-Thompson estimates 1/p_i or s_i/p_i — compute.Nht","text":"Jeff Laake","code":""},{"path":"/reference/covered.region.dht.html","id":null,"dir":"Reference","previous_headings":"","what":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"Computes H-T abundance within covered region sample.","code":""},{"path":"/reference/covered.region.dht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"","code":"covered.region.dht(obs, samples, group)"},{"path":"/reference/covered.region.dht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"obs observations table samples samples table group TRUE compute abundance group otherwise abundance individuals","code":""},{"path":"/reference/covered.region.dht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"Nhat..sample - dataframe abundance sample","code":""},{"path":"/reference/covered.region.dht.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"Internal function called dht related functions","code":""},{"path":"/reference/covered.region.dht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Covered region estimate of abundance from Horvitz-Thompson-like estimator — covered.region.dht","text":"Jeff Laake","code":""},{"path":"/reference/create.bins.html","id":null,"dir":"Reference","previous_headings":"","what":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"internal routine necessary normal analyses.","code":""},{"path":"/reference/create.bins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"","code":"create.bins(data, cutpoints)"},{"path":"/reference/create.bins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"data `data.frame` least column `distance`. cutpoints vector cutpoints bins","code":""},{"path":"/reference/create.bins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"argument `data` two extra columns `distbegin` `distend`.","code":""},{"path":"/reference/create.bins.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create bins from a set of binned distances and a set of cutpoints. — create.bins","text":"David L. Miller","code":""},{"path":"/reference/create.command.file.html","id":null,"dir":"Reference","previous_headings":"","what":"create.command.file — create.command.file","title":"create.command.file — create.command.file","text":"create.command.file","code":""},{"path":"/reference/create.command.file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"create.command.file — create.command.file","text":"","code":"create.command.file(dsmodel = call(), data, method, meta.data, control)"},{"path":"/reference/create.command.file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"create.command.file — create.command.file","text":"dsmodel distance sampling model specification data dataframe containing data analyzed method analysis method meta.data list containing settings controlling data structure control list containing settings controlling model fitting","code":""},{"path":"/reference/create.command.file.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"create.command.file — create.command.file","text":"Jonah McArthur","code":""},{"path":"/reference/create.ddfobj.html","id":null,"dir":"Reference","previous_headings":"","what":"Create detection function object — create.ddfobj","title":"Create detection function object — create.ddfobj","text":"Creates populates specific list structure define detection function object data. ddfobj used throughout package calling argument various functions.","code":""},{"path":"/reference/create.ddfobj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create detection function object — create.ddfobj","text":"","code":"create.ddfobj(model, xmat, meta.data, initial)"},{"path":"/reference/create.ddfobj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create detection function object — create.ddfobj","text":"model model list key function possibly adjustment functions, scale formula, shape formula xmat model data frame meta.data list options describing data like width, etc initial named list initial values parameters detection function (least \"scale\", maybe also \"shape\" \"adjustments\")","code":""},{"path":"/reference/create.ddfobj.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create detection function object — create.ddfobj","text":"Distance sampling function object list elements can null except type: type type detection function hn, hr, gamma, unif, logistic xmat model data frame intercept.TRUE scale = ~1 shape formula =~1 scale sublist elements (can NULL .e., unif key):formula, parameters, design matrix (dm) shape sublist elements (power hazard rate gamma) (can NULL .e., unif hn key):formula, parameters, design matrix (dm) adjustment sublist elements (NULL adjustments used):series,order,scale,parameters g0 sublist elements (used present):formula,parameters, design matrix(dm), link","code":""},{"path":"/reference/create.ddfobj.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create detection function object — create.ddfobj","text":"Internal function meant called user","code":""},{"path":[]},{"path":"/reference/create.ddfobj.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create detection function object — create.ddfobj","text":"Jeff Laake","code":""},{"path":"/reference/create.model.frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a model frame for ddf fitting — create.model.frame","title":"Create a model frame for ddf fitting — create.model.frame","text":"Creates model.frame distance detection function fitting. includes pre-specified computed variables included model specified user (formula)","code":""},{"path":"/reference/create.model.frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a model frame for ddf fitting — create.model.frame","text":"","code":"create.model.frame(xmat, scale.formula, meta.data, shape.formula = NULL)"},{"path":"/reference/create.model.frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a model frame for ddf fitting — create.model.frame","text":"xmat dataframe ddf scale.formula user specified formula scale distance detection function meta.data user-specified meta.data (see ddf shape.formula user specified formula shape parameter distance detection function","code":""},{"path":"/reference/create.model.frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a model frame for ddf fitting — create.model.frame","text":"model frame analysis","code":""},{"path":"/reference/create.model.frame.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a model frame for ddf fitting — create.model.frame","text":"following fields always included: detected, observer, binned, optionally distance (unless null), timesdetected (present data). distance data binned, include distbegin distend point fields. integration width varies also include int.begin int.end include offset field iterative glm, used. Beyond fields fields used model formula included.","code":""},{"path":"/reference/create.model.frame.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create a model frame for ddf fitting — create.model.frame","text":"Internal function called user","code":""},{"path":"/reference/create.model.frame.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a model frame for ddf fitting — create.model.frame","text":"Jeff Laake","code":""},{"path":"/reference/create.varstructure.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates structures needed to compute abundance and variance — create.varstructure","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"Creates samples obs dataframes used compute abundance variance based structure geographic regions samples within region. intent generalize routine work sampling structures.","code":""},{"path":"/reference/create.varstructure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"","code":"create.varstructure(model, region, sample, obs, dht.se)"},{"path":"/reference/create.varstructure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"model fitted ddf object region region table sample sample table obs table object #'s links sample region table dht.se uncertainty going calculated later?","code":""},{"path":"/reference/create.varstructure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"List 2 elements: samples merged dataframe containing region sample info - one record per sample obs merged observation data links region samples","code":""},{"path":"/reference/create.varstructure.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"function performs following tasks: 1)tests make sure region labels unique, 2) merges sample region tables samples table issue warning samples used, 3) regions samples values Area valid areas given issue error stop, error given code stops, 4) creates unique region/sample label samples obs, 5) merges observations sample issues warning observations used, 6) sorts regions label merges values predictions fitted model based object number limits data appropriate fitted detection function.","code":""},{"path":"/reference/create.varstructure.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"Internal function called dht","code":""},{"path":"/reference/create.varstructure.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creates structures needed to compute abundance and variance — create.varstructure","text":"Jeff Laake","code":""},{"path":"/reference/ddf.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"Fits conventional distance sampling (CDS) (likelihood eq 6.6 Laake Borchers 2004) multi-covariate distance sampling (MCDS)(likelihood eq 6.14 Laake Borchers 2004) model detection function observed distance data. uses key functions incorporate adjustment functions CDS/MCDS analysis engines DISTANCE (Marques Buckland 2004). Distance can grouped (binned), ungrouped (unbinned) mixture two. function called directly user called ddf,ddf.io, ddf.trial.","code":""},{"path":"/reference/ddf.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"","code":"# S3 method for class 'ds' ddf( dsmodel, mrmodel = NULL, data, method = \"ds\", meta.data = list(), control = list(), call )"},{"path":"/reference/ddf.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"dsmodel model list key function scale formula mrmodel used data data.frame; see ddf details method analysis method; needed function called ddf.io ddf.trial meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call function called directly ddf (e.g., called via ddf.io)","code":""},{"path":"/reference/ddf.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"result: ds model object","code":""},{"path":"/reference/ddf.ds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"complete description calling arguments, see ddf. argument model function dsmodel ddf. argument dataname name dataframe specified argument data ddf. arguments control,meta.data,method defined ddf.","code":""},{"path":"/reference/ddf.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"mixture binned unbinned distance, width must set >= largest interval endpoint; changed complicated analysis; likewise, binned bins overlap, must also hold; bins overlap, width must one interval endpoints; holds left truncation Although mixture analysis works principle tested via simulation.","code":""},{"path":"/reference/ddf.ds.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R. Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press. Marques, F.F.C. S.T. Buckland. 2004. Covariate models detection function. : Advanced Distance Sampling, eds. S.T. Buckland, D.R. Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"Jeff Laake","code":""},{"path":"/reference/ddf.ds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"CDS/MCDS Distance Detection Function Fitting — ddf.ds","text":"","code":"# ddf.ds is called when ddf is called with method=\"ds\" # \\donttest{ data(book.tee.data) region <- book.tee.data$book.tee.region egdata <- book.tee.data$book.tee.dataframe samples <- book.tee.data$book.tee.samples obs <- book.tee.data$book.tee.obs result <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~1), data = egdata[egdata$observer==1, ], method = \"ds\", meta.data = list(width = 4)) summary(result,se=TRUE) #> #> Summary for ds object #> Number of observations : 124 #> Distance range : 0 - 4 #> AIC : 311.1385 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 0.6632435 0.09981249 #> #> Estimate SE CV #> Average p 0.5842744 0.04637627 0.07937412 #> N in covered region 212.2290462 20.85130344 0.09824906 plot(result,main=\"cds - observer 1\") print(dht(result,region,samples,obs,options=list(varflag=0,group=TRUE), se=TRUE)) #> Abundance and density estimates from distance sampling #> Variance : R2, binomial #> #> Summary statistics #> #> Region Area CoveredArea Effort n k ER se.ER cv.ER #> 1 1 1040 1040 130 72 6 0.5538462 0.02926903 0.05284685 #> 2 2 640 640 80 52 5 0.6500000 0.08292740 0.12758061 #> 3 Total 1680 1680 210 124 11 0.5904762 0.03641856 0.06167659 #> #> Summary for clusters #> #> Abundance: #> Region Estimate se cv lcl ucl df #> 1 1 123.22977 13.54083 0.10988275 99.41771 152.7452 0 #> 2 2 88.99928 10.64090 0.11956159 70.46547 112.4078 0 #> 3 Total 212.22905 20.85130 0.09824906 175.13617 257.1780 0 #> #> Density: #> Region Estimate se cv lcl ucl df #> 1 1 0.1184902 0.01302002 0.10988275 0.09559396 0.1468704 0 #> 2 2 0.1390614 0.01662640 0.11956159 0.11010230 0.1756372 0 #> 3 Total 0.1263268 0.01241149 0.09824906 0.10424772 0.1530821 0 #> #> Summary for individuals #> #> Abundance: #> Region Estimate se cv lcl ucl df #> 1 1 391.9391 46.10793 0.1176405 311.4775 493.1858 0 #> 2 2 260.1517 33.65581 0.1293699 202.0987 334.8806 0 #> 3 Total 652.0909 67.40510 0.1033677 532.7888 798.1070 0 #> #> Density: #> Region Estimate se cv lcl ucl df #> 1 1 0.3768645 0.04433455 0.1176405 0.2994976 0.4742171 0 #> 2 2 0.4064871 0.05258720 0.1293699 0.3157792 0.5232509 0 #> 3 Total 0.3881493 0.04012208 0.1033677 0.3171362 0.4750637 0 #> #> Expected cluster size #> Region Expected.S se.Expected.S cv.Expected.S #> 1 1 3.180556 0.13362415 0.04201283 #> 2 2 2.923077 0.14443673 0.04941257 #> 3 Total 3.072581 0.09870565 0.03212467 print(ddf.gof(result)) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> [0,0.364] (0.364,0.727] (0.727,1.09] (1.09,1.45] (1.45,1.82] #> Observed 25.000 13.000 12.000 22.000 12.000 #> Expected 19.181 18.522 17.270 15.549 13.518 #> Chisquare 1.765 1.646 1.608 2.677 0.170 #> (1.82,2.18] (2.18,2.55] (2.55,2.91] (2.91,3.27] (3.27,3.64] (3.64,4] #> Observed 8.000 12.000 7.000 8.000 4.000 1.000 #> Expected 11.348 9.199 7.200 5.442 3.972 2.799 #> Chisquare 0.988 0.853 0.006 1.202 0.000 1.156 #> Total #> Observed 124.000 #> Expected 124.000 #> Chisquare 12.071 #> #> P = 0.20932 with 9 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.0655753 p-value = 0.77897 # }"},{"path":"/reference/ddf.gof.html","id":null,"dir":"Reference","previous_headings":"","what":"Goodness of fit tests for distance sampling models — ddf.gof","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"Generic function computes chi-square goodness fit test detection function models binned data Cramer-von Mises Kolmogorov-Smirnov (ks=TRUE)tests exact distance data. default Q-Q plot generated exact data (can suppressed using qq=FALSE argument).","code":""},{"path":"/reference/ddf.gof.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"","code":"ddf.gof( model, breaks = NULL, nc = NULL, qq = TRUE, nboot = 100, ks = FALSE, ... )"},{"path":"/reference/ddf.gof.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"model model object breaks Cutpoints use binning data nc Number distance classes qq Flag indicate whether quantile-quantile plot desired nboot number replicates use calculate p-values Kolmogorov-Smirnov goodness fit test statistics ks perform Kolmogorov-Smirnov test (involves many bootstraps can take ) ... Graphics parameters pass qqplot function","code":""},{"path":"/reference/ddf.gof.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"List class ddf.gof containing chi-square Goodness fit test statistic df Degrees freedom associated test statistic p-value Significance level test statistic","code":""},{"path":"/reference/ddf.gof.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"Formal goodness fit testing detection function models using Kolmogorov-Smirnov Cramer-von Mises tests. tests based looking quantile-quantile plot produced qqplot.ddf deviations line x=y. Kolmogorov-Smirnov test asks question \"largest vertical distance point y=x line?\" uses distance statistic test null hypothesis samples (EDF CDF case) distribution (hence model fits well). deviation y=x line points large reject null hypothesis say model good fit. Rather looking single biggest difference y=x line points Q-Q plot, might prefer think differences line points, since may many smaller differences want take account rather looking one large deviation. null hypothesis , statistic uses sum deviations point line. Note bootstrap procedure required Kolmogorov-Smirnov test ensure p-values procedure correct comparing cumulative distribution function (CDF) empirical distribution function (EDF) estimated parameters detection function. nboot parameter controls number bootstraps use. Set 0 avoid computing bootstraps (much faster Kolmogorov-Smirnov results, course). One can change precision printed values using print.ddf.gof method's digits argument.","code":""},{"path":[]},{"path":"/reference/ddf.gof.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Goodness of fit tests for distance sampling models — ddf.gof","text":"Jeff Laake","code":""},{"path":"/reference/ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance Detection Function Fitting — ddf","title":"Distance Detection Function Fitting — ddf","text":"Generic function fitting detection functions distance sampling single double observer configurations. Independent observer, trial dependent observer (removal) configurations included. generic function little validate calling arguments methods calls appropriate method specific function analysis.","code":""},{"path":"/reference/ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance Detection Function Fitting — ddf","text":"","code":"ddf( dsmodel = call(), mrmodel = call(), data, method = \"ds\", meta.data = list(), control = list(), call = NULL )"},{"path":"/reference/ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distance Detection Function Fitting — ddf","text":"dsmodel distance sampling model specification mrmodel mark-recapture model specification data dataframe containing data analyzed method analysis method meta.data list containing settings controlling data structure control list containing settings controlling model fitting call implemented top level ddf function, set ddf passed ddf generics.","code":""},{"path":"/reference/ddf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distance Detection Function Fitting — ddf","text":"model object class=(method, \"ddf\")","code":""},{"path":"/reference/ddf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Distance Detection Function Fitting — ddf","text":"fitting code certain expectations data. dataframe least following fields named defined follows: data clustered objects, dataframe also contain field named size gives observed number cluster. data double observer survey, two records observation object number. code assumes observations listed order observer data subsetted observer number records subset object order. addition predefined pre-named fields, dataframe can number type fields used covariates dsmodel mrmodel. present, discrepancies observations distance, size user-specified covariates assimilated uncertainty estimate. code presumes values fields records (observer=1 observer=2) uses value observer 1. Thus makes sense make values records pair even detect object observer 1 detect object data taken observer 2 consistent. Five different fitting methods currently available turn define whether dsmodel mrmodel need defined. Methods suffix \".fi\" use assumption full independence use distance sampling portion likelihood dsmodel needed. mrmodel needed double observer surveys thus needed method ds. dsmodel specifies detection function g(y) distance sampling data models restrict g(0)=1. single observer data g(y) detection function single observer double observer survey relative detection function (assuming g(0)=1) observers team (unique observations observers). double observer surveys, detection function p(y)=p(0)g(y) p(0)<1. detection function g(y) specified dsmodel p(0) estimated conditional detection functions (see mrmodel ). value dsmodel specified using hybrid formula/function notation. model definition prefixed ~ remainder function definition specified arguments. present two different functions, cds mcds, conventional distance sampling multi-covariate distance sampling. functions required arguments (key,formula). first specifies key function can half-normal (\"hn\"), hazard-rate (\"hr\"), gamma (\"gamma\") uniform (\"unif\"). argument formula specifies formula log scale parameter key function (e.g., equivalent standard deviation half-normal). variable distance included formula scale distance. See Marques Buckland (2004) details representation scale formula. hazard rate gamma functions, additional shape.formula can specified model shape parameter. default ~1. Adjustment terms can specified setting adj.series can values: \"none\", \"cos\" (cosine), \"poly\" (polynomials), \"herm\" (Hermite polynomials). One must also specify vector orders adjustment terms (adj.order) scaling (adj.scale) may \"width\" \"scale\" (scaling scale parameter). Note uniform key can used adjustments (usually cosine adjustments Fourier-type analysis). mrmodel specifies form conditional detection functions (.e.,probability seen observer j given seen observer 3-j) observer (j=1,2) double observer survey. value specified using mix formula/function notation case functions glm gam. arguments functions formula link. present, glm allowed restricted link=logit. Thus, currently form conditional detection functions logistic expressed eq 6.32 Laake Borchers (2004) . contrast dsmodel, argument formula typically include distance covariates affect detection probability. example, mrmodel=~glm(formula=~distance+size+sex) constructs conditional detection function based logistic form additive factors, distance, size, sex. another example, mrmodel=~glm(formula=~distance*size+sex) constructs model added interaction distance size. argument meta.data list enables various options data set. options include: point TRUE data point counts FALSE (default) implies line transect data width distance specifying half-width transect left distance specifying inner truncation value binned TRUE FALSE specify whether distances binned analysis breaks binned=TRUE, required sequence break points used plotting/gof. match distbegin, distend values bins fixed int.range integration range detection probability; either vector 2 matrix 2 columns mono constrain detection function weakly monotonically decreasing (applicable covariates detection function) mono.strict TRUE constrain detection function strictly monotonically decreasing (, applicable covariates detection function) Using meta.data=list(int.range=c(1,10)) meta.data=list(left=1,width=10). meta.data=list(binned=TRUE) used, dataframe needs contain fields distbegin distend observation specify left right hand end points distance interval containing observation. general data structure allows intervals change rather fixed standard distance analysis tools. Typically, intervals changing integration range. example, assume distance bins generated using fixed angular measurements aircraft altitude varying. analyses truncated (.e., last interval go infinity), transect width (left truncation point blindspot aircraft) can potentially change observation. argument int.range can also entered matrix 2 columns (left width) row observation. argument control list enables various analysis options set. necessary set analyses. provided user can optionally see intermediate fitting output control fitting algorithm converge happens infrequently. list values include: showit Integer (0-3, default 0) controls (increasing)amount information printed fitting. 0 - none, >=1 - information refitting bound changes printed, >=2 - information adjustment term fitting printed, ==3 -per-iteration parameter estimates log-likelihood printed. estimate FALSE fits model estimate predicted probabilities refit TRUE algorithm attempt multiple optimizations different starting values converge nrefits number refitting attempts initial named list starting values dsmodel parameters (e.g. $scale, $shape, $adjustment) lowerbounds vector lowerbounds dsmodel parameters order ds parameters appear par element ddf object, .e. fit.ddf$par fit.ddf fitted ddf model. upperbounds vector upperbounds dsmodel parameters order ds parameters appear par element ddf object, .e. fit.ddf$par fit.ddf fitted ddf model. limit TRUE restrict analysis observations detected=1 debug TRUE, fitting fails, return object fitting information nofit TRUE fit model, use starting values generate object based values optimx.method one (vector ) string(s) giving optimisation method use. one supplied, results one used starting values next. See optimx optimx.maxit maximum number iterations use optimisation. mono.random.start default monotonicity constraints enforced, grid starting values tested. Instead random starting values can used (uniformly distributed upper lower bounds). Set TRUE random start, FALSE (default) uses grid method mono.method optimiser method used (strict) monotonicity enforced. Can either slsqp solnp. Default slsqp. mono.startvals Controls mono.optimiser find better starting values first fitting key function without adjustments, use start values key function parameters fitting key + adjustment series detection function. Defaults FALSE mono.outer.iter Number outer iterations used solnp fitting monotonic model solnp selected. Default 200. silent silences warnings within ds fitting method (helpful running many times without generating many warning/error messages). optimizer default set '' single observer analyses 'R' double observer analyses. single observer analyses optimizer = '', R optimizer used present MCDS optimizer also used. result best likelihood value selected. run specified optimizer set value either 'R' 'MCDS'. MCDS optimizer currently used detection function fitting double observer analyses. See mcds_dot_exe information. winebin Location wine binary used run MCDS.exe. See mcds_dot_exe information. Examples distance sampling analyses available https://distancesampling.org/resources/vignettes.html. Hints tips fitting (particularly optimisation issues) mrds_opt manual page.","code":""},{"path":"/reference/ddf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Distance Detection Function Fitting — ddf","text":"Laake JL, Borchers DL (2004). “Advanced distance sampling: estimating abundance biological population.” chapter Methods incomplete detection distance zero. Oxford University Press. Marques FFC, Buckland ST (2004). “Advanced distance sampling.” chapter Covariate models detection function, 31-47. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Distance Detection Function Fitting — ddf","text":"Jeff Laake","code":""},{"path":"/reference/ddf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Distance Detection Function Fitting — ddf","text":"","code":"# load data data(book.tee.data) region <- book.tee.data$book.tee.region egdata <- book.tee.data$book.tee.dataframe samples <- book.tee.data$book.tee.samples obs <- book.tee.data$book.tee.obs # fit a half-normal detection function result <- ddf(dsmodel=~mcds(key=\"hn\", formula=~1), data=egdata, method=\"ds\", meta.data=list(width=4)) # fit an independent observer model with full independence result.io.fi <- ddf(mrmodel=~glm(~distance), data=egdata, method=\"io.fi\", meta.data=list(width = 4)) # fit an independent observer model with point independence result.io <- ddf(dsmodel=~cds(key = \"hn\"), mrmodel=~glm(~distance), data=egdata, method=\"io\", meta.data=list(width=4)) if (FALSE) { # \\dontrun{ # simulated single observer point count data (see ?ptdata.single) data(ptdata.single) ptdata.single$distbegin <- (as.numeric(cut(ptdata.single$distance, 10*(0:10)))-1)*10 ptdata.single$distend <- (as.numeric(cut(ptdata.single$distance, 10*(0:10))))*10 model <- ddf(data=ptdata.single, dsmodel=~cds(key=\"hn\"), meta.data=list(point=TRUE,binned=TRUE,breaks=10*(0:10))) summary(model) plot(model,main=\"Single observer binned point data - half normal\") model <- ddf(data=ptdata.single, dsmodel=~cds(key=\"hr\"), meta.data=list(point=TRUE, binned=TRUE, breaks=10*(0:10))) summary(model) plot(model, main=\"Single observer binned point data - hazard rate\") dev.new() # simulated double observer point count data (see ?ptdata.dual) # setup data data(ptdata.dual) ptdata.dual$distbegin <- (as.numeric(cut(ptdata.dual$distance, 10*(0:10)))-1)*10 ptdata.dual$distend <- (as.numeric(cut(ptdata.dual$distance, 10*(0:10))))*10 model <- ddf(method=\"io\", data=ptdata.dual, dsmodel=~cds(key=\"hn\"), mrmodel=~glm(formula=~distance*observer), meta.data=list(point=TRUE, binned=TRUE, breaks=10*(0:10))) summary(model) plot(model, main=\"Dual observer binned point data\", new=FALSE, pages=1) model <- ddf(method=\"io\", data=ptdata.dual, dsmodel=~cds(key=\"unif\", adj.series=\"cos\", adj.order=1), mrmodel=~glm(formula=~distance*observer), meta.data=list(point=TRUE, binned=TRUE, breaks=10*(0:10))) summary(model) par(mfrow=c(2,3)) plot(model,main=\"Dual observer binned point data\",new=FALSE) } # }"},{"path":"/reference/ddf.io.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"Mark-Recapture Analysis Independent Observer Configuration Full Independence","code":""},{"path":"/reference/ddf.io.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"","code":"# S3 method for class 'io.fi' ddf( dsmodel = NULL, mrmodel, data, method, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.io.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"dsmodel used mrmodel mark-recapture model specification data analysis dataframe method analysis method; needed function called ddf.io meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.io.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"result: io.fi model object","code":""},{"path":"/reference/ddf.io.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"mark-recapture data derived independent observer distance sampling survey can used derive conditional detection functions (p_j(y)) observers (j=1,2). conditional detection functions detection probability observer j based seeing seeing observations made observer 3-j. Thus, p_1(y) estimated p_1|2(y). detections observers independent (full independence) p_1(y)=p_1|2(y),p_2(y)=p_2|1(y) union, full independence means p(y)=p_1(y) + p_2(y) - p_1(y)*p_2(y) distance y. fitting detection functions likelihood given eq 6.8 6.16 Laake Borchers (2004) used. analysis require usual distance sampling assumption perpendicular distances uniformly distributed based line placement random relative animal distribution. However, assumption used computing predicted detection probability averaged based uniform distribution (see eq 6.11 Laake Borchers 2004). complete description calling arguments, see ddf. argument model function mrmodel ddf. argument dataname name dataframe specified argument data ddf. arguments control,meta.data,method defined ddf.","code":""},{"path":"/reference/ddf.io.fi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.io.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) IO - FI — ddf.io.fi","text":"Jeff Laake","code":""},{"path":"/reference/ddf.io.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"Mark-Recapture Distance Sampling (MRDS) Analysis Independent Observer Configuration Point Independence","code":""},{"path":"/reference/ddf.io.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"","code":"# S3 method for class 'io' ddf( dsmodel, mrmodel, data, method = NULL, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.io.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"dsmodel distance sampling model specification; model list key function scale formula mrmodel mark-recapture model specification; model list formula link data analysis dataframe method used meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.io.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"result: io model object composed io.fi ds model objects","code":""},{"path":"/reference/ddf.io.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"MRDS analysis based point independence involves two separate independent analyses mark-recapture data distance sampling data. independent observer configuration, mark-recapture data analysed call ddf.io.fi (see likelihood eq 6.8 6.16 Laake Borchers 2004) fit conditional distance sampling detection functions estimate p(0), detection probability distance zero independent observer team based independence zero (eq 6.22 Laake Borchers 2004). Independently, distance data, union observations independent observers, used fit conventional distance sampling (CDS) (likelihood eq 6.6) multi-covariate distance sampling (MCDS) (likelihood eq 6.14) model detection function, g(y), g(0)=1. detection function observer team created p(y)=p(0)*g(y) (eq 6.28 Laake Borchers 2004) predictions made. ddf.io called directly user called ddf method=\"io\". complete description calling arguments, see ddf. argument dataname name dataframe specified argument data ddf. arguments dsmodel, mrmodel, control meta.data defined ddf.","code":""},{"path":"/reference/ddf.io.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.io.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) IO - PI — ddf.io","text":"Jeff Laake","code":""},{"path":"/reference/ddf.rem.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"Mark-Recapture Distance Sampling (MRDS) Analysis Removal Observer Configuration Full Independence","code":""},{"path":"/reference/ddf.rem.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"","code":"# S3 method for class 'rem.fi' ddf( dsmodel = NULL, mrmodel, data, method, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.rem.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"dsmodel used mrmodel mark-recapture model specification data analysis dataframe method analysis method; needed function called ddf.io meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.rem.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"result: rem.fi model object","code":""},{"path":"/reference/ddf.rem.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"mark-recapture data derived removal observer distance sampling survey can derive conditional detection functions (p_j(y)) observers (j=1) technically assumes detection probability vary occasion (observer case). conditional detection function detection probability observer 1 conditional observations seen either observers. Thus, p_1(y) estimated p_1|2(y). detections observers independent (full independence) p_1(y)=p_1|2(y) union, full independence means p(y)=p_1(y) + p_2(y) - p_1(y)*p_2(y) distance y. fitting detection functions likelihood Laake Borchers (2004) used. analysis require usual distance sampling assumption perpendicular distances uniformly distributed based line placement random relative animal distribution. However, assumption used computing predicted detection probability averaged based uniform distribution (see eq 6.11 Laake Borchers 2004). complete description calling arguments, see ddf. argument model function mrmodel ddf. argument dataname name dataframe specified argument data ddf. arguments control,meta.data,method defined ddf.","code":""},{"path":"/reference/ddf.rem.fi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.rem.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) Removal - FI — ddf.rem.fi","text":"Jeff Laake","code":""},{"path":"/reference/ddf.rem.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"Mark-Recapture Distance Sampling (MRDS) Analysis Removal Observer Configuration Point Independence","code":""},{"path":"/reference/ddf.rem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"","code":"# S3 method for class 'rem' ddf( dsmodel, mrmodel, data, method = NULL, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.rem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"dsmodel distance sampling model specification; model list key function scale formula mrmodel mark-recapture model specification; model list formula link data analysis dataframe method used meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.rem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"result: rem model object composed rem.fi ds model objects","code":""},{"path":"/reference/ddf.rem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"MRDS analysis based point independence involves two separate independent analyses mark-recapture data distance sampling data. removal observer configuration, mark-recapture data analysed call ddf.rem.fi (see Laake Borchers 2004) fit conditional distance sampling detection functions estimate p(0), detection probability distance zero primary observer based independence zero (eq 6.22 Laake Borchers 2004). Independently, distance data, observations primary observer, used fit conventional distance sampling (CDS) (likelihood eq 6.6) multi-covariate distance sampling (MCDS) (likelihood eq 6.14) model detection function, g(y), g(0)=1. detection function primary observer created p(y)=p(0)*g(y) (eq 6.28 Laake Borchers 2004) predictions made. ddf.rem called directly user called ddf method=\"rem\". complete description calling arguments, see ddf. argument data dataframe specified argument data ddf. arguments dsmodel, mrmodel, control meta.data defined ddf.","code":""},{"path":"/reference/ddf.rem.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.rem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) Removal - PI — ddf.rem","text":"Jeff Laake","code":""},{"path":"/reference/ddf.trial.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"Mark-Recapture Analysis Trial Observer Configuration Full Independence","code":""},{"path":"/reference/ddf.trial.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"","code":"# S3 method for class 'trial.fi' ddf( dsmodel = NULL, mrmodel, data, method, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.trial.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"dsmodel used mrmodel mark-recapture model specification data analysis dataframe method analysis method; needed function called ddf.trial meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.trial.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"result: trial.fi model object","code":""},{"path":"/reference/ddf.trial.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"mark-recapture data derived trial observer distance sampling survey can used derive conditional detection function (p_1(y)) observer 1 based trials (observations) observer 2. conditional detection function detection probability observer 1 based seeing seeing observations made observer 2. Thus, p_1(y) estimated p_1|2(y). detections observers independent (full independence) p_1(y)=p_1|2(y) distance y. fitting detection functions likelihood given eq 6.12 6.17 Laake Borchers (2004) used. analysis require usual distance sampling assumption perpendicular distances uniformly distributed based line placement random relative animal distribution. However, assumption used computing predicted detection probability averaged based uniform distribution (see eq 6.13 Laake Borchers 2004). complete description calling arguments, see ddf. argument model function mrmodel ddf. argument dataname name dataframe specified argument data ddf. arguments control,meta.data,method defined ddf.","code":""},{"path":"/reference/ddf.trial.fi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.trial.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Analysis of Trial Configuration - FI — ddf.trial.fi","text":"Jeff Laake","code":""},{"path":"/reference/ddf.trial.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"Mark-Recapture Distance Sampling (MRDS) Analysis Trial Observer Configuration Point Independence","code":""},{"path":"/reference/ddf.trial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"","code":"# S3 method for class 'trial' ddf( dsmodel, mrmodel, data, method = NULL, meta.data = list(), control = list(), call = \"\" )"},{"path":"/reference/ddf.trial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"dsmodel distance sampling model specification; model list key function scale formula mrmodel mark-recapture model specification; model list formula link data analysis data.frame method used meta.data list containing settings controlling data structure control list containing settings controlling model fitting call original function call used call ddf","code":""},{"path":"/reference/ddf.trial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"result: trial model object composed trial.fi ds model objects","code":""},{"path":"/reference/ddf.trial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"MRDS analysis based point independence involves two separate independent analyses mark-recapture data distance sampling data. trial configuration, mark-recapture data analysed call ddf.trial.fi (see likelihood eq 6.12 6.17 Laake Borchers 2004) fit conditional distance sampling detection function observer 1 based trials (observations) observer 2 estimate p_1(0), detection probability distance zero observer 1. Independently, distance data observer 1 used fit conventional distance sampling (CDS) (likelihood eq 6.6) multi-covariate distance sampling (MCDS) (likelihood eq 6.14) model detection function, g(y), g(0)=1. detection function observer 1 created p_1(y)=p_1(0)*g(y) (eq 6.28 Laake Borchers 2004) predictions made. ddf.trial called directly user called ddf method=\"trial\". complete description calling arguments, see ddf. argument dataname name dataframe specified argument data ddf. arguments dsmodel, mrmodel, control meta.data defined ddf.","code":""},{"path":"/reference/ddf.trial.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"Laake, J.L. D.L. Borchers. 2004. Methods incomplete detection distance zero. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/ddf.trial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (MRDS) Trial Configuration - PI — ddf.trial","text":"Jeff Laake","code":""},{"path":"/reference/DeltaMethod.html","id":null,"dir":"Reference","previous_headings":"","what":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"Computes delta method variance-covariance matrix results generic function fct computes vector estimates function set estimated parameters par.","code":""},{"path":"/reference/DeltaMethod.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"","code":"DeltaMethod(par, fct, vcov, delta, ...)"},{"path":"/reference/DeltaMethod.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"par vector parameter values estimates constructed fct function constructs estimates parameters par vcov variance-covariance matrix parameters delta proportional change parameters used numerically estimate first derivative central-difference formula (ignored) ... additional arguments needed fct","code":""},{"path":"/reference/DeltaMethod.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"list values variance estimated variance-covariance matrix estimates derived fct partial matrix (vector) partial derivatives fct respect parameters par","code":""},{"path":"/reference/DeltaMethod.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"delta method (aka propagation errors based Taylor series approximation - see Seber's book Estimation Animal Abundance). uses first derivative fct respect par. also uses variance-covariance matrix estimated parameters derived estimating parameters input argument. first argument fct par vector parameter estimates. return single value (vector) estimate(s). remaining arguments fct can passed fct including end call DeltaMethod name=value pairs.","code":""},{"path":"/reference/DeltaMethod.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"generic function can used setting beyond mrds package. However internal function mrds user need call explicitly.","code":""},{"path":"/reference/DeltaMethod.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Numeric Delta Method approximation for the variance-covariance matrix — DeltaMethod","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/det.tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Observation detection tables — det.tables","title":"Observation detection tables — det.tables","text":"Creates series tables dual observer data shows number missed detected observer within defined distance classes.","code":""},{"path":"/reference/det.tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Observation detection tables — det.tables","text":"","code":"det.tables(model, nc = NULL, breaks = NULL)"},{"path":"/reference/det.tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Observation detection tables — det.tables","text":"model fitted model ddf nc number equal-width bins histogram breaks user define breakpoints","code":""},{"path":"/reference/det.tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Observation detection tables — det.tables","text":"list object class \"det.tables\" Observer1 table observer 1 Observer2 table observer 2 Duplicates histogram counts duplicates Pooled histogram counts observations either observer Obs1_2 table observer 1 within subset seen observer 2 Obs2_1 table observer 2 within subset seen observer 1","code":""},{"path":"/reference/det.tables.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Observation detection tables — det.tables","text":"Jeff Laake","code":""},{"path":"/reference/det.tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Observation detection tables — det.tables","text":"","code":"# \\donttest{ data(book.tee.data) region <- book.tee.data$book.tee.region egdata <- book.tee.data$book.tee.dataframe samples <- book.tee.data$book.tee.samples obs <- book.tee.data$book.tee.obs xx <- ddf(mrmodel=~glm(formula=~distance*observer), dsmodel=~mcds(key=\"hn\", formula=~sex), data=egdata, method=\"io\", meta.data=list(width=4)) tabs <- det.tables(xx, breaks=c(0, 0.5, 1, 2, 3, 4)) par(mfrow=c(2, 2)) plot(tabs, new=FALSE, which=c(1, 2, 5, 6)) # }"},{"path":"/reference/detfct.fit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit detection function using key-adjustment functions — detfct.fit","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"Fit detection function observed distances using key-adjustment function approach. adjustment functions included alternate fitting parameters key adjustment functions parameters much like approach CDS MCDS Distance FORTRAN code. calls detfct.fit.opt uses R optim function allow non-linear constraints inclusion adjustments allow detection function non-monotone.","code":""},{"path":"/reference/detfct.fit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"","code":"detfct.fit(ddfobj, optim.options, bounds, misc.options)"},{"path":"/reference/detfct.fit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"ddfobj detection function object optim.options control options optim bounds bounds parameters misc.options miscellaneous options","code":""},{"path":"/reference/detfct.fit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"fitted detection function model object following list structure par final parameter vector value final negative log likelihood value counts number function evaluations convergence see codes optim message string convergence hessian hessian evaluated final parameter values aux list 20 elements maxit: maximum number iterations allowed optimization lower: lower bound values parameters upper: upper bound values parameters setlower: TRUE user set bounds setupper: TRUE user set bounds point: TRUE point counts FALSE line transect int.range: integration range values showit: integer value determines information printed iteration silent: option silence errors detfct.fit.opt integral.numeric TRUE compute logistic integrals numerically breaks: breaks distance defined fixed bins analysis maxiter: maximum iterations used refit: TRUE, detection function fitted parameters boundary convergence achieved nrefits: number refittings mono: TRUE monotonicity enforced mono.strict: TRUE, strict monotonicity enforced; otherwise weak width: radius point count half-width strip standardize: TRUE, detection function scaled g(0)=1 ddfobj: distance detection function object; see create.ddfobj bounded: TRUE parameters ended boundary (think) model: list formulas detection function model (probably can remove )","code":""},{"path":"/reference/detfct.fit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit detection function using key-adjustment functions — detfct.fit","text":"Dave Miller; Jeff Laake","code":""},{"path":"/reference/detfct.fit.opt.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit detection function using key-adjustment functions — detfct.fit.opt","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"Fit detection function observed distances using key-adjustment function approach. adjustment functions included alternate fitting parameters key adjustment functions parameters much like approach CDS MCDS Distance FORTRAN code. function called driver function detfct.fit, calls relevant optimisation routine, slsqp, solnp optimx.","code":""},{"path":"/reference/detfct.fit.opt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"","code":"detfct.fit.opt(ddfobj, optim.options, bounds, misc.options, fitting = \"all\")"},{"path":"/reference/detfct.fit.opt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"ddfobj detection function object optim.options control options optim bounds bounds parameters misc.options miscellaneous options fitting character string values \"\",\"key\",\"adjust\" determine parameters allowed vary fitting","code":""},{"path":"/reference/detfct.fit.opt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"fitted detection function model object following list structure par final parameter vector value final negative log likelihood value counts number function evaluations convergence see codes optim message string convergence hessian hessian evaluated final parameter values aux list 20 elements maxit: maximum number iterations allowed optimization lower: lower bound values parameters upper: upper bound values parameters setlower: TRUE user set bounds setupper: TRUE user set bounds point: TRUE point counts FALSE line transect int.range: integration range values showit: integer value determines information printed iteration integral.numeric TRUE compute logistic integrals numerically breaks: breaks distance defined fixed bins analysis maxiter: maximum iterations used refit: TRUE, detection function fitted parameters boundary convergence achieved nrefits: number refittings mono: TRUE, monotonicity enforced mono.strict: TRUE, strict monotonicity enforced; otherwise weak width: radius point count half-width strip standardize: TRUE, detection function scaled g(0)=1 ddfobj: distance detection function object; see create.ddfobj bounded: TRUE estimated parameters bounds model: list formulas detection function model (probably can remove )","code":""},{"path":"/reference/detfct.fit.opt.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit detection function using key-adjustment functions — detfct.fit.opt","text":"Dave Miller; Jeff Laake; Lorenzo Milazzo; Felix Petersma","code":""},{"path":"/reference/dht.deriv.html","id":null,"dir":"Reference","previous_headings":"","what":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"Computes abundance specified values parameters numerical computation first derivative respect parameters detection function. internal function called DeltaMethod invoked dht.se","code":""},{"path":"/reference/dht.deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"","code":"dht.deriv(par, model, obs, samples, options = list())"},{"path":"/reference/dht.deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"par detection function parameter values model ddf model object obs observations table samples samples table options list options specified dht","code":""},{"path":"/reference/dht.deriv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"vector abundance estimates values parameters specified par","code":""},{"path":"/reference/dht.deriv.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"Internal function; intended called user","code":""},{"path":[]},{"path":"/reference/dht.deriv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Computes abundance estimates at specified parameter values using Horvitz-Thompson-like estimator — dht.deriv","text":"Jeff Laake","code":""},{"path":"/reference/dht.html","id":null,"dir":"Reference","previous_headings":"","what":"Density and abundance estimates and variances — dht","title":"Density and abundance estimates and variances — dht","text":"Compute density abundance estimates variances based Horvitz-Thompson-like estimator.","code":""},{"path":"/reference/dht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Density and abundance estimates and variances — dht","text":"","code":"dht( model, region.table, sample.table, obs.table = NULL, subset = NULL, se = TRUE, options = list() )"},{"path":"/reference/dht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Density and abundance estimates and variances — dht","text":"model ddf model object region.table data.frame region records. Two columns: Region.Label Area. density required, one can set Area=0 regions. sample.table data.frame sample records. Three columns: Region.Label, Sample.Label, Effort. obs.table data.frame observation records fields: object, Region.Label, Sample.Label give links sample.table, region.table data records used model. necessary data.frame used create model contains Region.Label, Sample.Label columns. subset subset statement create obs.table se TRUE computes standard errors, coefficient variation confidence intervals (based log-normal approximation). See \"Uncertainty\" . options list options can set, see \"dht options\", .","code":""},{"path":"/reference/dht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Density and abundance estimates and variances — dht","text":"list object class dht elements: clusters result list object clusters individuals result list individuals Expected.S data.frame estimates expected cluster size fields Region, Expected.S se.Expected.S cluster size=1, result includes individuals clusters Expected.S. list structure clusters individuals : bysample data.frame giving results sample; Nchat estimated abundance within sample Nhat scaled surveyed area/covered area within region summary data.frame summary statistics region total N data.frame estimates abundance region total D data.frame estimates density region total average.p average detection probability estimate cormat correlation matrix regional abundance/density estimates total (one region) vc list 3: total variance-covariance matrix, detection function component variance encounter rate component variance. detection v-c matrix partial vector returned Nhat..sample another summary Nhat sample used dht.se","code":""},{"path":"/reference/dht.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Density and abundance estimates and variances — dht","text":"Density abundance within sampled region computed based Horvitz-Thompson-like estimator groups individuals (clustered population) extrapolated entire survey region based defined regional stratification. variance based replicate samples within regional stratification. clustered populations, \\(E(s)\\) standard error also output. Abundance estimated Horvitz-Thompson-like estimator (Huggins 1989 ; Huggins 1991 ; Borchers et al. 1998 ; Borchers Burnham 2004 ). abundance sampled region simply \\(1/p_1 + 1/p_2 + ... + 1/p_n\\) \\(p_i\\) estimated detection probability \\(\\)th detection \\(n\\) total observations. strictly Horvitz-Thompson estimator \\(p_i\\) estimated known. animals observed tight clusters, estimator gives abundance groups (group=TRUE options) abundance individuals estimated \\(s_1/p_1 + s_2/p_2 + ... + s_n/p_n\\), \\(s_i\\) size (e.g., number animals group) observation (group=FALSE options). Extrapolation estimation abundance entire survey region based either random sampling design stratified random sampling design. Replicate samples (lines) specified within regional strata region.table, . stratification, region.table contain single record Area entire survey region. sample.table linked region.table Region.Label. obs.table linked sample.table Sample.Label Region.Label. Abundance can restricted subset (e.g., particular species) population limiting list observations obs.table desired subset. Alternatively, Sample.Label Region.Label data.frame used fit model, subset argument can given place obs.table. use subset argument include observations, use subset=1==1 avoid creating obs.table. extrapolating entire survey region important unit measurements consistent converted consistency. conversion factor can specified convert.units variable options list. values Area region.table, must made consistent units Effort sample.table units distance data.frame analyzed. easiest units Area square units Effort necessary convert units distance units Effort. example, Effort entered kilometres Area square kilometres distance metres using options=list(convert.units=0.001) convert metres kilometres, density expressed square kilometres consistent units Area. However, can different units long appropriate composite value convert.units chosen. Abundance survey region can expressed : *N/Area survey region, N abundance covered (sampled) region, area sampled region units Effort * distance. sampled region multiplied convert.units, chosen result units Area. example, Effort entered kilometres, Area hectares (100m x 100m) distance metres, using options=list(convert.units=10) convert units hectares (100 convert metres 100 metres distance .1 convert km 100m units). argument options list variable=value pairs set options analysis. two described . pdelta need changed included completeness. controls precision first derivative calculation delta method variance. option areas.supplied TRUE covered area assumed supplied CoveredArea column sample data.frame.","code":""},{"path":"/reference/dht.html","id":"uncertainty","dir":"Reference","previous_headings":"","what":"Uncertainty","title":"Density and abundance estimates and variances — dht","text":"argument se=TRUE, standard errors density abundance computed. Coefficient variation log-normal confidence intervals constructed using Satterthwaite approximation degrees freedom (Buckland et al. 2001 p 90). function dht.se computes variance interval estimates. variance two components: variation due uncertainty estimation detection function parameters; variation abundance due random sample selection; first component (model parameter uncertainty) computed using delta method estimate variance (Huggins 1989 ; Huggins 1991 ; Borchers et al. 1998 ) first derivatives abundance estimator respect parameters detection function computed numerically (see DeltaMethod). second component (encounter rate variance) can computed one several ways depending form taken encounter rate estimator used. begin three possible values varflag calculate encounter rate: 0 uses binomial variance number observations (equation 13 Borchers et al. 1998 . estimator useful sampled region survey region objects clustered; situation occur often; 1 uses encounter rate \\(n/L\\) (objects observed per unit transect) Buckland et al. (2001) pg 78-79 (equation 3.78) line transects (see also Fewster et al. 2009 estimator R2). variance estimator appropriate size derivative size used detection function; 2 default uses encounter rate estimator \\(\\hat{N}/L\\) (estimated abundance per unit transect) suggested Innes et al. (2002) Marques Buckland (2004) general covariates used models, default varflag=2 preferable estimated abundance take account variability due covariate effects. population clustered mean group size standard error also reported. options 1 2, possible choose one estimator forms given Fewster et al. (2009) line transects: \"R2\", \"R3\", \"R4\", \"S1\", \"S2\", \"O1\", \"O2\" \"O3\" can used specifying ervar list options provided options argument (default \"R2\"). points, either \"P2\" \"P3\" estimator can selected (>=mrds 2.3.0 default \"P2\", <= mrds 2.2.9 default \"P3\"). See varn Fewster et al. (2009) details estimators.","code":""},{"path":"/reference/dht.html","id":"dht-options","dir":"Reference","previous_headings":"","what":"dht options","title":"Density and abundance estimates and variances — dht","text":"Several options available control calculations output: ci.width Confidence interval width, expressed decimal 0 1 (default 0.95, giving 95% CI) pdelta delta value computing numerical first derivatives (Default: 0.001) varflag 0,1,2 (see \"Uncertainty\") (Default: 2) convert.units multiplier width convert units length (Default: 1) ervar encounter rate variance type (see \"Uncertainty\" type argument varn). (Default: \"R2\" lines \"P2\" points)","code":""},{"path":"/reference/dht.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Density and abundance estimates and variances — dht","text":"Borchers DL, Buckland ST, Goedhart PW, Clarke ED, Hedley SL (1998). “Horvitz-Thompson Estimators Double-Platform Line Transect Surveys.” Biometrics, 54(4), 1221-1237. doi:10.2307/253365 . Borchers DL, Burnham KP (2004). “Advanced distance sampling: estimating abundance biological population.” chapter General formulation distance sampling, 10-11. Oxford University Press. Buckland ST, Anderson DR, Burnham KP, Laake JL, Borchers DL, Thomas L (2001). Introduction distance sampling: estimating abundance biological populations. Oxford university press. Fewster RM, Buckland ST, Burnham KP, Borchers DL, Jupp PE, Laake JL, Thomas L (2009). “Estimating encounter rate variance distance sampling.” Biometrics, 65(1), 225-236. Huggins RM (1989). “statistical analysis capture experiments.” Biometrika, 76(1), 133-140. doi:10.1093/biomet/76.1.133 . Huggins RM (1991). “practical aspects conditional likelihood approach capture experiments.” Biometrics, 47(1), 725-732. doi:10.1093/biomet/76.1.133 . Innes S, Heide-Jørgensen MP, Laake JL, Laidre KL, Cleator HJ, Richard P, Stewart RE (2002). “Surveys belugas narwhals Canadian High Arctic 1996.” NAMMCO Scientific Publications, 4, 169-190. Marques FFC, Buckland ST (2004). “Advanced distance sampling.” chapter Covariate models detection function, 31-47. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/dht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Density and abundance estimates and variances — dht","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/dht.se.html","id":null,"dir":"Reference","previous_headings":"","what":"Variance and confidence intervals for density and abundance estimates — dht.se","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"Computes standard error, cv, log-normal confidence intervals abundance density within region () total regions. also produces correlation matrix regional total estimates.","code":""},{"path":"/reference/dht.se.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"","code":"dht.se( model, region.table, samples, obs, options, numRegions, estimate.table, Nhat.by.sample )"},{"path":"/reference/dht.se.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"model ddf model object region.table table region values samples table samples(replicates) obs table observations options list options can set (see dht) numRegions number regions estimate.table table estimate values Nhat..sample estimated abundances sample","code":""},{"path":"/reference/dht.se.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"List 2 elements: estimate.table completed table se, cv confidence limits vc correlation matrix estimates","code":""},{"path":"/reference/dht.se.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"variance two components: variation due uncertainty estimation detection function parameters; variation abundance due random sample selection; first component (model parameter uncertainty) computed using delta method estimate variance (Huggins 1989 ; Huggins 1991 ; Borchers et al. 1998 ) first derivatives abundance estimator respect parameters detection function computed numerically (see DeltaMethod). second component (encounter rate variance) can computed one several ways depending form taken encounter rate estimator used. begin three possible values varflag calculate encounter rate: 0 uses negative binomial variance number observations (equation 13 Borchers et al. 1998 ). estimator useful sampled region survey region objects clustered; situation occur often; 1 uses encounter rate \\(n/L\\) (objects observed per unit transect) Buckland et al. (2001) pg 78-79 (equation 3.78) line transects (see also Fewster et al. 2009 estimator R2). variance estimator appropriate size derivative size used detection function; 2 default uses encounter rate estimator \\(\\hat{N}/L\\) (estimated abundance per unit transect) suggested Innes et al. (2002) Marques Buckland (2004) general covariates used models, default varflag=2 preferable estimated abundance take account variability due covariate effects. population clustered mean group size standard error also reported. options 1 2, possible choose one estimator forms given Fewster et al. (2009) . line transects: \"R2\", \"R3\", \"R4\", \"S1\", \"S2\", \"O1\", \"O2\" \"O3\" can used specifying ervar list options provided options argument (default \"R2\"). points, either \"P2\" \"P3\" estimator can selected (>=mrds 2.3.0 default \"P2\", <= mrds 2.2.9 default \"P3\"). See varn Fewster et al. (2009) details estimators. Exceptions occur one sample stratum. situation, varflag=0 continues use negative binomial variance options assume Poisson variance (\\(Var(x)=x\\)), varflag=1 x number detections covered region varflag=2 x abundance covered region. also assumes known variance \\(z=1.96\\) used critical value. cases degrees freedom \\(t\\)-distribution assumed log(abundance) log(density) based Satterthwaite approximation (Buckland et al. 2001 pg 90) degrees freedom (df). df weighted squared cv combining two sources variation assumed log-normal distribution components multiplicative. combining df sampling variance across regions weighted variance sum across regions. non-zero correlation regional estimates can occur using common detection function across regions. reflected correlation matrix regional total estimates given value list. needed subtotals regional estimates needed.","code":""},{"path":"/reference/dht.se.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"function called dht expected user call function directly documented completeness anyone expanding code using function code.","code":""},{"path":"/reference/dht.se.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"Borchers DL, Buckland ST, Goedhart PW, Clarke ED, Hedley SL (1998). “Horvitz-Thompson Estimators Double-Platform Line Transect Surveys.” Biometrics, 54(4), 1221-1237. doi:10.2307/253365 . Buckland ST, Anderson DR, Burnham KP, Laake JL, Borchers DL, Thomas L (2001). Introduction distance sampling: estimating abundance biological populations. Oxford university press. Fewster RM, Buckland ST, Burnham KP, Borchers DL, Jupp PE, Laake JL, Thomas L (2009). “Estimating encounter rate variance distance sampling.” Biometrics, 65(1), 225-236. Huggins RM (1989). “statistical analysis capture experiments.” Biometrika, 76(1), 133-140. doi:10.1093/biomet/76.1.133 . Huggins RM (1991). “practical aspects conditional likelihood approach capture experiments.” Biometrics, 47(1), 725-732. doi:10.1093/biomet/76.1.133 . Innes S, Heide-Jørgensen MP, Laake JL, Laidre KL, Cleator HJ, Richard P, Stewart RE (2002). “Surveys belugas narwhals Canadian High Arctic 1996.” NAMMCO Scientific Publications, 4, 169-190. Marques FFC, Buckland ST (2004). “Advanced distance sampling.” chapter Covariate models detection function, 31-47. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/dht.se.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Variance and confidence intervals for density and abundance estimates — dht.se","text":"Jeff Laake","code":""},{"path":"/reference/distpdf.grad.html","id":null,"dir":"Reference","previous_headings":"","what":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"function updated match distpdf closely, flexibility. Effectively, gives gradient distpdf detfct, whichever one specified.","code":""},{"path":"/reference/distpdf.grad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"","code":"distpdf.grad( distance, par.index, ddfobj, standardize = FALSE, width, point, left = 0, pdf.based = TRUE )"},{"path":"/reference/distpdf.grad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"distance vector distances par.index index parameter interest ddfobj ddf object standardize whether function return gradient standardized detection function g(x)/g(0) (TRUE), simply g(0) (FALSE). Currently implemented standardize = FALSE. width truncation width point data point transects (TRUE) line transects (FALSE). left left truncation (default 0) pdf.based gradient non-normalised pdf (TRUE) detection function (FALSE)? Default TRUE.","code":""},{"path":"/reference/distpdf.grad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"gradient non-normalised pdf detection w.r.t. parameter parameter index par.index.","code":""},{"path":"/reference/distpdf.grad.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"Various functions used specify key adjustment functions gradients detection functions. far, developed half-normal, hazard-rate uniform key functions combination cosine, simple polynomial Hermite polynomial adjustments. called gradient-based solver called general user. distpdf.grad call either half-normal, hazard-rate uniform function adjustment terms fit data better, returning gradient detection distance w.r.t. parameters. adjustments either cosine, Hermite simple polynomial.","code":""},{"path":"/reference/distpdf.grad.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Gradient of the non-normalised pdf of distances or the detection function for the distances. — distpdf.grad","text":"Felix Petersma","code":""},{"path":"/reference/distpdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Detection functions — distpdf","title":"Detection functions — distpdf","text":"Various functions used specify key adjustment functions detection functions.","code":""},{"path":"/reference/distpdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detection functions — distpdf","text":"","code":"detfct(distance, ddfobj, select=NULL, index=NULL, width=NULL, standardize = TRUE, stdint=FALSE, left=0) adjfct.cos(distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp=FALSE) adjfct.poly(distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp=FALSE) adjfct.herm(distance, scaling = 1, adj.order, adj.parm = NULL, adj.exp=FALSE) scalevalue(key.scale, z) keyfct.hn(distance, key.scale) keyfct.hz(distance, key.scale, key.shape) keyfct.gamma(distance, key.scale, key.shape) fx(distance,ddfobj,select=NULL,index=NULL,width=NULL, standardize=TRUE,stdint=FALSE, left=0) fr(distance,ddfobj,select=NULL,index=NULL,width=NULL, standardize=TRUE,stdint=FALSE) distpdf(distance,ddfobj,select=NULL,index=NULL,width=NULL,standardize=TRUE, stdint=FALSE,point=FALSE, left=0)"},{"path":"/reference/distpdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detection functions — distpdf","text":"distance vector distances ddfobj distance sampling object (see create.ddfobj) select logical vector selection data values index specific data row index width (right) truncation width standardize logical used decide whether divide function evaluated 0 stdint logical used decide whether integral standardized point TRUE, point counts; otherwise line transects left (left) truncation distance z design matrix scale function key.scale vector scale values key.shape vector shape values adj.order vector adjustment orders adj.parm vector adjustment parameters scaling scaling adjustment terms adj.exp TRUE uses exp(adj) adjustment keep f(x)>0","code":""},{"path":"/reference/distpdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detection functions — distpdf","text":"detfct, value vector detection probabilities keyfct.*, vector key function evaluations adjfct.*, vector adjustment series evaluations scalevalue, vector scale parameters.","code":""},{"path":"/reference/distpdf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Detection functions — distpdf","text":"Multi-covariate detection functions (MCDS) represented function \\(g(x,w,\\theta)\\) x distance, z set covariates \\(\\theta\\) parameter vector. functions defined \\(g(0,w,\\theta)=1\\) covariates modify scale \\((x/\\sigma)\\) log link used relate \\(\\sigma\\) covariates, \\(\\sigma=exp(\\theta*w)\\). CDS function obtained constant \\(\\sigma\\) equivalent intercept design matrix, z. detfct call either gamma, half-normal, hazard-rate uniform function returning probability detection distance. addition simple model , may specify adjustment terms fit data better. adjustments either Cosine, Hermite simple polynomials. specified arguments detfct, detailed . detfct function calls others assembles final result using either key(x)[1+series(x)] (key(x)[1+series(x)])/(key(0)[1+series(0)]) (depending value standardize). keyfct.* functions calculate key function values adjfct.* calculate adjustment term values. scalevalue either detection function computes scale log link using parameters covariate design matrix fx, fr non-normalized probability density line transects point counts respectively","code":""},{"path":"/reference/distpdf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Detection functions — distpdf","text":"Marques, F. F. C., & Buckland, S. T. (2003). Incorporating covariates standard line transect analyses. Biometrics, 59(4), 924-935. Buckland, S. T., Anderson, D. R., Burnham, K. P., Laake, J. L., Borchers, D. L., & Thomas, L. (2004). Advanced Distance Sampling. Oxford University Press, Oxford, UK. Becker, E. F. P. X. Quang. 2009. gamma-shaped detection function line transect surveys mark-recapture covariate data. Journal Agricultural Biological Environmental Statistics 14:207-223.","code":""},{"path":[]},{"path":"/reference/distpdf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detection functions — distpdf","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/ds.function.html","id":null,"dir":"Reference","previous_headings":"","what":"Distance Sampling Functions — ds.function","title":"Distance Sampling Functions — ds.function","text":"Computes values conditional unconditional detection functions probability density functions line/point data single observer dual observer 3 configurations (io,trial,rem).","code":""},{"path":"/reference/ds.function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distance Sampling Functions — ds.function","text":"","code":"ds.function( model, newdata = NULL, obs = \"All\", conditional = FALSE, pdf = TRUE, finebr )"},{"path":"/reference/ds.function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distance Sampling Functions — ds.function","text":"model model object newdata dataframe compute values; NULL uses fitting data obs 1 2 observer 1 2, 3 duplicates, \".\" combined \"\" return values conditional FALSE, computes p(x) based distance detection function TRUE based mr detection function pdf FALSE, returns p(x) TRUE, returns p(x)*pi(x)/integral p(x)*pi(x) finebr fine break values line averaged","code":""},{"path":"/reference/ds.function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distance Sampling Functions — ds.function","text":"List containing xgrid grid distance values values average detection fct values xgrid values","code":""},{"path":"/reference/ds.function.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Distance Sampling Functions — ds.function","text":"Placeholder – functional —-","code":""},{"path":"/reference/ds.function.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Distance Sampling Functions — ds.function","text":"Jeff Laake","code":""},{"path":"/reference/flnl.constr.grad.neg.html","id":null,"dir":"Reference","previous_headings":"","what":"(Negative) gradients of constraint function — flnl.constr.grad.neg","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"function derives gradients constraint function model parameters, following order: 1. Scale parameter (part key function) 2. Shape parameter (part key function) 3. Adjustment parameter 1 4. Adjustment parameter 2 5. Etc.","code":""},{"path":"/reference/flnl.constr.grad.neg.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"","code":"flnl.constr.grad.neg(pars, ddfobj, misc.options, fitting = \"all\")"},{"path":"/reference/flnl.constr.grad.neg.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"pars vector parameter values detection function gradients negative log-likelihood evaluated ddfobj distance sampling object misc.options list object containing additional information type optimiser truncation width, created within ddf.ds fitting character string values \"\", \"key\", \"adjust\" determine parameters allowed vary fitting. actually used. Defaults \"\".","code":""},{"path":"/reference/flnl.constr.grad.neg.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"matrix gradients constraints (rows) w.r.t every parameters (columns)","code":""},{"path":"/reference/flnl.constr.grad.neg.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"(Negative) gradients of constraint function — flnl.constr.grad.neg","text":"constraint function formed specified number non-linear constraints, defaults 20 specified misc.options$mono.points. constraint function checks whether standardised detection function 1) weakly/strictly monotonic points 2) non-negative points. flnl.constr.grad returns gradients constraints w.r.t. parameters detection function, .e., 2 times mono.points gradients every parameter. function mostly follows structure flnl.constr detfct.fit.mono.R.","code":""},{"path":"/reference/flnl.grad.html","id":null,"dir":"Reference","previous_headings":"","what":"Gradient of the negative log likelihood function — flnl.grad","title":"Gradient of the negative log likelihood function — flnl.grad","text":"function derives gradients negative log likelihood function, respect parameters. based theory presented Introduction Distance Sampling (2001) Distance Sampling: Methods Applications (2015). meant called users mrds Distance packages directly rather gradient-based solver. solver used distance sampling model single-observer data coming either line point transect detection function contains adjustment series covariates. implement following key + adjustment series combinations detections function: key function can half-normal, hazard-rate uniform, adjustment series can cosine, simple polynomial Hermite polynomial. Data can either binned exact, combination two implemented yet.","code":""},{"path":"/reference/flnl.grad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Gradient of the negative log likelihood function — flnl.grad","text":"","code":"flnl.grad(pars, ddfobj, misc.options, fitting = \"all\")"},{"path":"/reference/flnl.grad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Gradient of the negative log likelihood function — flnl.grad","text":"pars vector parameter values detection function gradients negative log-likelihood evaluated ddfobj distance sampling object misc.options list object containing additional information type optimiser truncation width, created ddf.ds fitting character string values \"\", \"key\", \"adjust\" determine parameters allowed vary fitting. actually used. Defaults \"\".","code":""},{"path":"/reference/flnl.grad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Gradient of the negative log likelihood function — flnl.grad","text":"gradients negative log-likelihood w.r.t. parameters","code":""},{"path":"/reference/flnl.grad.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Gradient of the negative log likelihood function — flnl.grad","text":"Felix Petersma","code":""},{"path":"/reference/flnl.html","id":null,"dir":"Reference","previous_headings":"","what":"Log-likelihood computation for distance sampling data — flnl","title":"Log-likelihood computation for distance sampling data — flnl","text":"specific set parameter values, computes returns negative log-likelihood distance sampling likelihood distances unbinned, binned mixture . function flnl function minimized using optim within ddf.ds.","code":""},{"path":"/reference/flnl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Log-likelihood computation for distance sampling data — flnl","text":"","code":"flnl(fpar, ddfobj, misc.options, fitting = \"all\")"},{"path":"/reference/flnl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Log-likelihood computation for distance sampling data — flnl","text":"fpar parameter values detection function negative log-likelihood evaluated ddfobj distance sampling object misc.options list following elements: width transect width; int.range integration range observations; showit 0 3 controls level debug output; integral.numeric TRUE integral computed numerically rather analytically; point point transect? fitting character \"key\" fitting key function parameters, \"adjust\" fitting adjustment parameters \"\" fit ","code":""},{"path":"/reference/flnl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Log-likelihood computation for distance sampling data — flnl","text":"negative log-likelihood value parameter values specified fpar","code":""},{"path":"/reference/flnl.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Log-likelihood computation for distance sampling data — flnl","text":"computation flpt.lnl negative log-likelihood computed observation. flnl wrapper optionally outputs intermediate results sums individual log-likelihood values. flnl main routine manipulates parameters using getpar handle fitting key, adjustment parameters. calls flpt.lnl actual computation likelihood. probability density function point counts fr line transects fx. fx=g(x)/mu (g(x) detection function); whereas, f(r)=r*g(r)/mu mu cases normalizing constant. functions source code file link{detfct} called distpdf integral calculations made integratepdf.","code":""},{"path":"/reference/flnl.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Log-likelihood computation for distance sampling data — flnl","text":"internal functions used ddf.ds fit distance sampling detection functions. intended user invoke functions documented completeness.","code":""},{"path":[]},{"path":"/reference/flnl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Log-likelihood computation for distance sampling data — flnl","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/flt.var.html","id":null,"dir":"Reference","previous_headings":"","what":"Hessian computation for fitted distance detection function model parameters — flt.var","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"Computes hessian used variance-covariance matrix. hessian outer product vector first partials (see pg 62 Buckland et al 2002).","code":""},{"path":"/reference/flt.var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"","code":"flt.var(ddfobj, misc.options)"},{"path":"/reference/flt.var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"ddfobj distance sampling object misc.options width-transect width (W); int.range-integration range observations; showit-0 3 controls level iteration printing; integral.numeric-TRUE integral computed numerically rather analytically","code":""},{"path":"/reference/flt.var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"variance-covariance matrix parameters detection function","code":""},{"path":"/reference/flt.var.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"internal function used ddf.ds fit distance sampling detection functions. intended user invoke function documented completeness.","code":""},{"path":"/reference/flt.var.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"Buckland et al. 2002","code":""},{"path":[]},{"path":"/reference/flt.var.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Hessian computation for fitted distance detection function model parameters — flt.var","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/g0.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute value of p(0) using a logit formulation — g0","title":"Compute value of p(0) using a logit formulation — g0","text":"Compute value p(0) using logit formulation","code":""},{"path":"/reference/g0.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute value of p(0) using a logit formulation — g0","text":"","code":"g0(beta, z)"},{"path":"/reference/g0.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute value of p(0) using a logit formulation — g0","text":"beta logistic parameters z design matrix covariate values","code":""},{"path":"/reference/g0.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute value of p(0) using a logit formulation — g0","text":"vector p(0) values","code":""},{"path":"/reference/g0.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute value of p(0) using a logit formulation — g0","text":"Jeff Laake","code":""},{"path":"/reference/getpar.html","id":null,"dir":"Reference","previous_headings":"","what":"Extraction and assignment of parameters to vector — getpar","title":"Extraction and assignment of parameters to vector — getpar","text":"Extracts parameters particular type (scale, shape, adjustments g0 (p(0))) vector parameters ddfobj. parameters kept single vector optimization even though different uses. assign.par parses vector based known structure assigns ddfobj. getpar extracts requested types extracted ddfobj.","code":""},{"path":"/reference/getpar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extraction and assignment of parameters to vector — getpar","text":"","code":"getpar(ddfobj, fitting = \"all\", index = FALSE)"},{"path":"/reference/getpar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extraction and assignment of parameters to vector — getpar","text":"ddfobj distance sampling object (see create.ddfobj) fitting character string either \"\",\"key\",\"adjust\" determines parameters retrieved index logical determines whether parameters returned (FALSE) starting indices parameter vector scale, shape, adjustment parameters","code":""},{"path":"/reference/getpar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extraction and assignment of parameters to vector — getpar","text":"index==FALSE, vector parameters requested index==TRUE, vector 3 indices shape, scale, adjustment","code":""},{"path":"/reference/getpar.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extraction and assignment of parameters to vector — getpar","text":"Internal functions intended called user.","code":""},{"path":[]},{"path":"/reference/getpar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extraction and assignment of parameters to vector — getpar","text":"Jeff Laake","code":""},{"path":"/reference/gof.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute chi-square goodness-of-fit test for ds models — gof.ds","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"Compute chi-square goodness--fit test ds models","code":""},{"path":"/reference/gof.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"","code":"gof.ds(model, breaks = NULL, nc = NULL)"},{"path":"/reference/gof.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"model ddf model object breaks distance cut points nc number distance classes","code":""},{"path":"/reference/gof.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"list chi-square value, df p-value","code":""},{"path":[]},{"path":"/reference/gof.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute chi-square goodness-of-fit test for ds models — gof.ds","text":"Jeff Laake","code":""},{"path":"/reference/gstdint.html","id":null,"dir":"Reference","previous_headings":"","what":"Integral of pdf of distances — gstdint","title":"Integral of pdf of distances — gstdint","text":"Computes integral distpdf scale=1 (stdint=TRUE) specified scale (stdint=FALSE).","code":""},{"path":"/reference/gstdint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Integral of pdf of distances — gstdint","text":"","code":"gstdint( x, ddfobj, index = NULL, select = NULL, width, standardize = TRUE, point = FALSE, stdint = TRUE, doeachint = FALSE, left = left )"},{"path":"/reference/gstdint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Integral of pdf of distances — gstdint","text":"x lower, upper value integration ddfobj distance detection function specification index specific data row index select logical vector selection data values width truncation width standardize TRUE, divide function evaluated 0 point logical determine point (TRUE) line transect(FALSE) stdint TRUE, scale=1 otherwise specified scale used doeachint TRUE perform integration using integrate left left truncation width","code":""},{"path":"/reference/gstdint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Integral of pdf of distances — gstdint","text":"vector integral values detection function","code":""},{"path":"/reference/gstdint.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Integral of pdf of distances — gstdint","text":"internal function intended invoked directly.","code":""},{"path":"/reference/gstdint.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Integral of pdf of distances — gstdint","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/histline.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot histogram line — histline","title":"Plot histogram line — histline","text":"Takes bar heights (height) cutpoints (breaks), constructs line-histogram using function plot() (lineonly==FALSE) lines() (lineonly==TRUE).","code":""},{"path":"/reference/histline.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot histogram line — histline","text":"","code":"histline( height, breaks, lineonly = FALSE, outline = FALSE, ylim = range(height), xlab = \"x\", ylab = \"y\", det.plot = FALSE, add = FALSE, ... )"},{"path":"/reference/histline.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot histogram line — histline","text":"height heights histogram bars breaks cutpoints x lineonly TRUE, drawn plot; otherwise lines allow addition current plot outline TRUE, outline histogram plotted ylim limits y axis xlab label x axis ylab label y axis det.plot TRUE, plot detection yaxis limited unit interval add plot add previous window ... Additional unspecified arguments plot","code":""},{"path":"/reference/histline.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot histogram line — histline","text":"None","code":""},{"path":"/reference/histline.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot histogram line — histline","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/integratedetfct.logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Integrate a logistic detection function — integratedetfct.logistic","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"Integrates logistic detection function; separate function used certain cases integral can solved analytically also scale trick used half-normal hazard rate work logistic.","code":""},{"path":"/reference/integratedetfct.logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"","code":"integratedetfct.logistic(x, scalemodel, width, theta1, integral.numeric, w)"},{"path":"/reference/integratedetfct.logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"x logistic design matrix values scalemodel scale model logistic width transect width theta1 parameters logistic integral.numeric TRUE computes numerical integral value w design covariates","code":""},{"path":"/reference/integratedetfct.logistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"vector integral values","code":""},{"path":"/reference/integratedetfct.logistic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Integrate a logistic detection function — integratedetfct.logistic","text":"Jeff Laake","code":""},{"path":"/reference/integratelogistic.analytic.html","id":null,"dir":"Reference","previous_headings":"","what":"Analytically integrate logistic detection function — integratelogistic.analytic","title":"Analytically integrate logistic detection function — integratelogistic.analytic","text":"Computes integral (analytically) x 0 width logistic detection function; reference see integral #526 CRC Std Math Table 24th ed","code":""},{"path":"/reference/integratelogistic.analytic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analytically integrate logistic detection function — integratelogistic.analytic","text":"","code":"integratelogistic.analytic(x, models, beta, width)"},{"path":"/reference/integratelogistic.analytic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analytically integrate logistic detection function — integratelogistic.analytic","text":"x matrix data models list model formulae beta parameters logistic detection function width transect half-width","code":""},{"path":"/reference/integratelogistic.analytic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Analytically integrate logistic detection function — integratelogistic.analytic","text":"Jeff Laake","code":""},{"path":"/reference/integratepdf.grad.html","id":null,"dir":"Reference","previous_headings":"","what":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"Gradient integral detection function, .e., d beta/d theta documentation. gradient integral integral gradient, thanks Leibniz integral rule.","code":""},{"path":"/reference/integratepdf.grad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"","code":"integratepdf.grad( par.index, ddfobj, int.range, width, standardize = FALSE, point = FALSE, left = 0, pdf.based = TRUE )"},{"path":"/reference/integratepdf.grad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"par.index index parameter interest ddfobj ddf object int.range vector lower upper bound integration width truncation width standardize TRUE non-standardised detection function integrated. implemented standardize = FALSE, users touch argument can probably removed. point data point transects (TRUE) line transects (FALSE). left left truncation. Defaults zero. pdf.based evaluate non-normalised pdf detection function? Default TRUE.","code":""},{"path":"/reference/integratepdf.grad.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"internal use – called mrds Distance users directly.","code":""},{"path":"/reference/integratepdf.grad.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Numerically integrates the non-normalised pdf or the detection function of observed distances over specified ranges. — integratepdf.grad","text":"Felix Petersma","code":""},{"path":"/reference/integratepdf.html","id":null,"dir":"Reference","previous_headings":"","what":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"Computes integral pdf observed distances x observation. method computation depends argument switches set type detection function.","code":""},{"path":"/reference/integratepdf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"","code":"integratepdf( ddfobj, select, width, int.range, standardize = TRUE, point = FALSE, left = 0, doeachint = FALSE )"},{"path":"/reference/integratepdf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"ddfobj distance detection function specification select logical vector selection data values width truncation width int.range integration range matrix; vector converted matrix standardize logical used decide whether divide function evaluated 0 point logical determine point count (TRUE) line transect (FALSE) left left truncation width doeachint calculate integral numerically","code":""},{"path":"/reference/integratepdf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"vector integral values - one observation","code":""},{"path":"/reference/integratepdf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Numerically integrate pdf of observed distances over specified ranges — integratepdf","text":"Jeff Laake & Dave Miller","code":""},{"path":"/reference/io.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Iterative offset GLM/GAM for fitting detection function — io.glm","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"Provides iterative algorithm finding MLEs detection (capture) probabilities two-occasion (double observer) mark-recapture experiment using standard algorithms GLM/GAM offset compensate conditioning set observations. likelihood can formulated solved numerically, use GLM/GAM provides available tools fitting, predictions, plotting etc without development.","code":""},{"path":"/reference/io.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"","code":"io.glm( datavec, fitformula, eps = 1e-05, iterlimit = 500, GAM = FALSE, gamplot = TRUE )"},{"path":"/reference/io.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"datavec dataframe fitformula logit link formula eps convergence criterion iterlimit maximum number iterations allowed GAM uses GAM instead GLM fitting gamplot set TRUE get gam plot object GAM=TRUE","code":""},{"path":"/reference/io.glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"list class(\"ioglm\",\"glm\",\"lm\") class(\"ioglm\",\"gam\") glmobj GLM GAM object offsetvalue offsetvalues iterative fit plotobj gam plot object (GAM & gamplot==TRUE, else NULL)","code":""},{"path":"/reference/io.glm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"Note currently code function GAMs commented remainder mrds package work GAMs. internal function used ddf.io.fi fit mark-recapture models 2 occasions. argument mrmodel used fitformula.","code":""},{"path":"/reference/io.glm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"Buckland, S.T., J.M. breiwick, K.L. Cattanach, J.L. Laake. 1993. Estimated population size California gray whale. Marine Mammal Science, 9:235-249. Burnham, K.P., S.T. Buckland, J.L. Laake, D.L. Borchers, T.. Marques, J.R.B. Bishop, L. Thomas. 2004. topics distance sampling. pp: 360-363. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":"/reference/io.glm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Iterative offset GLM/GAM for fitting detection function — io.glm","text":"Jeff Laake, David Borchers, Charles Paxton","code":""},{"path":"/reference/is.linear.logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Collection of functions for logistic detection functions — is.linear.logistic","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"functions used test whether logistic detection function linear function distance (.linear.logistic) constant (varies distance covariates) .logistic.constant). Based tests, appropriate manner integrating detection function respect distance chosen. integrals needed estimate average detection probability given set covariates.","code":""},{"path":"/reference/is.linear.logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"","code":"is.linear.logistic(xmat, g0model, zdim, width)"},{"path":"/reference/is.linear.logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"xmat data matrix g0model logit model zdim number columns design matrix width transect width","code":""},{"path":"/reference/is.linear.logistic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"Logical TRUE condition holds FALSE otherwise","code":""},{"path":"/reference/is.linear.logistic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"logit linear distance integral can computed analytically. logit constant varies distance one integral needs computed rather integral observation.","code":""},{"path":"/reference/is.linear.logistic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Collection of functions for logistic detection functions — is.linear.logistic","text":"Jeff Laake","code":""},{"path":"/reference/is.logistic.constant.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a logit model constant for all observations? — is.logistic.constant","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"Determines whether specified logit model constant observations. constant one integral needs computed.","code":""},{"path":"/reference/is.logistic.constant.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"","code":"is.logistic.constant(xmat, g0model, width)"},{"path":"/reference/is.logistic.constant.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"xmat data g0model logit model width transect width","code":""},{"path":"/reference/is.logistic.constant.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"logical value","code":""},{"path":"/reference/is.logistic.constant.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Is a logit model constant for all observations? — is.logistic.constant","text":"Jeff Laake","code":""},{"path":"/reference/keyfct.grad.hn.html","id":null,"dir":"Reference","previous_headings":"","what":"The gradient of the half-normal key function — keyfct.grad.hn","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"key function contains one parameter, scale. Current implementation assumes scaled dist x/scale, x/width","code":""},{"path":"/reference/keyfct.grad.hn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"","code":"keyfct.grad.hn(distance, key.scale)"},{"path":"/reference/keyfct.grad.hn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"distance perpendicular distance vector key.scale vector scale values","code":""},{"path":"/reference/keyfct.grad.hn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"vector derivatives half-normal key function w.r.t. scale parameter","code":""},{"path":"/reference/keyfct.grad.hn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The gradient of the half-normal key function — keyfct.grad.hn","text":"d key / d scale = exp(-y ^ 2 / (2 scale ^ 2)) * (y ^ 2 / scale ^ 3)","code":""},{"path":"/reference/keyfct.grad.hz.html","id":null,"dir":"Reference","previous_headings":"","what":"The gradient of the hazard-rate key function — keyfct.grad.hz","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"key function contains two parameters, scale shape, gradient two-dimensional. Current implementation assumes scaled dist x/scale, x/width","code":""},{"path":"/reference/keyfct.grad.hz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"","code":"keyfct.grad.hz(distance, key.scale, key.shape, shape = FALSE)"},{"path":"/reference/keyfct.grad.hz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"distance perpendicular distance vector key.scale vector scale values key.shape vector shape values shape gradient parameter shape parameter? Defaults FALSE","code":""},{"path":"/reference/keyfct.grad.hz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"matrix derivatives hazard rate key function w.r.t. scale parameter shape parameter.","code":""},{"path":"/reference/keyfct.grad.hz.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"The gradient of the hazard-rate key function — keyfct.grad.hz","text":"d key / d scale = (shape * exp(-(1/ (x/scale) ^ shape)) / ((x/scale) ^ shape ) * scale) d key / d shape = - ((log(x / scale) * exp(-(1/ (x/scale) ^ shape))) / (x/scale) ^ shape) distance = 0, gradients also zero. However, equation result NaN (-)Inf due operations log(0) division zero. correct line 33.","code":""},{"path":"/reference/keyfct.th1.html","id":null,"dir":"Reference","previous_headings":"","what":"Threshold key function — keyfct.th1","title":"Threshold key function — keyfct.th1","text":"Threshold key function","code":""},{"path":"/reference/keyfct.th1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Threshold key function — keyfct.th1","text":"","code":"keyfct.th1(distance, key.scale, key.shape)"},{"path":"/reference/keyfct.th1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Threshold key function — keyfct.th1","text":"distance perpendicular distance vector key.scale vector scale values key.shape vector shape values","code":""},{"path":"/reference/keyfct.th1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Threshold key function — keyfct.th1","text":"vector probabilities","code":""},{"path":"/reference/keyfct.th2.html","id":null,"dir":"Reference","previous_headings":"","what":"Threshold key function — keyfct.th2","title":"Threshold key function — keyfct.th2","text":"Threshold key function","code":""},{"path":"/reference/keyfct.th2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Threshold key function — keyfct.th2","text":"","code":"keyfct.th2(distance, key.scale, key.shape)"},{"path":"/reference/keyfct.th2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Threshold key function — keyfct.th2","text":"distance perpendicular distance vector key.scale vector scale values key.shape vector shape values","code":""},{"path":"/reference/keyfct.th2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Threshold key function — keyfct.th2","text":"vector probabilities","code":""},{"path":"/reference/keyfct.tpn.html","id":null,"dir":"Reference","previous_headings":"","what":"Two-part normal key function — keyfct.tpn","title":"Two-part normal key function — keyfct.tpn","text":"two-part normal detection function Becker Christ (2015). Either side estimated apex distance histogram half-normal distribution, differing scale parameters. Covariates may included affect sides function.","code":""},{"path":"/reference/keyfct.tpn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Two-part normal key function — keyfct.tpn","text":"","code":"keyfct.tpn(distance, ddfobj)"},{"path":"/reference/keyfct.tpn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Two-part normal key function — keyfct.tpn","text":"distance perpendicular distance vector ddfobj meta object containing parameters, design matrices etc","code":""},{"path":"/reference/keyfct.tpn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Two-part normal key function — keyfct.tpn","text":"vector probabilities observation detected given specified distance assuming g(mu)=1","code":""},{"path":"/reference/keyfct.tpn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Two-part normal key function — keyfct.tpn","text":"Two-part normal models 2 important parameters: apex, estimates peak detection function ( g(x)=1). log apex reported summary results, taking exponential value give peak plotted function (see examples). parameter controls difference sides .dummy_apex_side, automatically added formula two-part normal model. One can add interactions variable normal, need add main effect automatically added.","code":""},{"path":"/reference/keyfct.tpn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Two-part normal key function — keyfct.tpn","text":"Becker, E. F., & Christ, . M. (2015). Unimodal Model Double Observer Distance Sampling Surveys. PLOS ONE, 10(8), e0136403. doi:10.1371/journal.pone.0136403","code":""},{"path":"/reference/keyfct.tpn.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Two-part normal key function — keyfct.tpn","text":"Earl F Becker, David L Miller","code":""},{"path":"/reference/lfbcvi.html","id":null,"dir":"Reference","previous_headings":"","what":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"data represent avian point count surveys conducted 453 point sample survey locations 24,000 (approx) live-fire region Fort Hood central Texas. Surveys conducted independent double observers (2 per survey occasion) maximum 3 paired survey histories, giving maximum 6 sample occasions (see MacKenzie et al. 2006, MacKenzie Royle 2005, Laake et al. 2011 various sample survey design details). point, surveyed 5 minutes (technically broken 3 time intervals 2, 2, 1 minutes; used ) noted detections observer collected distance observation within set distance bins (0-25, 25-50, 50-75, 75-100m) target species (Black-capped vireo's case) surveyor. primary focus use mark-recapture distance sampling methods estimate density Black-capped vireo's, estimate detection rates mark-recapture, distance, composite model.","code":""},{"path":"/reference/lfbcvi.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"format data frame following covariate metrics. VisitNumber Visit number point Species Species designation, either Golden-cheeked warbler (GW) Black-capped Vireo (BV) Distance Distance measure, either NA (representing detection), median binned detection distances PairNumber ID value indicating observers paired sampling occasion Observer Observer ID, either primary(1), secondary (2) Detected Detection bird, either 1 = detected, 0 = detected Date Date survey since 15 march 2011 Pred Predicted occupancy value survey hexagon based Farrell et al. (2013) Category Region.Label categorization, see mrds help file details data structure Effort Amount survey effort point Day Number days since 15 March 2011 ObjectID Unique ID paired observations","code":""},{"path":"/reference/lfbcvi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"addition detailing analysis used Collier et al. (2013, Review), example documents use mrds avian point count surveys shows density models can incorporated occupancy models develop spatially explicit density surface maps. interested, distance sampling portion analysis, used conventional distance sampling (cds) multiple covariate distance sampling (mcds) uniform half-normal key functions. mark-recapture portion analysis, tended use covariates distance (median bin width), observer, date survey (days since 15 March 2011). combined mrds density estimates via Horvitz-Thompson styled estimator resource selection function gradient developed Farrell et al. (2013) estimated density ~3.14ha hexagonal grid across study area, provided density gradient Fort Hood military installation. considerable data manipulation needed analysis structure data appropriately use mrds, rather wrap analysis single function, provided Golden-cheeked warbler Black-capped vireo analyses full detail. primary differences see changes model structures model outputs two species.","code":""},{"path":"/reference/lfbcvi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"Farrell, S.F., B.. Collier, K.L. Skow, .M. Long, .J. Campomizzi, M.L. Morrison, B. Hays, R.N. Wilkins. 2013. Using LiDAR-derived structural vegetation characteristics develop high-resolution, small-scale, species distribution models conservation planning. Ecosphere 43(3): 42. http://dx.doi.org/10.1890/ES12-000352.1 Laake, J.L., B.. Collier, M.L. Morrison, R.N. Wilkins. 2011. Point-based mark recapture distance sampling. Journal Agricultural, Biological Environmental Statistics 16: 389-408. Collier, B.., S.L. Farrell, K.L. Skow, . M. Long, .J. Campomizzi, K.B. Hays, J.L. Laake, M.L. Morrison, R.N. Wilkins. 2013. Spatially explicit density endangered avian species disturbed landscape. Auk, Review.","code":""},{"path":"/reference/lfbcvi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Black-capped vireo mark-recapture distance sampling analysis — lfbcvi","text":"Bret Collier Jeff Laake","code":""},{"path":[]},{"path":"/reference/lfgcwa.html","id":null,"dir":"Reference","previous_headings":"","what":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"data represent avian point count surveys conducted 453 point sample survey locations 24,000 (approx) live-fire region Fort Hood central Texas. Surveys conducted independent double observers (2 per survey occasion) maximum 3 paired survey histories, giving maximum 6 sample occasions (see MacKenzie et al. 2006, MacKenzie Royle 2005, Laake et al. 2011 various sample survey design details). point, surveyed 5 minutes (technically broken 3 time intervals 2, 2, 1 minutes; used ) noted detections observer collected distance observation within set distance bins (0-50, 50-100m; Laake et al. 2011) target species (Golden-cheeked warblers case) surveyor. primary focus use mark-recapture distance sampling methods estimate density Golden-cheeked warblers, estimate detection rates mark-recapture, distance, composite model.","code":""},{"path":"/reference/lfgcwa.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"format data frame following covariate metrics. VisitNumber Visit number point Species Species designation, either Golden-cheeked warbler (GW) Black-capped Vireo (BV) Distance Distance measure, either NA (representing detection), median binned detection distances PairNumber ID value indicating observers paired sampling occasion Observer Observer ID, either primary(1), secondary (2) Detected Detection bird, either 1 = detected, 0 = detected Date Date survey since 15 March 2011, numeric value Pred Predicted occupancy value survey hexagon based Farrell et al. (2013) Category Region.Label categorization, see R package mrds help file details data structure Effort Amount survey effort point Day Number days since 15 March 2011, numeric value ObjectID Unique ID paired observations","code":""},{"path":"/reference/lfgcwa.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"addition detailing analysis used Collier et al. (2013, Review), example documents use mrds avian point count surveys shows density models can incorporated occupancy models develop spatially explicit density surface maps. interested, distance sampling portion analysis, used conventional distance sampling (cds) multiple covariate distance sampling (mcds) uniform half-normal key functions. mark-recapture portion analysis, tended use covariates distance (median bin width), observer, date survey (days since 15 March 2011). combined mrds density estimates via Horvitz-Thompson styled estimator resource selection function gradient developed Farrell et al. (2013) estimated density ~3.14ha hexagonal grid across study area, provided density gradient Fort Hood. considerable data manipulation needed analysis structure data appropriately use mrds, rather wrap analysis single function, provided Golden-cheeked warbler Black-capped vireo analyses full detail. primary differences see changes model structures model outputs two species.","code":""},{"path":"/reference/lfgcwa.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"Farrell, S.F., B.. Collier, K.L. Skow, .M. Long, .J. Campomizzi, M.L. Morrison, B. Hays, R.N. Wilkins. 2013. Using LiDAR-derived structural vegetation characteristics develop high-resolution, small-scale, species distribution models conservation planning. Ecosphere 43(3): 42. http://dx.doi.org/10.1890/ES12-000352.1 Laake, J.L., B.. Collier, M.L. Morrison, R.N. Wilkins. 2011. Point-based mark recapture distance sampling. Journal Agricultural, Biological Environmental Statistics 16: 389-408. Collier, B.., S.L. Farrell, K.L. Skow, .M. Long, .J. Campomizzi, K.B. Hays, J.L. Laake, M.L. Morrison, R.N. Wilkins. 2013. Spatially explicit density endangered avian species disturbed landscape. Auk, Review.","code":""},{"path":"/reference/lfgcwa.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Golden-cheeked warbler mark-recapture distance sampling analysis — lfgcwa","text":"Bret Collier Jeff Laake","code":""},{"path":[]},{"path":"/reference/logisticbyx.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic as a function of covariates — logisticbyx","title":"Logistic as a function of covariates — logisticbyx","text":"treats logistic function covariates; given covariate combination computes function covariate values range distances","code":""},{"path":"/reference/logisticbyx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic as a function of covariates — logisticbyx","text":"","code":"logisticbyx(distance, x, models, beta, point)"},{"path":"/reference/logisticbyx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic as a function of covariates — logisticbyx","text":"distance vector distance values x covariate data models model list beta logistic parameters point TRUE point transect model","code":""},{"path":"/reference/logisticbyx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logistic as a function of covariates — logisticbyx","text":"vector probabilities","code":""},{"path":"/reference/logisticbyx.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logistic as a function of covariates — logisticbyx","text":"Jeff Laake","code":""},{"path":"/reference/logisticbyz.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic as a function of distance — logisticbyz","title":"Logistic as a function of distance — logisticbyz","text":"Treats logistic function distance; given distance computes function covariate values data.","code":""},{"path":"/reference/logisticbyz.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic as a function of distance — logisticbyz","text":"","code":"logisticbyz(x, distance, models, beta)"},{"path":"/reference/logisticbyz.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic as a function of distance — logisticbyz","text":"x covariate data distance single distance value models model list beta logistic parameters","code":""},{"path":"/reference/logisticbyz.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logistic as a function of distance — logisticbyz","text":"vector probabilities","code":""},{"path":"/reference/logisticbyz.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logistic as a function of distance — logisticbyz","text":"Jeff Laake","code":""},{"path":"/reference/logisticdetfct.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic detection function — logisticdetfct","title":"Logistic detection function — logisticdetfct","text":"Logistic detection function","code":""},{"path":"/reference/logisticdetfct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic detection function — logisticdetfct","text":"","code":"logisticdetfct(distance, theta, w, std = FALSE)"},{"path":"/reference/logisticdetfct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic detection function — logisticdetfct","text":"distance perpendicular distance vector theta scale parameters w scale covariate matrix std TRUE uses scale=1 routine returns vector probabilities observation detected given specified distance assuming g(0)=1 (ie standard line transect detection function).","code":""},{"path":"/reference/logisticdupbyx.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic for duplicates as a function of covariates — logisticdupbyx","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"Treats logistic duplicates function covariate z; given z computes function covariate values range distances.","code":""},{"path":"/reference/logisticdupbyx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"","code":"logisticdupbyx(distance, x1, x2, models, beta, point)"},{"path":"/reference/logisticdupbyx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"distance vector distance values x1 covariate data fct 1 x2 covariate data fct 2 models model list beta logistic parameters point TRUE point transect data","code":""},{"path":"/reference/logisticdupbyx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"vector probabilities","code":""},{"path":"/reference/logisticdupbyx.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logistic for duplicates as a function of covariates — logisticdupbyx","text":"Jeff Laake","code":""},{"path":"/reference/logisticdupbyx_fast.html","id":null,"dir":"Reference","previous_headings":"","what":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","title":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","text":"logisticdupbyx, faster distance covariate (interactions distance occur.","code":""},{"path":"/reference/logisticdupbyx_fast.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","text":"","code":"logisticdupbyx_fast(distance, x1, x2, models, beta, point, beta_distance)"},{"path":"/reference/logisticdupbyx_fast.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","text":"distance vector distance values x1 linear predictor 1, without distance x2 linear predictor 2, without distance models model list beta logistic parameters point TRUE point transect data beta_distance parameter distance","code":""},{"path":"/reference/logisticdupbyx_fast.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logistic for duplicates as a function of covariates (fast) — logisticdupbyx_fast","text":"David L Miller","code":""},{"path":"/reference/logit.html","id":null,"dir":"Reference","previous_headings":"","what":"Logit function — logit","title":"Logit function — logit","text":"Computes logit transformation.","code":""},{"path":"/reference/logit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Logit function — logit","text":"","code":"logit(p)"},{"path":"/reference/logit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Logit function — logit","text":"p probability","code":""},{"path":"/reference/logit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Logit function — logit","text":"logit(p) returns [log(p/(1-p)]","code":""},{"path":"/reference/logit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Logit function — logit","text":"Jeff Laake","code":""},{"path":"/reference/logLik.ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"log-likelihood value for a fitted detection function — logLik.ddf","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"Extract log-likelihood fitted detection function.","code":""},{"path":"/reference/logLik.ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"","code":"# S3 method for class 'ddf' logLik(object, ...)"},{"path":"/reference/logLik.ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"object fitted detection function model object ... included S3 completeness, ignored","code":""},{"path":"/reference/logLik.ddf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"numeric value giving log-likelihood two attributes: \"df\" \"degrees freedom\" model (number parameters) \"nobs\" number observations used fit model","code":""},{"path":"/reference/logLik.ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"log-likelihood value for a fitted detection function — logLik.ddf","text":"David L Miller","code":""},{"path":"/reference/mcds.html","id":null,"dir":"Reference","previous_headings":"","what":"MCDS function definition — mcds","title":"MCDS function definition — mcds","text":"Creates model formula list multiple covariate distance sampling using values supplied call ddf","code":""},{"path":"/reference/mcds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"MCDS function definition — mcds","text":"","code":"mcds( formula = NULL, key = NULL, adj.series = NULL, adj.order = c(NULL), adj.scale = \"width\", adj.exp = FALSE, shape.formula = ~1 )"},{"path":"/reference/mcds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"MCDS function definition — mcds","text":"formula formula scale function key string identifying key function (currently either \"hn\" (half-normal),\"hr\" (hazard-rate), \"unif\" (uniform) \"gamma\" (gamma distribution) adj.series string identifying adjustment functions cos (Cosine), herm (Hermite polynomials), poly (simple polynomials) NULL adj.order vector order adjustment terms include adj.scale whether scale adjustment terms \"width\" \"scale\" adj.exp TRUE uses exp(adj) adjustment keep f(x)>0 shape.formula formula shape function","code":""},{"path":"/reference/mcds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"MCDS function definition — mcds","text":"formula list used define detection function model fct string \"mcds\" key key function string adj.series adjustment function string adj.order adjustment function orders adj.scale adjustment function scale type formula formula scale function shape.formula formula shape function","code":""},{"path":"/reference/mcds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"MCDS function definition — mcds","text":"Jeff Laake; Dave Miller","code":""},{"path":"/reference/mcds_dot_exe.html","id":null,"dir":"Reference","previous_headings":"","what":"Run MCDS.exe as a backend for mrds — MCDS.exe","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"Rather use R-based detection function fitting algorithms provided `mrds`, one can also use algorithm used Distance Windows, implemented binary file `MCDS.exe`. Note changes R-based optimizer introduced `mrds` version 3.0.0 unlikely result better estimates. option remains available, although may deprecated future release. make use facility, one must first download `MCDS.exe` binary, laid `Obtaining MCDS.exe`. binary installed, calls `ddf` , default, result using model fit using `MCDS.exe` R-based algorithm, one lower negative log-likelihood selected. almost cases, algorithms produce results, found edge one fails find likelihood maximum hence trying useful.","code":""},{"path":"/reference/mcds_dot_exe.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"may also cases `MCDS.exe` algorithm faster R-based one. circumstance, can choose run `MCDS.exe` algorithm via setting `ddf` argument control=list(optimizer='MCDS'). completeness, one can also choose use R-based algorithm setting control=list(optimizer='R'). information examples comparing R-based `MCDS.exe` algorithms, see examples pages https://distancesampling.org/resources/vignettes.html running non-Windows operating system, can follow instructions `MCDS.exe` run using `wine`.","code":""},{"path":"/reference/mcds_dot_exe.html","id":"obtaining-mcds-exe","dir":"Reference","previous_headings":"","what":"Obtaining MCDS.exe","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"following code can used download `MCDS.exe` distance sampling website: download.file(\"http://distancesampling.org/R/MCDS.exe\", paste0(system.file(package=\"mrds\"),\"/MCDS.exe\"), mode = \"wb\") MCDS binary installed main directory local R mrds library. Alternatively, can copy `MCDS.exe` local Distance Windows installation prefer. location local mrds library main directory can found running following R: system.file(\"MCDS.exe\", package=\"mrds\").","code":""},{"path":"/reference/mcds_dot_exe.html","id":"running-mcds-exe-on-non-windows-platforms","dir":"Reference","previous_headings":"","what":"Running MCDS.exe on non-Windows platforms","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"tentatively tested mac currently considered largely experimental. One can still use MCDS.exe even running mac computer. one need install `wine` Windows emulator. important use version `wine` can run 32-bit programs. package attempt work `wine` binary use (detect installed), always work. case, location `wine` binary can specified `control` `list` provided `ddf` using `winebin` element supply `winebin` argument `ds` function. example, `wine` installed `/usr/bin/local/wine` can set `control$winebin` location use binary. macOS, can achieved using `homebrew` package management system installing `wine-crossover` package. may need change control$winebin `wine`, `wine64` `wine32on64`, depending system's setup. package tries work , likely handle corner cases. Currently untested Mac M1 systems.","code":""},{"path":"/reference/mcds_dot_exe.html","id":"stopping-using-mcds-exe","dir":"Reference","previous_headings":"","what":"Stopping using MCDS.exe","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"feature enabled, using `ddf` default run built-R optimizer `MCDS.exe`. disable behaviour, specify wish use via optimizer= option described . Alternatively, wish permanently stop using MCDS.exe, remove `MCDS.exe` binary file. can find folder running following R: system.file(\"MCDS.exe\", package=\"mrds\").","code":""},{"path":"/reference/mcds_dot_exe.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Run MCDS.exe as a backend for mrds — MCDS.exe","text":"David L Miller Jonah McArthur","code":""},{"path":"/reference/mrds-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Mark-Recapture Distance Sampling (mrds) — mrds-package","title":"Mark-Recapture Distance Sampling (mrds) — mrds-package","text":"package implements conventional distance sampling analysis mark-recapture distance sampling methods detection transect certain. Mark-recapture distance sampling methods described Borchers et al. (1988) , Laake (1999) Borchers et al. (2006)","code":""},{"path":"/reference/mrds-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mark-Recapture Distance Sampling (mrds) — mrds-package","text":"Examples distance sampling analyses available https://distancesampling.org/resources/vignettes.html. help distance sampling package, Google Group https://groups.google.com/forum/#!forum/distance-sampling.","code":""},{"path":"/reference/mrds-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mark-Recapture Distance Sampling (mrds) — mrds-package","text":"Borchers DL, Laake JL, Southwell C, Paxton CLG (2006). “Accommodating unmodelled heterogeneity double-observer distance sampling surveyss.” Biometrics, 372-378. Borchers DL, Zucchini W, Fewster RM (1988). “Mark-recapture models line transect surveys.” Biometrics, 1207–1220. Laake J (1999). “Distance sampling independent observers: reducing bias heterogeneity weakening conditional independence assumption.” Marine mammal survey assessment methods, 137-148. CRC Press.","code":""},{"path":"/reference/mrds-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mark-Recapture Distance Sampling (mrds) — mrds-package","text":"Jeff Laake , David Borchers , Len Thomas , David L. Miller , Jon Bishop , Felix Petersma ","code":""},{"path":"/reference/mrds_opt.html","id":null,"dir":"Reference","previous_headings":"","what":"Tips on optimisation issues in mrds models — mrds_opt","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"Occasionally fitting `mrds` model one can run optimisation issues. general problems can quite complex \"quick fixes\" may work. come problems fixed tips, feel results dubious please go ahead contact package authors.","code":""},{"path":"/reference/mrds_opt.html","id":"debug-mode","dir":"Reference","previous_headings":"","what":"Debug mode","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"One can obtain debug output stage optimisation using showit option. set via control, adding control=list(showit=3) gives highest level debug output (setting showit 1 2 gives less output).","code":""},{"path":"/reference/mrds_opt.html","id":"re-scaling-covariates","dir":"Reference","previous_headings":"","what":"Re-scaling covariates","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"Sometimes convergence issues covariate (MCDS) models caused values covariate large, rescaling covariate necessary. Simply scaling standard deviation covariate can help (e.g. dat$size.scaled <- dat$scale/sd(dat$scale) covariate size, including size.scaled model instead size). important note one needs use original covariate (size) computing Horvitz-Thompson estimates population size group size used estimate. .e. use unscaled size numerator H-T estimator.","code":""},{"path":"/reference/mrds_opt.html","id":"factor-levels","dir":"Reference","previous_headings":"","what":"Factor levels","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"default R set base factor level label comes first alphabetically. Sometimes can issue factor level corresponds subset data observations. can lead large uncertainty estimates (CVs) model parameters. One way around use relevel set base level level observations.","code":""},{"path":"/reference/mrds_opt.html","id":"initial-values","dir":"Reference","previous_headings":"","what":"Initial values","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"Initial (starting) values dsmodel can set via initial element control list. initial list elements scale, shape adjustment, corresponding associated parameters. model covariates scale shape elements vectors parameter initial values order specific model formula (using showit good check correct order). Adjustment starting values order order term (cosine order 2 cosine order 3 terms). One way obtaining starting values fit simpler model first (say fewer covariates adjustments) use starting values simpler model corresponding parameters. Another alternative obtain starting values fit model (submodel) using Distance Windows. Note Distance reports scale parameter (intercept covariate model) exponential scale, one must log supplying ddf.","code":""},{"path":"/reference/mrds_opt.html","id":"bounds","dir":"Reference","previous_headings":"","what":"Bounds","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"One can change upper lower bounds dsmodel parameters. specify largest smallest values individual parameters can . placing constraints parameters, possible \"temper\" optimisation problem, making fitting possible. , one uses control list, elements upperbounds lowerbounds. case, upperbounds lowerbounds vectors, one can think vectors shape, scale adjustment \"Initial values\" section , concatenated order. one occur (e.g. shape parameter) simple omitted vector.","code":""},{"path":"/reference/mrds_opt.html","id":"conventional-distance-sampling-optimizer-choice","dir":"Reference","previous_headings":"","what":"Conventional distance sampling optimizer choice","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"key function plus adjustment approach Conventional Distance Sampling (CDS) can sometimes run issues sensible constrain fitted detection function monotonic non-increasing (.e., flat going ) increasing distance - finding maximum constrained likelihood difficult task without constraints. several options within `ddf` control argument may help difficulties encountered. documented ddf manual page, mentioned . One potential strategy (mentioned ) use better starting values optimization. mono.startvals set TRUE detection function first fit without adjustments resulting scale (shape) estimates used starting values model adjustments. even finer control, initial option can used documented . Another potential thing change constraint solver used. `mrds` v 3.0.0 new constraint solver, `slsqp`, included default. found work better solver previously used (`solnp`) needed solver can specified using mono.method option control argument `ddf`. also possible use optimizer implemented Distance Windows downloading separate binary - see manual page mcds_dot_exe. specified, also used Multiple Covariate Distance Sampling (MCDS) analyses.","code":""},{"path":"/reference/mrds_opt.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tips on optimisation issues in mrds models — mrds_opt","text":"David L. Miller ","code":""},{"path":"/reference/NCovered.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute estimated abundance in covered (sampled) region — NCovered","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"Generic function computes abundance within covered region. calls method (class) specific functions computation.","code":""},{"path":"/reference/NCovered.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"","code":"NCovered(par, model = NULL, group = TRUE)"},{"path":"/reference/NCovered.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"par parameter values (used computing derivatives wrt parameter uncertainty); NULL parameter values model used model ddf model object group TRUE computes group abundance FALSE individual abundance","code":""},{"path":"/reference/NCovered.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"abundance estimate","code":""},{"path":"/reference/NCovered.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute estimated abundance in covered (sampled) region — NCovered","text":"Jeff Laake","code":""},{"path":"/reference/nlminb_wrapper.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper around nlminb — nlminb_wrapper","title":"Wrapper around nlminb — nlminb_wrapper","text":"wrapper around nlminb use scaling, available optimx.","code":""},{"path":"/reference/nlminb_wrapper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper around nlminb — nlminb_wrapper","text":"","code":"nlminb_wrapper( par, ll, ugr = NULL, lower = NULL, upper = NULL, mcontrol, hess = NULL, ddfobj, data, ... )"},{"path":"/reference/nlminb_wrapper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper around nlminb — nlminb_wrapper","text":"par starting parameters ll log likelihood function ugr gradient function lower lower bounds parameters upper upper bounds parameters mcontrol control options hess hessian function ddfobj detection function specification object data data ... anything else pass ll","code":""},{"path":"/reference/nlminb_wrapper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper around nlminb — nlminb_wrapper","text":"optimx object","code":""},{"path":"/reference/nlminb_wrapper.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper around nlminb — nlminb_wrapper","text":"David L Miller, modified optimx.run JC Nash, R Varadhan, G Grothendieck.","code":""},{"path":"/reference/p.det.html","id":null,"dir":"Reference","previous_headings":"","what":"Double-platform detection probability — p.det","title":"Double-platform detection probability — p.det","text":"Computes detection probability detection function computed mark-recapture data possibly different link functions.","code":""},{"path":"/reference/p.det.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Double-platform detection probability — p.det","text":"","code":"p.det(dpformula, dplink, dppars, dpdata)"},{"path":"/reference/p.det.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Double-platform detection probability — p.det","text":"dpformula formula detection function dplink link function (\"logit\",\"loglog\",\"cloglog\") dppars parameter vector dpdata double platform data","code":""},{"path":"/reference/p.det.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Double-platform detection probability — p.det","text":"vector predicted detection probabilities","code":""},{"path":"/reference/p.det.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Double-platform detection probability — p.det","text":"?????","code":""},{"path":"/reference/p.dist.table.html","id":null,"dir":"Reference","previous_headings":"","what":"Distribution of probabilities of detection — p.dist.table","title":"Distribution of probabilities of detection — p.dist.table","text":"Generate table frequencies probability detection detection function model. particularly useful employing covariates, can indicate detections small detection probabilities can unduly influential calculating abundance estimates.","code":""},{"path":"/reference/p.dist.table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Distribution of probabilities of detection — p.dist.table","text":"","code":"p.dist.table(object, bins = seq(0, 1, by = 0.1), proportion = FALSE) p_dist_table(object, bins = seq(0, 1, by = 0.1), proportion = FALSE)"},{"path":"/reference/p.dist.table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Distribution of probabilities of detection — p.dist.table","text":"object fitted detection function bins results binned proportion proportions returned well counts?","code":""},{"path":"/reference/p.dist.table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Distribution of probabilities of detection — p.dist.table","text":"data.frame probability bins, counts (optionally) proportions. object attribute p_range contains range estimated detection probabilities","code":""},{"path":"/reference/p.dist.table.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Distribution of probabilities of detection — p.dist.table","text":"dht uses Horvitz-Thompson-like estimator, abundance estimates can sensitive errors estimated probabilities. estimator based \\(\\sum 1/ \\hat{P}_a(z_i)\\), means sensitivity greater smaller detection probabilities. rough guide, recommend method used say 5% \\(\\hat{P}_a(z_i)\\) less 0.2, less 0.1. conditions violated, truncation distance w can reduced. causes loss precision relative standard distance sampling without covariates.","code":""},{"path":"/reference/p.dist.table.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Distribution of probabilities of detection — p.dist.table","text":"Marques, F.F.C. S.T. Buckland. 2004. Covariate models detection function. : Advanced Distance Sampling, eds. S.T. Buckland, D.R. Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":"/reference/p.dist.table.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Distribution of probabilities of detection — p.dist.table","text":"David L Miller","code":""},{"path":"/reference/p.dist.table.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Distribution of probabilities of detection — p.dist.table","text":"","code":"if (FALSE) { # \\dontrun{ # try out the tee data data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe # fit model with covariates result <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~sex+size), data = egdata[egdata$observer==1, ], method = \"ds\", meta.data = list(width = 4)) # print table p.dist.table(result) # with proportions p.dist.table(result, proportion=TRUE) } # }"},{"path":"/reference/parse.optimx.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse optimx results and present a nice object — parse.optimx","title":"Parse optimx results and present a nice object — parse.optimx","text":"Take resulting object call optimx make object mrds wants talk .","code":""},{"path":"/reference/parse.optimx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse optimx results and present a nice object — parse.optimx","text":"","code":"parse.optimx(lt, lnl.last, par.last)"},{"path":"/reference/parse.optimx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse optimx results and present a nice object — parse.optimx","text":"lt optimx object lnl.last last value log likelihood par.last last value parameters","code":""},{"path":"/reference/parse.optimx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse optimx results and present a nice object — parse.optimx","text":"lt object can used later ","code":""},{"path":"/reference/pdot.dsr.integrate.logistic.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","title":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","text":"Computes probability object detected least one observer (pdot p_.) logistic detection function contains distance.","code":""},{"path":"/reference/pdot.dsr.integrate.logistic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","text":"","code":"pdot.dsr.integrate.logistic( right, width, beta, x, integral.numeric, BT, models, GAM = FALSE, rem = FALSE, point = FALSE )"},{"path":"/reference/pdot.dsr.integrate.logistic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","text":"right either integration range binned data (vector 2) rightmost value integration (0 right) width transect width beta parameters logistic detection function x data matrix integral.numeric set TRUE unless data binned (done fct) model distance linear (eg distance^2), integral.numeric FALSE compute integral analytically. FALSE .linear.logistic function TRUE. BT FALSE except trial configuration; BT stands Buckland-Turnock initially proposed trial configuration dual observers models list models including g0model GAM used present. idea able use GAM g(0) portion detection function; always F rem TRUE removal configuration used removed pulled function calls. Originally thought pdot integral differ io formula. thing differs removal p(2|1)=1. Observer 2 sees everything seen observer 1, point TRUE point transects","code":""},{"path":"/reference/pdot.dsr.integrate.logistic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute probability that a object was detected by at least one observer — pdot.dsr.integrate.logistic","text":"Jeff Laake","code":""},{"path":"/reference/plot.det.tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Observation detection tables — plot.det.tables","title":"Observation detection tables — plot.det.tables","text":"Plot tables created det.tables. Produces series tables dual observer data shows number missed detected observer within defined distance classes.","code":""},{"path":"/reference/plot.det.tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Observation detection tables — plot.det.tables","text":"","code":"# S3 method for class 'det.tables' plot( x, which = 1:6, angle = NULL, density = NULL, col1 = \"white\", col2 = \"lightgrey\", new = TRUE, ... )"},{"path":"/reference/plot.det.tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Observation detection tables — plot.det.tables","text":"x object returned det.tables items x plot (vector values 1:6) angle shading angle hatching density shading density hatching col1 plotting colour total histogram bars. col2 plotting colour subset histogram bars. new TRUE new plotting window plot ... graphical parameters, passed plotting functions","code":""},{"path":"/reference/plot.det.tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Observation detection tables — plot.det.tables","text":"Just plots.","code":""},{"path":"/reference/plot.det.tables.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Observation detection tables — plot.det.tables","text":"Plots produced follows (controlled argument): 1 Detected either observer/Detected observer 1 2 Detected either observer/Detected observer 2 3 Seen observers 4 Seen either observer 5 Detected observer 2/Detected observer 1 | 2 6 Detected observer 1/Detected observer 2 | 1","code":""},{"path":"/reference/plot.det.tables.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Observation detection tables — plot.det.tables","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/plot.det.tables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Observation detection tables — plot.det.tables","text":"","code":"# \\donttest{ data(book.tee.data) region <- book.tee.data$book.tee.region egdata <- book.tee.data$book.tee.dataframe samples <- book.tee.data$book.tee.samples obs <- book.tee.data$book.tee.obs xx <- ddf(mrmodel=~glm(formula=~distance*observer), dsmodel = ~mcds(key = \"hn\", formula = ~sex), data = egdata, method = \"io\", meta.data = list(width = 4)) tabs <- det.tables(xx,breaks=c(0,.5,1,2,3,4)) par(mfrow=c(2,3)) plot(tabs,which=1:6,new=FALSE) # }"},{"path":"/reference/plot.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"Plots fitted detection function(s) histogram observed distances compare visually fitted model data.","code":""},{"path":"/reference/plot.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"","code":"# S3 method for class 'ds' plot( x, which = 2, breaks = NULL, nc = NULL, jitter.v = rep(0, 3), showpoints = TRUE, subset = NULL, pl.col = \"lightgrey\", pl.den = NULL, pl.ang = NULL, main = NULL, pages = 0, pdf = FALSE, ylim = NULL, xlab = \"Distance\", ylab = NULL, ... )"},{"path":"/reference/plot.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"x fitted model ddf. index specify plots produced: breaks user defined breakpoints nc number equal width bins histogram jitter.v apply jitter points multiplying fitted value random draw normal distribution mean 1 sd jitter.v. showpoints logical variable; TRUE plots predicted value observation (conditional observed distance). subset subset data plot. pl.col colour histogram bars. pl.den shading density histogram bars. pl.ang shading angle histogram bars. main plot title. pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. pdf plot histogram distances PDF probability detection overlaid. Ignored (warning) line transect models. ylim vertical axis limits. xlab horizontal axis label (defaults \"Distance\"). ylab vertical axis label (default automatically set depending plot type). ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc).","code":""},{"path":"/reference/plot.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"Just plots.","code":""},{"path":"/reference/plot.ds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.ds arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":[]},{"path":"/reference/plot.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.ds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot fit of detection functions and histograms of data from distance sampling model — plot.ds","text":"","code":"# \\donttest{ # fit a model to the tee data data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe xx <- ddf(dsmodel=~mcds(key=\"hn\", formula=~sex), data=egdata[egdata$observer==1, ], method=\"ds\", meta.data=list(width=4)) # not showing predicted probabilities plot(xx, breaks=c(0, 0.5, 1, 2, 3, 4), showpoints=FALSE) # two subsets plot(xx, breaks=c(0, 0.5, 1, 2, 3, 4), subset=sex==0) plot(xx, breaks=c(0, 0.5, 1, 2, 3, 4), subset=sex==1) # put both plots on one page plot(xx, breaks=c(0, 0.5, 1, 2, 3, 4), pages=1, which=1:2) # }"},{"path":"/reference/plot.io.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.io.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"","code":"# S3 method for class 'io.fi' plot( x, which = 1:6, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.io.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"x fitted model ddf index specify plots produced. Note order ignored plots produced order. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.io.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"Just plots.","code":""},{"path":"/reference/plot.io.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.io.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.io.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.io.fi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer model with full independence (io.fi) — plot.io.fi","text":"","code":"# \\donttest{ library(mrds) data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe result.io.fi <- ddf(mrmodel=~glm(~distance), data = egdata, method = \"io.fi\", meta.data = list(width = 4)) # just plot everything plot(result.io.fi) # Plot primary and secondary unconditional detection functions on one page # and primary and secondary conditional detection functions on another plot(result.io.fi,which=c(1,2,5,6),pages=2) # }"},{"path":"/reference/plot.io.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.io.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"","code":"# S3 method for class 'io' plot( x, which = 1:6, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.io.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"x fitted model ddf index specify plots produced. Note order ignored plots produced order. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.io.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"Just plots","code":""},{"path":"/reference/plot.io.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.io.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.io.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.io.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot fit of detection functions and histograms of data from distance sampling independent observer (io) model — plot.io","text":"","code":"# \\donttest{ library(mrds) data(book.tee.data) egdata <- book.tee.data$book.tee.dataframe result.io <- ddf(dsmodel=~cds(key = \"hn\"), mrmodel=~glm(~distance), data=egdata, method=\"io\", meta.data=list(width=4)) # just plot everything plot(result.io) # Plot primary and secondary unconditional detection functions on one page # and primary and secondary conditional detection functions on another plot(result.io,which=c(1,2,5,6),pages=2) # }"},{"path":"/reference/plot.rem.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.rem.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"","code":"# S3 method for class 'rem.fi' plot( x, which = 1:3, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.rem.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"x fitted model ddf index specify plots produced. breaks user defined breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.rem.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.rem.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.rem.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem.fi","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.rem.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.rem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"","code":"# S3 method for class 'rem' plot( x, which = 1:3, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.rem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"x fitted model ddf index specify plots produced. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.rem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.rem arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.rem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from removal distance sampling model — plot.rem","text":"Jeff Laake, Jon Bishop, David Borchers, David L Miller","code":""},{"path":"/reference/plot.trial.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.trial.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"","code":"# S3 method for class 'trial.fi' plot( x, which = 1:2, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.trial.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"x fitted model ddf index specify plots produced. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.trial.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.io.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.trial.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial.fi","text":"Jeff Laake, Jon Bishop, David Borchers","code":""},{"path":"/reference/plot.trial.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"Plots fitted detection functions distance sampling model histograms distances (unconditional detection functions) proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data.","code":""},{"path":"/reference/plot.trial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"","code":"# S3 method for class 'trial' plot( x, which = 1:2, breaks = NULL, nc = NULL, maintitle = \"\", showlines = TRUE, showpoints = TRUE, ylim = c(0, 1), angle = NULL, density = NULL, col = \"lightgrey\", jitter = NULL, divisions = 25, pages = 0, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot.trial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"x fitted model ddf index specify plots produced. breaks user define breakpoints nc number equal-width bins histogram maintitle main title line plot showlines logical variable; TRUE line representing average detection probability plotted showpoints logical variable; TRUE plots predicted value observation ylim range vertical axis; defaults (0,1) angle shading angle histogram bars. density shading density histogram bars. col colour histogram bars. jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. divisions number divisions averaging line values; default = 25 pages number pages spread plots. example, pages=1 plots displayed one page. Default 0, prompts user next plot displayed. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot.trial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"structure histogram can controlled user-defined arguments nc breaks. observation specific detection probabilities along line representing fitted average detection probability. intended user call plot.io.fi arguments documented . Instead generic plot command used call appropriate function based class ddf object.","code":""},{"path":"/reference/plot.trial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot fit of detection functions and histograms of data from distance sampling trial observer model — plot.trial","text":"Jeff Laake, Jon Bishop, David Borchers","code":""},{"path":"/reference/plot_cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot conditional detection function from distance sampling model — plot_cond","title":"Plot conditional detection function from distance sampling model — plot_cond","text":"Plot proportion observations detected within distance intervals (conditional detection functions) compare visually fitted model data. Internal function called plot methods.","code":""},{"path":"/reference/plot_cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot conditional detection function from distance sampling model — plot_cond","text":"","code":"plot_cond( obs, xmat, gxvalues, model, nc, breaks, finebr, showpoints, showlines, maintitle, ylim, angle = -45, density = 20, col = \"black\", jitter = NULL, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot_cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot conditional detection function from distance sampling model — plot_cond","text":"obs observer code xmat processed data gxvalues detection function values observation model fitted model ddf nc number equal-width bins histogram breaks user define breakpoints finebr fine break values line averaged showpoints logical variable; TRUE plots predicted value observation showlines logical variable; TRUE plots average predicted value line maintitle main title line plot ylim range y axis (default c(0,1)) angle shading angle hatching density shading density hatching col plotting colour jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot_cond.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot conditional detection function from distance sampling model — plot_cond","text":"Jeff Laake, Jon Bishop, David Borchers","code":""},{"path":"/reference/plot_layout.html","id":null,"dir":"Reference","previous_headings":"","what":"Layout for plot methods in mrds — plot_layout","title":"Layout for plot methods in mrds — plot_layout","text":"function paging, using devAskNewPage(). means can just call plots R make prompt us Warning, function side effects! modifies devAskNewPage!","code":""},{"path":"/reference/plot_layout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Layout for plot methods in mrds — plot_layout","text":"","code":"plot_layout(which, pages)"},{"path":"/reference/plot_layout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Layout for plot methods in mrds — plot_layout","text":"plots created pages number pages span plots across","code":""},{"path":"/reference/plot_layout.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Layout for plot methods in mrds — plot_layout","text":"Code stolen modified plot.R mgcv Simon Wood","code":""},{"path":"/reference/plot_layout.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Layout for plot methods in mrds — plot_layout","text":"David L. Miller, based code Simon N. Wood","code":""},{"path":"/reference/plot_uncond.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot unconditional detection function from distance sampling model — plot_uncond","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"Plots unconditional detection function observer=obs observations overlays histogram, average detection function values individual observations data. Internal function called plot methods.","code":""},{"path":"/reference/plot_uncond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"","code":"plot_uncond( model, obs, xmat, gxvalues, nc, finebr, breaks, showpoints, showlines, maintitle, ylim, return.lines = FALSE, angle = -45, density = 20, col = \"black\", jitter = NULL, xlab = \"Distance\", ylab = \"Detection probability\", subtitle = TRUE, ... )"},{"path":"/reference/plot_uncond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"model fitted model ddf obs value observer plot xmat processed data gxvalues detection function values observation nc number equal-width bins histogram finebr fine break values line averaged breaks user define breakpoints showpoints logical variable; TRUE plots predicted value observation showlines logical variable; TRUE plots average predicted value line maintitle main title line plot ylim range y axis; defaults (0,1) return.lines TRUE, returns values line angle shading angle hatching density shading density hatching col plotting colour jitter scaling option plotting points. Jitter applied points multiplying fitted value random draw normal distribution mean 1 sd jitter. xlab label x-axis ylab label y-axis subtitle TRUE, shows plot type sub-title ... graphical parameters, passed plotting functions (plot, hist, lines, points, etc)","code":""},{"path":"/reference/plot_uncond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"return.lines==TRUE returns dataframe average.line otherwise just plots","code":""},{"path":"/reference/plot_uncond.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot unconditional detection function from distance sampling model — plot_uncond","text":"Jeff Laake, Jon Bishop, David Borchers","code":""},{"path":"/reference/predict.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Predictions from mrds models — predict.ds","title":"Predictions from mrds models — predict.ds","text":"Predict detection probabilities (effective strip widths/effective areas detection) fitted distance sampling model using either original data (.e. \"fitted\" values) using new data.","code":""},{"path":"/reference/predict.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predictions from mrds models — predict.ds","text":"","code":"# S3 method for class 'ds' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, esw=FALSE, se.fit=FALSE, ...) # S3 method for class 'io.fi' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, integrate=FALSE, ...) # S3 method for class 'io' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, ...) # S3 method for class 'trial' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, ...) # S3 method for class 'trial.fi' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, integrate=FALSE, ...) # S3 method for class 'rem' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, ...) # S3 method for class 'rem.fi' predict(object, newdata=NULL, compute=FALSE, int.range=NULL, integrate=FALSE, ...)"},{"path":"/reference/predict.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predictions from mrds models — predict.ds","text":"object ddf model object. newdata new data.frame prediction, must include column called \"distance\". compute TRUE compute values use fitted values stored model object. int.range integration range variable range analysis; either vector 2 column matrix. esw TRUE, returns effective strip half-width (effective area detection point transect models) integral 0 truncation distance (width) \\(p(y)dy\\); otherwise returns integral 0 truncation width \\(p(y)\\pi(y)\\) \\(\\pi(y)=1/w\\) lines \\(\\pi(y)=2r/w^2\\) points. se.fit *.ds models , generate standard errors predicted probabilities detection (ESW esw=TRUE), stored se.fit element ... S3 consistency integrate *.fi methods, see Details .","code":""},{"path":"/reference/predict.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predictions from mrds models — predict.ds","text":"exceptions , value list single element: fitted, vector average detection probabilities esw values observation original data ornewdata predict.ds, se.fit=TRUE additional element $se.fit, contains standard errors probabilities detection ESW. predict.io.fi,predict.trial.fi,predict.rem.fi integrate=TRUE, value list one element: fitted, vector integrated (average) detection probabilities observation original data newdata. predict.io.fi, predict.trial.fi, predict.rem.fi integrate=FALSE, value list following elements: fitted \\(p(y)\\) values p1 \\(p_{1|2}(y)\\), conditional detection probability observer 1 p2 \\(p_{2|1}(y)\\), conditional detection probability observer 2 fitted \\(p_.(y) = p_{1|2}(y) + p_{2|1}(y) - p_{1|2}(y) * p_{2|1}(y)\\), conditional detection probability seen either observer","code":""},{"path":"/reference/predict.ds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Predictions from mrds models — predict.ds","text":"first 4 arguments predict function. latter 2 specific certain functions. line transects, effective strip half-width (esw=TRUE) integral fitted detection function either 0 W specified int.range. predicted detection probability average probability simply integral divided distance range. point transect models, esw=TRUE calculates effective area detection (commonly referred \"nu\", integral 2/width^2 * rg(r). Fitted detection probabilities stored model object returned unless compute=TRUE newdata specified. compute=TRUE used estimate numerical derivatives use delta method approximations variance. method=\"io.fi\" method=\"trial.fi\" integrate=FALSE, predict returns value conditional detection probability integrate=TRUE, returns average conditional detection probability integrating x (distance) respect uniform distribution. Note ordering returned results new data supplied (\"fitted\" values) necessarily data supplied ddf, data (hence results predict) sorted object ID (object) observer ID (observer).","code":""},{"path":"/reference/predict.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Predictions from mrds models — predict.ds","text":"function called generic function predict appropriate ddf model object. can called directly user, typically safest use predict calls appropriate function based type model.","code":""},{"path":[]},{"path":"/reference/predict.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Predictions from mrds models — predict.ds","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/print.ddf.gof.html","id":null,"dir":"Reference","previous_headings":"","what":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"Provides formatted output results goodness fit tests: chi-square, Kolmogorv-Smirnov Cramer-von Mises test appropriate.","code":""},{"path":"/reference/print.ddf.gof.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"","code":"# S3 method for class 'ddf.gof' print(x, digits = 3, ...)"},{"path":"/reference/print.ddf.gof.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"x result call ddf.gof digits number digits round chi-squared table values ... unused unspecified arguments generic print","code":""},{"path":"/reference/print.ddf.gof.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"None","code":""},{"path":[]},{"path":"/reference/print.ddf.gof.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Prints results of goodness of fit tests for detection functions — print.ddf.gof","text":"Jeff Laake","code":""},{"path":"/reference/print.ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Simple pretty printer for distance sampling analyses — print.ddf","title":"Simple pretty printer for distance sampling analyses — print.ddf","text":"Simply prints summary model fitted. detailed information see summary.","code":""},{"path":"/reference/print.ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simple pretty printer for distance sampling analyses — print.ddf","text":"","code":"# S3 method for class 'ddf' print(x, ...)"},{"path":"/reference/print.ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simple pretty printer for distance sampling analyses — print.ddf","text":"x ddf object ... passed , just S3 compatibility.","code":""},{"path":"/reference/print.ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simple pretty printer for distance sampling analyses — print.ddf","text":"David L. Miller","code":""},{"path":"/reference/print.det.tables.html","id":null,"dir":"Reference","previous_headings":"","what":"Print results of observer detection tables — print.det.tables","title":"Print results of observer detection tables — print.det.tables","text":"Provides formatted output detection tables","code":""},{"path":"/reference/print.det.tables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print results of observer detection tables — print.det.tables","text":"","code":"# S3 method for class 'det.tables' print(x, ...)"},{"path":"/reference/print.det.tables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print results of observer detection tables — print.det.tables","text":"x result call ddf ... unused unspecified arguments generic print","code":""},{"path":"/reference/print.det.tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print results of observer detection tables — print.det.tables","text":"None","code":""},{"path":[]},{"path":"/reference/print.det.tables.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print results of observer detection tables — print.det.tables","text":"Jeff Laake","code":""},{"path":"/reference/print.dht.html","id":null,"dir":"Reference","previous_headings":"","what":"Prints density and abundance estimates — print.dht","title":"Prints density and abundance estimates — print.dht","text":"Outputs summary statistics, abundance density region () optionally correlation matrix one region.","code":""},{"path":"/reference/print.dht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prints density and abundance estimates — print.dht","text":"","code":"# S3 method for class 'dht' print(x, cor = FALSE, bysample = FALSE, vcmatrices = FALSE, ...)"},{"path":"/reference/print.dht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prints density and abundance estimates — print.dht","text":"x dht object results call dht specific ddf object cor TRUE outputs correlation matrix estimates bysample TRUE, prints results sample vcmatrices TRUE, prints variance-covariance matrices ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/print.dht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prints density and abundance estimates — print.dht","text":"None","code":""},{"path":[]},{"path":"/reference/print.dht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Prints density and abundance estimates — print.dht","text":"Jeff Laake","code":""},{"path":"/reference/print.p_dist_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Print distribution of probabilities of detection — print.p_dist_table","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"Just pretty printer table probabilities detection.","code":""},{"path":"/reference/print.p_dist_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"","code":"# S3 method for class 'p_dist_table' print(x, digits = 2, ...)"},{"path":"/reference/print.p_dist_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"x output p_dist_table digits number significant digits print ... arguments passed print.data.frame","code":""},{"path":"/reference/print.p_dist_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"just prints table range ps","code":""},{"path":"/reference/print.p_dist_table.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print distribution of probabilities of detection — print.p_dist_table","text":"David L Miller","code":""},{"path":"/reference/print.summary.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.ds","title":"Print summary of distance detection function model object — print.summary.ds","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.ds","text":"","code":"# S3 method for class 'summary.ds' print(x, ...)"},{"path":"/reference/print.summary.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.ds","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.ds","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.io.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.io.fi","title":"Print summary of distance detection function model object — print.summary.io.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.io.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.io.fi","text":"","code":"# S3 method for class 'summary.io.fi' print(x, ...)"},{"path":"/reference/print.summary.io.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.io.fi","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.io.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.io.fi","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.io.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.io","title":"Print summary of distance detection function model object — print.summary.io","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.io.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.io","text":"","code":"# S3 method for class 'summary.io' print(x, ...)"},{"path":"/reference/print.summary.io.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.io","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.io.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.io","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.rem.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.rem.fi","title":"Print summary of distance detection function model object — print.summary.rem.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.rem.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.rem.fi","text":"","code":"# S3 method for class 'summary.rem.fi' print(x, ...)"},{"path":"/reference/print.summary.rem.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.rem.fi","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.rem.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.rem.fi","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.rem.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.rem","title":"Print summary of distance detection function model object — print.summary.rem","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.rem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.rem","text":"","code":"# S3 method for class 'summary.rem' print(x, ...)"},{"path":"/reference/print.summary.rem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.rem","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.rem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.rem","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.trial.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.trial.fi","title":"Print summary of distance detection function model object — print.summary.trial.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.trial.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.trial.fi","text":"","code":"# S3 method for class 'summary.trial.fi' print(x, ...)"},{"path":"/reference/print.summary.trial.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.trial.fi","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.trial.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.trial.fi","text":"Jeff Laake","code":""},{"path":"/reference/print.summary.trial.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary of distance detection function model object — print.summary.trial","title":"Print summary of distance detection function model object — print.summary.trial","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error. printed depends corresponding call summary.","code":""},{"path":"/reference/print.summary.trial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary of distance detection function model object — print.summary.trial","text":"","code":"# S3 method for class 'summary.trial' print(x, ...)"},{"path":"/reference/print.summary.trial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary of distance detection function model object — print.summary.trial","text":"x summary ddf model object ... unspecified unused arguments S3 consistency","code":""},{"path":[]},{"path":"/reference/print.summary.trial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary of distance detection function model object — print.summary.trial","text":"Jeff Laake","code":""},{"path":"/reference/prob.deriv.html","id":null,"dir":"Reference","previous_headings":"","what":"Derivatives for variance of average p and average p(0) variance — prob.deriv","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"Used call DeltaMethod prob.se get first derivatives","code":""},{"path":"/reference/prob.deriv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"","code":"prob.deriv(par, model, parfct, observer = NULL, fittedmodel = NULL)"},{"path":"/reference/prob.deriv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"par detection function parameter values model ddf model object parfct function detection probabilities; currently average (covariates) detection probability p integrated distance average (covariates) detection probability distance 0; p(0) observer 1,2,3 primary, secondary, duplicates average p(0); passed fct fittedmodel full fitted ddf model trial.fi io.fi called trial io respectively","code":""},{"path":"/reference/prob.deriv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"Vector values fct specified parameter values","code":""},{"path":"/reference/prob.deriv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"Need add equations think exist texts. probably checked simulation.","code":""},{"path":[]},{"path":"/reference/prob.deriv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Derivatives for variance of average p and average p(0) variance — prob.deriv","text":"Jeff Laake","code":""},{"path":"/reference/prob.se.html","id":null,"dir":"Reference","previous_headings":"","what":"Average p and average p(0) variance — prob.se","title":"Average p and average p(0) variance — prob.se","text":"Computes components variance average p=n/N average p(0) weights based empirical covariate distribution, contains covariates.","code":""},{"path":"/reference/prob.se.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Average p and average p(0) variance — prob.se","text":"","code":"prob.se(model, fct, vcov, observer = NULL, fittedmodel = NULL)"},{"path":"/reference/prob.se.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Average p and average p(0) variance — prob.se","text":"model ddf model object fct function detection probabilities; currently average (covariates) detection probability p integrated distance average (covariates) detection probability distance 0; p(0) vcov variance-covariance matrix parameter estimates observer 1,2,3 primary, secondary, duplicates average p(0); passed fct fittedmodel full fitted ddf model trial.fi io.fi called trial io respectively","code":""},{"path":"/reference/prob.se.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Average p and average p(0) variance — prob.se","text":"var variance partial partial derivatives parameters respect fct covar covariance n average p p(0)","code":""},{"path":"/reference/prob.se.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Average p and average p(0) variance — prob.se","text":"Need add equations think exist texts. probably checked simulation.","code":""},{"path":[]},{"path":"/reference/prob.se.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Average p and average p(0) variance — prob.se","text":"Jeff Laake","code":""},{"path":"/reference/process.data.html","id":null,"dir":"Reference","previous_headings":"","what":"Process data for fitting distance sampling detection function — process.data","title":"Process data for fitting distance sampling detection function — process.data","text":"Sets dataframe basic error checking. Adds needed fields dataframe meta.data.","code":""},{"path":"/reference/process.data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process data for fitting distance sampling detection function — process.data","text":"","code":"process.data(data, meta.data = list(), check = TRUE)"},{"path":"/reference/process.data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process data for fitting distance sampling detection function — process.data","text":"data dataframe object meta.data meta.data options; see ddf description check TRUE check data errors mrds structure; method=\"ds\" check=FALSE","code":""},{"path":"/reference/process.data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process data for fitting distance sampling detection function — process.data","text":"xmat processed data.frame added fields meta.data meta.data list","code":""},{"path":"/reference/process.data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Process data for fitting distance sampling detection function — process.data","text":"function number error checking tasks, creating fields adding meta.data including: 1) check=TRUE, check make sure record structure okay mrds data. number primary records (observer=1) must equal number secondary records (observer=2). Also, field dataframe created timesseen counts number times object detected 0,1,2; timesseen=0 record tossed analysis. Also differences data (distance, size, covariates) observer 1 2 warning issued analysis may fail. code assumes values observers. 2) Based presence fields distbegin distend, determination made whether data analysis based binned distances field binned created, TRUE distance observation binned. assigning observation allows analysis mixture binned unbinned distances. 4) Data restricted distances greater width less left values specified meta.data. specified left defaults 0 width defaults largest distance measurement. 5) Determine integration range (int.begin int.end specified observations. , add structure meta.data. integration range typically used aerial surveys altitude varies strip width (left width) changes change altitude. 6) Fields defined factors cleaned unused levels eliminated. 7) restrictions placed data, eliminated data, function stops error message","code":""},{"path":"/reference/process.data.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Process data for fitting distance sampling detection function — process.data","text":"Jeff Laake","code":""},{"path":"/reference/pronghorn.html","id":null,"dir":"Reference","previous_headings":"","what":"Pronghorn aerial survey data from Wyoming — pronghorn","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"Detections pronghorn fixed-wing aerial surveys Southeastern Wyoming using four angular bins defined strut marks. Illustrates data altitude ground level (AGL) varies survey.","code":""},{"path":"/reference/pronghorn.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"data frame 660 observations following 5 variables. STRATUM numeric vector direction factor levels N S representing survey direction AGL height ground level Band factor levels B C D represent angular bands breaks 35.42,44.56,51.52,61.02,70.97 degrees. angles set based selected distance bins based target AGL. cluster number pronghorn observed cluster","code":""},{"path":"/reference/pronghorn.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"Data provided courtesy Rich Guenzel Wyoming Game Fish.","code":""},{"path":"/reference/pronghorn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"record observed cluster pronghorn. data provide stratum observation, direction travel, AGL time observation, angular bin contained center pronghorn cluster(group), number pronghorn group. angular bins defined combination two window five wing strut marks define bin cutpoints perpendicular ground distances 0-65, 65-90, 90-115, 115-165 165-265 meters plane 300' (91.4 meters) ground level. inner band considered blind region due obstruction view beneath plane; thus th line offset 65 meters underneath plane.","code":""},{"path":"/reference/pronghorn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Pronghorn aerial survey data from Wyoming — pronghorn","text":"Laake, J., R. J. Guenzel, J. L. Bengtson, P. Boveng, M. Cameron, M. B. Hanson. 2008. Coping variation aerial survey protocol line-transect sampling. Wildlife Research 35:289-298.","code":""},{"path":"/reference/ptdata.distance.html","id":null,"dir":"Reference","previous_headings":"","what":"Single observer point count data example from Distance — ptdata.distance","title":"Single observer point count data example from Distance — ptdata.distance","text":"Single observer point count data example Distance","code":""},{"path":"/reference/ptdata.distance.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Single observer point count data example from Distance — ptdata.distance","text":"format 144 obs 6 variables: distance: numeric distance center observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... detected: numeric 0/1 object: sequential object number Sample.Label: point label Region.Label: single region label","code":""},{"path":"/reference/ptdata.distance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Single observer point count data example from Distance — ptdata.distance","text":"","code":"# \\donttest{ data(ptdata.distance) xx <- ddf(dsmodel = ~cds(key=\"hn\", formula = ~1), data = ptdata.distance, method = \"ds\", meta.data = list(point=TRUE)) #> Warning: no truncation distance specified; using largest observed distance summary(xx) #> #> Summary for ds object #> Number of observations : 144 #> Distance range : 0 - 34.16 #> AIC : 919.1403 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 2.283007 0.04523359 #> #> Estimate SE CV #> Average p 0.1644301 0.01466592 0.08919244 #> N in covered region 875.7520203 102.72037375 0.11729390 #> EDR 13.8518741 0.61774122 0.04459622 plot(xx,main=\"Distance point count data\") ddf.gof(xx) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> [0,2.85] (2.85,5.69] (5.69,8.54] (8.54,11.4] (11.4,14.2] (14.2,17.1] #> Observed 5.000 19.000 16.000 25.000 28.000 23.000 #> Expected 5.955 16.432 23.166 25.232 23.213 18.671 #> Chisquare 0.153 0.401 2.217 0.002 0.987 1.004 #> (17.1,19.9] (19.9,22.8] (22.8,25.6] (25.6,28.5] (28.5,31.3] #> Observed 14.000 5.000 5.000 3.000 0.000 #> Expected 13.356 8.578 4.978 2.620 1.254 #> Chisquare 0.031 1.493 0.000 0.055 1.254 #> (31.3,34.2] Total #> Observed 1.000 144.000 #> Expected 0.547 144.000 #> Chisquare 0.375 7.973 #> #> P = 0.6315 with 10 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.0954697 p-value = 0.607543 Regions <- data.frame(Region.Label=1,Area=1) Samples <- data.frame(Sample.Label=1:30, Region.Label=rep(1,30), Effort=rep(1,30)) print(dht(xx,sample.table=Samples,region.table=Regions)) #> Abundance and density estimates from distance sampling #> Variance : P2, N/L #> #> Summary statistics #> #> Region Area CoveredArea Effort n k ER se.ER cv.ER #> 1 1 1 109978.3 30 144 30 4.8 0.4245349 0.08844477 #> #> Abundance: #> Region Estimate se cv lcl ucl df #> 1 Total 0.007962956 0.001000224 0.1256096 0.006212055 0.01020736 97.52316 #> #> Density: #> Region Estimate se cv lcl ucl df #> 1 Total 0.007962956 0.001000224 0.1256096 0.006212055 0.01020736 97.52316 # }"},{"path":"/reference/ptdata.dual.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulated dual observer point count data — ptdata.dual","title":"Simulated dual observer point count data — ptdata.dual","text":"Simulated dual observer point count data detection p(0)=0.8; hn sigma=30; w=100 observers dependency y>0, gamma=0.1","code":""},{"path":"/reference/ptdata.dual.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulated dual observer point count data — ptdata.dual","text":"format 420 obs 6 variables: distance: numeric distance center observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... detected: numeric 0/1 person: Factor 2 levels ,B pair: Factor 2 levels \"AB\" BA\" $ object : sequential object number","code":""},{"path":"/reference/ptdata.dual.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulated dual observer point count data — ptdata.dual","text":"","code":"# \\donttest{ data(ptdata.dual) xx <- ddf(mrmodel=~glm(formula=~distance), dsmodel = ~cds(key=\"hn\", formula = ~1), data = ptdata.dual, method = \"io\", meta.data = list(point=TRUE)) #> Warning: no truncation distance specified; using largest observed distance summary(xx) #> #> Summary for io.fi object #> Number of observations : 210 #> Number seen by primary : 199 #> Number seen by secondary : 193 #> Number seen by both : 182 #> AIC : 192.4567 #> #> #> Conditional detection function parameters: #> estimate se #> (Intercept) 1.06437933 0.41946692 #> distance 0.04904523 0.01408653 #> #> Estimate SE CV #> Average primary p(0) 0.7435266 0.07999017 0.10758213 #> Average secondary p(0) 0.7435266 0.07999017 0.10758213 #> Average combined p(0) 0.9342214 0.04103071 0.04391969 #> #> #> Summary for ds object #> Number of observations : 210 #> Distance range : 0 - 96.32036 #> AIC : 1817.79 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 3.38454 0.03661838 #> #> Estimate SE CV #> Average p 0.1867483 0.01332166 0.07133485 #> EDR 41.6242555 1.48462997 0.03566742 #> #> #> Summary for io object #> Total AIC value : 2010.247 #> #> Estimate SE CV #> Average p 0.1744643 0.01461507 0.08377111 #> N in covered region 1203.6847617 125.94892721 0.10463614 plot(xx,main=\"Simulated point count data\") # }"},{"path":"/reference/ptdata.removal.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulated removal observer point count data — ptdata.removal","title":"Simulated removal observer point count data — ptdata.removal","text":"Simulated removal observer point count data detection p(0)=0.8; hn sigma=30; w=100 observers dependency y>0, gamma=0.1","code":""},{"path":"/reference/ptdata.removal.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulated removal observer point count data — ptdata.removal","text":"format 408 obs 6 variables: distance: numeric distance center observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... detected: numeric 0/1 person: Factor 2 levels ,B pair: Factor 2 levels \"AB\" BA\" object: sequential object number","code":""},{"path":"/reference/ptdata.removal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulated removal observer point count data — ptdata.removal","text":"","code":"# \\donttest{ data(ptdata.removal) xx <- ddf(mrmodel=~glm(formula=~distance), dsmodel = ~cds(key=\"hn\", formula = ~1), data = ptdata.removal, method = \"rem\", meta.data = list(point=TRUE)) #> Warning: no truncation distance specified; using largest observed distance summary(xx) #> #> Summary for rem.fi object #> Number of observations : 204 #> Number seen by primary : 195 #> Number additional seen by secondary : 9 #> AIC : 69.33598 #> #> #> Conditional detection function parameters: #> estimate se #> (Intercept) 1.19813958 0.7821458 #> distance 0.07245812 0.0327875 #> #> Estimate SE CV #> Average primary p(0) 0.9462658 0.06457123 0.06823794 #> #> #> #> Summary for ds object #> Number of observations : 204 #> Distance range : 0 - 83.04828 #> AIC : 1744.474 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 3.366348 0.0383046 #> #> Estimate SE CV #> Average p 0.2394111 0.01708192 0.07134975 #> EDR 40.6352360 1.44965694 0.03567487 #> #> #> Summary for rem object #> #> Total AIC value = 1813.81 #> Estimate SE CV #> Average p 0.2265465 0.02236647 0.09872793 #> N in covered region 900.4772670 104.77563511 0.11635567 plot(xx,main=\"Simulated point count data\") # }"},{"path":"/reference/ptdata.single.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulated single observer point count data — ptdata.single","title":"Simulated single observer point count data — ptdata.single","text":"Simulated single observer point count data detection p(0)=1; hn sigma=30; w=100","code":""},{"path":"/reference/ptdata.single.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulated single observer point count data — ptdata.single","text":"format 341 obs 4 variables: ..$ distance: numeric distance center $ observer: Factor w/ 2 levels \"1\",\"2\": 1 2 1 2 1 2 1 2 1 2 ... ..$ detected: numeric 0/1 $ object : sequential object number","code":""},{"path":"/reference/ptdata.single.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulated single observer point count data — ptdata.single","text":"","code":"# \\donttest{ data(ptdata.single) xx=ddf(dsmodel = ~cds(key=\"hn\", formula = ~1), data = ptdata.single, method = \"ds\", meta.data = list(point=TRUE)) #> Warning: no truncation distance specified; using largest observed distance summary(xx) #> #> Summary for ds object #> Number of observations : 341 #> Distance range : 0 - 95.62823 #> AIC : 2928.884 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 3.397033 0.02984984 #> #> Estimate SE CV #> Average p 0.1940384 0.0112283 0.05786639 #> N in covered region 1757.3842381 132.8196911 0.07557806 #> EDR 42.1240314 1.2187829 0.02893320 plot(xx,main=\"Simulated point count data\") # }"},{"path":"/reference/qqplot.ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Constructs quantile-quantile (Q-Q) plot fitted model graphical check goodness fit. Formal goodness fit testing detection function models using Kolmogorov-Smirnov Cramer-von Mises tests. tests based looking quantile-quantile plot produced qqplot.ddf deviations line x=y.","code":""},{"path":"/reference/qqplot.ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"","code":"qqplot.ddf(model, plot = TRUE, nboot = 100, ks = FALSE, ...)"},{"path":"/reference/qqplot.ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"model fitted distance detection function model object plot Q-Q plot plotted just report statistics? nboot number replicates use calculate p-values goodness fit test statistics ks perform Kolmogorov-Smirnov test (involves many bootstraps can take ) ... additional arguments passed plot","code":""},{"path":"/reference/qqplot.ddf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"list goodness fit related values: edf matrix lower upper empirical distribution function values cdf fitted cumulative distribution function values ks list K-S statistic (Dn) p-value (p) CvM list CvM statistic (W) p-value (p)","code":""},{"path":"/reference/qqplot.ddf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Kolmogorov-Smirnov test asks question \"largest vertical distance point y=x line?\" uses distance statistic test null hypothesis samples (EDF CDF case) distribution (hence model fits well). deviation y=x line points large reject null hypothesis say model good fit. Rather looking single biggest difference y=x line points Q-Q plot, might prefer think differences line points, since may many smaller differences want take account rather looking one large deviation. null hypothesis , statistic uses sum deviations point line.","code":""},{"path":"/reference/qqplot.ddf.html","id":"details-1","dir":"Reference","previous_headings":"","what":"Details","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Note bootstrap procedure required ensure p-values procedure correct comparing cumulative distribution function (CDF) empirical distribution function (EDF) estimated parameters detection function.","code":""},{"path":"/reference/qqplot.ddf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Burnham, K.P., S.T. Buckland, J.L. Laake, D.L. Borchers, T.. Marques, J.R.B. Bishop, L. Thomas. 2004. topics distance sampling. pp: 385-389. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":[]},{"path":"/reference/qqplot.ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Quantile-quantile plot and goodness of fit tests for detection functions — qqplot.ddf","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/rem.glm.html","id":null,"dir":"Reference","previous_headings":"","what":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"Detection function fitting mark-recapture data removal configuration secondary observer knows primary observer detects detects objects missed primary observer. iterative offset glm/gam uses offset compensate conditioning set objects seen either observer (eg 00 missed observers included analysis. function similar io.glm.","code":""},{"path":"/reference/rem.glm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"","code":"rem.glm( datavec, fitformula, eps = 1e-05, iterlimit = 500, GAM = FALSE, gamplot = TRUE, datavec2 )"},{"path":"/reference/rem.glm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"datavec dataframe containing records seen either observer 1 2 fitformula logit link formula eps convergence criterion iterlimit maximum number iterations allowed GAM uses GAM instead GLM fitting gamplot set TRUE get gam plot object GAM=TRUE datavec2 dataframe containing records observer 1 observer 2 io.glm form; used case observer(platform effect)","code":""},{"path":"/reference/rem.glm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"list class(\"remglm\",\"glm\",\"lm\") class(\"remglm\",\"gam\") glmobj GLM GAM object offsetvalue offsetvalues iterative fit plotobj gam plot object (GAM & gamplot==TRUE, else NULL)","code":""},{"path":"/reference/rem.glm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"difference function io.glm offset data construction one detection function estimated primary observer. two functions merged.","code":""},{"path":"/reference/rem.glm.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"currently code function GAMs commented remainder mrds package work GAMs.","code":""},{"path":"/reference/rem.glm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"Buckland, S.T., J.M. breiwick, K.L. Cattanach, J.L. Laake. 1993. Estimated population size California gray whale. Marine Mammal Science, 9:235-249. Burnham, K.P., S.T. Buckland, J.L. Laake, D.L. Borchers, T.. Marques, J.R.B. Bishop, L. Thomas. 2004. topics distance sampling. pp: 360-363. : Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, L. Thomas. Oxford University Press.","code":""},{"path":"/reference/rem.glm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Iterative offset model fitting of mark-recapture with removal model — rem.glm","text":"Jeff Laake","code":""},{"path":"/reference/rescale_pars.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"calculate rescaling needed covariates included scale detection function \"big\". Based code optimx.","code":""},{"path":"/reference/rescale_pars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"","code":"rescale_pars(initialvalues, ddfobj)"},{"path":"/reference/rescale_pars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"initialvalues starting values optimisation ddfobj detection function object","code":""},{"path":"/reference/rescale_pars.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"Derivative-free methods like nlminb sensitive parameters poorly scaled. can also cause problems quasi-Newton methods (least, bad scaling _help_ optimisation). rescale parameters necessary (unless already got scaling control)","code":""},{"path":"/reference/rescale_pars.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculate the parameter rescaling for parameters associated with covariates — rescale_pars","text":"David L Miller","code":""},{"path":"/reference/sample_ddf.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate data from a fitted detection function and refit the model — sample_ddf","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"Generate data fitted detection function refit model","code":""},{"path":"/reference/sample_ddf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"","code":"sample_ddf(ds.object)"},{"path":"/reference/sample_ddf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"ds.object fitted detection function object","code":""},{"path":"/reference/sample_ddf.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"function changes random number generator seed. avoid potential side-effects, use something like: seed <- get(\".Random.seed\",envir=.GlobalEnv) running code assign(\".Random.seed\",seed,envir=.GlobalEnv) .","code":""},{"path":"/reference/sample_ddf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate data from a fitted detection function and refit the model — sample_ddf","text":"David L. Miller","code":""},{"path":"/reference/setbounds.html","id":null,"dir":"Reference","previous_headings":"","what":"Set parameter bounds — setbounds","title":"Set parameter bounds — setbounds","text":"Set values lower upper bounds check lengths user-specified values","code":""},{"path":"/reference/setbounds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set parameter bounds — setbounds","text":"","code":"setbounds(lowerbounds, upperbounds, initialvalues, ddfobj, width, left)"},{"path":"/reference/setbounds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set parameter bounds — setbounds","text":"lowerbounds vector lower bounds upperbounds vector upper bounds initialvalues vector initial parameter estimates ddfobj distance detection function object width truncation distance left left truncation distance","code":""},{"path":"/reference/setbounds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set parameter bounds — setbounds","text":"lower vector lower bounds upper vector upper bounds setlower logical indicating whether user set lower bounds setupper logical indicating whether user set upper bounds","code":""},{"path":"/reference/setbounds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set parameter bounds — setbounds","text":"Jeff Laake","code":""},{"path":"/reference/setcov.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates design matrix for covariates in detection function — setcov","title":"Creates design matrix for covariates in detection function — setcov","text":"function creates design matrix g(0) scale covariates using input model formula. returns list contains 2 elements: 1) dim: dimension (number columns) design matrix, 2) cov: constructed design matrix. function relatively simple uses built-function model.matrix majority work. function handles 2 exceptions \"~.\", null model 0 columns \"~1\" intercept model - column 1s. model 2 exceptions provided, calls model.matrix construct columns. columns design matrix 0's column removed. occurs data particular factor.","code":""},{"path":"/reference/setcov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates design matrix for covariates in detection function — setcov","text":"","code":"setcov(dmat, model)"},{"path":"/reference/setcov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates design matrix for covariates in detection function — setcov","text":"dmat data matrix model model formula","code":""},{"path":"/reference/setcov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates design matrix for covariates in detection function — setcov","text":"design matrix specified data model","code":""},{"path":"/reference/setcov.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creates design matrix for covariates in detection function — setcov","text":"Jeff Laake","code":""},{"path":"/reference/setinitial.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Set initial values for detection function based on distance sampling — setinitial.ds","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"given detection function, computes initial values parameters including scale shape parameters adjustment function parameters . user-defined initial values parameters specified user computed.","code":""},{"path":"/reference/setinitial.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"","code":"setinitial.ds(ddfobj, width, initial, point, left) sethazard(ddfobj, dmat, width, left, point)"},{"path":"/reference/setinitial.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"ddfobj distance detection function object width half-width transect radius point count initial list user-defined initial values possible elements: scale, shape, adjustment point TRUE, point count data; otherwise, line transect data left left truncation dmat xmat ddfobj","code":""},{"path":"/reference/setinitial.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"scale vector initial scale parameter values shape vector initial shape parameter values adjustment vector initial adjustment function parameter values","code":""},{"path":"/reference/setinitial.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set initial values for detection function based on distance sampling — setinitial.ds","text":"Jeff Laake, David L Miller","code":""},{"path":"/reference/sim.mix.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"Simulation distance sampling data via mixture models Allows one simulate line transect distance sampling data using mixture half-normal detection functions.","code":""},{"path":"/reference/sim.mix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"","code":"sim.mix(n, sigma, mix.prop, width, means = 0)"},{"path":"/reference/sim.mix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"n number samples generate sigma vector scale parameters mix.prop vector mixture proportions (length sigma) width truncation means vector means (used generate wacky, non-monotonic data)","code":""},{"path":"/reference/sim.mix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"distances vector distances","code":""},{"path":"/reference/sim.mix.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"moment TOTALLY UNSUPPORTED! Please use anything important!","code":""},{"path":"/reference/sim.mix.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simulation of distance sampling data via mixture models Allows one to simulate line transect distance sampling data using a mixture of half-normal detection functions. — sim.mix","text":"David Lawrence Miller","code":""},{"path":"/reference/solvecov.html","id":null,"dir":"Reference","previous_headings":"","what":"Invert of covariance matrices — solvecov","title":"Invert of covariance matrices — solvecov","text":"Tries invert matrix solve. fails singularity, eigenvector decomposition computed, eigenvalues 1/cmax replaced 1/cmax, .e., cmax corresponding eigenvalue inverted matrix.","code":""},{"path":"/reference/solvecov.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Invert of covariance matrices — solvecov","text":"","code":"solvecov(m, cmax = 1e+10)"},{"path":"/reference/solvecov.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Invert of covariance matrices — solvecov","text":"m numeric symmetric matrix. cmax positive value, see .","code":""},{"path":"/reference/solvecov.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Invert of covariance matrices — solvecov","text":"list following components: inv inverted matrix, coll TRUE solve failed singularity.","code":""},{"path":"/reference/solvecov.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Invert of covariance matrices — solvecov","text":"solvecov code taken package fpc: Christian Hennig","code":""},{"path":[]},{"path":"/reference/solvecov.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Invert of covariance matrices — solvecov","text":"Christian Hennig","code":""},{"path":"/reference/stake77.html","id":null,"dir":"Reference","previous_headings":"","what":"Wooden stake data from 1977 survey — stake77","title":"Wooden stake data from 1977 survey — stake77","text":"Multiple surveys different observers single 1km transect containing 150 wooden stakes placed randomly throughout 40 m strip (20m either side).","code":""},{"path":"/reference/stake77.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Wooden stake data from 1977 survey — stake77","text":"data frame 150 observations following 10 variables. StakeNo unique number stake 1-150 PD perpendicular distance stake placed line Obs1 0/1 whether missed/seen observer 1 Obs2 0/1 whether missed/seen observer 2 Obs3 0/1 whether missed/seen observer 3 Obs4 0/1 whether missed/seen observer 4 Obs5 0/1 whether missed/seen observer 5 Obs6 0/1 whether missed/seen observer 6 Obs7 0/1 whether missed/seen observer 7 Obs8 0/1 whether missed/seen observer 8","code":""},{"path":"/reference/stake77.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Wooden stake data from 1977 survey — stake77","text":"Laake, J. 1978. Line transect estimators robust animal movement. M.S. Thesis. Utah State University, Logan, Utah. 55p.","code":""},{"path":"/reference/stake77.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Wooden stake data from 1977 survey — stake77","text":"Burnham, K. P., D. R. Anderson, J. L. Laake. 1980. Estimation Density Line Transect Sampling Biological Populations. Wildlife Monographs:7-202.","code":""},{"path":"/reference/stake77.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wooden stake data from 1977 survey — stake77","text":"","code":"# \\donttest{ data(stake77) # Extract functions for stake data and put in the mrds format extract.stake <- function(stake,obs){ extract.obs <- function(obs){ example <- subset(stake,eval(parse(text=paste(\"Obs\",obs,\"==1\",sep=\"\"))), select=\"PD\") example$distance <- example$PD example$object <- 1:nrow(example) example$PD <- NULL return(example) } if(obs!=\"all\"){ return(extract.obs(obs=obs)) }else{ example <- NULL for(i in 1:(ncol(stake)-2)){ df <- extract.obs(obs=i) df$person <- i example <- rbind(example,df) } example$person <- factor(example$person) example$object <- 1:nrow(example) return(example) } } extract.stake.pairs <- function(stake,obs1,obs2,removal=FALSE){ obs1 <- paste(\"Obs\",obs1,sep=\"\") obs2 <- paste(\"Obs\",obs2,sep=\"\") example <- subset(stake,eval(parse(text=paste(obs1,\"==1 |\",obs2,\"==1 \", sep=\"\"))),select=c(\"PD\",obs1,obs2)) names(example) <- c(\"distance\",\"obs1\",\"obs2\") detected <- c(example$obs1,example$obs2) example <- data.frame(object = rep(1:nrow(example),2), distance = rep(example$distance,2), detected = detected, observer = c(rep(1,nrow(example)), rep(2,nrow(example)))) if(removal) example$detected[example$observer==2] <- 1 return(example) } # extract data for observer 1 and fit a single observer model stakes <- extract.stake(stake77,1) ds.model <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~1), data = stakes, method = \"ds\", meta.data = list(width = 20)) plot(ds.model,breaks=seq(0,20,2),showpoints=TRUE) ddf.gof(ds.model) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> [0,2.22] (2.22,4.44] (4.44,6.67] (6.67,8.89] (8.89,11.1] (11.1,13.3] #> Observed 13.000 17.000 14.000 12.000 11.000 5.000 #> Expected 16.023 15.107 13.430 11.256 8.894 6.627 #> Chisquare 0.570 0.237 0.024 0.049 0.498 0.399 #> (13.3,15.6] (15.6,17.8] (17.8,20] Total #> Observed 3.000 3.000 3.000 81.00 #> Expected 4.655 3.083 1.925 81.00 #> Chisquare 0.588 0.002 0.600 2.97 #> #> P = 0.8878 with 7 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.051489 p-value = 0.867184 # extract data from observers 1 and 3 and fit an io model stkpairs <- extract.stake.pairs(stake77,1,3,removal=FALSE) io.model <- ddf(dsmodel = ~mcds(key = \"hn\", formula=~1), mrmodel=~glm(formula=~distance), data = stkpairs, method = \"io\") #> Warning: no truncation distance specified; using largest observed distance summary(io.model) #> #> Summary for io.fi object #> Number of observations : 89 #> Number seen by primary : 81 #> Number seen by secondary : 68 #> Number seen by both : 60 #> AIC : 137.046 #> #> #> Conditional detection function parameters: #> estimate se #> (Intercept) 3.105418 0.52079895 #> distance -0.228405 0.05957038 #> #> Estimate SE CV #> Average primary p(0) 0.9571157 0.021376325 0.022334108 #> Average secondary p(0) 0.9571157 0.021376325 0.022334108 #> Average combined p(0) 0.9981609 0.001833418 0.001836796 #> #> #> Summary for ds object #> Number of observations : 89 #> Distance range : 0 - 19.39 #> AIC : 504.1853 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 2.233369 0.1031155 #> #> Estimate SE CV #> Average p 0.5803993 0.04794403 0.08260525 #> #> #> Summary for io object #> Total AIC value : 641.2313 #> #> Estimate SE CV #> Average p 0.5793319 0.04786769 0.08262567 #> N in covered region 153.6252334 16.51282572 0.10748772 par(mfrow=c(3,2)) plot(io.model,breaks=seq(0,20,2),showpoints=TRUE,new=FALSE) dev.new() ddf.gof(io.model) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> #> Distance sampling component: #> [0,2.42] (2.42,4.85] (4.85,7.27] (7.27,9.7] (9.7,12.1] (12.1,14.5] #> Observed 17.000 21.000 16.000 14.000 9.000 4.000 #> Expected 18.954 17.725 15.499 12.673 9.690 6.929 #> Chisquare 0.202 0.605 0.016 0.139 0.049 1.238 #> (14.5,17] (17,19.4] Total #> Observed 4.000 4.000 89.000 #> Expected 4.633 2.897 89.000 #> Chisquare 0.086 0.420 2.756 #> #> P = 0.8388 with 6 degrees of freedom #> #> Mark-recapture component: #> Capture History 10 #> [0,2.42] (2.42,4.85] (4.85,7.27] (7.27,9.7] (9.7,12.1] (12.1,14.5] #> Observed 2 0 1 3 6 3 #> Expected 1 2 2 3 2 1 #> Chisquare 1 2 1 0 6 2 #> (14.5,17] (17,19.4] Total #> Observed 4 2 21 #> Expected 2 2 14 #> Chisquare 4 0 16 #> Capture History 01 #> [0,2.42] (2.42,4.85] (4.85,7.27] (7.27,9.7] (9.7,12.1] (12.1,14.5] #> Observed 3 1 2 1 0 0 #> Expected 1 2 2 3 2 1 #> Chisquare 5 0 0 1 2 1 #> (14.5,17] (17,19.4] Total #> Observed 0 1 8 #> Expected 2 2 14 #> Chisquare 2 0 12 #> Capture History 11 #> [0,2.42] (2.42,4.85] (4.85,7.27] (7.27,9.7] (9.7,12.1] (12.1,14.5] #> Observed 12 20 13 10 3 1 #> Expected 15 17 12 9 4 1 #> Chisquare 1 0 0 0 0 0 #> (14.5,17] (17,19.4] Total #> Observed 0 1 60 #> Expected 1 1 60 #> Chisquare 1 0 3 #> #> MR total chi-square = 31.176 P = 0.0052374 with 14 degrees of freedom #> #> #> Total chi-square = 33.932 P = 0.026589 with 20 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.0468697 p-value = 0.895003 # }"},{"path":"/reference/stake78.html","id":null,"dir":"Reference","previous_headings":"","what":"Wooden stake data from 1978 survey — stake78","title":"Wooden stake data from 1978 survey — stake78","text":"Multiple surveys different observers single 1km transect containing 150 wooden stakes placed based expected uniform distribution throughout 40 m strip (20m either side).","code":""},{"path":"/reference/stake78.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Wooden stake data from 1978 survey — stake78","text":"data frame 150 observations following 13 variables. StakeNo unique number stake 1-150 PD perpendicular distance stake placed line Obs1 0/1 whether missed/seen observer 1 Obs2 0/1 whether missed/seen observer 2 Obs3 0/1 whether missed/seen observer 3 Obs4 0/1 whether missed/seen observer 4 Obs5 0/1 whether missed/seen observer 5 Obs6 0/1 whether missed/seen observer 6 Obs7 0/1 whether missed/seen observer 7 Obs8 0/1 whether missed/seen observer 8 Obs9 0/1 whether missed/seen observer 9 Obs10 0/1 whether missed/seen observer 10 Obs11 0/1 whether missed/seen observer 11","code":""},{"path":"/reference/stake78.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Wooden stake data from 1978 survey — stake78","text":"Laake, J. 1978. Line transect estimators robust animal movement. M.S. Thesis. Utah State University, Logan, Utah. 55p.","code":""},{"path":"/reference/stake78.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wooden stake data from 1978 survey — stake78","text":"1997 survey based single realization uniform distribution. single transect randomization distances survey, repeated experiment used distances provided uniform distribution randomly sorted positions along line pattern obvious observer.","code":""},{"path":"/reference/stake78.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Wooden stake data from 1978 survey — stake78","text":"Burnham, K. P., D. R. Anderson, J. L. Laake. 1980. Estimation Density Line Transect Sampling Biological Populations. Wildlife Monographs:7-202.","code":""},{"path":"/reference/stake78.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wooden stake data from 1978 survey — stake78","text":"","code":"# \\donttest{ data(stake78) data(stake77) # compare distribution of distances for all stakes hist(stake77$PD) hist(stake78$PD) # Extract stake data and put in the mrds format for model fitting. extract.stake <- function(stake,obs){ extract.obs <- function(obs){ example <- subset(stake,eval(parse(text=paste(\"Obs\",obs,\"==1\",sep=\"\"))), select=\"PD\") example$distance <- example$PD example$object <- 1:nrow(example) example$PD <- NULL return(example) } if(obs!=\"all\"){ return(extract.obs(obs=obs)) }else{ example <- NULL for(i in 1:(ncol(stake)-2)){ df <- extract.obs(obs=i) df$person <- i example <- rbind(example,df) } example$person <- factor(example$person) example$object <- 1:nrow(example) return(example) } } extract.stake.pairs <- function(stake,obs1,obs2,removal=FALSE){ obs1 <- paste(\"Obs\",obs1,sep=\"\") obs2 <- paste(\"Obs\",obs2,sep=\"\") example <- subset(stake,eval(parse(text=paste(obs1,\"==1 |\",obs2,\"==1 \", sep=\"\"))), select=c(\"PD\",obs1,obs2)) names(example) <- c(\"distance\",\"obs1\",\"obs2\") detected <- c(example$obs1,example$obs2) example <- data.frame(object=rep(1:nrow(example),2), distance=rep(example$distance,2), detected = detected, observer=c(rep(1,nrow(example)), rep(2,nrow(example)))) if(removal) example$detected[example$observer==2] <- 1 return(example) } # extract data for observer 10 and fit a single observer model stakes <- extract.stake(stake78,10) ds.model <- ddf(dsmodel = ~mcds(key = \"hn\", formula = ~1), data = stakes, method = \"ds\", meta.data = list(width = 20)) plot(ds.model,breaks=seq(0,20,2),showpoints=TRUE) ddf.gof(ds.model) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> [0,3.33] (3.33,6.67] (6.67,10] (10,13.3] (13.3,16.7] (16.7,20] Total #> Observed 20.000 8.000 4.000 3.000 4.000 1.000 40.000 #> Expected 13.254 11.113 7.812 4.604 2.275 0.942 40.000 #> Chisquare 3.433 0.872 1.860 0.559 1.308 0.004 8.036 #> #> P = 0.090283 with 4 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.342811 p-value = 0.10286 # extract data from observers 5 and 7 and fit an io model stkpairs <- extract.stake.pairs(stake78,5,7,removal=FALSE) io.model <- ddf(dsmodel = ~mcds(key = \"hn\", formula=~1), mrmodel=~glm(formula=~distance), data = stkpairs, method = \"io\") #> Warning: no truncation distance specified; using largest observed distance summary(io.model) #> #> Summary for io.fi object #> Number of observations : 68 #> Number seen by primary : 60 #> Number seen by secondary : 55 #> Number seen by both : 47 #> AIC : 116.2709 #> #> #> Conditional detection function parameters: #> estimate se #> (Intercept) 1.81859268 0.43467528 #> distance -0.04485342 0.04688151 #> #> Estimate SE CV #> Average primary p(0) 0.8603972 0.05221053 0.06068190 #> Average secondary p(0) 0.8603972 0.05221053 0.06068190 #> Average combined p(0) 0.9805111 0.01457748 0.01486722 #> #> #> Summary for ds object #> Number of observations : 68 #> Distance range : 0 - 19.34 #> AIC : 391.1836 #> Optimisation : mrds (nlminb) #> #> Detection function: #> Half-normal key function #> #> Detection function parameters #> Scale coefficient(s): #> estimate se #> (Intercept) 2.340436 0.1284981 #> #> Estimate SE CV #> Average p 0.6309225 0.05837871 0.09252913 #> #> #> Summary for io object #> Total AIC value : 507.4545 #> #> Estimate SE CV #> Average p 0.6186265 0.05797515 0.09371592 #> N in covered region 109.9209291 13.18643833 0.11996294 par(mfrow=c(3,2)) plot(io.model,breaks=seq(0,20,2),showpoints=TRUE,new=FALSE) ddf.gof(io.model) #> #> Goodness of fit results for ddf object #> #> Chi-square tests #> #> Distance sampling component: #> [0,2.76] (2.76,5.53] (5.53,8.29] (8.29,11.1] (11.1,13.8] (13.8,16.6] #> Observed 19.000 16.000 12.000 5.000 4.000 7.000 #> Expected 15.217 14.183 12.322 9.977 7.530 5.297 #> Chisquare 0.940 0.233 0.008 2.483 1.655 0.548 #> (16.6,19.3] Total #> Observed 5.000 68.000 #> Expected 3.473 68.000 #> Chisquare 0.671 6.538 #> #> P = 0.25731 with 5 degrees of freedom #> #> Mark-recapture component: #> Capture History 10 #> [0,2.76] (2.76,5.53] (5.53,8.29] (8.29,11.1] (11.1,13.8] (13.8,16.6] #> Observed 1 4 2 3 1 2 #> Expected 2 2 2 1 1 1 #> Chisquare 1 1 0 6 0 0 #> (16.6,19.3] Total #> Observed 0 13 #> Expected 1 10 #> Chisquare 1 9 #> Capture History 01 #> [0,2.76] (2.76,5.53] (5.53,8.29] (8.29,11.1] (11.1,13.8] (13.8,16.6] #> Observed 4 0 2 0 0 0 #> Expected 2 2 2 1 1 1 #> Chisquare 1 2 0 1 1 1 #> (16.6,19.3] Total #> Observed 2 8 #> Expected 1 10 #> Chisquare 1 7 #> Capture History 11 #> [0,2.76] (2.76,5.53] (5.53,8.29] (8.29,11.1] (11.1,13.8] (13.8,16.6] #> Observed 14 12 8 2 3 5 #> Expected 14 12 8 3 3 4 #> Chisquare 0 0 0 1 0 0 #> (16.6,19.3] Total #> Observed 3 47 #> Expected 3 47 #> Chisquare 0 1 #> #> MR total chi-square = 17.108 P = 0.1456 with 12 degrees of freedom #> #> #> Total chi-square = 23.646 P = 0.12938 with 17 degrees of freedom #> #> Distance sampling Cramer-von Mises test (unweighted) #> Test statistic = 0.246294 p-value = 0.19319 # }"},{"path":"/reference/summary.ds.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.ds","title":"Summary of distance detection function model object — summary.ds","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.ds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.ds","text":"","code":"# S3 method for class 'ds' summary(object, se = TRUE, N = TRUE, ...)"},{"path":"/reference/summary.ds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.ds","text":"object ddf model object se TRUE, computes standard errors N TRUE, computes abundance covered (sampled) region ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.ds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.ds","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.ds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.ds","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.ds.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.ds","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.ds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.ds","text":"Jeff Laake","code":""},{"path":"/reference/summary.io.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.io.fi","title":"Summary of distance detection function model object — summary.io.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.io.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.io.fi","text":"","code":"# S3 method for class 'io.fi' summary(object, se = TRUE, N = TRUE, fittedmodel = NULL, ddfobj = NULL, ...)"},{"path":"/reference/summary.io.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.io.fi","text":"object ddf model object se TRUE, computes standard errors N TRUE, computes abundance covered (sampled) region fittedmodel full fitted model called trial io ddfobj distance sampling object description ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.io.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.io.fi","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.io.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.io.fi","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.io.fi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.io.fi","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.io.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.io.fi","text":"Jeff Laake","code":""},{"path":"/reference/summary.io.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.io","title":"Summary of distance detection function model object — summary.io","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.io.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.io","text":"","code":"# S3 method for class 'io' summary(object, se = TRUE, ...)"},{"path":"/reference/summary.io.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.io","text":"object ddf model object se TRUE, computes standard errors ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.io.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.io","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.io.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.io","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.io.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.io","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.io.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.io","text":"Jeff Laake","code":""},{"path":"/reference/summary.rem.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.rem.fi","title":"Summary of distance detection function model object — summary.rem.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.rem.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.rem.fi","text":"","code":"# S3 method for class 'rem.fi' summary(object, se = TRUE, N = TRUE, fittedmodel = NULL, ...)"},{"path":"/reference/summary.rem.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.rem.fi","text":"object ddf model object se TRUE, computes standard errors N TRUE, computes abundance covered (sampled) region fittedmodel full fitted model called trial io ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.rem.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.rem.fi","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.rem.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.rem.fi","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.rem.fi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.rem.fi","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.rem.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.rem.fi","text":"Jeff Laake","code":""},{"path":"/reference/summary.rem.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.rem","title":"Summary of distance detection function model object — summary.rem","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.rem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.rem","text":"","code":"# S3 method for class 'rem' summary(object, se = TRUE, ...)"},{"path":"/reference/summary.rem.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.rem","text":"object ddf model object se TRUE, computes standard errors ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.rem.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.rem","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.rem.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.rem","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.rem.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.rem","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.rem.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.rem","text":"Jeff Laake","code":""},{"path":"/reference/summary.trial.fi.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.trial.fi","title":"Summary of distance detection function model object — summary.trial.fi","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.trial.fi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.trial.fi","text":"","code":"# S3 method for class 'trial.fi' summary(object, se = TRUE, N = TRUE, fittedmodel = NULL, ...)"},{"path":"/reference/summary.trial.fi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.trial.fi","text":"object ddf model object se TRUE, computes standard errors N TRUE, computes abundance covered (sampled) region fittedmodel full fitted model called trial io ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.trial.fi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.trial.fi","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.trial.fi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.trial.fi","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.trial.fi.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.trial.fi","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.trial.fi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.trial.fi","text":"Jeff Laake","code":""},{"path":"/reference/summary.trial.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary of distance detection function model object — summary.trial","title":"Summary of distance detection function model object — summary.trial","text":"Provides brief summary data fitted detection probability model parameters, model selection criterion, optionally abundance covered (sampled) region standard error.","code":""},{"path":"/reference/summary.trial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary of distance detection function model object — summary.trial","text":"","code":"# S3 method for class 'trial' summary(object, se = TRUE, ...)"},{"path":"/reference/summary.trial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary of distance detection function model object — summary.trial","text":"object ddf model object se TRUE, computes standard errors ... unspecified unused arguments S3 consistency","code":""},{"path":"/reference/summary.trial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summary of distance detection function model object — summary.trial","text":"list extracted summarized objects","code":""},{"path":"/reference/summary.trial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Summary of distance detection function model object — summary.trial","text":"argument N used suppress computation abundance average detection probability calls summarize ds either io.fi trial.fi summaries io trial objects respectively composed ds model object mark-recapture model object. corresponding print function called print summary results.","code":""},{"path":"/reference/summary.trial.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Summary of distance detection function model object — summary.trial","text":"function called generic function summary ddf model object. function can called directly user, typically safest use generic function summary calls appropriate function based type ddf model.","code":""},{"path":"/reference/summary.trial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary of distance detection function model object — summary.trial","text":"Jeff Laake","code":""},{"path":"/reference/survey.region.dht.html","id":null,"dir":"Reference","previous_headings":"","what":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Extrapolate Horvitz-Thompson abundance estimates entire surveyed region","code":""},{"path":"/reference/survey.region.dht.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"","code":"survey.region.dht(Nhat.by.sample, samples, width, left, point, areas.supplied)"},{"path":"/reference/survey.region.dht.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Nhat..sample dataframe abundance sample samples samples table width truncation width left left truncation point TRUE point count otherwise line transect areas.supplied TRUE, covered area extracted CoveredArea column Nhat..sample","code":""},{"path":"/reference/survey.region.dht.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Revised Nhat..sample dataframe containing estimates extrapolated survey region","code":""},{"path":"/reference/survey.region.dht.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Internal function called dht related functions.","code":""},{"path":"/reference/survey.region.dht.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extrapolate Horvitz-Thompson abundance estimates to entire surveyed region — survey.region.dht","text":"Jeff Laake David L Miller","code":""},{"path":"/reference/test.breaks.html","id":null,"dir":"Reference","previous_headings":"","what":"Test validity for histogram breaks(cutpoints) — test.breaks","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"Determines whether user specified breaks histograms properly ordered match left right truncation.","code":""},{"path":"/reference/test.breaks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"","code":"test.breaks(breaks, left, width)"},{"path":"/reference/test.breaks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"breaks vector cutpoints (breaks) distance histogram left left truncation value width right truncation value; either radius point count half-width transect","code":""},{"path":"/reference/test.breaks.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"vector breaks modified valid necessary","code":""},{"path":"/reference/test.breaks.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Test validity for histogram breaks(cutpoints) — test.breaks","text":"Jeff Laake","code":""},{"path":"/reference/varn.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute empirical variance of encounter rate — varn","title":"Compute empirical variance of encounter rate — varn","text":"Computes one series possible variance estimates observed encounter rate set sample measurements (e.g., line lengths) number observations per sample.","code":""},{"path":"/reference/varn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute empirical variance of encounter rate — varn","text":"","code":"varn(lvec,nvec,type) covn(lvec, groups1, groups2, type)"},{"path":"/reference/varn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute empirical variance of encounter rate — varn","text":"lvec vector sample measurements (e.g., line lengths) nvec vector number observed type choice variance estimator use encounter rate groups1 vector number groups observed groups2 vector number individuals observed","code":""},{"path":"/reference/varn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute empirical variance of encounter rate — varn","text":"Variance encounter rate defined arguments","code":""},{"path":"/reference/varn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute empirical variance of encounter rate — varn","text":"choice type follows notation Fewster et al. (2009) 8 choices encounter rate variance can computed lines one points: R2 random line placement unequal line lengths (design-assisted estimator) R3 random line placement, model-assisted estimator, based true contagion process R4 random line placement, model-assisted estimator, based apparent contagion process S1 systematic line placement, post-stratification strata overlap S2 systematic line placement, post-stratification strata overlap, variances weighted line length per stratum O1 systematic line placement, post-stratification overlapping strata (akin S1) O2 systematic line placement, post-stratification overlapping strata (weighted line length per stratum, akin S2) O3 systematic line placement, post-stratification overlapping strata, model-assisted estimator trend encounter rate line length P2 random point placement, potentially unequal number visits per point, design-based estimator P3 random point placement, potentially unequal number visits per point, model-based estimator Default value \"R2\", shown Fewster et al. (2009) good performance completely random designs lines. systematic parallel line transect designs, Fewster et al. (2009) recommend \"O2\". point transects default \"P2\" (\"P3\" also available). systematic estimators, pairs assigned order given lengths groups vectors.","code":""},{"path":"/reference/varn.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Compute empirical variance of encounter rate — varn","text":"function also used different calling arguments compute Innes et al. (2002) variance estimated abundances/length rather observation encounter rate. function covn probably valid R3 R2. Currently, R2 form used types R3.","code":""},{"path":"/reference/varn.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute empirical variance of encounter rate — varn","text":"Fewster RM, Buckland ST, Burnham KP, Borchers DL, Jupp PE, Laake JL, Thomas L (2009). “Estimating encounter rate variance distance sampling.” Biometrics, 65(1), 225-236. Innes S, Heide-Jørgensen MP, Laake JL, Laidre KL, Cleator HJ, Richard P, Stewart RE (2002). “Surveys belugas narwhals Canadian High Arctic 1996.” NAMMCO Scientific Publications, 4, 169-190.","code":""},{"path":"/reference/varn.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute empirical variance of encounter rate — varn","text":"Jeff Laake, David L Miller","code":""},{"path":"/news/index.html","id":"mrds-301","dir":"Changelog","previous_headings":"","what":"mrds 3.0.1","title":"mrds 3.0.1","text":"Bug Fixes Fixed formatting issue flnl.grad help Now displays warning user tries fit detection function covariates using MCDS.exe either half-normal hazard rate model. (Issue #113) Fixed MCDS.exe try fit negative exponential place gamme key function. (Issue #113) Now issues warnings single transect varflag option 1 2. (Issue #115)","code":""},{"path":"/news/index.html","id":"mrds-300","dir":"Changelog","previous_headings":"","what":"mrds 3.0.0","title":"mrds 3.0.0","text":"CRAN release: 2024-10-23 New features default R optimiser (strict) monotonicity detection function enforced improved. Monotonicity enforced detection function adjustment terms include covariates. new optimiser Sequential Least Squares Programming (SLSQP) algorithm included ‘nloptr’-package. optimiser uses analytical gradients rather approximate gradients therefore robust improved runtime. Users can still make ddf() use previous default R optimiser specifying mono.method = ‘solnp’ ‘control’ argument. default mono.method ‘slsqp’. small improvements bug fixes monotonic optimiser, results ddf() might change even using old solnp optimiser. cases, however, expect significant changes estimates. Bug Fixes summary fitting object now correctly prints optimiser used monotonicity enforced (‘slsqp’ ‘solnp’). check.mono() now uses point locations optimiser. also uses tolerance optimiser (1e-8) applies tolerance checking (strict) monotonicity, checking 0 <= g(x) <= 1.","code":""},{"path":"/news/index.html","id":"mrds-230","dir":"Changelog","previous_headings":"","what":"mrds 2.3.0","title":"mrds 2.3.0","text":"CRAN release: 2023-12-18 New Features ‘P2’ estimator now default estimating encounter rate variance point transect surveys. (Issue #65) Bug Fixes Re-formatted format section documentation book.tee.data (Issue #91) Ensure MCDS optimizer used double observer models generating errors. (Issue #89) Improved documentation initial values, lower upper bounds ddf mrds_opt documentation (mrds_opt renamed mrds-opt accessible via ?mrds-opt). (Issue #90)","code":""},{"path":"/news/index.html","id":"mrds-229","dir":"Changelog","previous_headings":"","what":"mrds 2.2.9","title":"mrds 2.2.9","text":"CRAN release: 2023-07-06 New Features Users can now download fortran MCDS.exe optimiser used Distance Windows fit single observer models optimisers R via # mrds also MCDS.exe. datasets optimisation MCDS.exe superior (giving better likelihood) optimiser R used mrds. See ?MCDS details. Bug Fixes fix bug (true, 2nd derivative) hessian calculated optimisation. lead weird errors later (summary doesn’t work etc). Hessians now calculated case. Thanks Anne Provencher St-Pierre reporting issue Fix prediction bug (Issue #84) predicting hazard rate model covariates se.fit= TRUE. Note may issues predicting instance binned data - check results expected. Fix bug uniform model fitted adjustments. caused error looking hessian. also required covariance set 0 estimating cluster size standard errors (Issue #79). fix bug using binned data via cutpoints prediction (#73)","code":""},{"path":"/news/index.html","id":"mrds-228","dir":"Changelog","previous_headings":"","what":"mrds 2.2.8","title":"mrds 2.2.8","text":"CRAN release: 2022-11-16 Fix bug plotting rem.fi models truncation used lead error thrown. (#58) Fix bugs uniform fitted adjustments (#59) Fix bug plotting left truncation used points didn’t match detection function line (Distance #134) Fix bug debug reporting uniform models used (Distance #136) Fix bug adjustment term fitting width scaling defined right minus left truncation, rather just right truncation value (Distance #133) Use (0,width) interval monotonicity checks, rather (left, width) causing issues consistent Distance Windows (Distance #135) Expose mono.outer.iter option control number outer iterations used fit monotonic model. Default 200. Make dht output tables consistent. Now always refers Region display (rather Region summary Label N/D tables). Note display change won’t break code looks extract values based column names dht object unchanged. Fixed bug leading erroneous zero totals individuals N/D tables sightings one strata. Bug apparent data sightings clusters varflag 1 option (er_method = 1 Distance ds function) selected dht function.","code":""},{"path":"/news/index.html","id":"mrds-227","dir":"Changelog","previous_headings":"","what":"mrds 2.2.7","title":"mrds 2.2.7","text":"CRAN release: 2022-08-20 Fix bug check # parameters < # data. Thanks Anne Provencher St-Pierre. longer display errors caused solnp/gosolnp constrained optimisation, can seen showit>0 necessary. EXPERIMENTAL change use fixed grid starting values using monotonicity constraints, set control$mono.random.start=TRUE get old behaviour Scale covariates absolutely rather relatively optimisation. Expected.S element dht return now data.frame list Fix total encounter rate variance stratified analysis","code":""},{"path":"/news/index.html","id":"mrds-226","dir":"Changelog","previous_headings":"","what":"mrds 2.2.6","title":"mrds 2.2.6","text":"CRAN release: 2022-03-17 Individuals summary table dht now includes k (number transects) Add effective detection radius (EDR) uncertainty summary output Change default rounding chi-squared test tables. can customized using print(ddf.gof(…), digits=?) e.g., printing knitr::kable New detection function: two-part normal (“tpn”), useful aerial surveys mountainous terrain, see Becker EF, Christ (2015) Unimodal Model Double Observer Distance Sampling Surveys. PLOS ONE 10(8): e0136403. https://doi.org/10.1371/journal.pone.0136403 ?“two-part-normal”. add_df_covar_line -> add.df.covar.line p_dist_table -> p.dist.table Variable strip widths now supported dht. Users supply additional column sample data.frame (“CoveredArea”) giving total area covered given transect set options=list(areas.supplied=TRUE). Thanks Megan Ferguson providing example, code feedback.","code":""},{"path":"/news/index.html","id":"mrds-225","dir":"Changelog","previous_headings":"","what":"mrds 2.2.5","title":"mrds 2.2.5","text":"CRAN release: 2021-07-01 use “probabalists” definition Hermite polynomials, Distance. numerically stable remove setting Hermite parameter 1 (unclear case!) refinement adjustment-key-outer optimisation, optimization now subset parameters, rather holding one parameter constant refine outer optimization, using best previous values (likelihood) rather last values. Use optimizer’s convergence diagnostic assess outer convergence. Refinement “inner” optimization (detfct.fit.opt): (1) simplification stopping rules (one () loop rather two), (2) parameters nudged bounds hit, bounds hit expanded Rescaling covariate models’ parameters (scaling difference large) inverted, causing kinds issues. Made scaling kick-smaller scales. Removed inner (detfct.fit.opt) () loop dependence bounded status, since didn’t seem make sense Stop “correcting” infinite/NaN integrals small numbers misleading optimizer think “good” values Refine constrained optimisation use actual starting values , use random start points compare two. handle case model failed AIC adjustment term selection, montonicity check throw error assign g(x)=0 g(x)<0 integrating detection function (check post-optimisation problem!) fix bug predict.ds uniform key used binned data (Thanks Noémie Cappelle reporting issue!) dht now prints additional information variance estimators used errors now thrown parameters data (either unique distance values bins)","code":""},{"path":"/news/index.html","id":"mrds-224","dir":"Changelog","previous_headings":"","what":"mrds 2.2.4","title":"mrds 2.2.4","text":"CRAN release: 2020-12-01 add_df_covar_line now plots probability density functions point transect case warning longer raised truncation set bins specified binned data (’s assumed furthest cutpoint truncation) AIC/logLik functions now work methods","code":""},{"path":"/news/index.html","id":"mrds-223","dir":"Changelog","previous_headings":"","what":"mrds 2.2.3","title":"mrds 2.2.3","text":"CRAN release: 2020-07-31 fix bug region areas duplicated properly density estimated (using Area=0 data) fix bug getting starting values hazard-rate detection functions point transect data used fix issue left truncation estimating abundance/density dht","code":""},{"path":"/news/index.html","id":"mrds-222","dir":"Changelog","previous_headings":"","what":"mrds 2.2.2","title":"mrds 2.2.2","text":"CRAN release: 2020-05-12 fix issue predict() uniform key functions used new data. new function p_dist_table() show distribution estimated probabilities detection. Useful covariate models determine issues small ps. new function add_df_covar_line(), can used add lines plots showing detection function given covariate combination. Thanks various members distance sampling mailing list suggestion. plots produced plot.ds/plot.rem/plot.rem.fi/plot.trial/plot.trial.fi/plot.io/plot.io.fi/plot.det.tables now use defaults R 4.0.0 (“lightgrey” bars histograms). deprecated arguments plot.ds removed.","code":""},{"path":"/news/index.html","id":"mrds-221","dir":"Changelog","previous_headings":"","what":"mrds 2.2.1","title":"mrds 2.2.1","text":"CRAN release: 2020-01-22 hessian now returned solnp (constrained optimisation) used fit detection function Check NA covariate values, thanks Ana Cañadas highlighting issue. enable P2 variance estimator points Corrected handling NA covariates new option se.fit predict.ds obtain standard errors probability detection ESW Fixed bug dht left truncation used. Previously left truncation ignored. See https://github.com/DistanceDevelopment/mrds/issues/22 thanks Carl Schwarz finding bug. Fix bug two objects missing observer error thrown. Thanks Ainars Aunins reporting bug Eric Rexstad diagnosing.","code":""},{"path":"/news/index.html","id":"mrds-220","dir":"Changelog","previous_headings":"","what":"mrds 2.2.0","title":"mrds 2.2.0","text":"CRAN release: 2018-06-27 fixed bug calculation Kolmogorov-Smirnov p-values. Previous methods take account parameters detection function estimated, new bootstrap-based approach implemented. time-consuming, Kolmogorov-Smirnov test longer performed default (use ks=TRUE get test). Encounter rate variance point transects points sampled equal number times incorrect. # mrds now uses P3 estimator Fewster et al (2009) point transect encounter rate variance. Bug predicting left truncation used. Previously distance column new data set zero left truncation > 0 predictions discarded, particularly problematic io, etc # mrds models. Thanks Natalie Kelly spotting suggesting fix. Add errors “P3” used encounter rate variance estimator non-point transect data, throws warning switches P3 points ’s specified.","code":""},{"path":"/news/index.html","id":"mrds-2118","dir":"Changelog","previous_headings":"","what":"mrds 2.1.18","title":"mrds 2.1.18","text":"CRAN release: 2017-07-04 fixed bug parameter rescaling scales incorrectly entered 1 due indexing bug Quantile-quantile plots now use aspect ratio 1 Bug half-normal integration code adjustments used lead likelohood evaluated incorrectly models binned (grouped) distances. effected AIC comparisons models parameter estimates . Thanks Olivier Devineau spotting ! Fix bug predict.ds() didn’t work uniform keys. Thanks Jason Roberts reporting bug. Correctly specify distbegin/distend predictions binned data, thanks Jason Roberts spotting bug. Let user know int.range set summary() results","code":""},{"path":"/news/index.html","id":"mrds-2117","dir":"Changelog","previous_headings":"","what":"mrds 2.1.17","title":"mrds 2.1.17","text":"CRAN release: 2016-10-03 fixed starting value bug hazard-rate models distances binned. Thanks Natalia Schroeder Eric Rexstad discovering . predict.ds now uses numerical integration calculate integrals (rather approximation). Thanks Eric Rexstad spotting issue goodness fit testing highlighted . plot.ds() now accepts xlab=“” argument change x axis label. Thanks Steve Ahlswede suggesting .","code":""},{"path":"/news/index.html","id":"mrds-2116","dir":"Changelog","previous_headings":"","what":"mrds 2.1.16","title":"mrds 2.1.16","text":"CRAN release: 2016-08-10 improved predict() method now Right Thing factors Fixed bug scaling histograms point transect pdf plots points plots. Thanks Erics Howe Rexstad reporting issues. can now set y axis limits using plot.ds, defaults sensible pt+point models. Thanks Eric Howe suggestion. Fixed bug setting initial values threw many errors. Thanks Laura Marshall spotting .","code":""},{"path":"/news/index.html","id":"mrds-2115","dir":"Changelog","previous_headings":"","what":"mrds 2.1.15","title":"mrds 2.1.15","text":"rescaling parameters correct, now fixed. Thanks Laura Marshall spotting . coefficients called coefficients (mixture coefficients parameters) summary() results speed-io.fi models (thanks Winston Chang’s profvis, showing many unecessary calls model.matrix) plot.ds now pdf= option plot probability density function (point transect models ) assign.par, create.ddfobj detfct now exported, can used dsm (though shouldn’t used anything else!) fixed bug left truncation probability detection calculated correctly. Thanks Jason Roberts pointing !","code":""},{"path":"/news/index.html","id":"mrds-2114","dir":"Changelog","previous_headings":"","what":"mrds 2.1.14","title":"mrds 2.1.14","text":"CRAN release: 2015-07-29 updated initialvalues calculation hazard-rate – now uses Beavers & Ramsay method scale parameters hazard-rate automatic parameter rescaling covariate models covariates poorly scaled. Now default nlminb method minor speed-logistic code distance covariate","code":""},{"path":"/news/index.html","id":"mrds-2113","dir":"Changelog","previous_headings":"","what":"mrds 2.1.13","title":"mrds 2.1.13","text":"link distance sampling Google Groups help duplicate non-convergence warning/error removed warning singular Hessian now warning() re-wrote debug output easier read dht now option (ci.width) specify confidence interval width output (thanks David Pavlacky suggestion) monotonicity now operates left->right truncation models left truncated fail error message many integration intervals used. Thanks Tiago Marques highlighting issue.","code":""},{"path":"/news/index.html","id":"mrds-2112","dir":"Changelog","previous_headings":"","what":"mrds 2.1.12","title":"mrds 2.1.12","text":"CRAN release: 2015-02-05 examples now .","code":""},{"path":"/news/index.html","id":"mrds-2111","dir":"Changelog","previous_headings":"","what":"mrds 2.1.11","title":"mrds 2.1.11","text":"Bug unif+cos(1) models using monotonicity constraints randomised starting points. Since model 1 parameter, bug selecting columns Rsolnp starting value code makes result vector, doesn’t work apply later. Workaround using randomised starting values # mrds model. Thanks Nathalie Cavada finding bug. Fixed bug pdot.dsr.integrate.logistic giving incorrect AIC values FI models binned data points lines. Fixed issue returned optimisation obejct got accessed without checked see ’s result error, causing problems encapsulating ddf functions.","code":""},{"path":"/news/index.html","id":"mrds-2110","dir":"Changelog","previous_headings":"","what":"mrds 2.1.10","title":"mrds 2.1.10","text":"CRAN release: 2014-09-27 added testing directory .Rbuildignore, tests now included built packages run CRAN. tests use source packages github.","code":""},{"path":"/news/index.html","id":"mrds-219","dir":"Changelog","previous_headings":"","what":"mrds 2.1.9","title":"mrds 2.1.9","text":"BUG FIXES removed test failed CRAN’s testing","code":""},{"path":"/news/index.html","id":"mrds-218","dir":"Changelog","previous_headings":"","what":"mrds 2.1.8","title":"mrds 2.1.8","text":"CRAN release: 2014-09-16 CHANGES * removed doeachint/cgftab code, used spline approximation effective strip width/effective area half-normal detection function used. replaced exact calculation via error function (erf). * tests updated accordingly * monotonically constrained models now use bunch random start points – uses gosolnp() Rsolnp * re-fitting jiggling parameters refined multiply uniform variable limits set upper lower bounds (+/-1) jiggling can go either way, approximately scale parameters * corrected documentation predict methods, incorrectly stated returned point transect models. Thanks Thibault Dieuleveut spotting . BUG FIXES fixed 2 bugs create.varstructure; first removal method treated trial method. second obs.table specified (Region sample labels dataframe obs) dual observers. case doubling number observations. fixed bug dht.deriv setup removal; thanks John Boulanger noticing reporting bugs","code":""},{"path":"/news/index.html","id":"mrds-217","dir":"Changelog","previous_headings":"","what":"mrds 2.1.7","title":"mrds 2.1.7","text":"BUG FIXES Standardisation applied detection functions (g(0)=1) adjustments (uneccesary) also caused issues using gamma detection functions calculated g(apex) instead. Standardisation code removed adjustments correct scaling used gamma . Thanks Thomas Doniol-Valcroze alerting us bug. Partial name-matching dht fixed. Produced warning error. NEW FEATURES Tests gamma detection functions Observations automatically ordered object observer fields (included) ddf expected double observer analysis. erroneous error message can created ordered correctly worse. Thanks Ainars Aunins bringing attention. Added function create_document() run shiny application interface # mrds create knitr document template. template currently single observer analysis behind features app fairly complete.","code":""},{"path":"/news/index.html","id":"mrds-216","dir":"Changelog","previous_headings":"","what":"mrds 2.1.6","title":"mrds 2.1.6","text":"CRAN release: 2014-06-11 BUG FIXES key+adjustment models failed converge due bugs optimisation code (mainly unif+cosine models) NEW FEATURES optimisation tips help page ?“mrds-opt”","code":""},{"path":"/news/index.html","id":"mrds-215","dir":"Changelog","previous_headings":"","what":"mrds 2.1.5","title":"mrds 2.1.5","text":"CRAN release: 2014-04-22 CHANGES * models adjustment terms covariates now allowed * mono.check function checks detection function monotonic range (observed covariate combinations covariates included)","code":""},{"path":"/news/index.html","id":"mrds-214-5","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-5","title":"mrds 2.1.4-5","text":"CHANGES new testthat changes test locations etc, sorted . = argument plot.* now sorts first, plots always order plot.ds now friendly par() users, thanks Jason Roberts pointer BUG FIXES uniform+cosine detection functions ignored using monotonicity constraints, now can used together mono.strict=TRUE didn’t automatically turn mono=TRUE, extra logic correct montonicity constraints use standardised (g(x)/g(0) detection functions, g(x)>1 monotonicity constraints voilated. Now standardised detection functions used. Thanks Len Thomas noticing bug.","code":""},{"path":"/news/index.html","id":"mrds-214-3","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-3","title":"mrds 2.1.4-3","text":"BUG FIX predict.io.fi work new data (thanks Len Thomas Phil Hammond pointing ) CHANGES general documentation updates simplication re-structuring internals","code":""},{"path":"/news/index.html","id":"mrds-214-3-1","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-3","title":"mrds 2.1.4-3","text":"CHANGES internal re-structuring summary methods tests","code":""},{"path":"/news/index.html","id":"mrds-214-2","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-2","title":"mrds 2.1.4-2","text":"CHANGES plot.ds now new argument, TRUE (default) create new window plot. general janitorial work inside plotting methods, removing simplifying old code; (hopefully) new features.","code":""},{"path":"/news/index.html","id":"mrds-214-1","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4-1","title":"mrds 2.1.4-1","text":"CHANGES Warning now issued truncation set largest distance default. updated dht documentation","code":""},{"path":"/news/index.html","id":"mrds-214","dir":"Changelog","previous_headings":"","what":"mrds 2.1.4","title":"mrds 2.1.4","text":"CRAN release: 2013-09-23 CHANGES modified det.tables plot.det.tables create plot tables depending observer configuration (io,trial,removal). plot functions (plot.ds) added argument subtitle=TRUE (default). can either TRUE, FALSE. TRUE shows sub-titles plot type. FALSE, subtitles shown. argument possible get subtitles without main title. set iterlimit=1 call rem.glm ddf.rem.fi prevent convergence issues getting starting values. created average.line.cond now used place calcp.# mrds computing average line conditional detection function weighting values estimated population proportions covariate value. now weighted sample proportions (mean value).","code":""},{"path":"/news/index.html","id":"mrds-213-1","dir":"Changelog","previous_headings":"","what":"mrds 2.1.3-1","title":"mrds 2.1.3-1","text":"BUG FIXES patched dht.se vc1=NA fail patched plot.ds issue dev.new using another graphics device plays nice Distance.","code":""},{"path":"/news/index.html","id":"mrds-213","dir":"Changelog","previous_headings":"","what":"mrds 2.1.3","title":"mrds 2.1.3","text":"CRAN release: 2013-08-13 BUG FIXES patched bug dht returning incorrect values bysample sample.area Dhat. patched code dht.se skip variance component p key=unif p=1. CHANGES modified code detfct.fit.opt io rem functions adapt changes optimx removed old depends statements optimx Rsolnp; uses import","code":""},{"path":"/news/index.html","id":"mrds-212","dir":"Changelog","previous_headings":"","what":"mrds 2.1.2","title":"mrds 2.1.2","text":"CRAN release: 2013-06-26 BUG FIXES fixed usage example lines long","code":""},{"path":"/news/index.html","id":"mrds-211","dir":"Changelog","previous_headings":"","what":"mrds 2.1.1","title":"mrds 2.1.1","text":"BUG FIXES full independence methods, calculation distance sampling component unbinned data . Code added compute component correctly binned data. required changes ddf.x.fi routines logistic integration routines. CHANGES Modified flpt.lnl code set integrals 1E-25 <=0 integrate.pdf vector argument integration range converted matrix length 2. ddf.gof now use breaks set binned data unless others specified. NEW FEATURES Added threshold detection functions (“th1” “th2”) required minor changes functions summary/print. Added xlab ylab arguments plot functions -ride default labels","code":""},{"path":"/news/index.html","id":"mrds-210","dir":"Changelog","previous_headings":"","what":"mrds 2.1.0","title":"mrds 2.1.0","text":"CRAN release: 2012-12-11 CHANGES Modified DESCRIPTION R 2.15 greater allowed. Needed optimHess jll(12/10/2012)","code":""},{"path":"/news/index.html","id":"mrds-209","dir":"Changelog","previous_headings":"","what":"mrds 2.0.9","title":"mrds 2.0.9","text":"CRAN release: 2012-12-04 NEW FEATURES New option plot=TRUE/FALSE qqplot.ddf(), want K-S CvM test statistics, plotting. dlm(11/13/2012) BUG FIXES Fixed problem obs dataframe call dht (links observations samples regions) contained fields also observation dataframe. Now fields needed obs selected merge. dlm(11/13/2012)","code":""},{"path":"/news/index.html","id":"mrds-208","dir":"Changelog","previous_headings":"","what":"mrds 2.0.8","title":"mrds 2.0.8","text":"Unchanged version sent Distance summer 2012","code":""},{"path":"/news/index.html","id":"mrds-207","dir":"Changelog","previous_headings":"","what":"mrds 2.0.7","title":"mrds 2.0.7","text":"NEW FEATURES Restructured likelihood/integration code fitting ds models Adjustment functions now work binned data. Code added assure fields distbegin distend available binned=TRUE breaks set well. Added argument adj.exp set TRUE use keyexp(adj) rather keyadj keep f(x)>0 Added following restrictions adjustments: uniform key, adj.scale must “width”; non-uniform key adj.scale=“width”, doeachint set TRUE scale integration work. Changed code several functions uniform key adjustment functions used. New option plot=TRUE/FALSE qqplot.ddf(), want K-S CvM test statistics, plotting. BUG FIXES Fixed inconsistencies use documentation showit argument Fixed bug groups recognised dht() size column occurred model data observation table. (Thanks Darren Kidney spotting .)","code":""},{"path":"/news/index.html","id":"mrds-206","dir":"Changelog","previous_headings":"","what":"mrds 2.0.6","title":"mrds 2.0.6","text":"NEW FEATURES Example code binned point count data added help ddf Modified ddf.rem.fi ddf.io.fi use starting values iterative offset glm make optimization robust Added restriction one attempts fitting adjustment functions covariates. Added code assure necessary fields available binned data (binned=TRUE). BUG FIXES Patched create.ddfobj point counts binned data work properly Patched ddf.ds stored data object$data detected=1 Patched ddf.io.fi throw error optimx() converge Patched ddf.io.fi ddf.rem.fi inclusion factor(observer) work formula Patched dht, dht.se covered.region.dht handle 0 observations Suppress package messages optimx Patched fpt.lnl, flt.lnl, print.ddf, model.description, summary.ds, print.summary.ds coef.io, coef.trial, coef.rem, plot.io, plot.trial, plot.rem handle uniform key function.","code":""},{"path":"/news/index.html","id":"mrds-205","dir":"Changelog","previous_headings":"","what":"mrds 2.0.5","title":"mrds 2.0.5","text":"CRAN release: 2012-03-27 NEW FEATURES First version submitted CRAN BUG FIXES Fixed code dht.se uses sample size detection model Satterthwaite approximation rather size selected subset observations. Fixed coef functions return parameter estimates adjustment functions .","code":""},{"path":"/news/index.html","id":"mrds-204","dir":"Changelog","previous_headings":"","what":"mrds 2.0.4","title":"mrds 2.0.4","text":"BUG FIXES Changed flt.var compute variance average p correctly point transects. Numerous changes dlm optimization code Changes documentation remove non-ASCII characters","code":""},{"path":"/news/index.html","id":"mrds-203","dir":"Changelog","previous_headings":"","what":"mrds 2.0.3","title":"mrds 2.0.3","text":"NEW FEATURES Major rewrite ddf summary functions handle adjustment functions BUG FIXES Changes det.tables gof functions use include.lowest=TRUE calls cut function Changed usage T F TRUE FALSE","code":""},{"path":"/news/index.html","id":"mrds-202","dir":"Changelog","previous_headings":"","what":"mrds 2.0.2","title":"mrds 2.0.2","text":"changes 2.0.2 earlier see ONEWS","code":""}]
diff --git a/inst/REFERENCES.bib b/inst/REFERENCES.bib
new file mode 100644
index 00000000..58dd3f4d
--- /dev/null
+++ b/inst/REFERENCES.bib
@@ -0,0 +1,114 @@
+@article{borchers1988,
+ title={Mark-recapture models for line transect surveys},
+ author={Borchers, D. L. and Zucchini, W. and Fewster, R. M.},
+ journal={Biometrics},
+ pages={1207--1220},
+ year={1988},
+ publisher={JSTOR}
+}
+
+@article{borchers1998,
+ author = {Borchers, D. L. and Buckland, S. T. and Goedhart, P. W. and Clarke, E. D. and Hedley, S. L.},
+ title = {Horvitz-Thompson Estimators for Double-Platform Line Transect Surveys},
+ journal = {Biometrics},
+ year = {1998},
+ volume = {54},
+ number = {4},
+ pages = {1221-1237},
+ doi = {10.2307/253365}
+}
+
+@inbook{borchers2004,
+ author = {Borchers, D.L. and Burnham, K.P.},
+ title = {Advanced distance sampling: estimating abundance of biological population},
+ chapter = {General formulation for distance sampling},
+ pages = {10-11},
+ year = {2004},
+ publisher = {Oxford University Press}
+}
+
+@article{borchers2006,
+ title={Accommodating unmodelled heterogeneity in double-observer distance sampling surveyss},
+ author={Borchers, D. L. and Laake, J.L. and Southwell, C. and Paxton, C.L.G.},
+ journal={Biometrics},
+ volumn={62},
+ pages={372-378},
+ year={2006},
+}
+
+@book{buckland2001,
+ title={Introduction to distance sampling: estimating abundance of biological populations},
+ author={Buckland, S. T. and Anderson, D. R. and Burnham, K. P. and Laake, J. L. and Borchers, D. L. and Thomas, L.},
+ year={2001},
+ publisher={Oxford university press}
+}
+
+@article{fewster2009,
+ title={Estimating the encounter rate variance in distance sampling},
+ author={Fewster, R. M. and Buckland, S. T. and Burnham, K. P. and Borchers, D. L. and Jupp, P. E. and Laake, J. L. and Thomas, L.},
+ journal={Biometrics},
+ volume={65},
+ number={1},
+ pages={225-236},
+ year={2009},
+ publisher={Oxford University Press}
+}
+
+@article{huggins1989,
+ author = {Huggins, R. M.},
+ title = {On the statistical analysis of capture experiments},
+ journal = {Biometrika},
+ year = {1989},
+ volume = {76},
+ number = {1},
+ pages = {133-140},
+ doi = {10.1093/biomet/76.1.133}
+}
+
+@article{huggins1991,
+ author = {Huggins, R. M.},
+ title = {Some practical aspects of a conditional likelihood approach to capture experiments},
+ journal = {Biometrics},
+ year = {1991},
+ volume = {47},
+ number = {1},
+ pages = {725-732},
+ doi = {10.1093/biomet/76.1.133}
+}
+
+@article{innes2002,
+ title={Surveys of belugas and narwhals in the Canadian High Arctic in 1996},
+ author={Innes, Stuart and Heide-J{\o}rgensen, MP and Laake, Jeff L and Laidre, Kristin L and Cleator, Holly J and Richard, Pierre and Stewart, Robert EA},
+ journal={NAMMCO Scientific Publications},
+ volume={4},
+ pages={169-190},
+ year={2002}
+}
+
+@incollection{laake1999,
+ title={Distance sampling with independent observers: reducing bias from heterogeneity by weakening the conditional independence assumption},
+ author={Laake, J},
+ booktitle={Marine mammal survey and assessment methods},
+ pages={137-148},
+ year={1999},
+ publisher={CRC Press}
+}
+
+@inbook{laake2004,
+ author = {Laake, J.L. and Borchers, D.L.},
+ title = {Advanced distance sampling: estimating abundance of biological population},
+ chapter = {Methods for incomplete detection at distance zero},
+ year = {2004},
+ publisher = {Oxford University Press}
+}
+
+@inbook{marques2004,
+ author = {Marques, F. F. C. and Buckland, S. T.},
+ title = {Advanced distance sampling},
+ chapter = {Covariate models for the detection function},
+ pages = {31-47},
+ year = {2004},
+ publisher = {Oxford University Press}
+}
+
+
diff --git a/man/ddf.Rd b/man/ddf.Rd
index a00b453e..3af7af9e 100644
--- a/man/ddf.Rd
+++ b/man/ddf.Rd
@@ -105,7 +105,7 @@ can be half-normal ("hn"), hazard-rate ("hr"), gamma ("gamma") or uniform
for the log of the scale parameter of the key function (e.g., the equivalent
of the standard deviation in the half-normal). The variable \code{distance}
should not be included in the formula because the scale is for distance.
-See Marques, F.F.C. and S.T. Buckland (2004) for more details on the
+See \insertCite{marques2004;textual}{mrds} for more details on the
representation of the scale formula. For the hazard rate and gamma
functions, an additional \code{shape.formula} can be specified for the model
of the shape parameter. The default will be ~1.
@@ -125,7 +125,7 @@ the functions are \code{glm} and \code{gam}. The arguments for the
functions are \code{formula} and \code{link}. At present, only \code{glm}
is allowed and it is restricted to \code{link=logit}. Thus, currently the
only form for the conditional detection functions is logistic as expressed
-in eq 6.32 of Laake and Borchers (2004). In contrast to \code{dsmodel}, the
+in eq 6.32 of \insertCite{laake2004;textual}{mrds}. In contrast to \code{dsmodel}, the
argument \code{formula} will typically include \code{distance} and all other
covariates that affect detection probability. For example,
\code{mrmodel=~glm(formula=~distance+size+sex)} constructs a conditional
@@ -243,7 +243,7 @@ infrequently. The list values include:
}
Examples of distance sampling analyses are available at
-\url{https://examples.distancesampling.org/}.
+\url{https://distancesampling.org/resources/vignettes.html}.
Hints and tips on fitting (particularly optimisation issues) are on the
\code{\link{mrds_opt}} manual page.
@@ -320,15 +320,7 @@ plot(model,main="Dual observer binned point data",new=FALSE)
}
}
\references{
-Laake, J.L. and D.L. Borchers. 2004. Methods for incomplete
- detection at distance zero. In: Advanced Distance Sampling, eds. S.T.
- Buckland, D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L.
- Thomas. Oxford University Press.
-
-Marques, F.F.C. and S.T. Buckland. 2004. Covariate models for the detection
- function. In: Advanced Distance Sampling, eds. S.T. Buckland,
- D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas.
- Oxford University Press.
+\insertAllCited{}
}
\seealso{
\code{\link{ddf.ds}}, \code{\link{ddf.io}},
diff --git a/man/dht.Rd b/man/dht.Rd
index 8e6809df..66bf9cd7 100644
--- a/man/dht.Rd
+++ b/man/dht.Rd
@@ -78,8 +78,7 @@ any defined regional stratification. The variance is based on replicate
samples within any regional stratification. For clustered populations,
\eqn{E(s)} and its standard error are also output.
-Abundance is estimated with a Horvitz-Thompson-like estimator (Huggins 1989,
-1991; Borchers et al 1998; Borchers and Burnham 2004). The abundance in the
+Abundance is estimated with a Horvitz-Thompson-like estimator (\insertCite{huggins1989;nobrackets}{mrds}; \insertCite{huggins1991;nobrackets}{mrds}; \insertCite{borchers1998;nobrackets}{mrds}; \insertCite{borchers2004;nobrackets}{mrds}). The abundance in the
sampled region is simply \eqn{1/p_1 + 1/p_2 + ... + 1/p_n} where \eqn{p_i}
is the estimated detection probability for the \eqn{i}th detection of
\eqn{n} total observations. It is not strictly a Horvitz-Thompson estimator
@@ -147,7 +146,7 @@ for the delta method variance. If the option \code{areas.supplied} is
If the argument \code{se=TRUE}, standard errors for density and abundance is
computed. Coefficient of variation and log-normal confidence intervals are
constructed using a Satterthwaite approximation for degrees of freedom
-(Buckland et al. 2001 p. 90). The function \code{\link{dht.se}} computes the
+(\insertCite{buckland2001;nobrackets}{mrds} p 90). The function \code{\link{dht.se}} computes the
variance and interval estimates.
The variance has two components:
@@ -157,7 +156,7 @@ The variance has two components:
\item variation in abundance due to random sample selection;
}
The first component (model parameter uncertainty) is computed using a delta
-method estimate of variance (Huggins 1989, 1991, Borchers et al. 1998) in
+method estimate of variance (\insertCite{huggins1989;nobrackets}{mrds}; \insertCite{huggins1991;nobrackets}{mrds}; \insertCite{borchers1998;nobrackets}{mrds}) in
which the first derivatives of the abundance estimator with respect to the
parameters in the detection function are computed numerically (see
\code{\link{DeltaMethod}}).
@@ -168,17 +167,16 @@ estimator used. To begin with there three possible values for \code{varflag}
to calculate encounter rate:
\itemize{
\item \code{0} uses a binomial variance for the number of observations
- (equation 13 of Borchers et al. 1998). This estimator is only useful if the
+ (equation 13 of \insertCite{borchers1998;nobrackets}{mrds}. This estimator is only useful if the
sampled region is the survey region and the objects are not clustered; this
situation will not occur very often;
\item \code{1} uses the encounter rate \eqn{n/L} (objects observed per unit
- transect) from Buckland et al. (2001) pg 78-79 (equation 3.78) for line
- transects (see also Fewster et al, 2009 estimator R2). This variance
+ transect) from \insertCite{buckland2001;textual}{mrds} pg 78-79 (equation 3.78) for line
+ transects (see also \insertCite{fewster2009;nobrackets}{mrds} estimator R2). This variance
estimator is not appropriate if \code{size} or a derivative of \code{size}
is used in the detection function;
\item \code{2} is the default and uses the encounter rate estimator
- \eqn{\hat{N}/L} (estimated abundance per unit transect) suggested by Innes
- et al (2002) and Marques & Buckland (2004).
+ \eqn{\hat{N}/L} (estimated abundance per unit transect) suggested by \insertCite{innes2002;textual}{mrds} and \insertCite{marques2004;textual}{mrds}
}
In general if any covariates are used in the models, the default
@@ -187,13 +185,14 @@ account variability due to covariate effects. If the population is clustered
the mean group size and standard error is also reported.
For options \code{1} and \code{2}, it is then possible to choose one of the
-estimator forms given in Fewster et al (2009) for line transects:
+estimator forms given in \insertCite{fewster2009;textual}{mrds}
+for line transects:
\code{"R2"}, \code{"R3"}, \code{"R4"}, \code{"S1"}, \code{"S2"},
-\code{"O1"}, \code{"O2"} or \code{"O3"} by specifying the \code{ervar=}
-option (default \code{"R2"}). For points, either the \code{"P2"} or
+\code{"O1"}, \code{"O2"} or \code{"O3"} can be used by specifying \code{ervar}
+in the list of options provided by the \code{options} argument
+(default \code{"R2"}). For points, either the \code{"P2"} or
\code{"P3"} estimator can be selected (>=mrds 2.3.0 default \code{"P2"},
-<= mrds 2.2.9 default \code{"P3"}). See \code{\link{varn}} and Fewster
-et al (2009) for further details on these estimators.
+<= mrds 2.2.9 default \code{"P3"}). See \code{\link{varn}} and \insertCite{fewster2009;textual}{mrds} for further details on these estimators.
}
\section{\code{dht} options}{
@@ -215,40 +214,10 @@ et al (2009) for further details on these estimators.
}
\references{
-Borchers, D.L., S.T. Buckland, P.W. Goedhart, E.D. Clarke, and S.L. Hedley.
- 1998. Horvitz-Thompson estimators for double-platform line transect
- surveys. Biometrics 54: 1221-1237.
-
-Borchers, D.L. and K.P. Burnham. General formulation for distance sampling
- pp 10-11 In: Advanced Distance Sampling, eds. S.T. Buckland, D.R.Anderson,
- K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas. Oxford University
- Press.
-
-Buckland, S.T., D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and
- L. Thomas. 2001. Introduction to Distance Sampling: Estimating Abundance
- of Biological Populations. Oxford University Press.
-
-Fewster, R.M., S.T. Buckland, K.P. Burnham, D.L. Borchers, P.E. Jupp, J.L.
- Laake and L. Thomas. 2009. Estimating the encounter rate variance in
- distance sampling. Biometrics 65: 225-236.
-
-Huggins, R.M. 1989. On the statistical analysis of capture experiments.
- Biometrika 76:133-140.
-
-Huggins, R.M. 1991. Some practical aspects of a conditional likelihood
- approach to capture experiments. Biometrics 47: 725-732.
-
-Innes, S., M.P. Heide-Jorgensen, J.L. Laake, K.L. Laidre, H.J. Cleator, P.
- Richard, and R.E.A. Stewart. 2002. Surveys of belugas and narwhals in the
- Canadian High Arctic in 1996. NAMMCO Scientific Publications 4: 169-190.
-
-Marques, F.F.C. and S.T. Buckland. 2004. Covariate models for the detection
- function. In: Advanced Distance Sampling, eds. S.T. Buckland,
- D.R.Anderson, K.P. Burnham, J.L. Laake, D.L. Borchers, and L. Thomas.
- Oxford University Press.
+\insertAllCited{}
}
\seealso{
-print.dht dht.se
+\code{\link{print.dht}} \code{\link{dht.se}}
}
\author{
Jeff Laake, David L Miller
diff --git a/man/dht.se.Rd b/man/dht.se.Rd
index 8050e56e..c0e885d3 100644
--- a/man/dht.se.Rd
+++ b/man/dht.se.Rd
@@ -50,7 +50,7 @@ The variance has two components:
\item variation in abundance due to random sample selection;
}
The first component (model parameter uncertainty) is computed using a delta
-method estimate of variance (Huggins 1989, 1991, Borchers et al. 1998) in
+method estimate of variance (\insertCite{huggins1989;nobrackets}{mrds}; \insertCite{huggins1991;nobrackets}{mrds}; \insertCite{borchers1998;nobrackets}{mrds}) in
which the first derivatives of the abundance estimator with respect to the
parameters in the detection function are computed numerically (see
\code{\link{DeltaMethod}}).
@@ -60,18 +60,19 @@ several ways depending on the form taken for the encounter rate and the
estimator used. To begin with there three possible values for \code{varflag}
to calculate encounter rate:
\itemize{
- \item \code{0} uses a binomial variance for the number of observations
- (equation 13 of Borchers et al. 1998). This estimator is only useful if the
- sampled region is the survey region and the objects are not clustered; this
- situation will not occur very often;
+ \item \code{0} uses a negative binomial variance for the number of
+ observations (equation 13 of \insertCite{borchers1998;nobrackets}{mrds}).
+ This estimator is only
+ useful if the sampled region is the survey region and the objects are not
+ clustered; this situation will not occur very often;
\item \code{1} uses the encounter rate \eqn{n/L} (objects observed per unit
- transect) from Buckland et al. (2001) pg 78-79 (equation 3.78) for line
- transects (see also Fewster et al, 2009 estimator R2). This variance
+ transect) from \insertCite{buckland2001;textual}{mrds} pg 78-79 (equation 3.78) for line
+ transects (see also \insertCite{fewster2009;nobrackets}{mrds} estimator R2). This variance
estimator is not appropriate if \code{size} or a derivative of \code{size}
is used in the detection function;
\item \code{2} is the default and uses the encounter rate estimator
- \eqn{\hat{N}/L} (estimated abundance per unit transect) suggested by Innes
- et al (2002) and Marques & Buckland (2004).
+ \eqn{\hat{N}/L} (estimated abundance per unit transect) suggested by
+ \insertCite{innes2002;textual}{mrds} and \insertCite{marques2004;textual}{mrds}
}
In general if any covariates are used in the models, the default
@@ -80,21 +81,25 @@ account variability due to covariate effects. If the population is clustered
the mean group size and standard error is also reported.
For options \code{1} and \code{2}, it is then possible to choose one of the
-estimator forms given in Fewster et al (2009). For line transects:
+estimator forms given in \insertCite{fewster2009;textual}{mrds}. For line transects:
\code{"R2"}, \code{"R3"}, \code{"R4"}, \code{"S1"}, \code{"S2"},
-\code{"O1"}, \code{"O2"} or \code{"O3"} can be used by specifying the
-\code{ervar=} option (default \code{"R2"}). For points, either the
+\code{"O1"}, \code{"O2"} or \code{"O3"} can be used by specifying \code{ervar}
+in the list of options provided by the \code{options} argument
+(default \code{"R2"}). For points, either the
\code{"P2"} or \code{"P3"} estimator can be selected (>=mrds 2.3.0
default \code{"P2"}, <= mrds 2.2.9 default \code{"P3"}). See
-\code{\link{varn}} and Fewster et al (2009) for further details
-on these estimators.
+\code{\link{varn}} and \insertCite{fewster2009;textual}{mrds}
+ for further details on these estimators.
Exceptions to the above occur if there is only one sample in a stratum. In
-that case it uses Poisson assumption (\eqn{Var(x)=x}) and it assumes a known
-variance so \eqn{z=1.96} is used for critical value. In all other cases the
-degrees of freedom for the \eqn{t}-distribution assumed for the
+this situation, \code{varflag=0} continues to use a negative binomial
+variance while the other options assume a Poisson variance (\eqn{Var(x)=x}),
+where when \code{varflag=1} x is number of detections in the covered region and
+when \code{varflag=2} x is the abundance in the covered region. It also assumes
+a known variance so \eqn{z=1.96} is used for critical value. In all other cases
+the degrees of freedom for the \eqn{t}-distribution assumed for the
log(abundance) or log(density) is based on the Satterthwaite approximation
-(Buckland et al. 2001 pg 90) for the degrees of freedom (df). The df are
+(\insertCite{buckland2001;nobrackets}{mrds} pg 90) for the degrees of freedom (df). The df are
weighted by the squared cv in combining the two sources of variation because
of the assumed log-normal distribution because the components are
multiplicative. For combining df for the sampling variance across regions
@@ -112,7 +117,7 @@ completeness and for anyone expanding the code or using this function in
their own code.
}
\references{
-see \code{\link{dht}}
+\insertAllCited{}
}
\seealso{
\code{\link{dht}}, \code{\link{print.dht}}
diff --git a/man/mcds_dot_exe.Rd b/man/mcds_dot_exe.Rd
index 657ecf35..f9fbd0b0 100644
--- a/man/mcds_dot_exe.Rd
+++ b/man/mcds_dot_exe.Rd
@@ -25,7 +25,7 @@ the `ddf` argument \code{control=list(optimizer='MCDS')}. For completeness, one
choose to use only the R-based algorithm by setting \code{control=list(optimizer='R')}.
For more information and examples comparing the R-based and `MCDS.exe` algorithms,
-see our examples pages at https://examples.distancesampling.org/
+see our examples pages at https://distancesampling.org/resources/vignettes.html
If you are running a non-Windows operating system, you can follow the
instructions below to have `MCDS.exe` run using `wine`.
diff --git a/man/mrds-package.Rd b/man/mrds-package.Rd
index 7a626755..794d4637 100644
--- a/man/mrds-package.Rd
+++ b/man/mrds-package.Rd
@@ -5,26 +5,22 @@
\alias{mrds}
\title{Mark-Recapture Distance Sampling (mrds)}
\description{
-This package implements mark-recapture distance sampling
- methods as described in D.L. Borchers, W. Zucchini and Fewster,
- R.M. (1988), "Mark-recapture models for line transect surveys",
- Biometrics 54: 1207-1220. and Laake, J.L. (1999) "Distance sampling
- with independent observers: Reducing bias from heterogeneity by
- weakening the conditional independence assumption." in Amstrup,
- G.W., Garner, S.C., Laake, J.L., Manly, B.F.J., McDonald, L.L. and
- Robertson, D.G. (eds) "Marine mammal survey and assessment
- methods", Balkema, Rotterdam: 137-148 and Borchers, D.L., Laake,
- J.L., Southwell, C. and Paxton, C.L.G. "Accommodating unmodelled
- heterogeneity in double-observer distance sampling surveys". 2006.
- Biometrics 62:372-378.)
+This package implements both conventional distance sampling
+analysis and mark-recapture distance sampling methods for when
+detection on the transect is not certain. Mark-recapture distance sampling methods are described in
+\insertCite{borchers1988;textual}{mrds}, \insertCite{laake1999;textual}{mrds}
+and \insertCite{borchers2006;textual}{mrds}
}
\details{
Examples of distance sampling analyses are available at
-\url{http://examples.distancesampling.org/}.
+\url{https://distancesampling.org/resources/vignettes.html}.
For help with distance sampling and this package, there is a Google Group
\url{https://groups.google.com/forum/#!forum/distance-sampling}.
}
+\references{
+\insertAllCited{}
+}
\author{
Jeff Laake ,
David Borchers ,
diff --git a/man/varn.Rd b/man/varn.Rd
index c253b31c..8bf7300d 100644
--- a/man/varn.Rd
+++ b/man/varn.Rd
@@ -29,7 +29,7 @@ encounter rate for a set of sample measurements (e.g., line lengths) and
number of observations per sample.
}
\details{
-The choice of type follows the notation of Fewster et al. (2009) in that there are 8 choices of encounter rate variance that can be computed for lines and one for points:
+The choice of type follows the notation of \insertCite{fewster2009;textual}{mrds} in that there are 8 choices of encounter rate variance that can be computed for lines and one for points:
\describe{
\item{\code{R2}}{random line placement with unequal line lengths
@@ -55,9 +55,9 @@ visits per point, design-based estimator}
visits per point, model-based estimator}
}
-Default value is \code{"R2"}, shown in Fewster et al. (2009) to have good
+Default value is \code{"R2"}, shown in \insertCite{fewster2009;textual}{mrds} to have good
performance for completely random designs for lines. For systematic parallel
-line transect designs, Fewster et al. recommend \code{"O2"}. For point
+line transect designs, \insertCite{fewster2009;textual}{mrds} recommend \code{"O2"}. For point
transects the default is \code{"P2"} (but \code{"P3"} is also available).
For the systematic estimators, pairs are assigned in the order they are
@@ -65,14 +65,12 @@ given in the \code{lengths} and \code{groups} vectors.
}
\note{
This function is also used with different calling arguments to compute
-Innes et al variance of the estimated abundances/length rather than
+\insertCite{innes2002;textual}{mrds} variance of the estimated abundances/length rather than
observation encounter rate. The function covn is probably only valid for R3
and R2. Currently, the R2 form is used for all types other than R3.
}
\references{
-Fewster, R.M., S.T. Buckland, K.P. Burnham, D.L. Borchers, P.E.
- Jupp, J.L. Laake and L. Thomas. 2009. Estimating the encounter rate
- variance in distance sampling. Biometrics 65: 225-236.
+\insertAllCited{}
}
\author{
Jeff Laake, David L Miller
diff --git a/tests/testthat/test_dht.R b/tests/testthat/test_dht.R
index 8d8eef6e..202c3e83 100644
--- a/tests/testthat/test_dht.R
+++ b/tests/testthat/test_dht.R
@@ -83,3 +83,78 @@ test_that("dht with various opts after unif fixes", {
expect_true(inherits(dht.result.io.fi, "dht"))
})
+
+
+test_that("warning when only one sample", {
+ library(Distance)
+ data(capercaillie)
+ capercaillie$size <- NULL
+ conversion.factor <- convert_units("meter", "kilometer", "hectare")
+
+ caper.ddf <- ddf(dsmodel = ~cds(key = "hn", formula = ~1),
+ data = capercaillie,
+ meta.data = list(width = 60))
+
+ dht.tables <- Distance::unflatten(capercaillie)
+
+ caper.dht <- expect_warning(dht(caper.ddf,
+ region.table = dht.tables$region.table,
+ sample.table = dht.tables$sample.table,
+ obs.table = dht.tables$obs.table,
+ options = list(convert.units = conversion.factor)), "Only one sample, assuming abundance in the covered region is Poisson. See help on dht.se for recommendations.")
+
+ caper.dht <- expect_warning(dht(caper.ddf,
+ region.table = dht.tables$region.table,
+ sample.table = dht.tables$sample.table,
+ obs.table = dht.tables$obs.table,
+ options = list(convert.units = conversion.factor, varflag = 1)), "Only one sample, assuming variance of n is Poisson. See help on dht.se for recommendations.")
+
+ caper.dht <- expect_no_warning(dht(caper.ddf,
+ region.table = dht.tables$region.table,
+ sample.table = dht.tables$sample.table,
+ obs.table = dht.tables$obs.table,
+ options = list(convert.units = conversion.factor, varflag = 0)))
+
+ # Make up a dataset so that there are multiple strata and some have only one transect
+ # New dataset
+ caper <- capercaillie
+ caper$Region.Label <- "Strata A"
+ caper2.a <- data.frame(Sample.Label = 2, Effort = 120, distance = abs(rnorm(45,0,30)),
+ object = NA, detected = 1, observer = 1, Region.Label = "Strata B",
+ Area = 1472)
+ caper2.b <- data.frame(Sample.Label = 3, Effort = 120, distance = abs(rnorm(45,0,30)),
+ object = NA, detected = 1, observer = 1, Region.Label = "Strata B",
+ Area = 1472)
+ caper2.c <- data.frame(Sample.Label = 4, Effort = 120, distance = abs(rnorm(90,0,30)),
+ object = NA, detected = 1, observer = 1, Region.Label = "Strata C",
+ Area = 1472)
+ caper <- rbind(caper, caper2.a, caper2.b, caper2.c)
+ caper$object <- 1:nrow(caper)
+
+ # Model multi-strata data
+ caper2.ddf <- ddf(dsmodel = ~cds(key = "hn", formula = ~1),
+ data = caper,
+ meta.data = list(width = 60))
+ dht.tables2 <- Distance::unflatten(caper)
+
+ caper2.dht <- expect_warning(dht(caper.ddf,
+ region.table = dht.tables2$region.table,
+ sample.table = dht.tables2$sample.table,
+ obs.table = dht.tables2$obs.table,
+ options = list(convert.units = conversion.factor)),
+ "Only one sample in the following strata: Strata A, Strata C. For these strata, it is assumed abundance in the covered region is Poisson. See help on dht.se.")
+
+ caper2.dht <- expect_warning(dht(caper.ddf,
+ region.table = dht.tables2$region.table,
+ sample.table = dht.tables2$sample.table,
+ obs.table = dht.tables2$obs.table,
+ options = list(convert.units = conversion.factor, varflag = 1)),
+ "Only one sample in the following strata: Strata A, Strata C. For these strata, it is assumed variance of n is Poisson. See help on dht.se.")
+
+ caper2.dht <- expect_no_warning(dht(caper.ddf,
+ region.table = dht.tables2$region.table,
+ sample.table = dht.tables2$sample.table,
+ obs.table = dht.tables2$obs.table,
+ options = list(convert.units = conversion.factor, varflag = 0)))
+
+})
diff --git a/tests/testthat/test_nosightings.R b/tests/testthat/test_nosightings.R
index 5a554d73..4fb48b34 100644
--- a/tests/testthat/test_nosightings.R
+++ b/tests/testthat/test_nosightings.R
@@ -17,8 +17,8 @@ test_that("a dht object with only 0's for estimates is returned", {
#run analyses
ddf.clusters <- ddf(method='ds', dsmodel = ~mcds(key = 'hn', formula = ~scaledtotsize), data = clusters, meta.data = list(width = 5.5))
ddf.no.clusters <- ddf(method='ds', dsmodel = ~mcds(key = 'hn', formula = ~scaledtotsize), data = no.clusters, meta.data = list(width = 5.5))
- cluster.result <- dht(ddf.clusters, region.table, sample.table, obs.table.subset)
- no.cluster.result <- dht(ddf.no.clusters, region.table, sample.table, obs.table.subset)
+ cluster.result <- dht(ddf.clusters, region.table, sample.table, obs.table.subset, options = list(varflag = 0))
+ no.cluster.result <- dht(ddf.no.clusters, region.table, sample.table, obs.table.subset, options = list(varflag = 0))
#run tests
#checks there are NO results for clusters