
Regardless of whether you write the syntax yourself, or paste it into a syntax file from the menus, it really is best practice to use a syntax file to keep a record of all your data management and analysis procedures. We will start off by doing this, to ease you into using SPSS syntax.

While many people feel extremely uncomfortable using syntax, and would much rather use the built-in menus (sound like you?!), in SPSS you can actually do both (use the menus and the syntax file) for many procedures. When you first open a syntax file, it looks similar to a blank Word document: The Syntax Editor window is essentially a file that we can use to record and save everything that we do for a particular piece of analysis, or when managing/editing a dataset. The syntax window is where we can run commands (tell SPSS what we want it to do), such as opening files, editing and managing data, undertaking statistical procedures and tests, and saving files. Click on the File menu in the top left corner of your screen, and select New > Syntax: SPSS doesn’t automatically open a syntax file for us, so let’s open one now. There are two ‘views’ for the Data Editor w indow:ġ) Data view – you can see the actual data in your dataset for each record and each variable andĢ) Variable view – this gives a summary of each variable in your dataset, including the variable name, type, various properties of the way in which the data are stored, any label(s) for the variable itself and variable values (such as value labels for categories of sex, which in the dataset may be represented as 1 and 2, relating to male and female).Ī second window in the SPSS interface is the Syntax Editor window. It is also possible to change your data in this window, but I would strongly recommend against ever changing your data that way because things can go terribly wrong and you have no record of what you changed and how you changed it!

This is the window where you can see your data, and information about the variables in your dataset.
