[S] creating dummies from dyads

Michele Trovero (trovero@stat.unc.edu)
Mon, 4 May 1998 04:28:09 -0400 (EDT)


Dear Splus users

I have some data related to "dyads". Each dyad is made of two
organizations. Each observation refers to a dyad, so since 63 is the
total number of organizations, I have 63*62/2 obs. For each dyads I have
a variable that identifies it in the form 1st_org2nd_org. E.g. 0112 tells
me that that dyad comes from organization 1 and org. 12. And so, 1012
tells me that it comes from org. 10 and org. 12, and so on.

I want to create dummy variables for each organization. Say,
create a variable DUMMY_10 that is equal to 1 iff org. 10 is part of the
dyad and 0 if not.

I thought of hand-putting a space between the two numbers in the id
variable, e.g. transforming 0112 in 01 12, and then load the two as
different variables, but since I have 1993 obs, the process is quite
boring and time consuming. Do you have a better solution?

Thanks in advance,
Michele

**************************************************************************
Michele A. Trovero <trovero@stat.unc.edu>
UNC Dept. of Statistics Oooo <trovero@email.unc.edu>
New West, CB#3260 oooO ( ) tel. (919) 962 5707 (w)
Chapel Hill NC 27599 ( ) ) / (919) 933 8999 (h)
USA \ ( (__) fax (919) 962 1279
(__)
**************************************************************************

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news