Math 1112 - Biostatistics Lab



Math 1112 - Biostatistics Lab Name: _________________________________

Exercise 4 - Using the SPSS Computer Package

It is important to understand the theory behind statistical tests, and to know when it is appropriate to use specific tests. Also, it is a valuable learning experience to compute statistics by hand when first learning the proper analytical techniques. However, as you know, this can become very tedious very quickly. Virtually all modern statistical analyses are performed with the help of computer software packages which perform the calculations. Keep in mind, though, that a great deal of thought must still go into putting data into the proper format and deciding which tests are most appropriate for the data to be analyzed and the questions one hopes to answer with the analysis.

There are a multitude of statistical packages available, some very powerful, and a number of them are available to you through the Pitt computer network. We have chosen to use SPSS (Statistical Package for the Social Sciences - also useful for other sciences, by the way) because of several attractive features - it is relatively easy to use (menu-driven in Windows, as opposed to typing in complex commands with strict syntax), it offers a wide range of common statistical analyses, and it has nice graphing functions for data presentation.

In this exercise, you'll be using the data collected at the beginning of the term from the UPJ student population, calculating some descriptive statistics for the whole sample and subsets of the sample and graphing distributions. This data is stored in a text data file called biost01.txt. You will need to go to a campus computer lab to run SPSS. Instructions for downloading the file and running the program are as follows:

1. Log on to the computer.

2. Run Netscape and go to the course web site ().

3. Right click on the link and select "Save Link As" to download the file. You might want to save it to a disk in case you want it later.

4. Exit Netscape.

5. Click on Start, then Applications, then Data Analysis, then Statistics, then SPSS for Windows, then SPSS 10.0 for Windows. (The exact sequence might be somewhat different.) This should start SPSS.

6. Choose the option to "Type in data". This should open a blank SPSS data window.

7. On the menu bar, click File, then Read Text Data. You should be prompted for a file. Choose biost01.txt from wherever you've saved it.

8. Work through the "Text Import Wizard" application by making the appropriate selections, clicking the "Next" buttons, and clicking "Finish" at the end. Most items will not have to be changed, but a few will. There are no changes in Steps 1, 3, 5, or 6. In Step 2, at the question "Are variable included at the top of your file?", click "Yes". In Step 4, click on "Space" to remove the check mark, but leave "Tab" checked. When you are finished, the data will appear in the SPSS data window. You might want to save this file for later use, too. (It will have a ".sav" extension.)

Now you're ready to begin the exercise. First, you will compute descriptive statistics for all variables except sex and class. On the menu bar, click Analyze, then Descriptive Statistics, then Descriptives. Select each variable individually by clicking on the name, then on the ? button to add it to the list. Do this for every variable except sex and class. Then click on the OK button to start the analysis. The results will appear in a new output window. Record the results in the table below (or attach a printout to this report). Which standard deviation, N-weighted or (n-1)-weighted, do you think is being reported?

________________

Why?

Variable Minimum Maximum Mean Std Deviation

height _________ __________ __________ __________

Height (mm)

leg _________ __________ __________ __________

Leg length (mm)

age _________ __________ __________ __________

Age (months)

weight _________ __________ __________ __________

Weight (g)

hair _________ __________ __________ __________

Hair length (mm)

leftfore _________ __________ __________ __________

Left forearm length (mm)

rightfor _________ __________ __________ __________

Right forearm length (mm)

leftinde _________ __________ __________ __________

Left index finger length (mm)

rightind _________ __________ __________ __________

Right index finger length (mm)

leftring _________ __________ __________ __________

Left ring finger length (mm)

rightrin _________ __________ __________ __________

Right ring finger length (mm)

loverh _________ __________ __________ __________

Leg/height ratio

leftir _________ __________ __________ __________

Left index/ring ratio

rightir _________ __________ __________ __________

Right index/ring ratio

Now, you will analyze assigned subsets of the data. You will be given a piece of paper with four combinations of the subset and variable to analyze. To choose a subset of data, you will apply a "filter" to the data set that will exclude any cases that do not meet the conditions you specify. To do this, click Data on the menu bar, then Select Cases. Click on the empty circle next to "If condition is satisfied"; this fills the circle and makes the If button available. Click the If button. This opens a window that allows you to specify the conditions of the subset you wish to choose.

For example, let's say you want to limit the analysis to data on only freshman females. Using the list of variables at the left and the "calculator pad", you would enter the equations "sex = 2 & class = 1". Choose sex by highlighting that variable and clicking on the right arrow, putting the name in the equation window, then click = and 2 on the calculator pad. Click on the & and enter the second equation. When the limiting conditions are entered, click on the Continue button, then on OK. Now look at the data window by clicking anywhere inside the window. The cases which you have excluded have a slash through the case number.

Now, calculate descriptive statistics for the four variables you have been assigned, just as you did for the full data set. After the Analyze-Descriptive Statistics-Descriptives sequence, you will need to remove all of the variables except the ones you have been assigned by highlighting them on the list and clicking the ? button to return them to the list of unneeded variables. Record the results of your analysis below.

Class: ______________ Sex: _____________

Variable Minimum Maximum Mean Std Deviation

________ _________ __________ __________ __________

Class: ______________ Sex: _____________

Variable Minimum Maximum Mean Std Deviation

________ _________ __________ __________ __________

Class: ______________ Sex: _____________

Variable Minimum Maximum Mean Std Deviation

________ _________ __________ __________ __________

Class: ______________ Sex: _____________

Variable Minimum Maximum Mean Std Deviation

________ _________ __________ __________ __________

For each of your assigned variables and data subsets, graph the distribution. The filter you have applied must still be in place when you run the graphing routine. To prepare the graph, click on Graphs on the menu bar, then Histogram. Choose the variable you want to graph and click on OK to see the graph. Print the graph by clicking on the graph in the output window to highlight it, choosing File from the menu bar, and then choosing Print and OK. Once the graph has printed, repeat the graphing procedure for the other variables, and print the graphs showing the distribution. On all four graphs, write the subset of data which they represent (i.e., freshman females) and attach them to this report.

If you would like to have some more fun, select those cases that match your own sex and class, calculate descriptive statistics, and compare yourself to the means of each variable. Are you near-average or are you an “outlier”?

When you are finished, quit the program by clicking on File, then Exit, then log off the network.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download