**SPSS Workshop (Fall 2019)**
Undergraduate Research Opportunity Program
Nicholas Michalak ([nickmm@umich.edu](mailto:nickmm@umich.edu))
**Get SPSS**
SPSS is available on most UM campus computers. You can also access it via [Virtual Sites](http://virtualsites.umich.edu/) (i.e., log onto a server computer from your own computer) or buy it as a student rate (~ $45) via the [UM Computer Showcase](https://computershowcase.umich.edu/search.php).
**SPSS Documentation**
Sadly, you won't learn everything about SPSS during this workshop. But you can learn a lot on your own by Googling "how to X in SPSS" and searching through the manual for keywords (e.g., rename a variable, ANOVA). Here are links to the manual for SPSS Version 26:
- Download a PDF here: [IBM SPSS Statistics 26 Documentation](https://www.ibm.com/support/pages/ibm-spss-statistics-26-documentation#en)
- Search through the manual online here: [IBM SPSS Statistics 26 documentation](https://www.ibm.com/support/knowledgecenter/en/SSLVMB_26.0.0/statistics_kc_ddita/spss/product_landing.html)
**Organize your data**
Before you start working with your data, it's a good idea to organize the place where you put it and the any information necessary to understand it (e.g., questionnaires, variable codebooks, data collection procedures, lab notebooks). If you take some time to organize this information now, it should be easier to find and understand your data later. Here are some tips and resources.
- Assign easy-to-read-and-understand names to files and folders.
- Save a copy of data as .csv files because practically everyone can open .csv files with Excel
- Follow more data management best practices described in these library guides: [Stanford Library](https://library.stanford.edu/research/data-management-services/data-best-practices) guide or [Michigan Library](http://guides.lib.umich.edu/c.php?g=538509&p=3686046) guide
- Follow spreadsheet more best practices described in this article: [Data Organization in Spreadsheets](https://www.tandfonline.com/doi/full/10.1080/00031305.2017.1375989)
**Save your work as computer code (i.e., syntax)**
Whether you're preparing or analyzing your data, it's a good idea to save the computer code (i.e., syntax) you use to change your dataset or generate your analyses. This makes it much easier for you or others to reproduce your work. You can do almost everything you need to in SPSS by simply typing computer code, but you can also use the dropdown menus and ask SPSS to generate the computer code SPSS used to execute your commands. For example, if you use the dropdown menus to create a new variable or conduct a t-test, you can ask SPSS to "Paste" the code for those commands into a .sps file (i.e., a special computer code file for SPSS). If you save this code, later, you can use this code to automatically re-do everything you did before.
**Mind these general tips for SPSS code/syntax**
- Each command must have its own line and end with a period.
- Subcommands come after a forward slash (i.e., /SUBCOMMAND).
- All variables need their own, unique name (i.e., can't have two of VAR1).
- SPSS code is insensitive to case (i.e., COMMAND and command are treated equally).
- Text variable values need "quotes" or 'quotes.'
- Lines can't be longer than 80 characters across (i.e., start a new line after 80 characters).
**Load your data into SPSS**
Use either the dropdown menu or use computer code directly. You can load multiple kinds of files (e.g., .sav, .csv, .txt).
**Prepare your data**
- Compute new variables (e.g., average or sum 5 variables).
- Recode variables (e.g., 1 through 5 into 0 through 4).
- Label values (e.g., 0 = "Robot", 1 = "Human").
- Label variables (e.g., Extraversion = "Average of responses to items 1, 2, 3, 4, 5, and 6).
**Generate pictures of your data**
Even for experts, plots are often easier to interpret and provide more information than summary statistics and models/tests.
- Boxplots
- Scatterplots
- Bar Plots (e.g., means ± margin of error)
- Q-Q Plots or Histograms
**Summarize your data**
Summaries can be useful for describing your data in words. Typically, you want to tell people about central tendency (e.g., mean, median, mode) and spread (e.g., variance, standard deviation, skew). You probably also want to tell people about missing data and extreme values (i.e., outliers).
**Test your research questions**
Research should be informed by questions. Although a good figure can tell you a lot about your data, you typically want to capture your data with some kind of model (e.g., linear regression) or maybe you just want to make a decision about whether some comparison is large enough to care about it (e.g., Are these group means different? How different?).
- Compare means (e.g., _t_-test)
- Test whether correlations are more negative or more positive than 0 (i.e., Is _r_ = 0.25 significantly different from _r_ = 0?).
- Test associations between variables when other variables are held constant (e.g., Is X associated with Y when C is held constant at its mean?).
**Short Exercises**
- **Note.** For the exercises below, many of the variables are saved as "Ordinal." Convert them to "Scale" using the Data Editor (under the "Measure" column in "Variable View").
1. Download the [survey_sample.sav](https://osf.io/ztfx3/) file from the data folder.
2. Make a scatterplot of age and general happiness.
3. Compute the correlation between age and general happiness.
4. Compute a new variable: Age - [the average Age] (mean centered age).
5. Conduct a linear regression predicting general happiness. from mean centered age and general happiness.
6. Make a boxplot and generate descriptive statistics for political views by marital status.
7. Use the ONEWAY command to compare the mean political view score between married and never married subjects.
**Some Resources**
- [**SPSS 26 Sample Files**](https://www.ibm.com/support/knowledgecenter/en/SSLVMB_26.0.0/statistics_spsstut_project_ddita/spss/tutorials/data_files.html#data_files). This is a list of .sav files that come with SPSS 26. You can use these for practice.
- [**how2stats**](http://www.how2stats.net/p/home.html) **.** Gilles Gignac walks through a ton of SPSS tricks and analyses via YouTube videos. He's seriously the most delightful nerd.
- [**UCLA Institute for Digital Research and Education**](https://stats.idre.ucla.edu/spss/) **.** These folks are experts in statistics and computing. This site compiles a ton of tutorials on how to conduct analyses using all sorts of computer software.
- [**DESIGNING EXPERIMENTS AND ANALYZING DATA: A Model Comparison Perspective**](https://designingexperiments.com) **.** Learn basic and advanced statistics. They post free tutorials, including SPSS code and datasets. They also post some useful web applications. Go here to learn statistics.