[R] help r error "the integral is probably divergent"

jlmdanderson junliu at mdanderson.org
Wed May 23 00:01:54 CEST 2012


I constructed a likelihood function and then use optim to slove the mle.  It
gave the error like:
> LBCE.est<-optim(c(2,2,1),LBCE,hessian=T)
Error in integrate(LBCE.fc.4.1, lower = 0, upper = Inf) : 
  the integral is probably divergent


However, when I checked the the function of LBCE.fc.4.1, it can generante
values with various pamameters.  
> LBCE.fc.4<-integrate(LBCE.fc.4.1,lower=0,upper=Inf)$value
> LBCE.fc.4
[1] 1.047198

don't know how to check the error and solve the problem.

Please help me !

--
View this message in context: http://r.789695.n4.nabble.com/help-r-error-the-integral-is-probably-divergent-tp4631002.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list