views:

526

answers:

1

I'm looking for a an R package which can be used to train a Dirichlet prior from counts data. I'm asking for a colleague who's using R, and don't use it myself, so I'm not too sure how to look for packages. It's a bit hard to search for, because "R" is such a nonspecific search string. There doesn't seem to be anything on CRAN, but are there any other places to look?

+1  A: 

I've only come across both R and the Dirichlet distribution in passing, so I hope I'm not too much off the mark.

This mailing list message seems to answer your question:

Scrolling through the results of RSiteSearch("dirichlet") suggests some useful tools in the VGAM package. The gtools package and MCMC packages also have ddirichlet() functions that you could use to construct a (negative log) likelihood function and optimize with optim/nlmin/etc.

The deal, DPpackage and mix packages also may or may not provide what you need.

Then again, these are all still CRAN packages, so I'm not sure if you already found these and found them unsuitable.

As for searching for R, the R project site itself already provides a few links on its search page.

mercator
I'm rather curious myself now. Is it the dirichlet() function in the VGAM package?
mercator
Thanks, this was very helpful. I think it's probably dirmul in the VGAM package.http://finzi.psych.upenn.edu/R/library/VGAM/html/dirmul.old.html
fivebells
Thanks... Ooh, HTML documentation. I couldn't find that before.
mercator