[R] A Question about MLE in R
pd@|gd @end|ng |rom gm@||@com
Wed Jul 22 12:06:00 CEST 2020
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 it that logLik is really the _negative_ log-likelihood function, right? Otherwise, the problem could be that you are minimizing, not maximizing.)
> On 22 Jul 2020, at 09:06 , Zixuan Qi <zixuan.qi using duke.edu> wrote:
> I encounter a problem. I use optim() function in R to estimate likelihood
> function and the method is SANN in the optim function.
> out <-
> However, I find that each time I run the program, I will get different
> values of parameters. My initial values are same, but the number of
> iterations has reached the maximum limit. I expanded the number of
> iterations to 5 million, but it�s still wrong.
> I want to know what I should do. Is anyone willing to help me? Thanks so
> [[alternative HTML version deleted]]
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Office: A 4.23
Email: pd.mes using cbs.dk Priv: PDalgd using gmail.com
More information about the R-help