From the course: SPSS Statistics Essential Training (2019)

Data types, measures, and roles - SPSS Tutorial

From the course: SPSS Statistics Essential Training (2019)

Start my 1-month free trial

Data types, measures, and roles

- [Instructor] When you're working with data in any program, it's important to specify what kind of data you're working with, because that affects the kinds of operations, the kind of graphs, the kind of modeling, that you would do for those variables. Now in SPSS, this is relatively straightforward, although you get to specify in a few different ways. Here I have the demo dot save data set open it's one of the built in sample data set. And the first thing to look at here in the data window is that we have this row with the variable names at the top of this Spreadsheet part of the document. And next to each one we have a little icon and what that does is it indicates the level of measurement. The diagonally placed ruler is a quantitative variable, it's actually called the scale variable in SPSS. The three steps up with the different colors is an ordinal variable, and the three different color circles is a nominal variable. But let me show you a little bit more how this works by going to the Variable View. I'm going to come down here to the bottom, and hit Variable View. And now you see each of the variables in the data set. And the first thing you want to specify is the type of variable. Now you'll see that nearly all of these are numeric. There's one string of variable, which is what SPSS calls anything that has text, and other ones that might be called a character variable or a string variable, but if it has text, it's a string variable in SPSS. Let's click on this just for a moment. I'm going to click right here and show you the different options. Numeric and string are by far the most common but there are other options. Obviously, if you're using dates, or if you're using money, then some of these other options will be irrelevant. The other ones are kind of niche operations. I've almost never used anything other than numeric and a small number of string variables in my analysis, but that is a way of specifying how the data is entered. Next, as you go over, you have the option specifying the width of the column, the decimals, you get to give a label to the variable and to the values. And I'm going to talk more about this a little bit later along with specifying missing values, the alignment in the display. And then we get to measure this is the level of measurement. And as you can see, here, we have three different kinds showing, I'll just click on this, you can see that you can have scale, which is a quantitative or interval or ratio level, if you're familiar with those, ordinal or ordered categories, and then nominal, also sometimes called categorical or discreet, depending on where your background is. But those are kind of flexible, because SPSS is still going to let you do a lot of different things even if you want to get the mean and it doesn't necessarily match up with your level of measurement, if you have a numeric type, it'll probably still do those calculations. The last thing I'd want to mention here is the role of the variable. This is something that SPSS added not a terribly long time ago. And in this particular case, they're all input variables. But if you click on it, you see that you have the choice of an input, a target or an outcome, a criterion, something that serves as both or none, usually, that means something like an ID number, which you're not going to use in any kind of modeling. You can also specify that variables are to be used for partitioning the data set or for splitting the data set. Now, these are optional, you see that again, this one has everything listed as input, but there are times when you're doing especially automatic modeling within SPSS, that if you specify these are the inputs, and this is the target, it'll put them in the appropriate way and it makes things a little bit easier. It's not critical, but it is one way of speeding up analysis, especially if you're going to start doing things that are sophisticated. But taking together, specifying the type as numeric string or one of the other choices, the measure as scale, ordinal, or nominal and the role as input, target, both or none, can allow you to describe the data enough to get started with the statistical analysis and the modeling in SPSS.

Contents