You will need a computer account from the Department of Mathematics and Computer Science provided by your instructor. You will need to know your login name (most likely your last name or a variation) and your password. This information is on an account sheet you receive from your instructor. This sheet also details how to change your password.
If you had an account previously, your account (and the password) will be identical to what they were in the past. If you do not know your previous password, see Professor Larget and he will create a new password for you.
The computers should always remain on. First try pressing the shift key to ``wake up'' a computer that is in stand-by mode. The green indicator and the power button for the monitor are near the lower right side of the screen.
After checking the monitor is powered
and giving it a few moments to wake up,
you should see a prompt asking you for a login name.
After entering your login name and pressing the Enter
key,
enter your password (and Enter
) as prompted.
After a short while,
the screen will turn blue and a number of icons and windows may appear.
The computer is now running UNIX.
To use the statistics software,
you will need to reboot the machine under Windows 95.
With the mouse, move the cursor to any part of the blue background, press and hold the RIGHT mouse button, and select exit from the pop-up menu. Confirm by clicking with the left mouse button.
Programs
,
slide it to the right to open a submenu,
slide it down to Netscape...
and release the button.
In a few moments, the Web browser Netscape will start.
(If you're prompted about a license, click on AGREE
.)
The quick answer is
http://www.mathcs.duq.edu/larget/math225/math225.html
for Web experts.
More detail for Web novices is below.
You may access the course materials from your math/cs account on a lab computer or from any other computer on campus or at home connected to the campus network. If you're in the lab, pressing the home button at the top of the Netscape window should bring you to the Math/CS Department homepage. Below the picture of the department chairman is a box which says Mathematics Faculty. Click on the gothic D to go to the list of mathematics faculty. Scroll down to the assistant professors where you will find a truly awful bleached out picture of Professor Larget's face. Click on it. This action brings to the screen a larger, more blurry picture of Professor Larget. Quickly click on courses to make it go away. Finally, click on Math 225, Introduction to Biostatistics to find the course notes.
You can open the Bookmarks menu and select ``Add Bookmark''. Next time you connect, you can go directly to this page from the Bookmark menu.
After logging in and starting UNIX,
move the cursor to an open spot in the blue background,
press and hold the right mouse button,
move down to Windows...
,
and release the button.
Ignore the horror message about the world ending in 15 seconds,
and wait about half a minute until the computer shuts down
and starts up Windows 95.
From Windows 95, there should be an icon that says S-PLUS 4.0 (or possibly S-plus~1 if the computer is in a bad mood). Double click on it to start the software.
When you start S-PLUS, there should be a menu bar across the top of the screen, a ruler with several buttons, and two windows open below. One window, called an object browser, has a list of data sets for the class (and other things). The other window is a command window, where an expert can type commands. If you click on a menu item, you can read the choices. If you hold the arrow over a button for a few moments, a small box opens telling you what the button does.
S-PLUS is a powerful statistics package which was developed for use in statistical research. Older versions required knowledge of a complicated computer syntax. This version allows novices to do most tasks with simple point-and-click from menus. Experts can still execute more advanced commands by typing in the command window. For this course, you will use, almost exclusively, point-and-click commands. You will need to learn how to use the software to complete some assignments, but will not be tested on its use. You will be responsible on examinations with knowing how to interpret output from the software.
The machines in the multi-media classroom and in the Alcoa Computer Lab
should not be turned off.
To quit,
click on the Start
button
and select Restart the computer.
File
menu, select Save As...
Save
.
File
menu, select Import Data
and then From File...
.
Okay
Under the file menu, select ``Import Data'', and then ``From File...''. Use the little down arrow in the ``Look in'' box to find where your data is and then press the open button.
Follow these steps to create a variable named deathTime with the data
44 27 24 24 36 36 44 44 120 29 36 36 36
scan
function.
You can put spaces or single carriage returns between numbers.
A carriage return on a blank line ends the input.
See the example below. (Some of the characters below are computer output.)
> deathTime <- scan() > 1: 44 27 24 24 36 > 6: 36 44 44 120 29 > 11: 36 36 36 >
The answer to this fine question is not yet documented here. Try either the help menu in S-PLUS or ask Professor Larget in person.
The answer to this fine question is not yet documented here. Try either the help menu in S-PLUS or ask Professor Larget in person.
The answer to this fine question is not yet documented here. Try either the help menu in S-PLUS or ask Professor Larget in person.
In the Command Window, type
> attach(x)to be able to refer to the variables in the data frame
x
by name.
Only one window is active at a time. Clicking anywhere in the window will activate it. You can also select the window from the window menu. This is especially helpful if the window is buried by other windows or minimized.
Each window has three little buttons in the upper right corner. The first button will minimize the window and turn it into an icon at the bottom of the screen. (The icon may be buried by other windows.) Clicking the left button on the icon opens it again.
If you want to close a window for good (typically a graph or a report you don't need anymore), click on the third button with the ``x''. When you are prompted if you want to save changes, say no.
The middle button on the top right will maximize a window. If a window is already maximized, the middle button returns it to normal size.
When the graph window is active, pressing the ``F2'' function key will display the graph full screen. Pressing the ``F1'' function key returns the graph to its previous size. You can also use the second maximize button which makes the graph bigger without covering the menu bar or ruler.
The Window menu has many tools. Tile vertical is my favorite choice to show all open windows. You can also bring a buried or iconified window to the front from this menu.
Open the command window in S-PLUS. This window has a prompt that looks like this ``>''. You can open the command window by opening its icon or from the Windows menu. Also, there is a button on the task bar to open a command window.
There are multiple ways to make histograms in S-PLUS. This is the simplest.
If you want to change the bin size or customize the histogram in other ways, click on the ``Options'' tab and make changes before clicking on OK.
Alternatively,
you can make histogram directly from the Command Window.
To make a histogram of the data in x
(either a vector or the variable name of an attached data frame)
type into the command window
> hist(x)
The answer to this fine question is not yet documented here. Try either the help menu in S-PLUS or ask Professor Larget in person.
Just like with histograms, click on the ``2D Plots'' button. The box plot button is in the middle column of the Plots2D palette, six from the top. Click on it. Choose the data set just as you did for histograms. Because the variable will be drawn on the $y$-axis, click on the arrow to the right of ``y Column(s)'' and select the variable you want.
These plots are most useful when you want to examine a quantitative variable separately for each category in some categorical variable. Open the ``Plots2D'' palette, select the data set, put the categorical variable in for ``x Column(s)'' and the quantitative variable in for ``y Column(s)''.
The following commands find the mean, median, minimum, and maximum
of a variable x
.
> mean(x) > median(x) > min(x) > max(x)
The command name is quantile
.
By default, it will find the minimum, lower quartile, median, upper quartile,
and maximum of a variable.
> quantile(x)
The command name is quantile
.
If you wanted to find the 85th percentile of a variable x
,
you would type
> quantile(x,.85)
To find the lower quartile, you could type
> quantile(x,.25)
Type set.seed(n)
in the command window where n is a nonnegative integer.
First, make sure the data frame is attached.
The command sample
takes a random sample with or wihtout replacement.
Examples:
> sample(x,10)
randomly selects 10 elements of the object x without replacement.
> sample(x,10,replace=T)
randomly selects 10 elements of the object x with replacement.
Bret Larget, larget@mathcs.duq.edu