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 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 21 Jun 2007 10:29:02 -0400
Reply-To:     Juliana <juliana.i.tobon@GMAIL.COM>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Juliana <juliana.i.tobon@GMAIL.COM>
Subject:      Converting scale value into binary columns

It would be great if anyone could help me out with the following:

I have a series of contact dates such as

Jan02 May02 July02 Aug02

I would eventually like to convert this into binary coding month-by-month such that if a contact occurred in a given month the value is 1 and otherwise it is 0. I calculated the difference between the contact dates (in months) such that I have the following:

datediff1 datediff2 datediff3 datediff4 1 4 2 1

I would like to conver this into a new series of columns with (n-1) zeroes in between ones such that the above would become:

1 0 0 0 1 0 1 1

This would reflect the months January to August, with a 1 for a contact and a 0 for no contact.

Again, if anyone can help me out, I would appreciate it. Thanks!


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