[R] MLE for two random variables
Carsten Steinhoff
carsten.steinhoff at gmx.de
Sat Mar 12 17:48:19 CET 2005
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
More information about the R-help
mailing list