__Maximum size limits__

Stata/MP and
Stata/IC Stata/SE
-------------------------------------------------------------------------------
# of observations 2,147,483,619 1,099,511,627,775 (MP) (1)
2,147,483,619 (SE) (1)

# of variables 2,048 120,000 (MP)
32,767 (SE)

value of **matsize** 800 11,000
# of RHS variables 798 10,998

# characters in a command 264,408 4,227,159
# options for a command 256 256

# of elements in a *numlist* 2,500 2,500

# of interacted continuous variables 8 8
# of interacted factor variables 8 8

# of unique time-series operators in
a command 100 100
# seasonal suboperators per time-series
operator 8 8

# of dyadic operators in an expression 800 800
# of numeric literals in an expression 300 300
# of string literals in an expression 512 512
length of string in string
expression (bytes) 2,000,000,000 2,000,000,000
# of sum functions in an expression 5 5
# of pairs of nested parentheses 249 249

# of characters in a macro (2) 264,392 15,480,200 (MP)
4,227,143 (SE)

# of nested do-files 64 64

# of lines in a program 3,500 3,500
# of bytes in a program 135,600 135,600

length of a variable name (characters) 32 32
length of ado-command name (characters) 32 32
length of a global macro name
(characters) 32 32
length of a local macro name (characters) 31 31

length of a **str#** variable (bytes) 2,045 2,045
length of a **strL** variable
(bytes) 2,000,000,000 2,000,000,000

**anova**
# of variables in one **anova** term 8 8
# of terms in the **repeated()** option 4 4

**char**
length of one characteristic
(bytes) 67,784 67,784

**constraint**
# of constraints 1,999 1,999

**encode** and **decode**
# of unique values 65,536 65,536

**_estimates** **hold**
# of stored estimation results 300 300

**estimates** **store**
# of stored estimation results 300 300

**exlogistic** and **expoisson**
maximum memory specification in 2gb 2gb
**memory(***#***)**

**grmeanby**
# of unique values in *varlist* _N/2 _N/2

**graph twoway**
# of variables in a plot 100 100
# of styles in an option's stylelist 20 20

**impute**
# of variables in *varlist* 31 31

**infile**
record length without dictionary none none
record length with a dictionary 524,275 524,275

**infix**
record length with a dictionary 524,275 524,275

**label**
length of dataset label (characters) 80 80
length of variable label (characters) 80 80
length of value label string
(bytes) 32,000 32,000
length of name of value label
(characters) 32 32
# of codings within one
value label 65,536 65,536

**label language**
# of different languages 100 100

macros
# of nested macros 20 20

**manova**
# of variables in single **manova** term 8 8

**matrix** (3)
dimension of single matrix 800 x 800 11,000x11,000

maximize options
**iterate()** maximum 16,000 16,000

**mprobit**
# of categories in a *depvar* 30 30

**net** (also see **usersite**)
# of description lines in .pkg file 100 100

**nlogit** and **nlogittree**
# of levels in model 8 8

**notes**
length of one note (bytes) 67,784 67,784
# of notes attached to _dta 9,999 9,999
# of notes attached to each
variable 9,999 9,999

*numlist*
# of elements in the numeric list 2,500 2,500

**reg3**, **sureg**, and other system estimators
# of equations 800 11,000

**set** **adosize**
memory ado-files may consume 1000K 1000K

**set** **scrollbufsize**
memory for Results window buffer 2000K 2000k

**slogit**
# of categories in a *depvar* 30 30

**snapshot**
length of label (characters) 80 80
# of saved snapshots 1,000 1,000

**stcox**
# of variables in **strata()** option 5 5

**stcurve**
# of curves plotted on the same graph 10 10

**table** and **tabdisp**
# of by variables 4 4
# of margins, i.e., sum of rows,
columns, supercolumns, and
by groups 3,000 3,000

**tabulate**
# of rows in one-way table 3,000 12,000
# of rows & cols in two-way table 300x20 1,200x80

**tabulate, summarize** (see **tabsum**)
# of cells (rows X cols) 375 375

**teffects**
# of treatments 20 20

**xt** estimation commands (e.g., **xtgee**,
**xtgls**, **xtpoisson**, **xtprobit**, **xtreg**
with **mle** option, and **xtpcse** when
neither option **hetonly** nor option
**independent** is specified)

# of time periods within panel 800 11,000
# of integration points accepted 195 195
by **intpoints(***#***)**
-------------------------------------------------------------------------------

__Notes__

(1) For Stata/MP, the maximum number of observations is
1,099,511,627,775, and for Stata/SE, the maximum number is
2,147,483,619. In practice, both flavors are limited by memory.

(2) The maximum length of the contents of a macro are fixed in Stata/IC
and settable in Stata/SE and Stata/MP. The currently set maximum
length is recorded in **c(macrolen)**; type **display c(macrolen)**. The
maximum length can be changed with **set maxvar**. If you set **maxvar** to
a larger value, the maximum length increases; if you set **maxvar** to a
smaller value, the maximum length decreases. The relationship
between them is *maximum_length* = 129***maxvar** + 200.

(3) In Mata, matrices are limited only by the amount of memory on your
computer.

__Matrix size__

See **matsize**.

__Determining which flavor of Stata you are running__

Type

**. about**

The response will be Stata/MP, Stata/SE, or Stata/IC. Other information
is also shown, including your serial number. See **about**.