Re: [R] maximum likelihood convergence reproducing Anderson Blundell 1982 Econometrica R vs Stata

From: peter dalgaard <>
Date: Mon, 09 May 2011 09:04:05 +0200

On May 9, 2011, at 06:07 , Alex Olssen wrote:

> Thank you all for your input.
> Unfortunately my problem is not yet resolved. Before I respond to
> individual comments I make a clarification:
> In Stata, using the same likelihood function as above, I can reproduce
> EXACTLY (to 3 decimal places or more, which is exactly considering I
> am using different software) the results from model 8 of the paper.
> I take this as an indication that I am using the same likelihood
> function as the authors, and that it does indeed work.
> The reason I am trying to estimate the model in R is because while
> Stata reproduces model 8 perfectly it has convergence
> difficulties for some of the other models.
> Peter Dalgaard,
> "Better starting values would help. In this case, almost too good
> values are available:
> start <- c(coef(lm(y1~x1+x2+x3)), coef(lm(y2~x1+x2+x3)))
> which appears to be the _exact_ solution."
> Thanks for the suggestion. Using these starting values produces the
> exact estimate that Dave Fournier emailed me.
> If these are the exact solution then why did the author publish
> different answers which are completely reproducible in
> Stata and Tsp?

Ahem! You might get us interested in your problem, but not to the level that we are going to install Stata and Tsp and actually dig out and study the scientific paper you are talking about. Please cite the results and explain the differences.

Are we maximizing over the same parameter space? You say that the estimates from the paper gives a log-likelihood of 54.04, but the exact solution clocked in at 76.74, which in my book is rather larger.



> Ravi,
> Thanks for introducing optimx to me, I am new to R. I completely
> agree that you can get higher log-likelihood values
> than what those obtained with optim and the starting values suggested
> by Peter. In fact, in Stata, when I reproduce
> the results of model 8 to more than 3 dp I get a log-likelihood of 54.039139.
> Furthermore if I estimate model 8 without symmetry imposed on the
> system I reproduce the Likelihood Ratio reported
> in the paper to 3 decimal places as well, suggesting that the
> log-likelihoods I am reporting differ from those in the paper
> only due to a constant.
> Thanks for your comments,
> I am still highly interested in knowing why the results of the
> optimisation in R are so different to those in Stata?
> I might try making my convergence requirements more stringent.
> Kind regards,
> Alex

Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email:  Priv:

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 09 May 2011 - 07:05:56 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 09 May 2011 - 10:50:05 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive