Re: [R] A Question about MLE in R

2020-07-24 Thread Andrew Robinson
Hi Ravi, that's an interesting claim and N-M. Can you provide any reading matter to support it? Cheers, Andrew -- Andrew Robinson Director, CEBRA and Professor of Biosecurity, School/s of BioSciences and Mathematics & Statistics University of Melbourne, VIC 3010 Australia Tel: (+61) 0403 138

Re: [R] A Question about MLE in R

2020-07-24 Thread Andrew Robinson
Hi John, I wonder if you can suggest some reading material on that topic? A cursory search of the net doesn't uncover anything obvious. Andrew -- Andrew Robinson Director, CEBRA and Professor of Biosecurity, School/s of BioSciences and Mathematics & Statistics University of Melbourne, VIC

Re: [R] A Question about MLE in R

2020-07-24 Thread Ravi Varadhan
I agree with John that SANN should be removed from optim. More importantly, the default choice of optimizer in optim should be changed from "Nelder-Mead" to "BFGS." Nelder-Mead is a bad choice for the most commonly encountered optimization problems in statistics. I really do not see a good

Re: [R] A Question about MLE in R

2020-07-22 Thread J C Nash
SANN is almost NEVER the tool to use. I've given up trying to get it removed from optim(), and will soon give up on telling folk not to use it. JN On 2020-07-22 3:06 a.m., Zixuan Qi wrote: > Hi, > > I encounter a problem. I use optim() function in R to estimate likelihood > function and the

Re: [R] A Question about MLE in R

2020-07-22 Thread peter dalgaard
Simulated annealing is a probabilistic method and will do things like that. You should probably read an introduction to the method, e.g. the Wikipedia page. Not too unlikely, you really want to use one of the other methods in optim() (or better still optimr from the optimx package). (I take

[R] A Question about MLE in R

2020-07-22 Thread Zixuan Qi
Hi, I encounter a problem. I use optim() function in R to estimate likelihood function and the method is SANN in the optim function. out <- optim(parm,logLik,method='SANN',hessian=T,control=list(maxit=500)) However, I find that each time I run the program, I will get different values of