A couple handy things to know about SAS

14 February 1998

  • Statistics as a tool... things to keep in mind:

    1. Statistics Review Exercises

    Read through the following exercises and think about the above questions. Together we will determine the best analysis approach.

    1. Effect of herbicide application on tamarix.
      Two herbicide manufacturers want a biologist to use their products in a proposed spraying of tamarix plants to reduce plant cover. A small hillside is used in a test of the two sprays. The biologist notes a difference in the soil type, depth, and available moisture at the bottom, middle, and top of the slope. Because of these differences, the biologist feels these changes must be accounted for in the experimental design. One hectare plots at the top, middle, and bottom of the slope are sprayed with Herbicide A with other similar plots sprayed with Herbicide B. Control plots of untreated tamarix are also located at each position on the slope to compare with the treated plots. One month after spraying, the number of cm2 of ground cover in each m2 of ground in each experimental plot is measured with the following results:

      Herbicide A Herbicide B Control
      Top373836
      Middle887681
      Bottom514247

      Question: Is there any difference in the effectiveness of the three treatments (2 herbicides and the control)?

      1. Create a plot of these data in some meaningful way. What can you tell from this plot? Does it look like there is a difference between the herbicides and the control?
      2. What conclusions can you make? Does this agree with what you thought from looking at your plot? If not, was there a mistake made somewhere? Do you need to redo anything?
      Help! Which test

    2. Relationship between sagebrush density and sage grouse.

      A biologist has noted an apparent association between the density of sagebrush plants and the density of sage grouse in a certain mountain basin. Based on this association, the biologist wishes to predict the number of sage grouse per km2 from the number of sagebrush plants per hectare and has collected the following data:

      LocationSagebrushSage Grouse
      120021
      260029
      350030
      410012
      570032
      670027
      710017
      850032
      990037
      1020018
      1130025

      Question: What is the relationship between sagebrush and sage grouse?

      1. Plot these data. What are the 'dependent' and 'independent' terms?
      2. Does there appear to be a relationship? How would you describe it? Does this make sense in light of what you know or can guess about how sagebrush and sage grouse might be related?
      3. What are your conclusions? Do they agree with what you thought? If not, why not?
      4. Use your results to predict the number of sage grouse per km2 you would expect on average with 400 sagebrush plants per hectare.

      Help! Which test

    3. Classification of elk habitat and cattle range quality.

      Twenty-five separate mountain valleys can be grazed either by cattle or elk. By an arbitrary system, each valley has been classified as good, fair, or poor elk range and as good, fair, or poor cattle range. The specialist is interested in determining whether the two classifications are independent of each other, or whether good elk range tends to also be good cattle range. The number of valleys falling into the two classifications are as follows:

      Elk Classification
      GoodFairPoor
      Cattle
      Classification
      Good231
      Fair425
      Poor503

      Question: Does good elk range tend to also be good cattle range?

      1. Is there a good way to plot these data? Does there appear to be any relationship?
      2. Enter these data into Quattro and run your analysis.
      3. What can you conclude. Is this what you expected? Is this surprising?
      Help! Which test

    2. Introduction to SAS

    SAS has traditionally been a fairly intimidating statistics package to learn. It is a very powerful program, having more modules and manuals than several other programs combined. But, as with most computer applications, having that power means an increase in complexity. In order to accomodate all sorts of analyses and datasets, there is of necessity a large number of commands and options available. However, you don't have to learn everything at once. Let's start with some basic analyses and see how it goes.

    Most analyses with SAS take a two-step approach.

    Up until now, you had to become somewhat of a programmer to use SAS. The commands were laid out in a program that was then submitted to SAS to execute. If something didn't work, you had to rewrite the program and run it again. Well, things are a little easier now. SAS has a helpful utility called "SAS/ASSIST" from the 'GLOBALS' menu that gives you 'point and click' convenience to run some of the more basic procedures. You then use a series of dialog boxes to set up the analysis you want and SAS will put the code together for you. You can then recall the program SAS created to the PROGRAM EDITOR window to see what the code should look like. This provides for a good learning environment where you can be productive quickly, and yet learn the basic programming techniques needed for the more compex analyses sure to come later.

    We will provide a SAS demonstration by working through the first exercise above. You can copy the SAS files that perform these analyses to your own directory from this Zip file. When learning a new statistical package, it's helpful to have some completed analyses to compare.

    You can save any program or output to a file by making the appropriate window active, and then selecting 'SAVE AS' from the 'FILE' menu.


    Return to Mercury Home Page