Introduction to SPSS Syntax: Hands-On Exercises
- 2.5 hours on-demand video
- 31 downloadable resources
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Learn the basic skills of SPSS Statistics syntax for use in repetitive production tasks
- Solve everyday analysis tasks in less time and with not effort
- Learn how to use commands that are not available by using the GUI
- Learn the terminology and command syntax diagram to get the best from SPSS.
- Learn how to use the Log and Journal file appropriately.
- Learn how to execute transformation commands and procedures with syntax commands
- Learn how to create SPSS syntax file without dialog boxes and get your results easily!
- Learn how to use DO IF—END IF command
- Learn how to use LOOP — END LOOP command
- Skills learned are applicable and widely transferable to an incredibly wide variety of scenarios.
- A familiarity of SPSS: you should have experience in SPSS Statistics using the graphical user interface (dialog boxes)
- Have SPSS Statistics Standard (version >17) for Windows or Mac installed and functioning,
LATEST: The course is updated to Jan 2017.
=== This is the FIRST COURSE ever on Udemy of SPSS SYNTAX programming ===
Hi I am Doctor AnalytiX and I have spent many years on testing what really works in SPSS to get results in very short time, and now I want to share with you how to prepare data and how to automate tasks in a few simple steps.
I have trained hundreds of people in these years and explained how to use SPSS syntax programming in several live training sessions and now you have the chance to follow me lifetime.
This course will teach you how to use this 'behind the scene' language and other features for data management and manipulation, and for overall control of SPSS execution.
There will be an "in-depth" details about the Syntax language: useful and relevant examples and exercises that shows how Syntax can make your analysis more efficient, more transparent and more easy.
This awesome program includes:
- great exercises with solutions end codes.
- useful handouts.
- handy checklists.
- interesting projects.
- exiting quizzes.
Don't you think it possible to add percentage signs to your data? With SPSS syntax it will be very easy! Only a very limited number of people know this information. In only 3 hours you can learn how to automate repetitive tasks and how to perform additional options that are not available in the dialog(ue) boxes in SPSS. You can easily transform your analysis process in simple steps, record and reuse them whenever you need.
Is my course better than another? I don't think so, but what I have learned after 15 years of training and statistic projects is how to save 4 hours a day making analysis and repetitive data management tasks thanks to SPSS, by using simple syntax commands.
Creating a syntax script for SPSS automation is very easy, you don't need to know any special programming language or any complex tools, you just have to know SPSS.
Given the obvious advantages of using a graphic user interface, you can wonder why anyone could want to program by using the syntax. Actually, there may be many situations in which the use of the syntax is preferable or even essential. Here are some examples in which the syntax is preferable to the "point-and-click" method:
- If you have to create weekly or monthly reports: instead of recreating the commands, by using the menus each time, you can save them in a syntax file for later reuse.
- If you have to use commands that are not available by using the dialog(ue)s: some subroutines for reading complex data structures, transformations like structures "do if" and "loop" and macros, you can get only by using the syntax.
- If you have to create multiple tables or graphics: the syntax allows you to create them in a single step, whereas, by using the menu, you can only generate them one by one.
- If every month you run the same SPSS commands, but the name of the database changes every time you run the analysis: you can change the file name using "Syntax Editor", and re-use the rest of the commands, rather than redefining from the beginning the file by using the menu every time.
This course provides students with a greater understanding of a variety of programming techniques along with the procedure to use the most popular statistical software package, SPSS. The course will serve the students as a self-learning material of using SPSS for applying analysis and data management tasks, programmatically.
The course has been written to provide solutions to the students in different disciplines. The course is intended for everybody works on data analysis, statistics, strategic decision-making process or quantitative methods taught in management and other disciplines like psychology,economics, education, nursing, medical, or other behavioral and social sciences. This course is also useful for IBM SPSS certification exams..
Customer satisfaction is my main concern. Feel free to contact me for any questions, concerns or problems. We can work it out to make you feel satisfied with what you are getting. If things doesn't work out for you, we have a 30-day money back guarantee. I assure you that you won't regret this.
Already excited? Join me and let's do SPSS programming together.
Trademark legal notice:
All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.
- The course will serve the students as a self-learning material of using SPSS for applying analysis and data management tasks, programmatically.
- The course is intended for everybody works on data analysis, statistics, strategic decision-making process or quantitative methods taught in management and other disciplines like psychology,economics, education, nursing, medical, or other behavioral and social sciences.
- This course is also useful for IBM SPSS certification exams.
- The Course is for who are responsible for using and maintaining SPSS syntax jobs
In this step by step course I am going to teach you “SPSS Syntax Essentials”.
Before we begin the course, I just want to explain a few very important points.
With Syntax you can skip the menus and dialog boxes and insert commands directly into SPSS.
After only 1 hour of course you will learn how to perform transformations and reporting tasks with syntax programming.
In the next hour you will learn how to:
- Recode variables.
- Add value and variable labels.
- Re-use syntax on other files.
It's really easy to do, just follow me.
There may be many situations in which the use of the syntax is preferable or even essential.
- If you have to create weekly or monthly reports
- If you have to use commands that are not available by using the dialog(ue)s
- If you have to create multiple tables or graphics
- If every month you run the same SPSS commands, but the name of the database changes every time you run the analysis
Learn how to make the best use of this course: download data and syntax files.
The command files and data files used in the examples are included in the Zip file that contains this lecture.
- Please click 'View Resource' button in this lecture and download the file 'SyntaxFiles.zip'.
- Then create a new folder 'syntax' in drive C:
- Extract all zipped file into 'c:\syntax\'
- Most of the examples shown in this course are designed as hands-on exercises that you can perform yourself.
- Note: please don't copy files on desktop because is a bit complicated to write that path every time in the syntax file.
- Note: please check if SPSS Statistics is installed correctly. In the course I've used SPSS Statistics 22 for Windows. (if you dont have SPSS, please download the trial version (link and complete setup files are provided in this lecture) or use a FREE remote desktop with SPSS Statistics 23 already installed, yes it's working!! (link provided in this lecture too).
==== NOTE ====
Here in the lectures you see a "Lecture ID" like  for this lecture. It is useful to link each lesson with the correct datasets and syntax files you find in the syntaxFiles.zip
To use the syntax file, use the menu (FILE > OPEN > SYNTAX) and use 'Run all' to execute all the syntax code, or 'Run selection' to execute just the code selection.
Syntax diagrams are important for understanding how to write and edit all the Syntax commands.
Each command includes a syntax diagram that shows all of the subcommands, keywords, and specifications allowed for that command.
By recognizing symbols and different type fonts, you can use the syntax diagram as a quick reference for any command.
The goal of this exercise is to use understand the T-TEST command (its syntax diagram) for comparing sample means by calculating Student’s T, and displays the two-tailed probability of the difference between the means.
Statistics for T-test are available for:
- one-sample (tested against a specified value).
- independent samples (different groups of cases)
- paired samples (different variables).
Please see the text the exercise in the video lesson or in the resources.
It is very important to know that there are 4 program states in SPSS:
Each session starts in the initial state, followed by the input program state, the transformation state, and the procedure state.
This order conforms very closely to the order the program must follow as it processes your commands.
Specifically, the program checks command order according to the program state through which it passes. The program state is a characteristic of the program before and after a command is encountered.
The most used command types in SPSS syntax are the following:
1.File Definition Commands
1. File Definition Commands: all these commands are used to input data into SPSS. They include commands such as `GET` , `DATA LIST` , or `MATCH FILES`
2. Transformation Commands: These commands are varied: they modify data (`COMPUTE, RECODE` ), create new variables(`VECTOR` , `NUMERIC` ), or label data (`VARIABLE LABELS` ). It is important to know that transformations do not cause SPSS to read the data file.
3. Procedure Commands: A procedure in SPSS is a command that causes data to be read. In other words, all of these commands analyze data. In that way, `FREQUENCIES` is also a procedure because it causes the data to be read.
Exercise to learn how to use DO IF—END IF command.
Once you have a set of commands, you can run the commands in a number of ways.
- Highlight the commands that you want to run in a command syntax window and click the Run button.
- Invoke one command file from another command with the INCLUDE command or INSERT FILE command.
- Use the “Production Facility” to create production jobs that can run and even start whenever you need using common scheduling software.
Now we see how to Invoke one command file from another command with the INCLUDE command or INSERT FILE command.
Please solve this exercise and send me your solution with syntax file and comments and I will publish it!
Project description: The financial director of the bank branch in New York wants to make an analysis of the salaries of employees of New York and Amsterdam branches.
His goal is to calculate some main indicators and produce some insights.
So he asks his SPSS analyst to produce these analysis, both for the New York and the Amsterdam branch.
Can you help him as well?
Project description: The credit risk team want to make an analysis about the credit risk ralated to the number of card and the paytype (monthly or weekly) of their customers. The main indicator about the credit risk will be the mean of the credit cards owned by customers