Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: xtabond2 memory problems?

From   "Salvati, Jean" <>
To   <>
Subject   st: RE: xtabond2 memory problems?
Date   Wed, 12 Oct 2005 14:15:47 -0400


Xtabond2 creates a number of temporary variables (the instruments). You
should try increasing maxvar instead of matsize.

The number of temporary variables created by xtabond2 increases with the
number of instrumental variables, and with the number of observations
available for these variables (the number of periods in your panel).

Since you only have two regressors and one instrumental variable, I
presume that the number of periods in your panel is relatively high (not
much lower than the number of states in your panel). This can make the
estimator implemented in xtabond2 inconsistent.

Also, if pi is exogenous, you may want to add iv(pi) to your command. 

Jean Salvati

> -----Original Message-----
> From: 
> [] On Behalf Of 
> Kevin Christensen
> Sent: Wednesday, October 12, 2005 11:32 AM
> To:
> Subject: st: xtabond2 memory problems?
> I'm using xtabond2 to run some regressions.  My panel dataset 
> contains 1674 observations with data for each state by year 
> and quarter.  Not all states have observations for each quarter.
> When I attempt to run the regression:
>  	xtabond2 Investment l.Investment pi, gmm(l.Investment)
> I get an error stating:
> ".no room to add more variables due to width
>      An attempt was made to add a variable that would have 
> increased the memory required to
>      store an observation beyond what is currently possible.  
> You have the following
>      alternatives:
>       1.  Store existing variables more efficiently; see help 
> compress.
>       2.  Drop some variables or observations; see help drop. 
>  (Think of Stata's data area as
>           the area of a rectangle; Stata can trade off width 
> and length.)
>       3.  Increase the amount of memory allocated to the data 
> area using the set memory
>           command; see help memory.
> r(902);"
> I've increased the matsize (to 800) and memory and I continue 
> to get an error saying there is not enough space to run the 
> regression.  Does anyone know if xtabond2 has a limit on the 
> size of the dataset?  If so, what is it and is there a work around?
> Thanks,
> Kevin Christensen
> P.S.  I'm running SE 9 on Win XP pro.
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

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