S-PLUS FUNCTION FOR INTERESTING UNIVARIATE PLOTS

Many of the univariate plots described in the article by Ellison (1993) cannot be made using existing functions in S-Plus. While it is possible for you to write your own functions in S-Plus to make any graphical type that you would like, it's easier to use functions already written by others! Fortunately, Jack Lee and Nora Tu (1997) provide an S-Plus function for generating many of the different univariate plots (such as boxplots with stripe plots, distribution plots, jittered plots, etc.) described by Ellison (1993). Their function is called BLiP (for Box, Line, Polygon, which are the primitive elements of all of these plots).

Before you try to make these plots, you should read the article by Lee & Tu (1997), in which they describe the types of plots as well as how the function is used. On a first read through this article, you'll get a feel for the types of plots. You may want to refer to it again when you're trying to actually run the blip() function in S-Plus, since they discuss the options for this function in their article. (Reading this article requires Adobe Acrobat Reader (click here to download Acrobat Reader).

Jack Lee made his BLiP software available to the academic community through StatLib. You should read about StatLib to understand how the statistical community interacts regarding software sharing.

The BLiP software is available for your use. Here's what you have to do:

1. Before you start an S-Plus session, you need to map a network drive.

2. Map a network drive by right-clicking on the Network Neighborhood icon on the Windows desktop, and selecting Map Network Drive... from the pull-down menu. The following dialog box appears:

Accept the default Drive letter (in this example, it is H:), but remember it!

In the Path box, enter \\ambr\pecology and then press the OK button.

 

3. Begin your S-Plus session.

4. In the Object Browser window, right-click on the SearchPath icon in the left-hand panel of the window, and select Attach Database... from the pull-down menu. The following dialog box appears:

In the Database Path or Object Name, enter DRIVE:\s

where DRIVE is the Drive letter you saw in the Map Network Drive dialog box above. Be sure to type a colon (:) after the drive letter, followed by a backslash (\) followed by the letter s.

Change the value in the Position box from 1 to 2

Press the OK button

5. All BLiP commands must be entered in the Command Window, but first you have to attach your dataset.

6. In the Command Window of S-Plus, type the command attach(name_of_your_dataset), where name_of_your_dataset is the name that you gave to your dataset (such as vtcensus97).

7. Now you're ready to use BLiP.

8. The basic syntax of the command is blip(variable, std.plot="type_of_plot", ylab="y_axis_label"), where variable is the variable to be plotted (such as headwidth), type_of_plot can be boxplot, histogram, or polygon, and y_axis_label is the label you want on the y-axis. Note that the values for type_of_plot and y_axis_label must be enclosed in double quotes. For example, to draw a boxplot of head-width data, where the variable name is headwidth, enter the command

blip(headwidth, std.plot="boxplot", ylab="frequency").

9. In addition to the detailed description of the function blip() in the article by Lee & Tu (1997), you can get on-line help within your S-Plus by entering the command help(blip) at the command prompt (>) in the Command Window. The help file isn't particularly well-formated (I'm working on that), but it is complete.

10. An S-Plus Script file, paper.ssc, is also in the s directory on \\ambr\pecology. This file contains all the commands for making the figures that illustrate Lee & Tu's (1997) article. You can open this script file in the S-Plus Script editor, and run them from there. See Chapter 21 of the S-Plus user's manual for information on using S-Plus scripts and the S-Plus script editor.

10. When you exit S-Plus, do not save the changed Object Browser.

Good luck!

 Bio Dept.

 Math Dept.

 MHC Home

 Aaron Ellison

 Other Stat. Sites

 Biostatistics Home Page