All functions 


Random generation of datasets using the dirichlet broken stick method 

Data from Satterthwaite, W.H., Ciancio, J., Crandall, E., PalmerZwahlen, 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 portbased sampling of recreationallylanded Chinook salmon in California from 19982002. 

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 samplediet item combination. Dashes have been replaced with 0s. 

Find appropriate standard deviations for prior 

Fit a trinomial mixture model with Stan 

Extract estimates of predicted latent proportions. 

Extract parameters from fitted model. 

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

Find appropriate prior for a given target distribution. 

The 'zoid' package. 