Description Usage Arguments Value See Also Examples
View source: R/Categorical_Inference.r
Calculate probability masses for integer valued Categorical random samples. For a random variable x, the density function of categorical distribution is defined as
prod_{k in 1:K} p_k^{I(x=k)}
Where K is the number of unique values.
1 | dCategorical(x, p)
|
x |
integer, categorical samples. |
p |
numeric, probabilities. |
A numeric vector of the same length of 'x'.
1 | dCategorical(x=c(1L,2L,1L),p=c(1,2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.