This action might not be possible to undo. Are you sure you want to continue?

**1.1 Dowloading data from the web
**

• The data I post on my webpage will be either in a zipped directory containing a few

ﬁles or just in one ﬁle containing data. Please learn how to unzip zipped documents.

• Saving data on my website to your director:

Right click on the link (the ﬁle or the zipped directory you want to save). Then click

on Save Link As... By pressing on here it will give you the option of saving the data

to your chosen directory.

• Once saved, if the ﬁle was zipped you will need to unzip it.

1.2 Plotting Histograms in SPSS

• I have posted on my page some data (in a zipped directory called Student651Data), this

data is for you to play with. Student651Data contains height and course information

data from a 651 class.

• Open the data in the SPSS data editor, by going to SPSS -> file -> Open -> Data.

It will ask you the format, click Okay all the way.

• Now you should see the data on the SPSS spread sheet infront of you.

• The third column in this data are the heights of students (this is a numerical variable),

the fourth column is a column of zeros and ones, one indicates a female and zero a

male (this is a binary variable).

• We want to make a histogram of all the data and the male/female data.

• To do this go to Graphs -> Legacy dialogues -> Bar -> Define.

• To make a relative frequency histogram of all the heights (regardless of gender), high-

light % of cases, and put the third column (these are the heights) into the category

Axis. Then press Okay. You should get a histogram of all heights in a separate page.

• To get a separate plot of the male and female heights, put the heights into the Category

Axis, and the male/female binary variable indicators (4th column) into the Rows panel,

then press Okay. You should get a histogram of the male/female heights on a separate

page.

• Compare the overall heights with the subsample heights of only males and females.

1

1.3 Making a box plot in SPSS (single sample)

• Input data in SPSS.

• Go to Graphs -> Legacy Dialogs -> Boxplots Highlight Summaries of separate

variables. Then click on Simple.

• Put your variable of interest into Boxes Represent and click on okay.

1.4 Comparing two samples using boxplots

• Boxplots are excellent for comparing two samples.

• Do this is SPSS with the height data, comparing male and female heights.

• To compare boxplots in SPSS:

(i) Go to Graphs -> Legacy Dialogs -> Boxplots. Highlight Summaries for groups

of cases. Then click on Simple.

(ii) Put the data you are interested in analysing (such as the heights) in the Variable

Axis and the diﬀerent categories (such as male/female) into the Category Axis.

Then press okay.

• Compare the plots, what do you observe?

1.5 Making QQplots in SPSS

• Load data in SPSS.

• Go to Analyze → descriptive statistics → QQplots.

• Put the variable you want to check for normality into the Variables box. Then press

okay. The ﬁrst plot is the QQplot. Ignore, for now, the second plot.

1.6 Doing one sample tests in SPSS (2-sided tests)

• These instructions only give information on how to do a two-sided test.

• Suppose we want to test

H

0

: µ = µ

0

H

A

: µ = µ

0

.

• Load data into SPSS.

• Go to Analyze − > Compare means − > one sample t-test.

2

• Put the variable of interest into to the Test variable box.

• Put the value µ

0

(mean under the null hypothesis) into the Test Value box.

• Press Okay.

• You should get two tables.

• The ﬁrst table is called one-sample statistics:

– The second column is the sample size N, the third is the sample mean

¯

X, the

fourth is sample standard deviation s and the ﬁfth the St. Error mean this is the

square root of the variance of the mean

s

2

/N.

• The second table is the One-sample test (we base out decision on the results in this

table).

– We will focus for now on the Sig. (2-tailed) and Mean Diﬀerence columns.

– The Mean diﬀerence column is the diﬀerence between the sample mean and the

mean under the null. That is

¯

X −µ.

– The Sig (2-tailed) column contains the p-value. Take this number and compare

it to the 5% signiﬁcance level. If it is smaller than the signiﬁcance level. Then

there is enough evidence to reject the null.

1.7 Comparing populations in SPSS - independent sample t-test

• We use the male female height data to demonstrate how to compare populations in

SPSS.

• Let µ

x

be the mean female height in Texas A&M and µ

y

the mean male height at

A&M. I want to test H

0

: µ

x

≥ µ

y

against H

A

: µ

x

< µ

y

(equivalently H

0

: µ

x

−µ

y

≥ 0

against H

A

: µ

x

−µ

y

< 0). I only have the 651 class sample avaliable, and want to do

test based on this sample.

• First we must check that all the assumptions are satisﬁed, this SPSS will not do. The

explanations above show that they are approximately satisﬁed.

• Import the data into SPSS.

• Go to Analyze → Compare means → Independent Samples T-test. But the vari-

able of interest (eg. heights) into the Test Variable and the grouping (one and zero,

which indicate male/female) into the grouping variable.

• Deﬁne the grouping, that is Group 1 = 1 and Group 2 = 0.

• Then press okay.

3

1.8 Comparing populations: The Mann-Whitney/Wilxon rank sum

test in SPSS

• Import the data into SPSS.

• Go to Analyze → Nonparametric tests → 2-independent Samples...

• Select Mann-Whitney U.

• Put the variable of interest into the Test variable List and the grouping (one and

zero, which indicate male/female) into grouping variable.

• Deﬁne the grouping, that is Group 1 = 1 and Group 2 = 0. Press okay.

• Look at diet data wilcoxon rank sum test SPSS.pdf to understand the output for the

diet data.

1.9 The paired t-test in SPSS

• Input data as two columns, for example one column is the Friday 13th data and the

other is the Friday 6th Data.

• For the paired t-test go to Analyze -> Compare means -> Paired sample T Test.

