/* this program creates a person-to-person and group-to-group matrix from the OSU Soc area lists. The first lines read the area list from the excel file, the next section reads it into IML, where I create the matrix and write it to PAJEK. Author: Moody Date: Jan, 01 */ /* lines to read the file 'ohioareas.xls' into the SAS dataset 'work.a' */ PROC IMPORT OUT= WORK.a DATAFILE= "C:\moody\Misc\ohioareas.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=YES; RUN; prco print data=a; run; proc iml; %include 'c:\moody\sas\programs\modules\pajwrite.mod'; use work.a; read all var{PHLC CC GWIR CSC} into areas; read all var{name} into names; p=areas*areas`; g=areas`*areas; mattrib g format=3.0 [colname={phlc cc gwir csc}]; print g; file 'c:\temp\fac_overlap.net'; call pajwrite(p,names,2); mattrib areas format=1.0 [colname={phlc cc gwir csc}]; print names areas; mattrib p format=1.0; print p; quit;