examples: Rename variables for nhtsa example to give them better names.
[pspp] / doc / pspp-figures / ctables35.sps
1 GET FILE='nhtsa.sav'.
2 CTABLES
3     /PCOMPUTE &all_drivers=EXPR([1 THRU 2] + [3 THRU 4])
4     /PPROPERTIES &all_drivers LABEL='All Drivers'
5     /PCOMPUTE &pct_never=EXPR([5] / ([1 THRU 2] + [3 THRU 4] + [5]) * 100)
6     /PPROPERTIES &pct_never LABEL='% Not Drivers' FORMAT=COUNT PCT40.1
7     /TABLE=freqOfDriving BY gender
8     /CATEGORIES VARIABLES=freqOfDriving [1 THRU 2,SUBTOTAL='Frequent Drivers',
9                                          3 THRU 4, SUBTOTAL='Infrequent Drivers',
10                                          &all_drivers, 5, &pct_never,
11                                          MISSING, SUBTOTAL='Not Drivers or Missing'].