[R] Likelihood of multiple random processes

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Nov 2 12:19:02 CET 2006


Do you know which observations came from which process (you do in your 
example, but it whatever it is supposed to emulate)?  If not, you want to 
estimate a mixture distribution.  This is covered in chapter 16 of the 
book fitdistr() supports as well as in several CRAN packages.

On Thu, 2 Nov 2006, Dan Bebber wrote:

> Is there a method in R for estimating the likelihood that two (or more)
> random variables generated a univariate sample?
>
> For a single random variable there is:
> x <- c(rnorm(20,10,3),rnorm(20,20,5))
> plot(density(x))
> logLik(fitdistr(x,"normal"))
>
> Is there a way of of specifying that more than one normal distribution
> should be fitted?
> If so, then I suppose that the AIC of the two models could be calculated.
>
> Many thanks,
> Dan Bebber
>
> Department of Plant Sciences
> University of Oxford
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
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



More information about the R-help mailing list