SPSS for Windows - Radford University



Introduction to SPSS 17.0 for Windows

Material covered: Creating a new SPSS data file, variable labels, value labels, saving data files, opening an existing SPSS data file, generating frequency distributions, obtaining printouts from SPSS.

To start SPSS 17.0 for Windows

Depending on the computer you find yourself in front of, here’s what you’ll need to do to open SPSS.

1. There may just be an SPSS icon on the desktop. If there is, double-click on it and that’s all there is to it.

2. If there’s no SPSS icon on the desktop you may have to start the program using the Start button.

• Click on Start.

• Click Programs.

• Click Radford University Course Software.

• Click Math-Stats.

• Click SPSS 17.0

• Click SPSS for Windows 17.0.

• Two windows should pop up. The window in front is labeled SPSS 17.0 for Windows. This opening window gives you several options. For example, it shows you the data files you’ve used most recently and gives you the option of reopening one. Frankly, what I usually do is to hit the Cancel button on this window and get right to the SPSS spreadsheet. Go ahead and do this.

• Now you’re looking at the spreadsheet. This is the starting point for most of the things we’re going to ask SPSS to do. You’ll notice a bunch of terms at the top, like File, Edit, View, Data, Transform, Analyze, Graphs, etc. Each one gives you a pull down menu with a particular set of options. By and large, if you want something done in SPSS you go to the appropriate pull-down menu, find what you need, click the option that tells SPSS what you want to do and click an OK button.

• You might also notice that there are two “tabs” for the spreadsheet displayed at the bottom. The one that’s active at the moment is the Data View tab. Logically enough, this is where you get to look at the actual data. Clicking the tab labeled Variable View takes you to a spreadsheet that presents information about each variable, rather than the scores for that variable. We’ll get to the Variable View in a minute. Make sure the Data View tab is selected for now.

At this point you’ve got three basic options: (a) enter data into the SPSS spreadsheet to create a new data file, (b) open an existing data file that has already been stored as an SPSS system file, or (c) import a data file that’s currently in another format (e.g., ascii, Excel, SAS) into SPSS. Let’s start with creating a new data file.

To create a new data file using the SPSS spreadsheet

Entering data in SPSS is easy. Each row contains data from one subject. Each column contains data for one variable.

Let’s say that we had a data set with data on four variables from 10 subjects. All of the subjects are college students. These variables are the subject’s ID number (ID), the IQ score for the subject (IQ), the subject’s GPA (GPA), and the number of years the subject has been at college (Year). The data are presented below:

ID IQ GPA Year

--------------------------------------

1.00 102.00 2.75 1

2.00 108.00 4.00 2

3.00 109.00 2.25 2

4.00 118.00 3.00 4

5.00 79.00 1.67 2

6.00 88.00 2.25 2

7.00 100.00 2.50 3

8.00 92.00 3.50 1

9.00 131.00 3.75 2

10.00 83.00 2.75 2

• Move the cursor to the top-left cell in the spreadsheet and click once. That cell should now be highlighted with a thick black line around the outside of the cell. Now you can type in the number for the first variable for the first subject. Because the first variable in the data set is the person’s ID number, this score will be 001. When you press the Enter key the number should show up in the spreadsheet and the next box down should be highlighted. Type the rest of the scores for the variable “subject ID” in the first column.

Entering a variable name

• When you enter data into a particular column a variable name in bold type shows up at the top of the column, var00001. To change this variable name, double-click on the variable name. This automatically takes you to the Variable View option that we mentioned before. You’ll notice that from left to right the columns are labeled Name, Type, Width, Decimals, Label, Values, Missing, Columns, Align, and Measure. To change the name of the variable, move the cursor to the box in the Name column for row 1. Replace VAR0001 with id. Variable names can be more than eight characters long, but I strongly recommend trying not to them get much longer than this. Variable names cannot start with a digit. Now click the Data View tab at the bottom of the screen. When you go back to the data spreadsheet you should see the new variable name id displayed at the top of the far left column.

• Go ahead and enter the data for the three other variables. Enter the variable names iq, gpa, and year.

• After the data are entered, click the Variable View tab.

• Now that we’re here, we might as well show you a couple more things.

Specifying the type of variable you’re working with

Go to the column labeled Type in the Variable View. Notice that the term Numeric is in that column for each of the four variables you’ve entered. Go to the row for the variable id and click on the term Numeric. A grey box with three little dots shows up just to the right of Numeric. Click on the grey box. A new window labeled Variable Type pops up. This window displays a number of options for the type of variable you’re working with. The default option of Numeric should already be selected. This is because most of the variables that people use are recorded as numbers. However, occasionally a researcher wants to record a variable in the form of text. For example, a possible variable name might be a subject’s name. SPSS’s term for a variable that is recorded as text is a String Variable. So, if you want to have SPSS record information about a subject as text instead of a number, you’ve got to select the String option in this window. At this point, keep the variable type as Numeric and click OK to go back to the Variable View.

