Homework 1 tutorial



Homework 1 tutorial

Objectives: After completing this tutorial you will have a basic familiarity with SPSS and will be prepared to complete homework 1. This familiarity will include skills related to: opening and creating files, inputting data, frequency tables with raw scores and intervals, histograms, box-and-whisker plots, stem-and-leaf plots, and descriptive statistics.

Getting started

SPSS is present on all College of Education TEC center computers. Before starting you will need to have a user account. To get your user account, visit the kiosk near the entrance downstairs.

Depending on the computer you are using there are two ways to get started. The first way is to find the icon for SPSS 14.0 on your desktop and double click it. This is the quickest way to access SPSS. However, it assumes that someone has placed an SPSS shortcut on the desktop. If you don't have a shortcut on your desktop go to the [Start => All Programs => SPSS] menu and start the package by clicking on the SPSS icon.

[pic]

Starting the program will result in the following menu. Click the “type in data” bubble then “O.K.” this results in an Excel like spreadsheet.

[pic]

Creating and opening files

Entering data into SPSS is very similar to how it is done in Excel, with each column representing a variable, start at the leftmost column and begin entering the following data (You will use this data for homework 1). See screenshot below for an example of how it will look in SPSS.

|County |  |County |

|# of Deaths |County |# of Deaths |

| |# of Deaths | |

|Bernalillo | |Roosevelt |

|54.00 |Harding |2.00 |

| |0.00 | |

|Catron | |Sandoval |

|3.00 |Hidalgo |16.00 |

| |3.00 | |

|Chaves | |San Juan |

|4.00 |Lea |37.00 |

| |11.00 | |

|Cibola | |San Miguel |

|12.00 |Lincoln |8.00 |

| |3.00 | |

|Colfax | |Santa Fe |

|10.00 |Los Alamos |16.00 |

| |1.00 | |

|Curry | |Sierra |

|6.00 |Luna |6.00 |

| |10.00 | |

|De | |Socorro |

|3.00 |McKinley |11.00 |

| |34.00 | |

|Doña | |Taos |

|26.00 |Mora |5.00 |

| |4.00 | |

|Eddy | |Torrance |

|14.00 |Otero |8.00 |

| |13.00 | |

|Grant | |Union |

|5.00 |Quay |4.00 |

| |7.00 | |

|Guadalupe | |Valencia |

|4.00 |Rio Arriba |14.00 |

| |13.00 | |

| | |  |

| |  | |

[pic]

Notice at the top of the column the variables are labeled VAR0001 and VAR0002. You will want to rename them as “county” and “deaths”. To do this, double click on VAR0001 or VAR0002. You will get a variable view screen that looks like the one below. Now you can click on VAR0001 and VAR0002 and rename them “county” and “deaths”.

[pic]

Click here to change variable name. Notice that the “type” column has VAR0001 labeled as a string variable and VAR00002 labeled as a numeric variable. This is due to the county variable being comprised of letters and the deaths variable being comprised of numbers. Also, notice the level of measurement for the “county” variable is labeled as nominal and “deaths” is labeled scale. If you ever need to change these values simply double click on the cell of interest and make the necessary changes.

After renaming the two variables to “death” and “county” you will want to go back to the data editor, to do this click on the data view tab at the bottom of your screen.

[pic]

Now complete entering the data from the table above. When you are finished save it to your desktop, 3.5” floppy, or thumb drive by clicking file > save as. Shown below.

[pic]

This will result in screen that is similar to other windows-based programs. Name the file “nmdeath” and make sure the “save as type” field ends with “sav”.

Opening Files

Oftentimes, you will be sent a data file by a client/colleague for your analyses. At times, these files will be sent to you in non-SPSS formats. Fortunately, SPSS can handle several common formats (Excel, DBF, CSV, etc.).

Go to and find the data file titled tutorial1.sav. Click on the hyperlink for tutorial1.sav using the right button on your mouse (i.e., right click). You will see this menu.

[pic]

Click on “save target as” and save the file to your desktop. Once you have the file on your desktop open it by double clicking on it. SPSS will open and you will see a spreadsheet that looks like this. You might need to close the output and syntax windows. If so, click on the X box in the top corner of each window.

[pic]

Frequency Tables

As we discussed on class it is often difficult to identify patterns in our data when looking at raw scores. For example, look at the column labeled zoo and try to identify a pattern in the raw scores. It’s very difficult. One way to look at our data that addresses this problem is to create frequency tables. To create a frequency table click on analyze > descriptive statistics > frequencies which results in the following view.

