[R] MLE, precision

From: boshao zhang <zboshao_at_yahoo.com>
Date: Wed 14 Jul 2004 - 00:25:35 EST


Hi, everyone

I am trying to estimate 3 parameters for my survival function. It's very complicated. The negative loglikelihood function is:

l<- function(m1,m2,b) -sum( d*( log(m1) + log(m2) + log(1- exp(-(b + m2)*t)) ) + (m1/b - d)*log(m2 + b*exp(-(b + m2)*t) ) + m1*t - m1/b*log(b+m2) )

here d and t are given, "sum" means sum over these two vairables.
the parameters are assumed small, m1, m2 in thousandth, m2 in millionth.

I used the function "nlm" to estimate m1,m2,b. But the result is very bad. you can get more than 50 warnings, most of them are about "negative infinity"in log. And the results are initial value dependent, or you will get nothing when you choose some values.

So I tried brutal force, i.e. evaluate the values of grid point. It works well. Also, you can get the correct answer of log(1e-12).

My questions are:
 What is the precision of a variable in R?  How to specify the constraint interval of parameters in nlm? I tried lower, upper, it doesn't work. any advice on MLE is appreciated.

Thank you.

Boshao



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 14 00:32:16 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 02:35:50 EST