Hints for SPSS: Syntax and Inserting Charts/Tables into a document
By Patti Price, Former RSS Statistical Consultant
The latest version of SPSS now available from Research and Statistical Support is 10.07 for Windows and 10 for Mac users. You can check which version is installed on your computer by going to Help and About. There are a few new bells and whistles with the new version such as the ability to easily switch back and forth from the data view to the variable view. No longer is it necessary to click on each variable to add variable labels, etc. One word of caution for Mac users, your operating system must be 9.0 or higher.
While most users of SPSS are satisfied with the simple point and click procedures to run analyses, it is also very easy to use the syntax mode. When installing SPSS, be sure to click on Custom Installation. This will allow one to access the syntax help file which is not available with the Common Installation mode. The syntax help file can be read using Adobe Acrobat and is searchable. Although the syntax manual requires additional hard drive space, it is a very useful tool. There are still some processes which one cannot run through the simple point and click but must write the syntax.
Syntax files are saved with a .sps extension. After opening the file, one can run the entire syntax or a selection of the syntax. In order to avoid having to save your file in order to execute the syntax, simply type execute. at the end of the syntax section.
It is also possible to add in comments by typing comment (type your comment here). Be sure to place a period at the end of the comment. It is not necessary to place anything in quotes.
Still scared of writing your own syntax?
SPSS also has syntax for dummies. Simply use the point and click method, and then instead of clicking on OK after clicking on all options, click on Paste. This will paste the syntax into a syntax file window. Type execute (be sure to place a period here) after the pasted in syntax and now the syntax is written for the user. It is possible to add in comments and save the syntax file. This allows one to rerun analyses several times without having to go back and point and click every time one wants to run the same analysis.
So why use syntax if you can just point and click. One advantage is the ability to see exactly what was done in the analysis for future reference. Second, by saving the file, the same analysis can be run very quickly without having to point and click again.
SPSS and MSWord
Another feature of SPSS is the ability to take the output generated and paste it into a MSWord document. One can insert both tables and charts generated by SPSS straight into your document. There are just a couple of items one needs to be aware of: