Posts filed under '0. SPSS, where to start'

How to create a cross table

The most easy way to present data in a cross table is to use the table function in SPSS. To do this first go to analyze>tables>basic tables. This opens the following screen.
crosstables1.jpg
Now we drag the question “what is your sex?” into down and “SPSS lessons” into across. By clicking statistics we will get the following screen.
crosstables2.jpg
To get the amount and the row percentage into the crosstable, we drag “row%” and “count” into the right box. Now we click continue.
By clicking ok you will get the following cross table:
crosstables3.jpg
Tip: If you want a total percentage or amount in your table, just click on “total” at the basic tables screen, and choose the option “totals over each group variables”.

Files used for this example:

SPSSlog.com example data sheet
SPSSlog.com SPSS file
SPSSLog.com example questionnaire

5 comments May 27th, 2006

How to create a frequency table

The most easy way to present data is to create a table. There are different ways in SPSS to create a table. We will describe the most common way of creating table.
The most common way of creating a table is with the descriptive statistics function. To do this first go to analyze>descriptive statistics>frequencies. This opens the following screen:
tables1.jpg
Now we drag the question “what is your sex?” into the variables. By clicking ok you will get the following tables:
tables2.jpg
The first table shows how many valid cases there are and how many there are missing.
The second table shows:
- The 1st column: This shows the value names and the total.
- The 2nd column: This show the frequency of the values.
- The 3rd column: This shows the percentage of the values including the missing cases.
- The 4th column: This shows the percentage of the values excluding the missing cases.
- The 5th column: This shows the cumulative percentage; this can be important information.

Files used for this example:

SPSSlog.com example data sheet
SPSSlog.com SPSS file
SPSSLog.com example questionnaire

5 comments May 21st, 2006

Make your codebook

This example is based on a market research project. In this project a questionnaire went out and we got a lot of data back from our respondents. To have a guideline when filling in your data, using a codebook is very handy. In fact, it is essential if someone else is filling in data for you. Below you can find an explanation on how to make this codebook.

1. Make a copy of your questionnaire document, and name it e.g. codebook.doc (a little obvious, I know).
2. Change the question numbers into variable names. The most logical thing to do is to give question 1 the variable name q1, question 2 the variable name q2, etc.

SPSSlog.com Codebook

3. Now start coding the answer categories. If your question has only one possible answer, than you can code the first answer as 1, the second as 2.

SPSSlog.com Codebook 2

4. If your question has multiple possible answers, than you should take a different approach. The most handy one is the following. For each possible answer, you make a new variable. For example, the first possible answer for question 11, you give the variable 11a. The second possible answer, give it variable 11b, etc.

SPSSlog.com Codebook multiple choice

After you have done this, you can start define your variables in SPSS.

Files used for this example:

SPSSlog.com example data sheet
SPSSlog.com SPSS file
SPSSLog.com example questionnaire

2 comments May 10th, 2006 andris

Importing data into SPSS

Importing some data

If you have a small amount of data you want to get into SPSS, the most easy way is to simply Copy Paste it into SPSS. Be aware to check if everything ends up in the right cell, and if  you really have all the data you need. The most safe way to get this data into SPSS, would be to import it. Especially if you have a lot of data.

Importing a lot of data

There are a number of file formats SPSS can import data from. In general it is handy – but optional – to have a header row in the top of your file with descriptions of the columns. This means that you add one line before all the cases, where you put the name of the column (or variable).

Importing data from an Excel file
Importing data from an ASCII file
Importing data from a tab delimited text file

5 comments May 3rd, 2006 andris

How to handle multiple response questions

In a lot of research, multiple answers can be given to a single question. For example:

“What kind of food do you like?”
o soup
o rice
o salad

How do you analyse this type of question? Let’s assume you want to make a table with the answers. How do you combine them? Even though it may seem like the most easy thing to do, this is pretty difficult stuff. SPSS is good at analyzing unique combinations of variables (answers to questions) combined with unique cases (people in a survey). The combination of more than one answer per person, does not fit into that logic. So we have to be a little creative.

There are – at least – four different ways to analyze these results. They all have advantages and disadvantages, so it really comes down to your preferences:

1) Create separate variables for each answer 
varsoup (0 = not ticked, 1 = ticked)
varrice (0 = not ticked, 1 = ticked)
varsalad (0 = not ticked, 1 = ticked)

If you’re not entering the data yourself, chances are that this is what your data-set will look like if there was a multiple question in the survey. With three separate variables, you can create three tables using the frequencies-command. The advantage of this approach is its simplicity, the disadvantage is that you have three separate tables. You cannot tell if the three answers were in any way linked to one another.

2) Make a ‘grouping variable
a. Follow the steps in option 1, creating separate variables for each answer
b. Create a new variable: the ‘grouping variable’. Select analyze > tables > multiple response sets… Select all variables from the list you want to group together and click them into the right window ‘Variables in set’. Choose the ‘counted value’: this is the value that you want to count as ‘yes’. In our example, this is the value 1. Give the new variable a name, for instance ‘varfood’. Click ‘add’, and ‘OK’. Your new grouping variable will appear with a $ in front in de list to the right of the screen: ‘$varfood’. The $-sign tells you this is a variable containing several variables.

To make a table, select analyze > tables > multiple response tables… In the window to the bottom-left of the screen, you see grouping variables. Click the one you want and click it into the ‘Rows’ box. Click OK and you’re done.

