Archive for April, 2006

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

One sample t-test

Many visitors of our blog are searching for information about the one sample t-test.

You perform a one-sample t-test when you want to determine if the mean value of a target variable is different from a hypothesized value.

To perform a one-sample t-test in SPSS. Choose Analyze>Compare Means>One-sample t-test.

ttest1.JPG

Move the variable of interest to the Test variable(s) box. Change the test value to the hypothesized value. Click the OK button.

The output from this analysis will contain the following sections.

One-Sample Statistics. Provides the sample size, mean, standard deviation, and standard error of the mean for the target variable.

One-Sample Test. Provides the results of a t-test comparing the mean of the targetvariable to the hypothesized value.

A significant test statistic indicates that the sample mean differs from the hypothesized value. This section also contains the upper and lower bounds for a 95% confidence interval around the sample mean.

Do you have an question about the one-sample t-test, submit your question here.

3 comments April 26th, 2006

Performing a MANOVA in SPSS

Ivy sent us an e-mail about investigating the interaction effect of independent variables. MANOVA (multivariate analysis of variance) is a statistical procedure that allows you to determine if a set of categorical predictor variables can explain the variability in a set of continuous response variables.

In SPSS you can perform a MANOVA as follows:

- Choose Analyze -> General Linear Model -> Multivariate.
- Move the DVs (dependent variables) you want to examine to the Dependent Variables box.
- Move any categorical IVs (independent variables) to the Fixed Factor(s) box.
- Move any continuous IVs to the Covariate(s) box.
- Click OK and there you have your output.

If you have any more questions about MANOVA or ANOVA, submit your questions!

18 comments April 25th, 2006 andris

100% stacked bar graph problem

This Friday we got a question from Els, who has a problem with making her stacked bar graphs look good:

“As a trainee I am now analysing the results of a customer satisfactory investigation. Many people advised me to use SPSS, so I did.

Most of the questionnaire questions are built the same way (very dissatisfied, dissatisfied, satisfied, very satisfied).

The report will be devised in subjects (price, quality, reaction speed,etc). Each subject contains around 5 questions.

For each subject I made a horizontal graph in which all 5 questions regarding that subject are being displayed. This way I will analyze around 5 questions in each graph, as in this example.

bar1.gif

The stacked graphs I made myself are horizontal, 100% stacked, so the bar fills the entire graph horizontally (like in the example). So far, so good, it looks great!

Then the problem: Inside the bars I would like to show the exact percentage over that question.(like in the example).

The problem is, that these figures are incorrect. Now I see the percentage concerning the entire graph, all the questions together, in stead of per question.

Can you tell me what I have to do to change the figures inside the bars from a percentage over the entire graph to a percentage over the bar?”

To solve the problem we will describe step by step how to make a 100% stacked bar chart, and how to get the exact percentages into it. First select Tables > Tables of frequencies.

Now drag the five questions you want to make graphs for to Frequencies for. Click on statistics and choose percent. Click ok, and you are back at the ‘tables of frequencies’ screen. By clicking ok again you will get a table.
Select the table by double-clicking, then click the right-mouse button and select create graph > bar. Now you will get the following screen (click on the picture to show the screen shot in full size):

stackedbar2.jpg
Click at the red marked button in the picture above. In this screen you can change the option cluster after ‘color’ into stack. Go back to the graph and click on the button Horizontale orientation.

After this you have to double click on one of the bars. A new screen will open. In this screen you can click on values in bar labels. Now you can choose the location of the percent value. Now click on inside base and then click ok. Then you will have 100% stacked bars, with the exact percentage on that question inside.

Do you also need an answer to your SPSS question, submit your question here.

17 comments April 22nd, 2006

Looking for patterns in data

This weekend we got a question from Kat, who is desperately ;) looking for our help. She is working on a project with a lot of data in Excel:

“I am in the middle of a project for which I have constructed a large table in Microsoft Excel.

The table consists of variables going across the top, and cases down the side. The cells contain numbers (ie. the frequency of each variable within each case). Many of the cells have no number or the variable has zero frequency in that case.

I want to look for patterns with in the data, that is , similarities between cases. It has been suggested that I do this visually, however the table is so big it would take forever. I am wondering if you know of an application within SPSS which looks for patterns in this way. It would be an enormous help to my work if there is such a thing.”

