Computer Hints
Links to Resources
SAS on cquest
An important part of this course is use of the SAS statistical software package. SAS is available to students free of charge on U of T's
cquest
computers. Students in STA429 should go to the
cquest web site immediately to set up their accounts. Students in STA1007 will need to fill out a short paper form (available from Jerry); your accounts will be set up manually.
Chapter 2 of the online textbook contains an introduction to SAS, and also to the unix operating system used by cquest. Well, actually cquest uses linux, but for the most part, the differences between linux and unix are just legal, moral and political. That is, they do not matter to most people.
You can use SAS in the cquest labs. There are three labs in the Ramsey Wright building (Rooms 211, 107 and 109), and one in Earth Sciences 1046 (the round building).See the cquest web site for hours of access.
You can also use SAS over the Internet from home or some other remote location. Go to login.cquest.utoronto.ca. This is convenient, but several issues are involved.
- For security reasons, you need to connect using software that probably did not come with your computer. The protocol is SSH, which stands for "Secure SHell." When you use SSH, information travels over the Internet in encrypted form, so hackers have trouble intercepting your password and other information. You cna download a free copy of SSH below
- At the cquest labs, SAS is easy to find in the menus. Running SAS this way starts up the SAS Display Manager. It's really quite nice once you get used to it, but
- It's much easier to learn how to use the Display Manager if you already know how to use SAS from the command line, the way it will be illustrated in lecture and the online text.
- The display manager does not work over SSH, so if you are running SAS from a remote location you will have to do so from the command line anyway.
So, if you are at a cquest lab, open a terminal window or two (right click on the background area and use the resulting menu), and run SAS from the command line at first. Once you are comfortable with that, it will be easy to move up to the Display Manager (which basically just shows you the various input and output files in separate windows and lets you execute SAS by making a menu choice) when you happen to be in a cquest lab, if you want.
- If you are happy running SAS at the command line from home and you try to do it when you are in a cquest lab, you may be prompted for a password when you execute SAS. This annoying problem (and maybe others) problems can be avoided by typing ssh login.cquest at the unix prompt. This uses the Secure SHell protocol to log you onto the application server. That's the machine that has SAS, and you're coming in over the Internet just as you do from home, so the environment is the same
- When you run SAS from the command line, either from home or in the lab, there is one unpleasant technical issue that arises. Both the SAS program and the data file must be in your top-level (home) directory.
This is unfortunate, because it is natural to make separate subdirectories for different courses, projects or even assignments. In every other unix environment I have ever seen, when you type SAS filename and press Enter, SAS looks in your current directory for the program file filename.sas, and the name of the data file that you specify in the SAS program implicitly begins with a path to your current directory. I assume that on cquest, SAS is not installed properly, or else there was some other horrible technical problem that was even worse, and the work-around broke this aspect of SAS. Oh well. I suppose we should be thankful we can run SAS from the command line at all, and not complain too much.
When you run SAS from the menus in a cquest lab, your files do not have to be in the top-level directory. SAS can find them. So this a reason to move to running SAS from the menus when you happen to be in a lab. But watch out for different versions of a file with the same name, at different directory levels.
Another advantage of the menu interface is the availability of online help. The manuals may be better, but you probably do not have any SAS manuals. If you are departing from the examples in any substantial way, SAS' online help can be a lifesaver.
If you want to connect from home but you do not already have an Internet Service Provider, U of T provides good inexpensive dialup access through
UTORDIAL.
There is a PC version of SAS, and you can get a copy and run it on your own computer if you wish. The SAS Institute makes a lot of money selling its software to big corporations as well as universities, research institutes and so on; SAS is expensive! But U of T has paid them a lot of money for a site license, and you can
get your own copy of SAS that locks up on July 1st for $110 a year.
A convenient way to get a file to your home
computer for printing is to email it to yourself.
Try
mail yourname@yourisp.com < fname
where yourname@yourisp.com is your email address and fname is
the name of the file, like hw3.lst.
With an Internet
connection, SSH applications give you a text-only
connection to cquest and other unix machines from your home
computer. From cquest's prompt, you can run programs
such as SAS, R and
emacs. SSH is secure
because what you type and see on your screen is encrypted at one end and
decrypted at the other end. This prevents hackers from stealing your password
as you log on, and also prevents nosy people from spying on the highly
sensitive and confidential work you do in your Statistics courses.
Different SSH programs are recommended, depending on
the operating system that you are using. To use these programs, you must be
connected to the Internet, say with a broadband connnnection or via PPP over
your phone line.
- Linux: SSH is built in. Suppose your
login name on cquest is botulism. At the
linux prompt, type
ssh -l botulism login.cquest.toronto.edu
That -l is a lower case L. If your login name on your
linux machine is also botulism, you can
omit the "-l botulism" part.
- Mac OS X: SSH is built in. Suppose your
login name on cquest is botulism. Start
up the terminal application on your Mac. At the prompt, type
ssh -l botulism login.cquest.toronto.edu
That -l is a lower case L. If your login name on your Mac is
also botulism, you can omit the "-l botulism"
part.
- Mac OS 7, 8 or 9: A number of free SSH
programs are available. Mac SSH is nice.
To connect, note that the Host Name is
login.cquest.toronto.edu.
- MS Windows: A number of free SSH
programs are available. PuTTY is nice.
To connect, note that for cquest's IP address (or
Host Name), you can put login.cquest.toronto.edu.
In any of these SSH programs, the first time you
connect to a host, you will be told that the program can't verify that this
host is really what it appears to be. Do you want to trust it?
SSH is just being sanely paraniod. Say yes.
Suppose you want to transfer fairly small amounts of
text between the unix machine and your PC. In a normal Windows application
like Explorer or Word, the edit menu has Copy and Paste items -- or you can
use control-C and control-V. But PuTTY has no menus, and
Control-C and control-V don't do what you might expect, especially if emacs is
running. But you can still copy-paste; here's how:
- When you select a block of text in PuTTY,
it's automatically copied into a buffer; you don't need to do
anything extra to copy it. So to copy from unix to your PC, select
in PuTTY, click over on a Word document or
whatever, and then choose Paste from the edit menu.
- In PuTTY, you paste by clicking on the right
mouse button. So, to get text from Word into
emacs, have emacs running in a
PuTTY window. In Word, select the text and
choose Copy from the edit menu. Click on the
PuTTY window (left click). Then right
click, and the text will be pasted in.