

Important: Notice that favourite_sport is a nominal variable, but you can also create dummy variables for an ordinal variable. Since this independent variable was categorical (i.e., nominal variables and ordinal variables can be broadly classified as categorical variables), dummy variables had to be created before it could be entered into the multiple regression analysis. This nominal independent variable, favourite_sport, was to be included in a multiple regression analysis that also had a number of continuous independent variables. Their answers were recorded in the nominal independent variable, favourite_sport, which has three categories: "swimming", "cycling" and "running". In this guide we will be using the example of 10 triathletes who were asked to select their favourite sport from the three sports they perform when doing a triathlon: swimming, cycling and running. SPSS Statistics Example used in this guide We may be able to add another guide to the site to help. Note 2: If you find that the procedures in this guide do not cover the type of dummy variables you want to create, please contact us. However, the data setup and procedure are identical.

Therefore, if you have SPSS Statistics versions 27 or 28 (or the subscription version of SPSS Statistics), the images that follow will be light grey rather than blue. However, in version 27 and the subscription version, SPSS Statistics introduced a new look to their interface called " SPSS Light", replacing the previous look for versions 26 and earlier versions, which was called " SPSS Standard". Note 1: The data setup and procedure that follow are identical for SPSS Statistics versions 22 to 28, as well as the subscription version of SPSS Statistics, with version 28 and the subscription version being the latest versions of SPSS Statistics.
#Spss code interaction windows
Finally, we explain the SPSS Statistics output after running the Create Dummy Variables procedure, including how your dummy variables will now be set up in the Variable View and Data View windows of SPSS Statistics. In the Procedure section that follows, we set out the simple, 3-step Create Dummy Variables procedure in SPSS Statistics that can be used to create dummy variables.
#Spss code interaction how to
If you are unfamiliar with the use of dummy variables, we recommend that you then read about some of the basic principles of dummy variables and dummy coding, including: (a) the number of dummy variables you need to create in your analysis and (b) how to create dummy variables and dummy coding.

Therefore, in this guide we show you how to create dummy variables when you have categorical independent variables.įirst, we set out the example we use to show how to create dummy variables in SPSS Statistics, before explaining how to set up your data in the Variable View and Data View windows of SPSS Statistics so that you can create dummy variables. The exception is ordinal independent variables that are entered into a multiple regression as continuous independent variables, which do not need to be converted into dummy variables.

Instead, they need to be converted into dummy variables. This is because nominal and ordinal independent variables, more broadly known as categorical independent variables, cannot be directly entered into a multiple regression analysis. If you are analysing your data using multiple regression and any of your independent variables were measured on a nominal or ordinal scale, you need to know how to create dummy variables and interpret their results. Creating dummy variables in SPSS Statistics Introduction
