Home Käyttöjärjestelmä SPSS Tutorial

SPSS Tutorial

2120 11/11/2021

The first step in defining variable names and attributes is to select the Variable View tab in the data window. Then we can create (or edit) each attribute below.

Name

The name of each SPSS variable in a given file must be unique; it muststart with a letter; it may have up to 8 characters (including letters,numbers, and the underscore _ (note that certain key words arereversed and may not be used as variable names, e.g., "compute","sum", and so forth). To change an existing name, click inthe cell containing the name, highlight the part you want to change,and type in the replacement. To create a new variable name, click inthe first empty row under the name column and type a new (unique)variable name.

Notice that we can use "cat_dog" but not "cat-dog" and not "catdog". The hyphen gets interpreted as subtraction (cat minus dog) bySPSS, and the space confuses SPSS as to how many variables are beingnamed.

Type

The two basic types of variables that you will use are

numeric

and

string

. Numeric variables may only have numbers assigned.String variables may contain letters or numbers, but even if a stringvariable happens to contain only numbers, numeric operations on thatvariable will not be allowed (e.g., finding the mean, variance,standard deviation, etc...). To change a variable type, click in thatcell on the grey box with ...

Clicking on this box will bring up the variable type menu:

If you select a numeric variable, you can then click in the widthbox or the decimal box to change the default values of 8 charactersreserved to displaying numbers with 2 decimal places. For wholenumbers, you can drop the decimals down to 0.

If you select a string variable, you can tell SPSS how much "room"to leave in memory for each value, indicating the number of charactersto be allowed for data entry in this string variable.

Width

The width of a variable is the number of characters SPSS will allow to be entered for the variable. If it is a numerical value with decimals, this total width has to include a spot for each decimal, as well as one for the decimal point. You can change a width by clicking in the widthcell for the desired variable and typing a new number or you can usethe arrow keys at the edge of the cell

Decimals

The decimals of a variable is the number of decimal places that SPSSwill display. If more decimals have been entered (or computed bySPSS), the additional information will be retained internally but notdisplayed on screen. For whole numbers, you would reduce the numberof decimals to zero. You can change the number of decimal places byclicking int he decimals cell for the desired variable and typing anew number or you can use the arrow keys at the edge of the cell

Label

The label of a variable is a string of text to indentify in moredetail what a variable represents. Unlike the name, the label islimited to 255 characters and may contai

n spaces and punctuation. Forinstance, if there is a variable for each question on a questionnaire,you would type the question as the variable label. To change or edita variable label, simply click anywhere within the cell.

Values

Although the variable label goes a long way to explaining what thevariable represents, for categorical data (discrete data of bothnominal and ordinal levels of measurement), we often need to know whichnumbers represent which categories. To indicate how these numbers areassigned, one can add labels to specific values by clicking on the ...box in the values cell

Clicking here opens up the Value Labels dialogue box.

Click in the Value field to type a specific numeric value

Click in the Label field to type the corresponding label

Click on the Add button to add this pair of value and label to the list

You can remove a pairing created above by clicking on that pair and then clicking on the delete button. Similarly, you can change pairing by clicking on the pair, then typing in a new value, a new label, or both; then, you click on the Change button. When you are satisfied with the definitions of each value, click on the OK button

The real beauty of value labels can be seen in the Data View by clicking on the "toe tag" icon in the tool bar

, which switches between the numeric values and their labels

Missing

We sometimes want to signal to SPSS that data should be treated as missing, even though there is some other numerical code recorded instead of the data actually being missing (in which case SPSS displays a single period -- this is also called SYSTEM MISSING data). In this example, after clicking on the ... button in the Missing cell, I declared "9", "99", and "999" all to be treated by SPSS as missing (i.e., these values will be ignored)

Columns

The columns property tells SPSS how wide the column should be foreach variable. Don't confuse this one with width, which indicates howmany digits of the number will be displayed. The column sizeindicates how much space is allocated rather than the degree to whichit is filled.

Align

The alignment property indicates whether the information in theData View should be left-justified, right-justified, orcentered

Measure

The Measure property indicates the level of measurement. SinceSPSS does not differentiate between interval and ratio levels ofmeasurement, both of these quantitative variable types are lumpedtogether as "scale". Nominal and ordinal levels of measurement,however,

are

different

Latest: Which Operating System Should You Choose for Your Next PC?
Next: How To Log Transform Data In SPSS
Popular Articles/span>
Back to top