fitdirichlet: Fits a Dirichlet distribution,

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/helper_functions.R

Description

Fits a Dirichlet distribution based on the parameters of Beta distributions

Usage

1
fitdirichlet(..., plotBeta = FALSE, n.fitted = "opt")

Arguments

...

named vectors with the distribution parameters shape1, shape2

plotBeta

if TRUE a ggplot of the densities are plotted

n.fitted

Method to fit the values

Details

Each one of the arguments is a named vector with values for shape1, shape2. Values from fitbeta are suitable for this. This is a wrap of fitDirichlet

Value

a vector with the parameters for a Dirichlet distribution

Author(s)

John J. Aponte

See Also

fitDirichlet

Examples

1
2
3
4
a <- fitbeta(0.3, 0.2, 0.4)
c <- fitbeta(0.2, 0.1, 0.3)
b <- fitbeta(0.5, 0.4, 0.6)
fitdirichlet(cat1=a,cat2=b,cat3=c)

convdistr documentation built on April 20, 2021, 9:06 a.m.