STATA on CBS Research Grid
STATA is a statistics/data analysis program that runs on a variety of platforms.
Name & Version | Command | Mode Type |
---|---|---|
STATA IC, SE and MP 15 |
stata or statase or statamp |
Line-by-line interactive mode. Type "exit" to quit. |
STATA --GRID_SUBMIT=BATCH "MYPROG >OUT"orSTATASE --GRID_SUBMIT=BATCH "MYPROG >OUT"orSTATAMP --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 |
Graphic mode. |
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';
run;/span> - 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* ;
data out.mydata;
set mylib.mydata;
run;
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.
Additional Information
- Vendor Site - More software information provided by STATA.