Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In our last video, we talked about one method of recoding variables, or taking the data in its existing format and changing it into another that may be more amenable to a particular graphic or a statistical analysis. In the last movie, we looked at what might be called Manual Recode by using the Transform command to recode into a different variable. In this movie, we are going to look at another one that's called Visual Binning. It's one of pretty attractive features of SPSS.
We do this by coming up to Transform, coming down into Visual Binning. And you take a variable that has a wide range of scores--in this particular one, I'll take Age and I'll put that into Variables to Bin and press Continue. And what this shows me is the age range or the people in this particular sample. It goes from a minimum of 18 to a maximum of 87 years old. This is a national sample of adults and so this isn't surprising.
Now, there may be times when I want to break this down into groups. For instance, I have one particular procedure where you like to take variables like this and you want to break them into actually five even groups that are called quintiles, even meaning it's the same number of people in each group. The Visual Binning is a perfect way to do this. Now I need to do something right here. We are going to be creating a new variable and it already knows to call out Age (Binned) into different bins. I am just going to call that, Age_Bin.
And then what I do is I need to come down and have SPSS create cutpoints or different ways of separating the distribution. I come down here to Make Cutpoints, and I can tell it to make the intervals of even sizes, say for instance the 20 to 30 year olds, the 30 to 40 year olds, and so on, and that's one possibility. And maybe I would want to do that. I could say let's start the first one at 20 and then do it every 10. The one I'm thinking of is where I want to create five equal-size groups as I need four cutpoints to create five groups.
See, right here it says, "N cutpoints produce N+1 intervals." And so what I'm going to do is I am going to create four cutpoints, and each one of them will have 20% of the sample, because there is five of them total, so that's 100%. I click OK, and what SPSS has done here is put in dividers that each has the same number of people. Now, some of these dividers will be closer, some will be further apart, because there aren't as many people in that group.
So for instance you see in the 30 to 40 range, they're pretty close because there's a lot of people right there, similarly in the 40 to 47 group. But we have from 62 on up to get the same number of people. Now, these are automatically created. It may be however that I look at them and I say that yes, these are exactly equal groups, there are a number of people in each one, but I may want them to be slightly different. Maybe I don't want to have the last group start at 61, I think that sounds little silly.
Maybe I'd want to change it to be exactly 60, and I'd want the other ones to change to be slightly different. So I can actually grab them and move them, ever so slightly, to be what I want them to be. Or I could try typing them in, to make sure they get exactly where I want them. I could change that to 40. I could leave the 47 where it is. I can double-click that one and change it to 60, and the last group is higher.
And now I've got the cutpoints, and these are approximately equal groups; I changed them only slightly. Another neat thing is this is going to create a new variable called Age_Bin and these are the values, 1, 2, 3, 4 and 5, because I have created five different groups. I can also create labels automatically by clicking on Make Labels right here, and when I do that, it says that the first group is less than or equal to 30, then 31 to 40, 61+, and so on. And all I need to do now is press OK, and it tells me that it has created one new variable in my data set.
This is the history of the command. If I were to write it out by writing code, this is what I would do. But if I go back to my data set, I come to the end, and I see that I have a new variable here called Age_Bin that has the numbers 1 through 5 in it. And if I go straight above here to the button bar and click on Value Labels, you can see the label that shows each size group. And so the Visual Binning procedure is a wonderful feature of SPSS that allows you to create a new variable by grouping people on another scaled variable.
This can save a lot of time when you're trying to create groups of particular sizes or split things up into particular intervals, like every 10 years. And so this is the second way we're looking at in terms of recoding variables. I am going to show you another one and it is called ranking variables which works in a pretty predictable way. But between the three of those, you should be able to do a fair amount in terms of getting the data into the form that you need them for your statistical analyses.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.