LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 13 Jun 2003 11:55:45 +1000
Reply-To:     paulandpen@optusnet.com.au
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Paul Dickson <paulandpen@optusnet.com.au>
Subject:      Re: How to?
Comments: To: "Caryd @ aol . com" <Caryd@aol.com>
Content-Type: text/plain

Hi there Cary,

Here is syntax I have used in the past for this type of thing with two examples

Chronic condition and also gender

THE ORIGINAL VARIABLE IMPORTED FROM EXCEL WAS PRIMACYC IN THIS CASE (TRUNCATED BY SPSS TO EIGHT LETTERS) SUBSTITUTE YOUR EXCEL VARIABLE AS THE PRIMACYC VARIABLE AND CREATE A NEW VARIABLE FOR SPSS BASED ON PRIMARY

You can use do repeat for longer recoding needs and for shorter recoding needs use "if"

Regards Paul

Do Repeat=A "Arthritis" "Cardio" "Depression" "Diabetes" "Osteoporosis" "Other" "Respiratory"/B=1 2 3 4 5 6 7. If (primaryc=A) primary=B. End Repeat. Value label primary 1 "Arthritis" 2 "Cardio" 3 "Depression" 4 "Diabetes" 5 "Osteoporosis" 6 "Other" 7 "Respiratory". Variable label primary "primary condition". Execute.

RECODING GENDER (STRING TO NUMERIC)

IF (gender="Male") gender1=1. IF (gender="Female") gender1=2. value label gender1 1 'male' 2 'female'. Variable label gender1 gender execute.

regards Paul


Back to: Top of message | Previous page | Main SPSSX-L page