plot_kde: plot kernel density estimate and true density for simulated...

View source: R/plot_kde.R

plot_kdeR Documentation

plot kernel density estimate and true density for simulated data

Description

This function plots the kernel density estimate and true density for simulated data.

Usage

plot_kde(
  b,
  mark_recapture_object,
  pdf = FALSE,
  ylim = c(0, 1.5),
  true_values_available = FALSE,
  log = FALSE,
  age_min = 0,
  age_max = NULL,
  draw_boundaries = FALSE,
  title = TRUE
)

Arguments

b

specifies the area of origin for which the plot is drawn. Can be either a origin_name, the corresponding number of the area of origin or "all" for all areas of origin at once.

mark_recapture_object

object of class mark_recapture_object (see mark_recapture_object())

pdf

logical, saves image as pdf-file if TRUE. Defaults to FALSE.

ylim

vector in the form of c(ymin,ymax): limits of the y-axis. Defaults to c(0,3).

true_values_available

logical, use TRUE for simulated data, FALSE for real-world data. Defaults to FALSE.

log

logical, uses log-scale for kernel-density-values if TRUE. Defaults to FALSE.

age_min

numeric. Defaults to 0. If set only data points older than age_min are plotted.

age_max

numeric. If set only data points younger or equal age_max are plotted. Defaults to NULL.

draw_boundaries

logical, country boundaries will be drawn, if TRUE. Defaults to TRUE.

title

logical, if TRUE the name of the area of origin will be added as the title. If FALSE, no title will be added. Defaults to TRUE.

Value

depending on arguments plot as pdf or to plot device

Examples

plot_kde("all", mro1D, true_values_available = TRUE)

SaskiaSchirmer/CONSURE documentation built on Sept. 3, 2023, 8:52 a.m.