mizerStomach: Using stomach content data in mizer
Source:R/mizerStomach-package.R
mizerStomach-package.RdFits distributions to predator/prey body-mass ratios observed in stomach contents and converts supported distributions to feeding-kernel parameters for mizer size-spectrum models.
Details
The package works with \(l=\log(w_{pred}/w_{prey})\). A typical workflow is to:
standardize observations with
validate_ppmr_data();inspect their dependence on predator size with
plot_ppmr_violins();fit normal, smoothly truncated-exponential, or Gaussian-mixture densities with
fit_log_ppmr();diagnose number- and biomass-weighted fits with
plot_log_ppmr_fit(); andtransfer a fitted distribution to a mizer model with
set_kernel_params().
Fit objects retain the exponent of prey mass used as an observation weight.
transform_fit() uses family-specific parameter updates to express a fit at
another weighting without fitting the raw observations again.
Vignettes
Read the package articles in this order:
vignette("mizerStomach", package = "mizerStomach")gives a complete introductory workflow.vignette("density_functions", package = "mizerStomach")explains weighting and density transformations.vignette("PPMR_distributions", package = "mizerStomach")covers data limitations, family choice, and fit diagnostics.vignette("feeding_kernels", package = "mizerStomach")derives and demonstrates the mizer feeding-kernel conversion.