Well Kat, to begin, of course you should always use SPSS, and never Excel for analysing your data. :)
There are two ways to solve your problem:

1. Do it the hard way by comparing all answers with a correlation test. This means you would have to compare all the questions (and their answers) to see if there is a correlation between them. Doing this, you will in the end have found all relationships and be able to find the patterns.

2. There is an easy way, but for this you need an extra piece of software from SPSS, called “SPSS Categories“. In the software you can put in ratings and categories, and the software will display graphically (and in figures) the possible relationships in your data.

Good luck analysing your data!

April 19th, 2006 andris

New categories and difficulty rating

We have a great website visitor programme, called Google Analytics. With this we get a lot of information about you, our visitor. Not too personal however, so you don’t have to worry. We get to see what you search for, how long you stay, if you come back and how many times. Also we see on which links you click. We found out that most of the people click on the category “Questions and answers“. We decided that we should you help you a little bit, and give you a more easy search digging into this category. To do so, we have added subcategories in this category, based on the steps people normally take when using SPSS. Every question we answer or tip / trick we write, we will place in one of these subcategories. We hope this will make life with SPSS for you a little bit easier. :)

We have also added a rating to the Questions and answers posts. You can find the rating just below the title of a post. This rating shows what level of SPSS knowledge we think you should have if you can use to use the information in the post. So if you are a beginner, and see a posting with a 4 or 5 star rating, for example “Finding correlations using the Pearson correlation analysis.“, than you know you should stay far away from that one.

Happy SPSS-ing! And oh yeah, Happy Easter for everyone.

April 13th, 2006 andris

New SPSS 14 patch available

The SPSS 14.0.2 patch is now available at the SPSS site. This is a regularly scheduled patch release. You can find a description of the patch and installation instructions at the above link. The patch is for the English version of SPSS 14, other languages will be available soon. You have to login, but you can also use “guest” as your userid and password to access the patch.

11 comments April 12th, 2006

Finding correlations using the Pearson correlation analysis.

Zakya asked us another question. After getting his Excel data into SPSS, he wanted to find possible correlations between a couple of variables. Zakya, please find below an explanation on finding correlations using the Pearson correlation analysis.

The Pearson correlation analysis test can be used to find correlations between responses of nominal variables.

A correlation analysis is performed to quantify the strength of association between two numeric variables. In the following task we will perform Pearson correlation analysis. The variables used in the analysis are chicken, car, house, and job.
Select Analyze>Correlate>Bivariate. This opens the Bivariate Correlations dialog box. The numeric variables in your data file appear on the source list on the left side of the screen.
Select chicken, car, house, and job from the list and click the arrow box. The variables will be pasted into the selection box. The options Pearson and Two-tailed are selected by default.

Correlation

Click OK.
A symmetric matrix with Pearson correlation as given below will be displayed on the screen. Along with Pearson r, the number of cases and probability values are also displayed

correlation2.jpg

This is the main matrix of the Pearson’s output. Variables have been arranged in a matrix such that where their columns/rows intersect there are numbers that tell about the statistical interaction between the variables. Three pieces of information are provided in each cell — the Pearson correlation, the significance, and number of cases. When a variable interacts with itself, the correlation will obviously be 1.00. No significance is given in these cases.

Notice that the .775 has asterisks by it. As is indicated at the bottom of the output this is how SPSS indicates significant interactions for you. Notice the significance is under 0.05 (.041).

5 comments April 11th, 2006

Importing Excel file into SPSS

This weekend we got a question from Zakya, who desperately needs information on how to import Excel data into SPSS.

Actually, importing from SPSS is not that hard at all. But before you import, there are some steps to take to make importing more easy:

- Close the Excel file (otherwise SPSS will give an error message)
- Make a header row in Excel with column names (keep them brief and descriptive)
- Do not mix up numbers and text in the same column

In SPSS, select Open -> File from the menu. In the Open file dialog, select Excel file as file type. Browse to the right directory and select the Excel file. Click Open. After this, you will get a new dialog (Hurray!) “Opening Excel Data Source”. If you have made a header row with column names, check the box “Read variable names from the first row of data”. If you do not have other irrelevant data in your Excel file, just click OK. Otherwise select the right worksheet and range, and click OK. If everything went allright, you now have your data in SPSS. Now you can start adjusting the Variables to the right types etc.

3 comments April 10th, 2006 andris

Previous Posts