3) Several variables with a hierarchy
In order to be able to use this method, it would be nice if your survey also asked to rank the three items available. If that’s not the case, you will have to decide for yourself which answer is most important and label that one first answer.

This will lead to:

varfood1 (1 = soup, 2 = rice, 3 = salad) label “First answer”
varfood2 (1 = soup, 2 = rice, 3 = salad) label “Second answer”
varfood3 (1 = soup, 2 = rice, 3 = salad) label “Third answer”

4) Create a variable with a single value for each possible combination
This will lead to:

varfood

1 = soup,
2 = rice,
3 = salad,
4 = soup and rice,
5 = soup & salad,
6 = rice and salad,
7 = soup and rice and salad

The disadvantage is that this can be quite some work when you’ve got more than three answers. And you also run the risk of not being able to interpret your resulting table at a glance: the number of cases per option can be quite small. This is really only a serious option if you want to know exactly what each person answered. Pay attention to the order of the answers: if you start off with those combinations that were pretty popular, they will be at the top of your table, making it easier to interpret the results.

(Thanks to Sander for answering this question)

27 comments May 2nd, 2006

Entering data in SPSS

We write this post assuming that you have already defined your variables, and that you have not already entered data in another program. If you have, please refer to the post about importing data into SPSS.

Open your SPSS file, and make sure that the tab selected in the bottom is the “Data View” tab. In this view, the rows represent the observations (or respondents, cases) and the columns represent your variables.

SPSS Empty data sheet

In this example we will use the data which you can find in our SPSSlog.com example data sheet (PDF file). One handy thing when filling in data, is to set SPSS to show the labels. You do this by choosing View -> Value Labels. If you have filled in everything from the Excel sheet, and chosen this option, your SPSS file should look like this:

SPSS Filled in data sheet

When you have to enter a lot of data, be sure to Save your file now and than. Typing in data is not the coolest job, and you certainly don’t want to spent hours typing in the same data again. After you have filled in your data, don’t forget to check the data for errors!

Files used for this example:

SPSSlog.com example data sheet
SPSSlog.com SPSS file
SPSSLog.com example questionnaire

1 comment May 1st, 2006 andris

How to define your variables

Start SPSS, and create a new data file (Choose Type in data in the first dialog window). You now see a file that looks like a Microsoft Excel file. In the bottom of your screen, you see two tabs. We see that the tab “Data View” is selected. This is the place to type in your data. Before we take that step, we have to define our variables. Next to the tab “Data View” we see the tab “Variable View“, click on that tab. When you have clicked this tab, you get the following screen:

SPSS Variable View
(click on thumbnail to get the big version)

For each variable there is a row in this view. In the columns you can find several properties of a variable, such as, name, type, width, etc. Below you will find an explanation of the most important columns.
In the name column you have to define the name of the variable. This is bound to a lot of limitations, the following are the most important:

- The name must start with a letter.
- The name should be 8 characters max (depending on your version of SPSS).
- The name should not be one of the keywords that SPSS uses to make statistical calculations (like AND, NOT, EQ, BY, WITH and ALL).

You can find the other limitations in the SPSS help file. Personally I always try to name my variables as follows: for question 1, I name the variable q1, for question 3a, variable q3a etc.
After you have typed in a name, and pressed “Enter“, the other columns (except Label) are filled in automatically:

SPSS Question 1

(click on thumbnail to get the big version)

The next thing you have to do is adjust these columns (where neccessary):

- Adjusting the Type
When you have hit Enter, the focus goes to the Type column, and a grey box appears in the right part of this cell. If you click on this box, you can select the variable type from a dialog window. The types you should focus on in the beginning are Numeric and String. Use the String type for questions with open answers, use the Numeric type for questions where for example the respondent has a limited number of choices which you have preselected.

- Adjusting Width
If you have selected the String type, than adjust the width to maximum (for some version of SPSS 255 characters, for other versions more). If you have chosen Numeric, you can go with the standard with of 8 characters.

- Adjusting decimals
In most cases this is not neccessary to adjust.

- Adjusting Label
This is the place where you can fill in a describing text for your variables. This can be the text of your question or in some cases of the answer category. This label will appear in output.

- Adding Value Labels
For Numeric type questions, you can predefine the answers. To add variables, click the grey box in the right of the cell. In the dialog window you can add value labels:

Insert value labels

(click on thumbnail to get the big version)

- Adding Missing labels
Here you can add value labels that are irrelevant.

- Adjusting column align and widht
The columns do not have to be changed for starter use of SPSS, so we leave them untouched.

- Adjusting Measurment
This is the last place where you can choose the right measurment for the variable. You can choose between scale, ordinal and nominal. Which measurment you’ve choose for what question, you can read here.

Repeat these steps for all of your questions, and you have defined all your variables!

Files used for this example:

SPSSlog.com example data sheet
SPSSlog.com SPSS file
SPSSLog.com example questionnaire 

4 comments April 29th, 2006 andris

Get SPSS in your own language

Today Giuseppe from Italy sent us the following question:

“How can i translate spss into the italian language?”

SPSS is available in several different languages, namely English, Japanese, French, German, Italian, Spanish, Chinese, Polish, Korean, and Russian. The website of SPSS says you should “contact your local office to find out version information and more”. Visit the SPSS website to find a list of local offices. And Guiseppe, especially for you, the SPSS website in Italian. :)
If you have any more questions about SPSS, please submit your question!

April 29th, 2006 andris


Calendar

September 2011
M T W T F S S
« Apr    
 1234
567891011
12131415161718
19202122232425
2627282930  

Posts by Month

Posts by Category