Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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 <>
To   "''" <>
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.


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 <> 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:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index