[R] MLE for two random variables

From: Carsten Steinhoff <carsten.steinhoff_at_gmx.de>
Date: Sun 13 Mar 2005 - 03:48:19 EST


Hello,

I've the following setting:

(1) Data from a source without truncation (x)

(2) Data from an other source with left-truncation at threshold u (xu)

I have to fit a model on these these two sources, thereby I assume that both are "drawn" from the same distribution (eg lognormal). In a MLE I would sum the densities and maximize. The R-Function could be:

function(x,xu,u,mu,sigma)
dlnorm(x,mu,sigma)+(dlnorm(xu,mu,sigma)/(plnorm(u,mu,sigma)))

So I tried to use the function FITDISTR for the MLE. But unfortunately it only accepts ONE random variable.
Then I tried to combine x and xu in a vector, but that doesn't work, too, because the length of x and xu differs.

Does anybody has a solution for my problem?

Thanks in advance.

Carsten



R-help@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 Received on Mon Mar 14 10:32:49 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:46 EST