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

From |
Roberto <terrymondo@onetel.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: xtabond2.mata: a bug? |

Date |
Wed, 23 Nov 2005 18:03:24 +0000 |

Dear all, I very recently passed to Stata9 and therefore I was very hopeful in the "speed improvements" of the new code. Unfortunately at my first attempt I have encountered an error. I read from the email of David Roodman that, if we got a red message it would probably be a bug

this is what I receive:

xtabond2_mata(): 3900 unable to allocate real <tmp>[45984,843]

<istmt>: - function returned error

I am trying to estimate the following equation following the notation suggested to me by the author of the routine:

xtabond2 lev l.lev mtbv size1 mat1 collateral profitability ndts year1-year24, gmm(lev mtbv size1 mat1 collateral profitability ndts, lag (2 7) equation(diff)) gmm(lev mtbv size1 mat1 collateral profitability ndts, lag(2 2)) iv(year1-year24, equation(level)) robust noc small twostep h(2)

this is a brief summary of the dataset I am using:

year | Freq. Percent Cum.

------------+-----------------------------------

1980 | 3 0.03 0.03

1981 | 6 0.06 0.10

1982 | 6 0.06 0.16

1983 | 6 0.06 0.22

1984 | 9 0.10 0.32

1985 | 16 0.17 0.49

1986 | 43 0.46 0.95

1987 | 75 0.80 1.74

1988 | 141 1.50 3.24

1989 | 196 2.08 5.32

1990 | 234 2.49 7.81

1991 | 508 5.40 13.20

1992 | 742 7.88 21.08

1993 | 802 8.52 29.60

1994 | 831 8.83 38.42

1995 | 845 8.97 47.40

1996 | 850 9.03 56.43

1997 | 828 8.79 65.22

1998 | 793 8.42 73.64

1999 | 693 7.36 81.00

2000 | 614 6.52 87.52

2001 | 569 6.04 93.56

2002 | 524 5.56 99.13

2003 | 82 0.87 100.00

------------+-----------------------------------

Total | 9,416 100.00

Last, I have a Pentium 4 3.2Giga with 1 Giga RAM memory.

My Stata9 is fully updated and I am using the most recent version of xtabond2: 2.0.0 16Nov2005

I have searched in past Statalist for possible solutions to this issue but I had no luck.

Is this a "bug"?. Is there a solution to this issue?

Thank you in advance for your kind attention.

Best Regards

Roberto

--David

David Roodman

Center for Global Development

Research Fellow

1776 Massachusetts Ave. NW

Suite 301

Washington, DC 20036

droodman@cgdev.org

202-416-0723

fax: 413-410-2602

-----Original Message-----

From: Roberto Mura [mailto:fellowsh@tiscali.it]

Sent: Monday, February 14, 2005 8:14 AM

To: David Roodman

Subject: RE: xtabond2

Dear David

first of all allow me to thank you for your kind reply.

I do in fact have the latest version but I still do not seem able to manage.

I have tried this command:

xtabond2 Y l.Y X1 X2 X3 year1-year11, gmm(Y, lag(3 3)) gmm(X1, lag(2 3)) gmm(X2 X3, lag(3 3)) equation(diff) gmm(Y, lag(2 2)) gmm(X1, lag(1 1)) gmm( X2 X3, lag(2 2)) iv(year1-year11) equation(level) robust small noc twostep

but stata says

year1 dropped because of collinearity.

Building GMM instruments.........

equation(difference) equation(level) invalid.

r(198);

the only way I found to perform a GMM-SYS is

xtabond2 Y l.Y X1 X2 X3 year1-year11, gmm(Y, lag(3 3)) gmm(X1, lag(2 3)) gmm(X2 X3, lag(3 3)) iv(year1-year11, eq(level)) robust small noc twostep

Here I do not specify the lag structure of the instruments for the equation in levels....see the problem is that, for some reason I don't quite get, Stata uses 1 instrument more than DPD in making the system.

I have tried to recreate the matrix instrument in excel just to be sure and what I get is the same as DPD provides (84 instruments for the GMM-SYS specified above) and so 70 dof in the Sargan test (Y X1 X2 X3 + 10 year dummies). Stata uses 81 instruments and so 71 dof in the hansen stat. More interesting is the fact that, stata uses 5666 observations while DPD uses 5667.

The dataset has been thoroughly cleaned so there are no missing observations anywhere.

Here are the info from Stata

Arellano-Bond dynamic panel-data estimation, two-step system GMM results

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

Group variable: code Number of obs = 5666

Time variable : year Number of groups = 673

Number of instruments = 85 Obs per group: min = 4

F(13, 672) = 1943.77 avg = 8.42

Prob > F = 0.000 max = 10

Furthermore, now with the new version of the command I cannot seem to manage to get exactly the same results even for the GMM-DIFF....

I will stop here because I think I have taken too much of your time already.

I wish you a very nice day and thank you so much for your kind attention.

R

*

* 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/

- Prev by Date:
**st: xtabond2.mata: a bug?** - Next by Date:
**Re: st: binary endogenous variable with panel data (call for GMM)** - Previous by thread:
**st: xtabond2.mata: a bug?** - Next by thread:
**Re: st: binary endogenous variable with panel data (call for GMM)** - Index(es):

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