MLE error in R: initial value in ‘vmmin’ is not finite

The value of R becomes zero at some point; it leads to a non-finite value of the function to be minimized and returns an error. Using the argument log=TRUE handles better this issue, see function LL3 below. The following gives some warnings but a result is returned, with parameter estimates close to the true parameters.