Example (VARIABLE ATTRIBUTE Command)
VARIABLE ATTRIBUTE
VARIABLES=Age Income1 Income2 Income3
ATTRIBUTE=AnswerFormat('Fill-in')
/VARIABLES=Gender OwnHome MortgageType
ATTRIBUTE=AnswerFormat('Single select')
/VARIABLES=AvgIncome
ATTRIBUTE=AnswerFormat('Computed value')
/VARIABLES=AvgIncome
ATTRIBUTE=Formula('mean(Income1, Income2, Income3)')
/VARIABLES=AvgIncome
ATTRIBUTE=DerivedFrom[1]('Income1')
DerivedFrom[2]('Income2')
DerivedFrom[3]('Income3').
DISPLAY ATTRIBUTES.
- The variables Age, Income1, Income2, and Income3 are assigned the variable attribute AnswerFormat with a value of Fill-in.
- The variables Gender, OwnHome, and MortgageType are assigned the variable attribute AnswerFormat with a value of Single select.
- The variable AvgIncome is assigned the variable attribute AnswerFormat with a value of Computed value.
- The variable AvgIncome is assigned the variable attribute Formula, with a value the describes the formula used to calculate the value of this variable.
- The variable AvgIncome is assigned the variable attribute array DerivedFrom, and each array value identifies one of the variables used to calculate the value of AvgIncome.
- DISPLAY ATTRIBUTES lists the variable attributes for each variable in the active dataset.
Figure 1. Variable attributes
