STATA is a statistics/data analysis program that runs on a variety of platforms.
STATA on CBS Research Grid
Name & Version
STATA IC, SE and MP 15
Line-by-line interactive mode. Type "exit" to quit.
stata --grid_submit=batch "myprog >out"
statase --grid_submit=batch "myprog >out"
statamp --grid_submit=batch "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 OR xstatase OR xstatamp
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:
- Store your variables more efficiently; see help compress.
- Drop some variables or observations; see help drop.
- Increase the amount of memory; see help memory.
One of the options above is to increase the amount of memory. These two commands should be sufficient:
- 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 good site with lots of content on STATA from UCLA
- Vendor Site - More software information provided by STATA.