[R] Likelihood of multiple random processes

Dan Bebber danbebber at forestecology.co.uk
Thu Nov 2 11:44:19 CET 2006


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



More information about the R-help mailing list