Find appropriate standard deviations for prior
fit_prior(n_bins, n_draws = 10000, target = 1/n_bins, iterations = 5)
Bins for the Dirichlet distribution
Numbers of samples to use for doing calculation
The goal of the specified prior, e.g. 1 or 1/n_bins
to try, to ensure robust solution. Defaults to 5
A 3-element list consisting of sd
(the approximate standard deviation
in transformed space that gives a similar prior to that specified), value
(the
value of the root mean squared percent error function being minimized),
and convergence
(0 if convergence occurred, error code from
optim()
otherwise)
# \donttest{
# fit model with 3 components / alpha = 1
set.seed(123)
f <- fit_prior(n_bins = 3, n_draws = 1000, target = 1)
# fit model with 20 components / alpha = 1/20
f <- fit_prior(n_bins = 20, n_draws = 1000, target = 1 / 20)
# }