Javatpoint Logo
Javatpoint Logo

SPSS Numeric Variable

In this section, we are going to enter all the variables one by one. So, the first variable we want to record is our independent variable, i.e., hardwork. To type the name of a variable, we can simply click on the name and start typing it and then press enter. Once we enter it, we will see that rest of the fields have been automatically populated like this:

SPSS Numeric Variable

Once we typed the name of a variable, space is automatically defined as a numeric variable in which numeric stands for a number. By default, any variable is a numeric variable, but we can change it to other variable types. But we know that it is going to measure in terms of the no of hours, so that is going to be a numeric variable. So, we will let it as a numeric variable. To change the Type, width, and decimals of variable, go to the Numeric Type and click on the three-dot, shown in the following image. We can also define the width and decimal places. A Width is a number of digits that we are going to have. For example, we believe that the max number of hours a student can study is 24, so we need 2 digits for width. The number of hours can be in decimal, so we will record it in hours, minutes, and seconds, so we will set it as 1. So, our variable, name, width, and decimals have been defined as follows:

SPSS Numeric Variable

There are certain conventions of defining variables names in SPSS. We cannot have a space between the variable names. If we write a space between variable names and press enter, we will get an error warning like this:

SPSS Numeric Variable

We cannot begin a variable name by a number or a special character. If we write 1hardwork, we are going to get an error warning like this:

SPSS Numeric Variable

But if we want to write 1, we can write it as a hardwork1. If we want a space between the name, we can use an underscore(_), but not space. We cannot have dolor($) in the beginning. If we write $hardwork, we will get an error warning like this:

SPSS Numeric Variable

We can have dolor in between the variable like hard$work. So, most of the restrictions apply at the beginning of the variable names. Similarly, we cannot have a slash(/), comma(,), anywhere in between the variable name. If we write har,dwork, or hard/work, it will give an error warning like this:

SPSS Numeric Variable

So, these are the certain conventions while defining the variable name in SPSS. We should keep the variable name short while defining the variable in SPSS. If we want to write a descriptor for the variable name, we can use the label option. For example, for hardwork, we can write it as no of hours of study. We can write a full story in the label, and that will be acted like a descriptor.

SPSS Numeric Variable

Now we are going to add some research variables like Intelligence, Performance. Where Intelligence is measured as an IQ score, and Performance is measured as a Marks obtained. Apart from them, we have some demographic variables like Age, Gender, SES (socioeconomic status) like this:

SPSS Numeric Variable

When we click on the data view option, we can see all the variables. The importance of writing the labels is that when we put the mouse cursor on variable names, we can see the description of those variables. This description helps us to understand our variable when we have a large data set. We can quickly place our cursor on the variable name and understand what kind of variable it is.

SPSS Numeric Variable

So that's how we can define our variable in SPSS.






Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA