1.2 Import data

This section uses the raw depression data set from the Afifi et.al. textbook.

SPSS syntax will look similar like this:

GET DATA /TYPE=XLSX 
  /FILE='C:\path\to\file.xlsx' 
  /SHEET=name 'Name-of-Sheet' 
  /CELLRANGE=full
  /READNAMES=on
  /ASSUMEDSTRWIDTH=32767.
EXECUTE. 
DATASET NAME DataSetExcel WINDOW=FRONT.

Reference on importing data into SPSS: https://libguides.library.kent.edu/SPSS/ImportData.

The absolute first thing you should do is to look at your raw data table. Are the column headers variable names? Did all the rows get read in? Are there any extra columns or rows included?

1.2.1 Renaming variable names for sanity sake

Turn all variable names to lower case. This is especially frustrating for R and STATA users where syntax is case sensitive. This is completely optional but helpful

You should also rename any variable that has spaces or special characters in the name.