Re: [R] R 3.1.2 mle2() function on Windows 7 Error and multiple solutions

2015-01-15 Thread Ravi Varadhan
A more important point that want to make is that I find few people taking advantage of the "comparative evaluation" or benchmarking ability of optimx. There is no "uniformly best" optimizer for all problems. Different ones turn out to perform better for different problems and it is quite diffi

Re: [R] R 3.1.2 mle2() function on Windows 7 Error and multiple solutions

2015-01-15 Thread Ravi Varadhan
Hi, I tried your problem with optimx package. I found a better solution than that found by mle2. ?library(optimx) # the objective function needs to be re-written LL2 <- function(par,y) { lambda <- par[1] alpha <- par[2] beta <- par[3] R = Nweibull(y,lambda,alpha,beta) -sum(log(R)) }

Re: [R] R 3.1.2 mle2() function on Windows 7 Error and multiple solutions

2015-01-15 Thread Ben Bolker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 For what it's worth, you can use either nlminb (directly) or optimx within the mle2 wrapper by specifying the 'optimizer' parameter ... this gives you flexibility in optimization along with the convenience of mle2 (likelihood ratio tests via anova(),