Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

check.mono

Check that a detection function is monotone


Description

Check that a fitted detection function is monotone non-increasing.

Usage

check.mono(
  df,
  strict = TRUE,
  n.pts = 100,
  tolerance = 1e-06,
  plot = FALSE,
  max.plots = 6
)

Arguments

df

a fitted detection function object

strict

if TRUE (default) the detection function must be "strictly" monotone, that is that (g(x[i])<=g(x[i-1])) over the whole range (left to right truncation points).

n.pts

number of equally-spaced points between left and right truncation at which to evaluate the detection function (default 100)

tolerance

numerical tolerance for monotonicity checks (default 1e-6)

plot

plot a diagnostic highlighting the non-monotonic areas (default FALSE)

max.plots

when plot=TRUE, what is the maximum number of plots of non-monotone covariate combinations that should be plotted? Plotted combinations are a random sample of the non-monotonic subset of evaluations. No effect for non-covariate models.

Details

Evaluates a series of points over the range of the detection function (left to right truncation) then determines:

1. If the detection function is always less than or equal to its value at the left truncation (g(x)<=g(left), or usually g(x)<=g(0)). 2. (Optionally) The detection function is always monotone decreasing (g(x[i])<=g(x[i-1])). This check is only performed when strict=TRUE (the default). 3. The detection function is never less than 0 (g(x)>=0). 4. The detection function is never greater than 1 (g(x)<=1).

For models with covariates in the scale parameter of the detection function is evaluated at all observed covariate combinations.

Currently covariates in the shape parameter are not supported.

Value

TRUE if the detection function is monotone, FALSE if it's not. warnings are issued to warn the user that the function is non-monotonic.

Author(s)

David L. Miller


mrds

Mark-Recapture Distance Sampling

v2.2.4
GPL (>= 2)
Authors
Jeff Laake <jeff.laake@noaa.gov>, David Borchers <dlb@st-and.ac.uk>, Len Thomas <len.thomas@st-and.ac.uk>, David Miller <dave@ninepointeightone.net> and Jon Bishop
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.