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

From: peter dalgaard <PDalgd_at_gmail.com>
Date: Mon, 09 May 2011 14:55:48 +0200

On May 9, 2011, at 13:40 , Alex Olssen wrote:

> Hi Mike,
> 
> Mike said
> "is this it, page 1559?"
> 
> That is the front page yes, page 15*6*9 has the table, of which the
> model labelled 18s is the one I replicated.
> 

However, the R code you posted will at best replicate model 18. For 18s, you need to impose symmetry conditions.

The fit of model 18 does seem to give similar results to those in Table II, but not exactly.

Even more puzzling, if you start from the published coefficients, nlm seems to be getting stuck at a non-concave point of the negative likelihood.

> nlm(p=ab, f=lnl, hessian=TRUE, y1=y1, y2=y2, + x1=x1, x2=x2, x3=x3, gradtol=1e-15)
$minimum
[1] -76.60681

$estimate
[1] -0.64701504 0.27284992 -0.13713084 -0.07205753 1.28200342 -0.24596766 0.13502787 0.06001181

$gradient
[1] 2.782425 12.648629 -1.830244 -29.296795 -2.577734 -4.954042 1.495517 11.016190

$hessian

          [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 197435.9 1977197 1741724 805132.7 135821.9 1358013 1196714 553746
[2,] 1977197.4 19712076 17383474 8064540.2 1359856.0 13527720 11935305 5544903
[3,] 1741724.0 17383474 15336008 7121047.7 1197868.5 11929667 10529439 4896008
[4,] 805132.7 8064540 7121048 3315377.8 553733.1 5534923 4889523 2279404
[5,] 135821.9 1359856 1197868 553733.1 271511.7 2713733 2391332 1106572
[6,] 1358012.7 13527720 11929667 5534923.0 2713732.9 26955636 23784039 11054174
[7,] 1196714.3 11935305 10529439 4889522.6 2391331.9 23784039 20993413 9765022
[8,] 553746.0 5544903 4896008 2279404.1 1106571.9 11054174 9765022 4552693

$code
[1] 2

$iterations
[1] 4

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes_at_cbs.dk  Priv: PDalgd_at_gmail.com

______________________________________________
R-help_at_r-project.org 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.
Received on Mon 09 May 2011 - 13:04:28 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 - 13:10:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive