Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: matrix not positive definite with fixed effects and clustering


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: matrix not positive definite with fixed effects and clustering
Date   Thu, 28 Sep 2006 21:52:20 +0100

Daniel, 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Daniel Simon
> Sent: 28 September 2006 20:01
> To: [email protected]
> Subject: st: matrix not positive definite with fixed effects 
> and clustering
> 
> Hi - I am running -areg- with a bunch of additional fixed 
> effects, which I am using -xi- to create, and clustered 
> standard errors. In some specifications, I get the error 
> message "matrix not positive definite." I get the same 
> message when I use -xtreg, fe- instead of areg. But, I do not 
> get this message when I run the same model without 
> clustering.

I am pretty sure the only matrix involved is the variance-covariance
matrix, so there is something that is causing problems with the
clust-robust vcv.  I wonder if this is a symptom of a singleton
observation problem, i.e., you have a panel group with only one
observation in it?  If you try estimating with xtivreg2, you might (or
might not!) get a more informative error message.

HTH,
Mark

Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3296
email: [email protected]
web: http://www.sml.hw.ac.uk/ecomes

> In addition, I do not get this message when I 
> drop some of the xi-created fixed effects. 
> I include the output with the error message below. Can anyone 
> provide me with an intuitive explanation for why the 
> clustering and/or the fixed effects cause this problem, and 
> whether there is any solution. thanks. Daniel
> 
> . xi:areg  lncirc currentsite pgcurrentsites1 lnpubcirc1 
> pubmags   markets 
> lnissues chgpub   i.groupyr i.pub   , absorb(mag1) cluster(mag1)
> i.groupyr         _Igroupyra3-622     (naturally coded; 
> _Igroupyra3 omitted)
> i.pub             _Ipuba5-959         (naturally coded; 
> _Ipuba5 omitted)
> matrix not positive definite
> r(506);
> 
> . xi:xtreg  lncirc currentsite pgcurrentsites1 lnpubcirc1 
> pubmags   markets 
> lnissues chgpub   i.groupyr i.pub   , fe i(mag1) cluster(mag1)
> i.groupyr         _Igroupyra3-622     (naturally coded; 
> _Igroupyra3 omitted)
> i.pub             _Ipuba5-959         (naturally coded; 
> _Ipuba5 omitted)
> 
> 
> Here it is without clustering:
> 
> . xi:areg  lncirc currentsite pgcurrentsites1 lnpubcirc1 
> pubmags   markets 
> lnissues chgpub   i.groupyr i.pub   , absorb(mag1)
> i.groupyr         _Igroupyra3-622     (naturally coded; 
> _Igroupyra3 omitted)
> i.pub             _Ipuba5-959         (naturally coded; 
> _Ipuba5 omitted)
> 
> Linear regression, absorbing indicators                Number 
> of obs =    5011
>                                                         
> F(597,  3800) =    3.36
>                                                         Prob 
> > F      =  0.0000
>                                                         
> R-squared     =  0.9886
>                                                         Adj 
> R-squared =  0.9849
>                                                         Root 
> MSE      =   .1639
> 
> --------------------------------------------------------------
> ----------------
>        lncirc |      Coef.   Std. Err.      t    P>|t|     
> [95% Conf. Interval]
> -------------+------------------------------------------------
> ----------
> -------------+------
>   currentsite |  -.0353274   .0113278    -3.12   0.002    
> -.0575366   -.0131183
> pgcurrents~1 |   .0005656   .0040061     0.14   0.888    
> -.0072888    .0084199
>    lnpubcirc1 |   .0218753    .003488     6.27   0.000     
> .0150368    .0287138
>       pubmags |  -.0036036   .0013778    -2.62   0.009    
> -.0063048   -.0009023
>       markets |   .0029789   .0033642     0.89   0.376    
> -.0036169    .0095748
>      lnissues |   .1162314   .0224666     5.17   0.000     
> .0721835    .1602792
>        chgpub |  -.0099665   .0447696    -0.22   0.824    
> -.0977412    .0778081
>   _Igroupyra4 |  -.0222715   .0980753    -0.23   0.820    
> -.2145569    .1700139
> ...
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index