On Sat, Jul 27, 2024 at 7:01 AM Riccardo (Jack) Lucchetti
<p002264(a)staff.univpm.it> wrote:
 While browsing lib/src/random.c, I noticed that we've had the "dir"
 parameter to mrandgen for a LOOOOOOOOONG time (if my reconstruction is
 correct, since 2022a). For example
 <hansl>
 matrix D = mrandgen("dir", {0.4, 1.2, 0.8}, 16)
 </hansl>
 It would seem that we forgot to document our ability to draw from a
 Dirichlet distribution; the Changelog is silent on this too.
 I can't find any email exchange on this subject. Does anyone remember if
 this was a conscious choice (maybe, insufficient testing), or did we
 just forget? 
I found the following message that I sent on Dec 16, 2021, which kinda
suggests that it wasn't sufficiently tested:
<quote>
I've added Dirichlet ("dir") to the options for mrandgen(), but I'm
not sure I've got this right; comments are welcome.
A suitable call is:
<hansl>
matrix alpha = {0.5, 1, 2, 4}
matrix D = mrandgen("dir", alpha, 10)
print D
</hansl>
In this example you get back a 10 x 4 matrix, with the intent that
each row should be a drawing from the Dirichlet distribution of
order 4 with parameter vector alpha. The code can be found in
gretl_rand_dirichlet(), in lib/src/random.c.
</quote>
Allin