Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: max number of variables in Stata IC/11.1


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: max number of variables in Stata IC/11.1
Date   Tue, 29 Nov 2011 10:27:45 +0000

One possibility is that you may be using temporary variables to hold constants; if so, don't do that, but use -scalar-s or -local-s instead. 

If the problem arises from code beyond your control, you may need Stata/SE or MP.

Nick 
n.j.cox@durham.ac.uk 

Maarten Buis

The error message refers to the dataset and not to the model. Many
estimation commands create temporary variables during the computation,
and if Stata runs into the maximum number of variables while executing
that command it will return that error message. In such a large model
the number of temporary variables can become quite large. If you also
have a dataset with many variables than it becomes even more easy to
run into this problem, even if you are not using those variables in
your model. In that case the easiest way to solve that is to drop
those unused variables.

On Tue, Nov 29, 2011 at 10:51 AM, Ivica Rubil <irubil@eizg.hr> wrote:

> here's the problem: I'm trying to run -nlsur- with 12 equations, same 34
> regressors in each, and 354 coefficients to be estimated. When I run it,
> Stata returns the following error message:
>
> no room to add more variables
>    An attempt was made to add a variable that would have resulted in
> more than 2048 or 2047 variables (Stata reserves one variable
>    for its own use).  You have the following alternatives:
>
>     1.  Drop some variables; see help drop.
>
>     2.  If you are using Stata/SE, increase maxvar; see help maxvar.
> r(900);
>
> I'm using Stata IC/11.1 which, as far as I'm aware, accepts more
> variables than I actually have (46 = 34 regressors + 12 dep. var.), plus
> I have compressed (-compress-) all of them.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index