Re: Question about multimodal parameter estimation
- From: David Winsemius <doe_snot@xxxxxxxxxxx>
- Date: Sun, 28 May 2006 11:25:35 -0500
"Robert Dodier" <robert.dodier@xxxxxxxxx> wrote in
news:1148789059.171313.130550@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
nelson wrote:
i have some data and looking at them i suppose are generated by a
gamma
distribution plus a normal distribution, in fact the look like this
figure:
*
**
**
***
***
**** ****
******* ********
******************************
(i hope you can read it :) )
How can i estimate the parameter of the distribution of my data? I
read about MLE, but i can't find example that uses multimodal
ditributions...
What you want is to estimate a mixture density, in this case a density
p (x) = a_1 p_1 (x) + a_2 p_2 (x) where p_1 and p_2 and gamma and
normal
density functions, respectively, and a_1 and a_2 are positive factors
(the so-called mixing weights) such that a_1 + a_2 = 1.
You can do direct MLE on p, the free parameters being a_1 and a_2
in addition to the parameters for the gamma and normal densities.
There is also the so-called expectation-maximization algorithm,
which is very simply to implement if you already have MLE implemented
for each mixture component.
Check and see if the R project (http://www.r-project.org)
already has something for this problem. Try asking on the r-help
mailing list.
That looks promising. The r-help mailing list encourages submitters to
first search the available resources.
Here is a transcript of an R session which also illustrates, by way of an
error, the need to use the library function after installing an R package:
help.search("mixtures") #which returned info pointing to flexmix package<snipped info specific to the chosen mirror and a success message
chooseCRANmirror()
utils:::menuInstallPkgs()
help(flexmix)No documentation for 'flexmix' in specified packages and libraries:
you could try 'help.search("flexmix")'
library(flexmix)-----end session transcript----------
help(flexmix)
help(FLXglm)
This is the beginning of the FLXglm documentation:
FLXglm package:flexmix R Documentation
FlexMix Interface to Generalized Linear Models
Description:
This is the main driver for FlexMix interfacing the 'glm' family
of models.
Usage:
FLXglm(formula = . ~ .,
family = c("gaussian", "binomial", "poisson", "Gamma"),
offset = NULL)
<rest of FLXglm help file elided>
At the end of the flexmix help file there was an example:
-----
## now we fit a model with one Gaussian response and one Poisson
## response. Note that the formulas inside the call to FLXglm are
## relative to the overall model formula.
ex2 <- flexmix(yn~x, data=NPreg, k=2,
model=list(FLXglm(yn~.+I(x^2)),
FLXglm(yp~., family="poisson")))
-----
If those data were count data, the Poisson model might be reasonable as
well.
--
David Winsemius
.
- References:
- Question about multimodal parameter estimation
- From: nelson
- Re: Question about multimodal parameter estimation
- From: Robert Dodier
- Question about multimodal parameter estimation
- Prev by Date: Re: Chi-Squared Test (goodness of fit) confidence levels
- Next by Date: Re: Correlation coefficient
- Previous by thread: Re: Question about multimodal parameter estimation
- Next by thread: What discontinuities? WHAT?
- Index(es):
Relevant Pages
|
Loading