[R] Estimates at each iteration of optim()?
basu.15 at osu.edu
Mon Apr 23 17:34:12 CEST 2007
I read the description of the trace control parameter in ?optim and then also looked at the examples given at the end. In one of the examples I found that they had used "trace=TRUE" with the method "SANN". I am using the method "BFGS" and I tried using "trace=TRUE" too but I did not get the parameter estimates at each iteration. As you say, it might be method dependent. I tried reading the source code for "optim" but could not find out what I was looking for. Hence, I was wondering if anyone could tell me what option to use with the method "BFGS" to get the parameter estimates at each iteration of the optimization.
----- Original Message -----
From: Peter Dalgaard <p.dalgaard at biostat.ku.dk>
Date: Monday, April 23, 2007 2:46 am
Subject: Re: [R] Estimates at each iteration of optim()?
> DEEPANKAR BASU wrote:
> > I am trying to maximise a complicated loglikelihood function with
> the "optim" command. Is there some way to get to know the estiamtes
> at each iteration? When I put "control=list(trace=TRUE)" as an
> option in "optim", I just got the initial and final values of the
> loglikelihood, number of iterations and whether the routine has
> converged or not. I need to know the estimate values at each
> It might help if you actually _read_ the description of the trace
> control parameter (hint: it is not an on/off switch) in ?optim...
> as it says, this is method dependent, so you may have to study the
> source code.
> > Deepankar
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > 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.
More information about the R-help