| tab_dir | R Documentation |
Wrappers for Dirichlet distribution over a table
dtab_dir(x, alpha, log = FALSE)
rtab_dir(n, alpha, rev = FALSE)
x |
|
alpha |
table containing parameters |
n |
number of samples |
rev |
logical: should output move through each table fastest? |
This function obtains the Dirichlet density over a contingency table
structure. In other words, suppose that we have a matrix observation
x = (x_{ij}) where \sum_{i,j} x_{i,j} = 1. Then we might choose
to model the vector x as having a Dirichlet distribution, with weights
\alpha_{ij}.
If alpha is a scalar in dtab_dir then it is applied to every entry in x.
dtab_dir(): density function
rtab_dir(): sampling function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.