/* this program exports the OSUGRAD network to a file that UCINET can read. Used as part of a class exersize for soc nets Author: Moody Date: Feb, 2001 */ libname in1 v6 'i:\people\jwm\s884\data\'; data a; set in1.osugrd; run; proc iml; %include 'c:\moody\sas\programs\modules\uciwrite.mod'; use work.a; read all var{cohortn} into cohort; read all var{survey} into survey; read all var{nonwhite} into nonwhite; read all var("BF1":"BF94") into bfrnd; /* reads the adjacency matrix */ read all var("help1":"help94") into help; cohort = choose(cohort=.,0,cohort); /* recode missing data */ sample = choose(survey=.,2,survey); /* fix an error in my coding */ nonwhite = choose(nonwhite=.,9,survey); fake = j(nrow(cohort),1,0); fake[70]=1; /* the non-graduate student name I placed in the data as a test */ id=1:nrow(cohort); id=id`; id2=id; /* uciwrite requires both a row and column id */ file 'c:\moody\classes\soc884\examples\osuhlp.dat'; /* note that the name must be <= 8 chars */ call uciwrite(help,id,id2,1); file 'c:\moody\classes\soc884\examples\osubfnd.dat'; call uciwrite(bfrnd,id,id2,1); quit;