[R] question on package plm

Millo Giovanni Giovanni_Millo at Generali.com
Mon Mar 11 09:57:09 CET 2013


Hello.

Sorry, as already explained on this list this isn't a problem with the software but with the data. Negative variance estimates may happen, most likely when the model is misspecified: see Wooldridge, "Econometric analysis of cross-section and panel data", p. 261.

Hence, there is no real "solution". In Stata, if I remember correctly, zeros are (silently?) substituted for the negative values, in R we chose not to do this, issuing an error instead: in fact, substituting zeros for individual components amounts exactly to estimating a "pooling" model, which you can easily do.

Best,
Giovanni

Giovanni Millo, PhD
Research Dept.,
Assicurazioni Generali SpA
Via Machiavelli 3,
34132 Trieste (Italy)
tel. +39 040 671184
fax  +39 040 671160

-------------- original message ----------------

Message: 65
Date: Thu, 7 Mar 2013 16:50:43 -0800 (PST)
From: Wei-han Liu <weihanliu2002 at yahoo.com>
To: "r-help at r-project.org" <r-help at r-project.org>
Subject: [R] question on package plm
Message-ID:
	<1362703843.84094.YahooMailNeo at web163805.mail.gq1.yahoo.com>
Content-Type: text/plain

 Hi R users:

 I am using the plm package for linear panel data analysis but encountered the following message when I try plm function to estimate an random model with individual effect.

 data.re.ind <- plm(X.RETURN. ~ IOB + IOBS,data=E,model="random",effect = "individual")
 Error in swar(object, data, effect) :  the estimated variance of the individual effect is negative

 I have tried the other estimation methods ("walhus", "amemiya", "nerlove") in addition to method "swar" but it does not help.

 I have googled for answer but I have not found the solution yet. Actually this problem encountered by some users but still remains unsolved, I am afraid. Would some people help in this regard?

 Best regards,

Wei-han Liu

	[[alternative HTML version deleted]]



------------- end original message -----------------

 
Ai sensi del D.Lgs. 196/2003 si precisa che le informazi...{{dropped:12}}



More information about the R-help mailing list