help r error "the integral is probably divergent"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

help r error "the integral is probably divergent"

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 !