Learn R Programming

zoid (version 1.3.1)

Bayesian Zero-and-One Inflated Dirichlet Regression Modelling

Description

Fits Dirichlet regression and zero-and-one inflated Dirichlet regression with Bayesian methods implemented in Stan. These models are sometimes referred to as trinomial mixture models; covariates and overdispersion can optionally be included.

Copy Link

Version

Install

install.packages('zoid')

Monthly Downloads

172

Version

1.3.1

License

GPL (>= 3)

Maintainer

Eric J. Ward

Last Published

January 24th, 2024

Functions in zoid (1.3.1)

get_pars

Extract parameters from fitted model.
zoid-package

The 'zoid' package.
rmspe_calc

Find appropriate prior for a given target distribution.
fit_prior

Find appropriate standard deviations for prior
broken_stick

Random generation of datasets using the dirichlet broken stick method
get_fitted

Extract estimates of predicted latent proportions.
fit_zoid

Fit a trinomial mixture model with Stan
chinook

Data from Satterthwaite, W.H., Ciancio, J., Crandall, E., Palmer-Zwahlen, M.L., Grover, A.M., O’Farrell, M.R., Anson, E.C., Mohr, M.S. & Garza, J.C. (2015). Stock composition and ocean spatial distribution from California recreational chinook salmon fisheries using genetic stock identification. Fisheries Research, 170, 166–178. The data genetic data collected from port-based sampling of recreationally-landed Chinook salmon in California from 1998-2002.
parse_re_formula

Fit a trinomial mixture model that optionally includes covariates to estimate effects of factor or continuous variables on proportions.
fit_dirichlet

Extract point estimates of compositions from fitted model.
coddiet

Data from Magnussen, E. 2011. Food and feeding habits of cod (Gadus morhua) on the Faroe Bank. – ICES Journal of Marine Science, 68: 1909–1917. The data here are Table 3 from the paper, with sample proportions (columns w) multiplied by total weight to yield total grams (g) for each sample-diet item combination. Dashes have been replaced with 0s.