If you already have a variable defined by age groups, say AGEGROUP, then the
syntax is FREQUENCIES AGEGROUP. You'll get the frequency plus the
percentages and the cumulative percentages as well. An alternative is using
the CTABLES or TABLES commands.
If you do NOT have an age-group variable, but just the raw ages, you may
want to create the age group variable first, either on a permanent or
temporary basis. For instance:
TEMPORARY
RECODE AGE
(0 THRU 29=1)(30 THRU 39=2)(40 THRU 49=3)(50 THRU 59=4) (ELSE=5)
INTO AGEGROUP.
VARIABLE LABEL AGEGROUP 'Age Group'.
VALUE LABEL AGEGROUP 1 'Under 30' 2 '30-39' 3 '40-49' 4 '50-59'
5 '60 and over'.
FREQUENCIES AGEGROUP.
If the TEMPORARY command is present before this sequence of commands, the
new variable AGEGROUP will not survive after the FREQUENCIES procedure.
Otherwise, it will remain in the working file, and could be saved for next
time. TEMPORARY covers all transformation commands until the first command
requiring a data pass, such as FREQUENCIES.
Hector
-----Mensaje original-----
De: SPSSX(r) Discussion [mailto:
[hidden email]] En nombre de Manny
Estrada
Enviado el: Wednesday, June 28, 2006 12:06 AM
Para:
[hidden email]
Asunto: Frequency distribution
Could someone please let me know how to get a table
like this, doing syntax:
Class Interval Frequency
30-39 11
40-49 46
50-59 70
Thanks,
Manny Estrada