Notes on using SPSS to perform tests in Chapter 6 (2nd ed.)
===========================================================

The following are rough notes on the analyses in Chapter 6 using SPSS.  These analyses
are in the enclosing ZIP file.  They were performed using IBM SPSS 29.0.1.0 (171) running
on a Lenovo X1 Carbon laptop running Windows 11.

For each analysis, four files are provided:
   1. A .txt file containing the original example data
   2. A .sav file containing the original data after importing into SPSS
   3. A .spv file containing the SPSS analysis
   4. A .pdf file containing the SPSS analysis in a PDF file
   
To examine an analysis, just look in the .pdf file.  Alternatively, launch SPSS and open 
the .spv file.  To reproduce an analysis, first open the .sav data file in SPSS, then 
follow the instructions below for the desired analysis.

Note that some of the data files indicated below append "b" to the filename (e.g., 
chisquare-ex1b.txt).  These text files were reorganized into a vertical format as required
by SPSS. 

The following table identifies the figure in the book (2nd edition) corresponding to each 
SPSS analysis contained herein:

   SPSS analyis (without extension)  Equivalent figure in book
   --------------------------------  ----------------------------------
   anova-ex1                         Figure 6.5
   anova-ex2                         Figure 6.8
   posthoc-ex1                       Figure 6.11 (ANOVA table)
   posthoc-ex1                       Figure 6.12 (post hoc comparisons)
   betweensubjects                   Figure 6.14
   twofactor                         Figure 6.16
   dix-example-10x2                  Figure 6.18c
   dix-example-h10x2b                Figure 6.20
   chisquare-ex1                     Figure 6.25
   chisquare-ex2                     Figure 6.27
   chisquare-ex5                     Figure 6.28b
   lilliefors-ex1                    Figure 6.29
   lilliefors-ex2                    Figure 6.31
   lilliefors-ex3                    Figure 6.33
   mannwhitneyu-ex1                  Figure 6.36
   wilcoxonsignedranks-ex1           Figure 6.38
   kruskalwallis-ex1                 Figure 6.40
   friedman-ex1                      Figure 6.42


NOTES ON HOW TO DO THE ANALYSES IN SPSS
=======================================

Within-subjects ANOVA (one-way) 
-------------------------------

   Example data file: anova-ex1.txt (or anova-ex1.sav in SPSS)

   Analyze ---> General Linear Model ---> Repeated Measures...

   enter name of factor 
   enter number of levels
   click Define
   click Add
   click arrow button to move levels over to Within-Subjects Variables panel
   click OK


Post Hoc tests
--------------

   Example data file: posthoc-ex1b.txt (or posthoc-ex1b.sav in SPSS)

   The data in posthoc-ex1b.txt are a vertical reorganization of the
   data in posthoc-ex1.txt.  This is needed by SPSS.

   The group variable must be numeric:  Transform ---> Automatic recode 

   Then...

   Analyze ---> Compare Means ---> One-way ANOVA
   click arrow button to move variables over to Dependent List (DV) and Factor (IV_numeric)
   select Post Hoc...
   select desired test (e.g., Scheffe)
   click Continue
   click OK


Between-subjects (one-way)
--------------------------

   Example data file: betweensubjects.txt (or betweensubjects.sav in SPSS)

   Group variable must be numeric.  Transform ---> Automatic recode (if necessary)

   Analyse ---> Compare Means ---> One-Way ANOVA...
   move variables over
   click OK


Within-subjects (two-way) 
-------------------------

   Example data file: twofactor.txt (or twofactor.sav in SPSS)

   Analyze ---> General Linear Model ---> Repeated Measures...
   Define Variables and levels
   click Continue
   click arrow button to move levels over Within-Subjects Variables panel
   click OK


Mixed Design (1 within-subjects + 1 between-subjects)
-----------------------------------------------------

   Example data file: dix_example-h10x2b.txt.txt (or dix-example-h10x2b.sav in SPSS)

   Analyze ---> General Linear Model ---> Repeated Measures...
   Define variable and levels
   give name to dependent variable
   click Define
   move variables over (including between-subjects variable)
   click OK


Chi-square test
---------------

   Example data file: chisquare-ex1.txt (or chisquare-ex1b.sav in SPSS)

   Data ---> Weight cases... (weight by "counts")
   Analyse ---> Descriptive Statistics --> Crosstabs...


Lilliefors test
---------------

   Example data file: lilliefors-ex1.txt (or lilliefors-ex1b.sav in SPSS)

   Analyze ---> Nonparametric Tests ---> Legacy Dialogs ---> 1-Sample K-S...
   select "Normal" for test distribution
   select "Paste" (to run SPSS script)
   click green arrow to run script


Mann Whitney U
--------------

   Example data file: manwhitneyu.txt (or mannwhitneyu-ex1b.sav in SPSS)

   Analyze ---> Nonparametric Tests ---> Independent Samples...
   place numeric variable in Test Fields and group variable in Groups
   click Run


Wilcoxon Signed-Rank test
-------------------------

   Example data file: wilcoxonsignedrank-ex1.txt (or wilcoxonsignedrank-ex1.sav in SPSS)

   Analyze ---> Nonparametric Tests ---> Legacy Dialogs ---> 2 Related Samples
   move the variables over and click OK


Kruskal Wallis test
-------------------

   Example data file: kruskalwallis-ex1.txt (or kruskalwallis-ex1.sav in SPSS)

   Analyze ---> Nonparametric Tests ---> Independent Samples...
   click Customize
   click Fields and move fields over
   click Settings
   select Customize tests
   select Kruskal Wallis 1-way ANOVA (k samples)
   click Run


Friedman test
-------------

   Example data file: friedman-ex1.txt (or friedman-ex1.sav in SPSS)

   Analyze ---> Nonparametric Tests ---> Related Samples
   click Customize
   click Fields and move fields over
   click Settings
   select Customize tests
   select Kendall's coefficient of concordance
   click Run



If you find these examples helpful, or if you have comments or
suggestions, please let me know.

Good luck,

Scott MacKenzie, November 2023
mack@yorku.ca

*** end ***