A great way to start working from syntax is using "Paste" instead of "Ok". However, there's no "Paste" option for modifying most variable properties. This tutorial shows how handle that properly.
Changing Variable Properties
- Note that all variable properties (such as variable labels and value labels) are part of the SPSS dictionary.
- It is strongly recommended you use syntax in order to modify these. Why this is so important is explained in SPSS Syntax - Six Reasons you Should Use it.
- You can't "Paste" this syntax from any menu but fortunately it's very straightforward.
- This tutorial starts with creating some test data for practicing and then walks through each variable property.
- It's recommended you follow along and copy-paste-run all syntax. Don't forget to inspect your variable view after each step.
Creating Test Data
Running the syntax below will create some test data. We'll use it in the following tutorials to demonstrate how to modify each of the variable properties individually.
*Create some test data for modifying variable properties.
data list free/name(a6) birthday(edate10) married(f1) income(f5.0) q1 q2 q3.
begin data
Chris 15/4/1979 1 2880.5 0 1 0
Stefan 10/1/1978 0 4812.45 1 1 1
Anneke 31/3/1947 2 3438.12 1 2 2
end data.
data list free/name(a6) birthday(edate10) married(f1) income(f5.0) q1 q2 q3.
begin data
Chris 15/4/1979 1 2880.5 0 1 0
Stefan 10/1/1978 0 4812.45 1 1 1
Anneke 31/3/1947 2 3438.12 1 2 2
end data.
Click on of the Properties in the Screenshot Below
Overview Changing Variable Properties
- Changing Variable Names in SPSS
- Changing Variable Type in SPSS
- Changing Variable Width in SPSS
- Changing Variable Decimals in SPSS
- Changing Variable Labels in SPSS
- Changing Value Labels in SPSS
- Setting Missing Values in SPSS
- Changing Columns in SPSS
- Changing Variable Alignment in SPSS
- Changing Variable Measure in SPSS
- Changing Variable Role in SPSS
THIS TUTORIAL HAS 1 COMMENT:
By MUNIRAH on October 19th, 2016
hi, i got a problem with my spss version 22. i cannot input a negative value in my variable column. variable type is numeric and measurement is scale but everytime i insert a negative value, the value when missing. what is wrong with my spss? can u help me? tq!