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))
}



optimx(fn=LL2,  par=c(.01,325,.8),y=y, lower=c(.00001,.00001,.00001),upper = 
c(Inf, Inf,Inf),control=list(all.methods=TRUE))



# Look at the solution found by `nlminb' and `nmkb'. This is the optimal one.  
This log-likelihood is larger than that of mle2 and other optimizers in optimx.



If this solution is not what you are looking for, your problem may be poorly 
scaled.  First, make sure that the likelihood is coded correctly.  If it is 
correct, then you may need to improve the scaling of the problem.





Hope this is helpful,

Ravi



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to