multivariate_multinomial_postpred: Sample from the posterior predictive of a multivariate...

View source: R/popsim_superfast.R

multivariate_multinomial_postpredR Documentation

Sample from the posterior predictive of a multivariate multinomial distribution

Description

\loadmathjax

multivariate_multinomial_postpred samples from the posterior predictive distribution given an observation from a multivariate multinomial distribution and a prior on the probabilities of each category.

Usage

multivariate_multinomial_postpred(obs, N, nsamples, priors)

Arguments

obs

a data.frame representing the observed sample.

N

the size of the predictive samples to create.

nsamples

the number of predictive samples to create.

priors

either a list of named numeric vectors containing the Dirichlet parameters for individual priors on each variable or an array describing the joint Dirichlet prior. Can also be a single number, which is interpreted as a flat joint prior with the given height. See vignette("mmpp", package = "lemur.pack") for an example of setting priors.

Details

I will complete this later!


ctgrubb/lemur.pack documentation built on May 7, 2023, 4:13 a.m.