__Using Stata/IC__

There are three flavors of Stata:

Flavor Description
-----------------------------------------------
-> **Stata/IC** standard version
**Stata/SE** Stata/IC + large datasets
**Stata/MP** Stata/SE + parallel processing
-----------------------------------------------
See **[U] 5 Flavors of Stata** for descriptions

To determine which flavor of Stata you are running, type

**. about**

If you are using a different flavor of Stata, click on the appropriate
link:

-----------------------------------------------
**Stata/SE** Using Stata/SE
**Stata/MP** Using Stata/MP
-----------------------------------------------

For information on upgrading to Stata/SE or Stata/MP, point your browser
to http://www.stata.com.

__Contents__

1. Starting Stata/IC

2. Setting Stata/IC's limits
2.1 Advice on setting matsize

3. Sharing .dta datasets with non-IC users

4. Querying memory usage

5. Advice to programmers: Determining flavor

__1. Starting Stata/IC__

You start Stata/IC as follows:

Windows:
Select **Start > All Programs > Stata 15.1 > StataIC 15.1**

Mac:
Double-click the file **Stata.do** from the **data** folder, or
double-click the **Stata** icon from the **Stata** folder.

Unix:
At the Unix command prompt, type **xstata** to invoke the GUI
version of Stata/IC, or type **stata** to invoke the console
version.

__2. Setting Stata/IC's limits__

The two limits for Stata/IC are as follows:

1. **maxvar**
The maximum number of variables allowed in a dataset. This
limit is set to 2,048 and cannot be reset.

2. **matsize**
The maximum size of matrices, or said differently, the
maximum number of independent variables allowed in the
models that you fit. This limit is initially set to 400,
and you can increase it up to 800.

You set the limit by using the

**set matsize** *#* [**,** __perm__**anently**]

command. For instance, you might type

**. set matsize 500**

If you specify the **permanently** option when you set a limit, in addition
to making the change for the present session, Stata/IC will remember the
new limit and use it in the future when you invoke Stata/IC:

**. set matsize 500, permanently**

You can reset the present or permanent limit whenever and as often as you
wish.

__2.1 Advice on setting matsize__

**set matsize** *#* [**,** __perm__**anently**] 10 <= *#* <= 800

The name **matsize** is unfortunate because it suggests something that is
only partially true. It suggests that the maximum size of matrices is
**matsize** *x* **matsize**. **matsize**, however, is irrelevant for the size of
matrices in Mata, Stata's modern matrix-programming language. Regardless
of the value of **matsize**, Mata matrices be larger or smaller than that.

**matsize** specifies the maximum size of matrices in Stata's old matrix
language -- and that is not of great importance -- and it specifies the
maximum number of variables that may appear in Stata's estimation
commands -- and that is important. A better name for **matsize** would be
**modelsize**.

With that introduction, let us begin.

The value of **matsize** has a dramatic effect on memory usage, the formula
being

Number of megabytes = (8***matsize**^2 + 88***matsize**)/(1024^2)

For instance,

+--------------------------+
| **matsize** | memory use |
|-----------+--------------|
| 40 | .015M |
| 100 | .084M |
| 200 | .322M |
| 400 | 1.254M |
| 800 | 4.950M |
+--------------------------+

The formula, in fact, understates the amount of memory certain Stata
commands use and understates what you will use yourself if you use
Stata's old matrix language matrices directly. The formula gives the
amount of memory required for one matrix and 11 vectors. If two matrices
are required, the numbers above are nearly doubled.

Choose a reasonable value given the kinds of models you fit.

__3. Sharing .dta datasets with non-IC users__

You may share datasets with Stata/SE and Stata/MP users with no changes
necessary.

__4. Querying memory usage__

The command

**. memory**

will display the current memory report and the command

**. query memory**

will display the current memory settings. See help memory.

__5. Advice to programmers: Determining flavor__

Programmers can determine which flavor of Stata is running by examining
the creturn values

creturn values
| **c(flavor) c(SE) c(MP)**
------------+------------------------------
Stata/IC | "**IC**" 0 0
Stata/SE | "**IC**" 1 0
Stata/MP | "**IC**" 1 1
-------------------------------------------