hong qin <alongway <at> gmail.com> writes:
>
> Hi all,
>
> I have a problem using rdirichlet{gtools}.
> For Dir( a1, a2, ..., a_n), its mode can be found at $( a_i -1)/ (
> \sum_{i}a_i - n)$;
> The means are $a_i / (\sum_{i} a_i ) $;
>
I believe the problem is that the marginal
modes are not equal to the full posterior modes.
(Think about the two-parameter normal distribution
for example; for a sample {x_i}, the mode
of the posterior variance is near sum((x_i-\bar x)^2)/n
while the marginal mode is near sum((x_i-\bar x)^2)/(n-1) ...)
[haven't checked this at all carefully.]
Ben Bolker
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.