On Wed, 11 Oct 2006, Caroline TRUNTZER wrote:
> Dear all,
> I would like to estimate the parameters of a mixture of two beta
> binomial distributions. I saw the function fitdistr from the MASS
> library could be a solution but I have some difficulties. Does anyone
> know how to specify to fitdistr another function as these which are
> predefined? Or is there any other solution to estimate the parameters?
>From the help:
densfun: Either a character string or a function returning a density
evaluated at its first argument.
Just use the 'or' version.
Alternatively, chapter 16 of MASS has several ways to fit a mixture of two
normals, which you could generalize.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595