Select both variables and press OK.

• Interpreting the paired t-test output: see paired t test runners SPSS1.pdf.

1.10 The Wilcoxon sign rank test in SPSS

• Input data as two columns.

• For the Wilcoxon sign rank test, go to Analyze -> Nonparametric tests -> Related

Samples. Select both variable and cross the Wilcoxon test.

• Interpreting the Wilcoxon sign rank output:

see wilcoxon sign rank test runners SPSS1.pdf.

1.11 The ANOVA in SPSS option I

The observations (dependent) are on one column and the sample from which it came from

(the factor) is in another column. It should be a 90 degree turn oﬀ:

• Select Analyze → Compare means → One way Anova.

• Select the observations as the Dependent variables.

4

dependent -0.307 -0.294 0.079 0.019 -0.136 -0.176 0.125 -0.013 0.082 0.091 0.459 0.137

factor 1 1 1 1 1 2 2 2 2 2 2 3

• Select the group numbers as the Factors. Press Okay

• See ANOVA speed of light SPSS.pdf for an interpretation.

1.12 ANOVA in SPSS option II: obtaining the residuals

• The One-sided ANOVA command in SPSS does an ANOVA. However Generalised

linear model command gives more informative output. This option does an ANOVA,

but also calculates the residuals for you ¯ ε

ij

= X

ij

−

¯

X

i

. With residuals you can check

for normality of the residuals.

• This is how to do it:

– Input the data into SPSS.

– Select Analyze, then select Generalised Linear Model, ﬁnally select Univariate.

– At this point you will see a subwindow.

– Highlight the observations X

ij

(eg. the speed of light in the data) and put that

as a Dependent Variable.

– Hightlight the group numbers (these will be trial number 1-5 in speed of light the

data set) and put that in as a Fixed Factors.

– Go the the Save option and tick the box Residuals Unstandardised. The will

calculate the residuals ¯ ε

ij

for you and place it as an extra column in your data.

– Finally select Okay This will do the ANOVA for you.

• Checking for normality with the residuals.

– After the ANOVA is done you should see an extra column in your data containing

the data. To check to see whether they are close to normal select Graphs, then

select the Q-Q.. option. Highlight the variable you want to check for normality

(it should be labelled by residuals) and make a QQplot.

1.12.1 Interpretating the SPSS GLM output

• The output from the General Linear Model option is harder to read than the ANOVA

option. But there are only three rows you should look at. These three rows you should

treat as the Between Groups, Within Groups and Total rows you see the typical AOV

table

5

Generalised Linear Model in SPSS = one-sided ANOVA in SPSS

Corrected Model = Between Group

Error = Within Group

Corrected total = Total

Understanding the Univariate Analysis of Variance table:

• See the ﬁle SPSS speed light residuals ANOVA1.pdf, do the think the speed of light

residuals are normal?

1.13 Linear regression in SPSS

• Load the data into SPSS. The independent variables (such as number of cigarettes

smoked are in one column and the dependent variable such as the number of incidents

of lung cancer are in another column).

• Go to analyze → Regression → linear.

• Put the dependent variable such as the number of incidence of lung cancer (the y-

variable) into the dependent variable box and the independent variables such the num-

ber of cigarrettes smoked into the dependent variable box (the x-variable).

• To store the residuals (which you need to use to the make QQplots etc), press on Save

and tick the box Residuals Unstandardised, the press Continue.

• To do the regression press Okay.

• The residuals ˆ ε

i

= Y

i

−

ˆ

β

1

x

i

−

ˆ

β

0

= Y

i

−

ˆ

Y

i

are stored in an additional column of your

data.

• Make a QQplot of the residuals.

• Look for patterns which remain in the residuals by making a scatterplot of the residuals

against the independent variable x −variable. To make the scatterplot

– Go to Graphs → legacy dialogue → Scatter/Dot → Simple Scatter →

Define.

– Put the independent variable in the x-axis and the unstandardised residual in the

y-axis. Press Okay. Look for patterns in the scatterplot, if there are not patterns,

then the linear model is appropriate.

• See the ﬁle linear regression smoking1.pdf.

6

1.14 Correlations and SPSS

• To calculate correlations in SPSS.

• Select Correlate → Bivariate correlation.

• Choose the two variables in your data you want to correlate.

• Select the correlation estimator you wish to use.

• The correlation we did above is known as Pearson correlation.

• The nonparametric correlation we will describe below is called Spearman Rank corre-

lation.

• Tick the boxes (you can choose more than one) you desire and then press okay.

7

Sign up to vote on this title

UsefulNot usefulspss

spss

- BIOL 300 Desharnais FinalExamBKey (2010)
- RM ANOVA - SPSS Interpretation
- ANOVA MCQuestions
- Pharmatox Analysis of Variance Presentation
- Dependent Variables Example
- ANOVA and Simple Comparative Experiment
- Homework Four
- 9-07 Factorial Planning Process
- UDS Further Linear Models Trial Questions
- Lecture08_ACCG615_2pp
- Stata
- Tutorial 4 Q4
- Lect7
- SigmaXL Features
- Lecture 12
- K.ch18.Notes
- Methodology in Sport Science
- U5.2-RandomizedBlockDesigns
- Parametric Test
- Oneway and Twoway ANOVA Models Using SAS
- SPSS Tutorial
- t-test-120919022935-phpapp02
- Solutions
- Prism 6 Statistics Guide
- On-line AppendixB-Hand Calculation of Statistical Tests
- Which Statistical Tests to Use
- Reverse Code
- Inferential Analysis SPSS
- breiman2001randomforests
- how to do anova in spss
- SPSS

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd