Anthony A. Pezzola
2009-Jun-23 15:06 UTC
[R] nlme package - unbalanced data and Croissant (2008)
Dear listserv members, In Croissant (2008) “Panel Data Econometrics in R: The plm Package” the authors seem to indicate that the nlme package for R cannot correctly handle unbalanced panel data: “Moreover, economic panel datasets often happen to be unbalanced (i.e., they have a different number of observations between groups), which case needs some adaptation to the methods and is not compatible with those in nlme” (pg. 2, Croissant 2008). However in Pinhiero and Bates (2000, pg 24) the authors state that the lme() does generate sensible Ml and REML estimates for unbalanced data. I would greatly appreciate any insight into how and when the nlme package or functions within it do not produce sensible / accurate results. Sincerely, Anthony Pezzola ----------------------------------------------- Anthony A. Pezzola apezzola@uc.cl (02) 354-7823 Profesor de Ciencia Política Instituto de Ciencia Política Pontificia Universidad Católica de Chile Santiago de Chile We looked at the equations on the whiteboard. After awhile, I finally asked if they made sense to him and he said no, "I think they''re just there to keep the riffraff out." [[alternative HTML version deleted]]
Millo Giovanni
2009-Jun-24 11:07 UTC
[R] nlme package - unbalanced data and Croissant (2008)
Dear Anthony: please please! I didn't say 'nlme' "[does] not produce sensible / accurate results", nor did I ever mean it. The sentence you quote is an unfortunate mistake on my part, and like most unfortunate mistakes it first went unnoticed and then ended up in a most visible part of the paper. I originally meant to say that 'nlme' doesn't want missing values, and ended up saying that it doesn't accept unbalanced panels, which is false but is also different from saying that it produces inaccurate results. Besides, in the remainder of the paper we use (and acknowledge) a lot of functionality from 'nlme' on unbalanced panels as well (e.g. the Baltagi and Li test). For the reasons why there is a 'plm' package (simple models, semiparametric methods, LS-GLS based, sampling problems typical of econometrics) next to 'nlme' (more complex specifications possible, parametric, ML-based) please see section 7 of the same paper. For an example of how an econometrician may misunderstand mixed models, well I think I just gave you one. I knew I was stepping into a minefield as I spoke of other people's work but I still consider this better than keeping panel data econometricians and mixed models statisticians on two separate tracks, ignoring all the functionality that was "on the other side". My apologies to the authors of 'nlme' (and 'lme4' as well). I owe you a beer, payable at the useR! in two weeks if you like. Best, Giovanni ##### original message ####### ------------------------------ Message: 61 Date: Tue, 23 Jun 2009 11:06:54 -0400 From: "Anthony A. Pezzola" <apezzola at uc.cl> Subject: [R] nlme package - unbalanced data and Croissant (2008) To: <r-help at r-project.org> Message-ID: <965A9DA1A12C41E7A0B4FD723B346280 at usuario> Content-Type: text/plain Dear listserv members, In Croissant (2008) "Panel Data Econometrics in R: The plm Package" the authors seem to indicate that the nlme package for R cannot correctly handle unbalanced panel data: "Moreover, economic panel datasets often happen to be unbalanced (i.e., they have a different number of observations between groups), which case needs some adaptation to the methods and is not compatible with those in nlme" (pg. 2, Croissant 2008). However in Pinhiero and Bates (2000, pg 24) the authors state that the lme() does generate sensible Ml and REML estimates for unbalanced data. I would greatly appreciate any insight into how and when the nlme package or functions within it do not produce sensible / accurate results. Sincerely, Anthony Pezzola ----------------------------------------------- Anthony A. Pezzola apezzola at uc.cl (02) 354-7823 Profesor de Ciencia Pol?tica Instituto de Ciencia Pol?tica Pontificia Universidad Cat?lica de Chile Santiago de Chile ######## end original message ########## Giovanni Millo Research Dept., Assicurazioni Generali SpA Via Machiavelli 4, 34132 Trieste (Italy) tel. +39 040 671184 fax +39 040 671160 Ai sensi del D.Lgs. 196/2003 si precisa che le informazi...{{dropped:13}}