Learn R Programming

mrds (version 2.3.0)

plot_cond: Plot conditional detection function from distance sampling model

Description

Plot proportion of observations detected within distance intervals (for conditional detection functions) to compare visually the fitted model and data. Internal function called by plot methods.

Usage

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,
  ...
)

Arguments

obs

observer code

xmat

processed data

gxvalues

detection function values for each observation

model

fitted model from ddf

nc

number of equal-width bins for histogram

breaks

user define breakpoints

finebr

fine break values over which line is averaged

showpoints

logical variable; if TRUE plots predicted value for each observation

showlines

logical variable; if TRUE plots average predicted value line

maintitle

main title line for each plot

ylim

range of y axis (default c(0,1))

angle

shading angle for hatching

density

shading density for hatching

col

plotting colour

jitter

scaling option for plotting points. Jitter is applied to points by multiplying the fitted value by a random draw from a normal distribution with mean 1 and sd jitter.

xlab

label for x-axis

ylab

label for y-axis

subtitle

if TRUE, shows plot type as sub-title

...

other graphical parameters, passed to the plotting functions (plot, hist, lines, points, etc)

Author

Jeff Laake, Jon Bishop, David Borchers