[pic]

After you click on frequencies you will see the menu below. Notice that the zoo variable has been added to the right side. Left clicking on zoo and then pressing the right facing arrow in the center of the menu did this.

[pic]

Now click the OK button. The output screen will popup and you will see the table below. Unfortunately, the table is not very useful, because the values on the measure are continuous. In other words, the frequency table is not much better than the raw values. It would be useful to split the data into quartile intervals.

[pic]

Splitting a variable into intervals.

Select transform > Visual Bander

[pic]

This results in the menu below. Place zoo in the “variables to band” column as you did with frequencies.

[pic]

Clicking continue results in the following menu.

[pic]

Click “zoo story” to get this histogram, and click on “make cutpoints” to arrive at the following menu.

[pic]

We want to create quartiles so click on the bubble labeled “equal percentiles based on scanned cases”. To do this we need to make cutpoints at the 25th, 50th, and 75th percentiles. This is why I entered “3” in the “number of cutpoints” field. The width(%) filed now indicates that each interval is 25% of the cases wide. Experiment with different values. For example, if you input “2” cutpoints each interval will be 33% of the cases wide. This would be useful if you wanted to break the scores into “high”, “medium” and “low”. When done experimenting set the cutpoint to “3” and click the apply button. This will take you back to the original table.

[pic]

Notice that the histogram now has blue vertical lines indicating the locations of the three cutpoints. Now we want to label these cutpoints, to do this click “make labels”. This results in the following view. Notice that SPSS has automatically labeled the cutpoints.

You can change the labels by clicking on the cells and typing a new label.

[pic]

Now give the banded variable a name (try zooband) and click OK. SPSS will say that it is going to create 1 new variable click OK again. This will send you to the output screen switch to the data editor screen. Now create a frequency table using your new banded variable by going to analyze > descriptive statistics > frequencies.

[pic]

Place the banded variable into the right hand column and click OK. You will get the following table.

[pic]

The table above is much easier to interpret. Notice that the 3rd quartile is not at the 75th percentile; this is because the score of 13 is a modal value.

Histograms

Throughout the course we will be looking at the shape of a variable’s distribution. Histograms are a nice way to visually represent the data. To create a histogram click graphs > histograms. See below.

[pic]

This will result in the following menu.

[pic]

Place zoo story in the variable field and check the “display normal curve” box. You will get a histogram that looks like this.

[pic]

Displaying the normal curve can confuse the eye and suggest the distribution is normal. In the case of this variable it is fairly normal with a little positive skew. On the side the mean and standard deviation of the variable are listed which is helpful.

Boxplots

Another way to visually represent data is with boxplots. In the tutorial dataset there are two conditions. One condition viewed pictures of toys and the other condition manipulated toys that represented story events. The zoo story was used as a pretest to determine if the to conditions were equivalent in the beginning. To create a boxplot click graphs > boxplot. This results in the following menu.

[pic]

Highlight “simple” and click define.

[pic]

Place “zoo story” in the variable field and “activity vs. picture” in the category axis and click OK. This will result in two boxplots (0 = pictures and 1 = manipulation).

[pic]

Stem and Leaf Plots

Another way to visually represent data is with stem and leaf plots. To do this click analyze > descriptive statistics > explore. This will result in the following menu.

[pic]

Place “zoo story” in the dependent list and click on the bubble for plots. Then click OK. You should see the following table.

zoo story Stem-and-Leaf Plot

Frequency Stem & Leaf

22.00 0 . 0111222222333334444444

25.00 0 . 5556666667777777888899999

19.00 1 . 0000111233333334444

6.00 1 . 556669

4.00 2 . 0013

Stem width: 10.0

Each leaf: 1 case(s)

If you scroll down a little further you will also see a boxplot of the variable. Try going back to the menu and including “active vs. picture” in the factor list. This will give a different representation of the data.

Descriptive Statistics

Throughout the course we will be looking at summary statistics for variables. The most common ones we will use are the mean, variance and standard deviation. To calculate these values click analyze > descriptive statistics > descriptives. This will result in the following menu.

[pic]

Place zoo story in the variables box and check the “save standardized values” box. OK. Saving the standardized values will give you z-scores for each subject. Now click the “options” button to see the following menu.

[pic]

By default SPSS will calculate the mean, standard deviation, range, minimum and maximum. We need the variance (it really should be a default option) in this class so check the variance box. Now click continue and then OK on the next menu to see the table below.

[pic]

You are now ready to do Homework 1.

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

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

Google Online Preview   Download