Stata
Many versions of Stata are installed on the ICER HPC. When you log in, Stata is not available by default, but it may be load easily using this command (note you must type Stata with a capital 'S'
1 |
|
This loads Stata SE version 15. This is equivalent to using the command
1 |
|
Stata has a command line version and a GUI (windowed) version. To use the command line, type stata at the prompt. You will see this :
Using Stata command line
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
In which you may type Stata commands. Type 'exit' to quit this version.
To run a Stata do file from the command line in 'batch', you use the syntax
1 |
|
Versions
Stata comes in several versions: IC, SE, and MP; see https://www.stata.com/products/which-stata-is-right-for-me/ for details for the differences. Stata/IC has limitations on the numbers of variables that affect most users but has no licensing restrictions (see below). While the default version of Stata available when you load the module is Stata/SE, you currently have to use the command 'stata-se' to start the 'SE' version
1 2 3 |
|
However, to use the "MP" Version, you must load it explicitly.
1 2 |
|
Note that even if you load Stata/MP or SE module, as above, if you just
use the command stata
it will load the IC version. To see which
version of Stata you are current in, use the about
command at the dot
prompt. To use these special versions to run a bach do file, use
stata-se and stata-mp instead of plain stata
For Stata/SE There are 15 licenses available, so 15 users may use it, for MP there are 5 user licenses of 8-cores each. Please exit the program when you are finished with it.
GUI version
To use the GUI version, you must first be connected to HPCC with X11 forwarding ( MobaXterm for Windows, XQuartz for Mac - see instructions on installing an SSH client ) or using a web-base connection to HPCC (see instructions on Connecting via web site ). Once an X11 or remote desktop client is connected, you can run xstata on a dev node:
1 2 |
|
Variables Limits
Even if you load the MP or SE versions, Stata limits the number of variables to 5000 unless you tell it otherwise. For information use the help set_maxvar command at the dot prompt. You can set the maxvar for your session or in your do file with (for example to 6000)
1 |
|
There are other settings related to memory usage which are important as Stata attempts to be very conservative. For more information use the Stata "memory" command
Running Jobs
Note you must use the command line version inside a sb script when running jobs. To copy a working example of Stata job file into your home directory, you can use our getexample tool
Getting Stata Example
1 2 3 4 5 6 7 |
|
More help
For questions requiring deeper knowledge of statistics, users could contact CSTAT services at https://cstat.msu.edu/cstat-services and use the "schedule a meeting" link to submit an intake form.