plot_pdf: Plot a gamma pdf for post-molt size parameterized by mean and...

View source: R/calcGammaPDFs.R

plot_pdfR Documentation

Plot a gamma pdf for post-molt size parameterized by mean and scale

Description

Function to plot a gamma pdf for post-molt size parameterized by the mean and scale.

Usage

plot_pdf(z_, mnZ, beta)

Arguments

z_
  • premolt size

mnZ
  • mean post-molt size

beta
  • scale parameter

Details

Expands z_ by 0:100 to plot the pdf. Overplots output from pdf_z, pdf_dz, and pdf_gamma to demonstrate equivalency.

The underlying gamma pdf (pdf_gamma) is defined as

pdf(x) = \frac{1}{\Gamma(\alpha) \theta^\alpha} x^(\alpha-1) e^{-\frac{x}{\theta}}

where x is the molt increment (i.e., post-molt size = z_+x), \theta = beta is the scale parameter, and \alpha is the shape parameter such that

\alpha = \frac{\mu}{\theta}

where \mu is the mean molt increment (mnZ-z_).

Value

ggplot2 plot object showing pdf and mean


wStockhausen/tcsamFunctions documentation built on Jan. 28, 2024, 9:01 a.m.