Skip to content

plm random effect: the estimated variance of the individual effect is negative

3 messages · Millo Giovanni, matteo ognibene

#
Matteo,

I fully agree with David: please read the posting guide.

Anyway, the error message says it all: "the estimated variance of the
individual effect is negative". See e.g. the "basic panel" chapter (10
or 11) in Wooldridge's "Econometric Analysis of XS and Panel Data" to
understand why this may happen.  

Stata's behaviour is (as far as I remember) to transparently substitute
it with 0; 'plm's is to let the estimation fail, issuing a warning. You
can try a different 'random.method' which may, or might not, solve the
problem, depending on your data. 

Hint: a random effects model with sigma_mu=0 is a pooling model.

HTH

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: 49
Date: Thu, 3 Jan 2013 13:23:07 -0800
From: David Winsemius <dwinsemius at comcast.net>
To: matteo ognibene <ognibenematteo at hotmail.it>
Cc: "r-help at r-project.org" <r-help at r-project.org>
Subject: Re: [R] plm random effect: the estimated variance of the
	individual	effect is negative
Message-ID: <D32FDC11-38AE-4AAF-9270-30C791232A24 at comcast.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
On Jan 3, 2013, at 8:19 AM, matteo ognibene wrote:

            
Head up; matteo: This is pretty much unreadable (due to the failure to  
follow the recommended posting procedure.)
#
Thanks Giovanni,

but I already tried with the others "random.method" and it doesn't work anyway.
Do you think is it possible change the if statement in the plm formula, to set the value to 0 if sigma<0 ?
Because if I insert a dummy variabile in the formula R gives me this error:
Thanks
Matteo Ognibene


----------------------------------------
#
Dear Matteo,
as I stated in my previous email, if the random effects variance is set to zero then they are identically zero (as mean=0, sd=0) hence you just need to use 'plm(<...> , model="pooling")'.
Best,
Giovanni

-----Messaggio originale-----
Da: matteo ognibene [mailto:ognibenematteo at hotmail.it] 
Inviato: venerd? 4 gennaio 2013 20.08
A: Millo Giovanni; r-help at r-project.org
Oggetto: RE: [R] plm random effect: the estimated variance of the individual effect is negative


Thanks Giovanni,

but I already tried with the others "random.method" and it doesn't work anyway.
Do you think is it possible change the if statement in the plm formula, to set the value to 0 if sigma<0 ?
Because if I insert a dummy variabile in the formula R gives me this error:
Thanks
Matteo Ognibene


----------------------------------------