Specifying a Variable Label

Take a look at the column with Label at the top. This column gives you a place to enter a variable label for a particular variable. Variables labels aren’t required, but they come in pretty handy – especially if you have a data set with a lot of different variables. They give you a way of identifying a variable in your SPSS output with more than just an eight character name. For example, you might have a score from the 14th item of the Beck Depression Inventory. The variable name might be bdi14. Whenever this variable is referred to in your output you can ask SPSS to substitute the variable label Beck Depression Inventory – Item 14. This saves you from having to remember what each variable name means.

Entering a variable label is easy. Click twice in the box in the Label column for the variable id. Type Subject ID number in the box. That’s all there is to it. Now put in the following variable labels for the remaining three variables.

Iq ( IQ score

GPA ( Grade point Average

Year ( Year in college

Specifying Value Labels

If a variable is categorical in nature, another handy thing you can do in the way of labeling is to use is to use a Value Label. For example, the variable Year in your spreadsheet is categorical. Instead of having to remember that a value of “1” means “First Year College Student”, you can have SPSS display this information in any output for that variable. A value label gives you a way of recording (coding) what each numerical value means.

Let’s put in some value labels for the variable Year.

• The default setting in the Values column of the Variable View is None. Click once in the box for the Year row and the Values column. A grey box with three little dots should show up. Click the grey box.

• You should get a Value Labels window.

• We’re going to put in Value Labels for each of the four numerical categories for Year (years one through four).

• To start with, type a 1 in the empty box to the right of the term Value.

• Now type First year college student in the empty box to the right of the term Value Label.

• Click the Add button.

• You should now see the phrase 1.00 = “First year college student” show up in the bottom box.

• Repeat the same procedure for the other three years of college.

• 2 ( Second year college student

• 3 ( Third year college student

• 4 ( Fourth Year college student

• When you’re done, click OK to go back to the Variable View. You can always change your value labels later by clicking on the grey box again.

Saving a new data file

• To save the new data file, click file, then Save As. Find (or create) a folder to save the file in. I would suggest making a folder on your h: drive so that you can get access to your SPSS files from any machine on campus. Now type in the name for your data file. You might name it iq-gpa. SPSS will automatically save it with .sav as the file extension (i.e., the name of the file will end up being iq-gpa.sav). Check your directory to make sure that it got saved.

• Close SPSS and then re-open it again so that you’re starting from scratch.

To open an existing SPSS data file

I’d like you re-open the ig-gpa.sav file that you just saved.

To open a file that you’ve already saved…

• Click File

• Click Open

• Click Data. This will bring up an Open File window.

• Find the folder that the file is in, click on it to select it and then click the Open button.

Working with an output window

SPSS displays the results you ask for in an Output Window. So that you can have something to put in an output window, let’s get a frequency distribution for the variable Year.

• Click the Analyze pull-down menu.

• Go down to Descriptive Statistics.

• Click on the Frequencies option. You should now get a Frequencies window.

• Click on the variable Year to select it. Now click on the arrow just to the right of the list of variables. The variable Year should move in the box labeled Variable(s).

• Click OK.

• A new output window should pop up. The larger display on the right side of the window contains the results. Notice that SPSS has provided the frequencies for each of the four categories of Year. Also notice that it has used the Value Labels you gave it before.

• The display of the left side of the output window looks like a branching tree. This gives you an outline of the various parts of the output. If you want to hide a part of the output, double click on the label for it in the branching tree. For example, double-click on the little icon that looks like an open book beside the term Title in the branching tree. The title of the output, Frequencies, disappears from the output displayed on the left. If you double-click on the icon that looks like a closed book beside the term Title the term Frequencies will pop up again in the output on the left. This function means that you can control what SPSS does or does not display in the output when you go to print it.

• Save the output to a file named iq-gpa. The file extension for SPSS output files is .sps

Printing (You don’t have to print anything for this assignment!)

• To print a section of output you need to make sure it’s highlighted in the branching tree listing on the left side of the output window. If you want to print everything you’ve got to click once on the term Output at the very top of the branching tree. This will highlight everything.

• You’d click the File pull-down menu.

• Then click Print. You may need to change the printer selected.

• At this point all you’d need to do is to click OK. To save a bit of paper, let’s not do that here.

And that’s it! Make sure you’ve saved all your work. Then send Amanda an e-mail (avanlaeken@radford.edu) that contains both your data and output files as attachments.

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

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

Google Online Preview   Download