Write frequency percentages to data file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | * Write frequency percentage to data file. * rlevesque@videotron.ca. DATA LIST LIST /item(F8) var1(F8). BEGIN DATA. 2 1 1 2 5 3 2 4 3 4 1 7 1 2 END DATA. LIST. AGGREGATE /OUTFILE=* /BREAK=item /freq_nb = N(item). COMPUTE dummy=1. AGGREGATE /OUTFILE='C:\\temp\\temp.sav' /BREAK=dummy /tot_nb = SUM(freq_nb). MATCH FILES /FILE=* /TABLE='C:\\temp\\temp.sav' /BY dummy. COMPUTE freq_pc=freq_nb/tot_nb. MATCH FILES FILE=* /KEEP=item freq_pc. |
Related pages
...