Dummy Coding Variables in SPSS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello this is dr. grande welcome to my video on creating dummy variables using SPSS so I have here fictitious data and the date of view of SPSS and I have two variables level of care and I have three levels to this variable outpatient day treatment and impatient and then I have a salary so let's say that we are running a substance use training program and we're looking at where the graduates work right they can work an outpatient setting day treatment setting or an inpatient setting for this example so have these three options and then you have the various salaries now this data can be analyzed in the form it is now it's coded level care one two and three for outpatient day treatment and impatient but if you want to run a linear regression you can't do that with the way this these data are formatted because you have three levels of the independent variable so what we have to do to adjust for this is what's called dummy coding so we need two dummy code the level of care variable in two separate variables that contain either a 0 or 1 so to start with the dummy coding we're first going to go to transform and then we want to recode in two different variables so we want to create new variables here we do not want to overwrite the level of care variable we want to create new variables from it so it's recode in two different variables and you can see they have a list box here for input variable two output variable and we're going to use this nominal variable level of care and it is nominal because one level of care can't be quantified as better than the other it's just different there's just three different levels of care so it's not an ordinal variable it's a nominal variable so its name level care for our first example here and we're gonna want to name this outpatient because that's the first level and I'm just going to copy and paste that down here so control C and then control V to have the label match and I'm going to make sure I click change so C level of care to outpatient and then we want to look at old and new values so what we want to do here is want to convert the value of 1 which would be outpatient into a new value and in these dummy coded variables a 1 is going to represent that specific level right in this case outpatient and a 0 is going to represent that it's not that level so in this case if the value is 1 and it is outpatient we want the value to be 1 so 1 will move to 1 and then we're going down to all other values and we make them equal to 0 and make sure we add that on so 1 will remain 1 and all others meaning 2 or 3 will be changed to 0 the one represents outpatient level of care and the zero represents not outpatient level of care click continue and then ok and we can see that our patient is now coded one and not outpatient meaning day treatment and impatient in this example they are left at zero so for day treatment would go to transform and recode in different variables click here so we can change the name so just change this today treatment I think I'm just gonna copy paste this here now I'm gonna take the space out for name I don't like there to be a space so it's just made a treatment but the label deeds of space and I can click change now you can see level of care is being changed to day treatment and we move to the old new values again now we can reuse this else but I'm going to remove both of these just to show you how this is done from the beginning for this variable so we know de treatments values too and we know in this variable de treatments value we want to equal one meaning there is day treatment so two will go to one and all other values meaning outpatient and inpatient or equal zero we'll add that so day treatment will move to one all other values to zero the one tells us the level of treatment is state treatment and the zero tells us that it's not day treatment click continue and ok and you can see zeros for outpatient and then one for day treatment and zeros for inpatient and then for our last variable and click here and this is going to be impatient and I'll make that to label as well quick change and look at the olden values again we could retain this but I want to show you how to do it from the beginning so we know that the value 3 is equal to impatient and this new variable the one will represent in patient and the 0 the 0 will represent not in patient so we want 2 1 here so 3 now moves to 1 and all other values other than 3 move to 0 so else moves to 0 it could continue and ok and now looking back we can see that for outpatient of course and the impatient variable that's 0 for day treatment that's 0 but down here for impatient that's a 1 so if we have split level of care which is a nominal variable at 3 levels into 3 separate variables that either contain a 0 or 1 the one indicating that it matches that particular level of care that's named in the variable outpatient date River in patient and a 0 representing that is not that level of care so the data as its format now could be used in a multiple regression I hope you found this video on dummy coding variables in SPSS to be helpful as always if you have any questions or concerns feel free to contact me and I'll be happy to assist you
Info
Channel: Dr. Todd Grande
Views: 46,095
Rating: 4.9852943 out of 5
Keywords: SPSS, dummy, code, dummy coding, nominal, ordinal, interval, ratio, scale, recode, recode into different variables, transform, linear regression, multiple regression, regression, range, counseling, Grande, statistics, Variables (Quotation Subject), Coding, Math
Id: c79i8qZc7KM
Channel Id: undefined
Length: 7min 41sec (461 seconds)
Published: Sun Aug 23 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.