Basic Commands SPSS
Basic Commands SPSS
Basics
• From the Start Menu at the bottom left corner of the screen
• From the Shortcut to SPSS icon on the Desktop
• Data files. These files are spreadsheets that contain the data on which
you will perform analyses. Data files have a ".sav" extension.
• Output files. These files have several functions: they show you a record
of the actions you have performed in SPSS, the results of your analyses,
and any errors the program may encounter. Output files have a ".spo"
extension.
• Syntax files. These files contain commands that may be run on the data
files. Since commands may be performed by pointing and clicking on the
data file, it is not necessary to use a syntax file. Syntax files have a ".sps"
extension.
Entering Data
Q-Q plot
What it does: The normal Q-Q plot graphically compares the distribution of a
given variable to the normal distribution (represented by a straight line).
Where to find it: Under the Graphs menu, choose Q-Q. Move the variable(s)
you wish to plot into the Variables list. Following is an example of a normal Q-
Q plot for the variable that represents our ethnocentrism scale.First, you'll see
the Normal Q-Q plot.
Where to find it: Under the Graphs menu, choose Boxplot. Click on Simple,
and click on Summaries for separate variables. Click Define. Move the variable
you would like to plot into the "boxes represent" area, then click OK.
SPSS Output
The box represents the interquartile range. The line across the box indicates the
median.
Where to find it: Under the Graphs menu, choose Scatter, then Simple, and
click OK. Plot one scale or ratio variable on the X axis, and the other on the Y
axis. It does not matter which variable you put on either axis.Following is a
scatterplot of the variable Self-Esteem and
Anxiety.
The more tightly clustered the data points around a negatively or positively
sloped line, the stronger the association.
If the data points appear to be a cloud, there is no association between the two
variables
What it does: Graphically displays the 95% confidence interval of the mean
for groups of cases.
Where to find it: Under Graphs, choose Error Bar. Click on Simple, and click
on Summaries for Groups of Cases. Click Define. Move your dependent
variable into the box marked "Variable." Move the independent variable (or
grouping variable) into the box marked "Category Axis." Click OK.
Following is an example of an Error Bar plot for the confidence interval of the
mean level of prejudice for each year in college.
What it is: The Chi Square Goodness of Fit test determines if the observed
frequencies are different from what we would expect to find (we expect to see
equal numbers in each group within a variable).
Where you find it: Under the Analyze menu, choose Nonparametric Tests,
then Chi Square. Move the variable you wish to look at into the "Test
Variables" box, then click OK.
Assumptions
-None of the expected values may be less than 1
-No more than 20% of the expected values may be less than 5
Hypotheses
Null: There are approximately equal numbers of cases in each group
Alternate: There are not equal numbers of cases in each group
group.
The "Expected N" tells us how many people we expected to find in each group,
if there is no difference between groups. Here we see that we expected to find
18.7 people in each group.
What it does: The Chi Square Test of Independence tests the association
between 2 categorical variables.
Assumptions:
-None of the expected values may be less than 1
-No more than 20% of the expected values may be less than 5
Hypotheses:
Null: There is no association between the two variables.
Alternate: There is an association between the two variables.
SPSS Output
There are a total of 230 people who participated in our study, but there is one
missing case. Thus, our valid number of cases (Valid N) is 229.
We can look to the marginals, or the ends of each row or column, to find the
total number for that category. For example, there are 46 students who have
children. There are 200 students who are full-time.
The contingency table also gives the expected values for each cell. For
example, we expected to find 40.2 students who are full-time with children.
We see that our Pearson Chi Square value is 20.704. We have 1 degree of
freedom. Our significance is .000.
What it does: The One-Way ANOVA compares the mean of one or more
groups based on one independent variable (or factor).
Where to find it: Under the Analyze menu, choose Compare Means, then
choose One-Way ANOVA. Move all dependent variables into the box labeled
"Dependent List," and move the independent variable into the box labeled
"Factor." Click on the button labeled "Options," and check off the boxes for
Descriptives and Homogeneity of Variance. Click on the box marked "Post
Hoc" and choose the appropriate post hoc comparison. Generally, for Psych
205 students, you can follow this rule: If there are equal numbers of cases in
each group, choose Tukey. If there are not equal numbers of cases in each
group, choose Bonferroni.
Assumptions:
-The dependent variable(s) is normally distributed. You can check for normal
distribution with a Q-Q plot.
-The two groups have approximately equal variance on the dependent variable.
You can check this by looking at the Levene's Test. See below.
Hypotheses:
Null: There are no significant differences between the groups' mean scores.
Alternate: There is a significant difference between the groups' mean scores.
SPSS Output
First, we see the descriptive statistics for each of the 4 years in college.
This tells us if we have met our second assumption (the groups have
approximately equal variance on the dependent variable). If the Levene's Test is
significant (the value under "Sig." is less than .05), the two variances are
significantly different. If it is not significant (Sig. is greater than .05), the two
variances are not significantly different; that is, the two variances are
approximately equal. If the Levene's test is not significant, we have met our
second assumption. Here, we see that the significance is .435, which is greater
than .05. We can assume that the variances are approximately equal. We have
met our second assumption.
We can look at the results of the Post-Hoc Comparisons to see exactly which
pairs of groups are significantly different.
What it does: The One-Sample T Test compares the mean score of a sample
to a known value. Usually, the known value is a population mean.
Where to find it: Under the Analyze menu, choose Compare Means, then One-
Sample T Test. Move the dependent variable into the "Test Variables" box.
Type in the value you wish to compare your sample to in the box called "Test
Value."
Assumption:
-The dependent variable is normally distributed. You can check for normal
distribution with a Q-Q plot.
Hypotheses:
Null: There is no significant difference between the sample mean and the
population mean.
Alternate: There is a significant difference between the sample mean and the
population mean.
SPSS Output
The mean of our sample is 4.04, which is slightly higher than our population
mean of 3.9.
Therefore, we can say that our sample mean of 4.04 is significantly greater than
the population mean of 3.9.
What it does: The Paired Samples T Test compares the means of two
variables. It computes the difference between the two variables for each case,
and tests to see if the average difference is significantly different from zero.
Where to find it: Under the Analyze menu, choose Compare Means, then
choose Paired Samples T Test. Click on both variables you wish to compare,
then move the pair of selected variables into the Paired Variables box.
Assumption:
-Both variables should be normally distributed. You can check for normal
distribution with a Q-Q plot.
Hypothesis:
Null: There is no significant difference between the means of the two variables.
SPSS Output
There is a strong positive correlation. People who did well on the pre-test also
did well on the post-test.
Finally, we see the results of the Paired Samples T Test. Remember, this test is
based on the difference between the two variables. Under "Paired Differences"
we see the descriptive statistics for the difference between the two variables.
Where to find it: Under the Analyze menu, choose Compare Means, the
Independent Samples T Test. Move your dependent variable into the box
marked "Test Variable." Move your independent variable into the box marked
"Grouping Variable." Click on the box marked "Define Groups" and specify
the value labels of the two groups you wish to compare.
Assumptions:
-The dependent variable is normally distributed. You can check for normal
distribution with a Q-Q plot.
-The two groups have approximately equal variance on the dependent variable.
You can check this by looking at the Levene's Test. See below.
-The two groups are independent of one another.
Hypotheses:
Null: The means of the two groups are not significantly different.
Alternate: The means of the two groups are significantly different.
SPSS Output
First, we see the descriptive statistics for the two groups. We see that the mean
for the "New Drug" group is higher than that of the "Placebo" group. That is,
people who received the new drug have, on average, higher blood pressure than
those who took the placebo.
Finally, we see the results of the Independent Samples T Test. Read the TOP
line if the variances are approximately equal. Read the BOTTOM line if the
variances are not equal. Based on the results of our Levene's test, we know that
we have approximately equal variance, so we will read the top line.
Therefore, we can say that there is a significant difference between the New
Drug and Placebo groups. People who took the new drug had significantly
higher blood pressure than those who took the placebo.
Where to find it: Under the Analyze menu, choose Correlations. Move the
variables you wish to correlate into the "Variables" box. Under the "Correlation
Coefficients," be sure that the "Pearson" box is checked off.
Assumption:
-Both variables are normally distributed. You can check for normal distribution
with a Q-Q plot.
Hypotheses:
Null: There is no association between the two variables.
Alternate: There is an association between the two variables.
SPSS Output
SPSS creates a correlation matrix of the two variables. All the information we
need is in the cell that represents the intersection of the two variables.
The correlation coefficient is a number between +1 and -1. This number tells us
about the magnitude and direction of the association between two variables.
The MAGNITUDE is the strength of the correlation. The closer the correlation
is to either +1 or -1, the stronger the correlation. If the correlation is 0 or very
close to zero, there is no association between the two variables. Here, we have
a moderate correlation (r = -.378).
The DIRECTION of the correlation tells us how the two variables are related.
If the correlation is positive, the two variables have a positive relationship (as
one increases, the other also increases). If the correlation is negative, the two
variables have a negative relationship (as one increases, the other decreases).
Here, we have a negative correlation (r = -.378). As self-esteem increases,
anxiety decreases
What it does: The Spearman Rho correlation tells you the magnitude and
direction of the association between two variables that are on an interval or
ratio scale.
Where to find it: Under the Analyze menu, choose Correlations. Move the
variables you wish to correlate into the "Variables" box. Under the "Correlation
Coefficients," be sure that the "Spearman" box is checked off.
Assumption:
-Both variables are NOT normally distributed. You can check for normal
distribution with a Q-Q plot. If the variables are normally distributed, use a
Pearson R correlation.
Hypotheses:
Null: There is no association between the two variables.
Alternate: There is an association between the two variables.
SPSS Output
SPSS creates a correlation matrix of the two variables. All the information we
need is in the cell that represents the intersection of the two variables.
The correlation coefficient is a number between +1 and -1. This number tells us
about the magnitude and direction of the association between two variables.
The MAGNITUDE is the strength of the correlation. The closer the correlation
is to either +1 or -1, the stronger the correlation. If the correlation is 0 or very
close to 0, there is no association between the two variables. Here, we have a
moderate correlation (r = -.392).
The DIRECTION of the correlation tells us how the two variables are related.
If the correlation is positive, the two variables have a positive relationship (as
one increases, the other also increases). If the correlation is negative, the two
variables have a negative relationship (as one increases, the other decreases).
Here, we have a negative correlation (r = -.392). As self-esteem increases,
anxiety decreases.
Where to find it: Under the Analyze menu, choose Regression, then choose
Linear. Enter the dependent and independent variables in the appropriate
places, then click OK.
Assumptions:
-The data are linear (if you look at a Scatterplot of the data, and the data seem
to be moving in a straight line, that's a good indication that the data are linear).
-The dependent variable is normally distributed. You can check for normal
distribution with a Q-Q plot.
Hypotheses:
The hypotheses for regression focus on the slope of the regression line.
Null: The slope equals zero (there is no slope)
Alternate: The slope is not equal to zero
SPSS Output
There are 3 key pieces of information we need to look for in our regression
output:
-The R Square value
-The significance of the regression
-The values of the constant and slope
The R Square tells us how much of the variance of the dependent variable can
be explained by the independent variable. In this case, 15% of the variance in
Comfort can be explained by differences in levels of prejudice.
Finally, the Coefficients table gives us all the information we need to plug into
our Y' = b0 + b1X equation (where b0 = the constant and b1 = the slope). In
this example, b0 = 5.474 and b1 = -.53.