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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.