Skip to content
Prev 65815 / 398506 Next

MLE for two random variables

Just to make sure, do you have any information on events when xu > 
u, i.e. do you know how many such events and you know u for those 
events?  If yes, then that's called "censoring", not truncating.  For 
that, the survival package seems pretty good.  I found the information 
in Venables and Ripley, Modern Applied Statistics with S, helpful. 

      If you don't have data when xu > u, do you know u or must that be 
estimated also?  In either case, I would likely use "optim", though 
"nlm" might work also.  If I knew u and didn't have to estimate it, then 
I might combine the data as follows: 

XU <- data.frame(x=c(x,xu),
     u=c(rep(0, length(x)), rep(u, length(xu))))

      If I needed to estimate u, I'd modify this as follows: 

XU. <- data.frame(x=c(x,xu),
     u=c(rep(0, length(x)), rep(1, length(xu))))

      Then I'd write a function to compute, e.g, dev = 
(-2)*log(likelihood) and use optim or nlm to minimize this.  If I had to 
estimate u, I might actually try to estimate ln.up = log(u-max(xu));  I 
may or may not get better numerical convergence using this than trying 
to estimate u directly. 

      hope this helps. 
      spencer graves
Carsten Steinhoff wrote: