Re: syntax

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: syntax

Dennis Deck
Helga

I assume these are numerically coded (1='Babtist',2='Protestent,  . . . )
A simple approach is to use RECODE:

RECODE Length (1,2=1) (3,4=2) INTO Length2 .

VALUE LABELS
  Length
    1  'less than 6 months'
    2  '6 months to 5.5 years'
    3  '5.6 years to 10 years'
    4  'more than 10 years'
 /Length2
    1 '0 to 5.5 years'
    2 'More than 5.5 years'
  .

FREQUENCIES Vars= Length Length2 .



-----Original Message-----
From: Helga Walz [mailto:[hidden email]]
Sent: Thursday, April 24, 2008 7:05 PM
Subject: FW: syntax

Thank you for your assistance ahead of time.

Could you please assist me with syntax, how to collapse the following because of small numbers:

length of living:   less than 6 months
                       1 to 5 years
                       6 to 10 years
                       More than 10 years
       into 2 categories  (<6 up to 5 years, 6 to >10 years))

religion:           Baptist
                      Protestant
                      Catholic
                      Muslim
                      Other
                     But not Jewish (because n is only 2)
  into 3 categories (Baptist, Protestant and Catholic, Muslim and Other



marital status: single/never married
                      divorced/separated                        into 2 categories
                      widowed
                      but not married  (because n=2 only)
   into 2 categories  (single/never married and divorced/separated, widowed)

ethnicity:    Caucasian/white
                 African American/Black
                 but not American Indian (n=1)
     into 2 categories (Caucasian/white, African American)

Age:   51 to 64
          65 to 70
          71 to 84
         85 to 90
  into 2 categories (51 to 64 and 65 to 70, 71 to 84)  but not 85 to 90

Thank you so much,

Helga

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD