![]() |
![]() |
Search DSS Finding Data Using Data About Us |
Home
Stata on UNIXStata is available on the high-performance Unix server tombstone. Users of tombstone need to register before using this service; to find out more and register an account, see OIT's information page. Stata on Unix can be run in three different ways. The most basic is text-only mode, which is available to anyone with access to a SSH program but doesn't let you display graphs. An X-Windows version of unix Stata is also available. This version looks and functions similarly to Stata for MS Windows or for the Mac, including the ability to display graphs. The third option is to run unix Stata as a background process, which is useful for people who need to run very slow operations that may take several hours to complete. Text-Only Unix StataTo run Stata in text mode on Unix, connect to tombstone using an SSH program such as SSH Secure Shell, which is available on all the OIT clusters. After logging in, type "Stata" at the prompt. Once you're in Stata, you type your commands at the prompt at the bottom of the screen, and the output from your commands appears above it, the same as it would appear in the "results" window in Windows Stata. The commands are the same. The only difference is that you don't have a variables window, a review window, or any of the menus. A few shortcut key combinations are different on Unix. To repeat a previous command, type control-r
(hold the control key down and press r) instead of using the pageup key. To interrupt a command, press control-c
rather than control-k.
X-Windows StataTo run Stata from a Windows PC with an X-Windows interface, you need two things: a connection to tombstone, which Stata will be running from, and an X-Windows server program running on your computer. One option is to use Hummingbird Exceed, which is available on some computers on campus. To start Exceed, simply click on the "Exceed" icon in the "Hummingbird Connectivity" folder on the start menu. Minimize or ignore the taskbar that pops up. Once you have an X-Windows server program (such as Exceed) running, you need to use an SSH program to connect to the machine you will be running Stata from. The program SSH Secure Shell should be installed on all Windows machines. You will need to configure it to allow XWindows tunneling. Open SSH Secure Shell, click on File, then Profiles, and choose Edit Profiles. Next click on "Quick Connect", and open the Tunneling tab. Check "Tunnel X11 connections" under "X11 Tunelling" and press "OK". (Different versions of SSH Secure Shell may have slightly different layouts of options.)
Connect to tombstone using Quick Connect, and in your SSH window, type xstata & to run Stata.
UNIX BackgroundSometimes you may want to run a Stata job as a background Unix process. This is usefull if you have a very large dataset or are running complex stata procedures that will take a long time to finish. Running stata as a background process lets you start your commands running, go away and ignore it for a while, and then come back and retrieve your output. If Stata is running in the background, it won't be interrupted if someone closes your SSH window on you, or even turns off the computer you're connected from. To do this, you need to have all your stata commands entered in a do file, which is just a text file containing a list of commands. After creating your do file, run it by entering the following command at the unix prompt: stata -b do mydofile.do & This runs all the commands in mydofile.do and saves the output in mydofile.log.
|