STATA is a statistics/data analysis program that runs on a variety of platforms.
STATA on CBS Research Grid
|Name & Version||Command||Mode Type|
STATA 10.0 &
STATA 10.0 Parallel Edition
|Line-by-line interactive mode. Type "exit" to quit.|
stata -B "myprog >out"
statamp -B "myprog >out"
Submit job in batch in background (You can log off and job will still run in background). Note: "myprog" is the name of the file that contains STATA commands. STATA automatically saves the output into a file named "myprog.log." "out" is an optional user speficied output file. Without the option, you could issue a command such as: stata -B "myprog"
|xstata||Graphic mode (Stata 10.0). Requires X-windows connection.|
How can I read economic database file on CBS Research Grid using STATA?
- All databases are in SAS dataset format. You can use SAS PROC EXPORT to create a Stata dataset "mydata.dta" in your home directory from a "file" in "database" you select. "mydata.dta" is a STATA file which can be read by STATA.
proc export data=database.file dbms=dta outfile='~/mydata.dta';
- If you need to preserve special missing values, then create an XPT file, download and import it into Stata (see above). The program below creates the file mydata.xpt:
libname mylib '~';
libname out xport '~\mydata.xpt'; *Use "XPORT" engine in libname OUT* ;
How can I process large datasets in Stata?
PROC EXPORT of database can easily generate datasets larger than the default maximum for Stata. If you attempt to read in a dataset larger than your current maximum, you'll probably get a message such as following:
No room to add more observations
An attempt was made to increase the number of observations beyond what is currently possible.
You have the following alternatives:
1. Store your variables more efficiently; see help compress.
2. Drop some variables or observations; see help drop.
3. Increase the amount of memory ...see help memory.
- query memory. Reports your current memory allocations.
- set memory #[b|k|m|g] [, perm ]. Lets you allocate memory in units of gigabytes (e.g. "set memory 1g"), megabytes ("set memory 3m"), kilobytes, or bytes. The optional ",perm" tells Stata to remember this memory allocation and let it become the default for every subsequent use of Stata.
- Learning Stata - A guide to using STATA on the cunix cluster provided by EDS
- Learning Stata - A good site with lots of content on STATA from UCLA
- Vendor Site - More software information provided by STATA.