Draw from a dirichlet distribution based on number of counts in transition. Adapted from brms::rdirichlet
rdirichlet.Rd
Draw from a dirichlet distribution based on number of counts in transition. Adapted from brms::rdirichlet
Examples
rdirichlet(n=1,alpha= matrix(c(1251, 0, 350, 731),2,2))
#> [,1] [,2]
#> [1,] 0.7961308 0.2038692
#> [2,] 0.0000000 1.0000000
rdirichlet(n=2,alpha= matrix(c(1251, 0, 350, 731),2,2))
#> [[1]]
#> [,1] [,2]
#> [1,] 0.7849987 0.2150013
#> [2,] 0.0000000 1.0000000
#>
#> [[2]]
#> [,1] [,2]
#> [1,] 0.7550121 0.2449879
#> [2,] 0.0000000 1.0000000
#>