[R] problem with mode of marginal distriubtion of rdirichlet{gtools}

Ben Bolker bolker at zoo.ufl.edu
Sun Oct 22 00:32:29 CEST 2006


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



More information about the R-help mailing list