Using STATA on the Leland System

A Guide to Setting Up Your Computer—

 

Prepared by Moonhawk Kim

Department of Political Science

Stanford University

moonhawk@stanford.edu

 

October 6, 2000

 

This guide is prepared for students of Political Science 100A/200A Fall 2000.  The course requires that students have access to STATA (or some other statistical analysis software), and the most convenient and cheapest way to obtain access (even at home on your own computer!) is through the version of STATA on the Leland UNIX system.  Although the UNIX version does not have the same level graphical-interface friendliness as the PC or Mac versions do, it does offer a similar level of functionality as the other two versions.  This guide will walk through the process of setting up a computer to use STATA on the Leland system.

 

 

 


1.      If you don’t already have one, obtain a Stanford University Network ID.  (If you have a @leland.stanford.edu or @stanford.edu e-mail address, then you already have one.)  This will allow you to access the Leland system from a computer.

 

2.      If you haven’t already installed them, take a moment right now to install the appropriate Stanford University network software.  Go to this site, and choose the link appropriate to your computer type (either PC or Macintosh).  The two software you need are Samson (either Samson for Windows or MacSamson) and Leland authentication program (PC-Leland or MacLeland).  Follow the directions on the web page for installation directions.

 

3.      Go to Simon Jackman’s web site for his classes.  Go to the section titled “X resources.”  Follow one of the links (depending on the type of your computer) to the site of one of the X Windows software.  Download the appropriate software and install the software according to the instruction that comes with the software (usually requires simply expanding the downloaded file).

 

4.      Now, open Samson (Samson for Windows or MacSamson).  Go to menu “File” and to the menu item “New Telnet Session…”.  If it is not already showing, type in the following in the box next to “Host [port]:”

 

cardinal.stanford.edu

 

and press return.  PC-Leland or MacLeland window should pop up, asking for your SUNet ID and your password.  Type them in and press return.  You should now be logged into your account and the Leland system, with the following prompt showing:

cardinal0:~>

 

5.      Please follow this step extremely carefully!  Otherwise you can make damaging changes to your Leland account!  At the prompt shown above, type in

 

pico .cshrc

 

A document will open in an editor window.  The beginning of the document looks like the following:

 

# @(#) Leland Systems .cshrc version 3.0.5

#

# Commands in the .cshrc file are executed after /etc/csh.cshrc

# and before those in the .login file.  This file is read each time

# you directly or indirectly start a shell process.

#

# This file is used by both tcsh and csh.  See the man page for

# tcsh for a list of the many options that the shell supports.

 

Now, press and hold down Control (Ctrl) key on the keyboard and press the letter “v” repeatedly, until you get to the bottom of the document and cannot go down further.  Type in the following on the empty line:

 

setenv DISPLAY ${REMOTEHOST}:0.0

 

Press and hold down Control (Ctrl) key on the keyboard and press the letter “x”.  The editing program will ask if you want to “Save modified buffer”.  Press the letter “y”.  The editing program will ask for the name under which you want to save the file.  Simply press return, which will keep the original file name.

 

6.      Logout of your Leland account by typing in logout and pressing return.

 

7.      The configuration phase of this instruction is over.  Now, you will try to run STATA from the Leland system.  First, open the X Windows software you downloaded and installed in Step 3 by double clicking.  Even though the program will open, you will not see anything (blank document, etc.) on the screen.  Next, go to Samson and log in to your account just as you did in Step 4.  Type in stata at the prompt.  If everything went correctly, you should see the opening of Stata on your screen.

 

8.      To make sure that your X windows client is working properly, type in the following at the Stata prompt:

 

tutorial graphics

 

and press return.  When Stata says “--more--”, press space bar to go to the next screen.  Stata will ask if you want to see examples of each graph.  Press the letter “y” to say yes.  Your X client should be now drawing the first of the several example graphs.  (Warning: If you are connected through a modem, the speed of drawing might be slow.)  In Stata, press space bar to have the next example of a graph drawn.

 

If you have any problems in getting Stata and X Windows client to work, let me know.  I will try my best to help you.  If you succeeded in getting them to work, congratulations!  You might want to try tutorial intro to start getting used to using Stata.