/* testbcent.sas 2007/09/12 Alan R. Ellis, MSW Research Associate and Fellow Cecil G. Sheps Center for Health Services Research University of North Carolina at Chapel Hill CB 7590 Chapel Hill, NC 27599 are@unc.edu IML code and supporting SAS macro to test bcent.sas */ %macro test(matrix); print &matrix; &matrix._directed=bcent(&matrix,1,0); print &matrix._directed; &matrix._directed_normalized=bcent(&matrix,1,1); print &matrix._directed_normalized; &matrix._undirected=bcent(&matrix,0,0); print &matrix._undirected; &matrix._undirected_normalized=bcent(&matrix,0,1); print &matrix._undirected_normalized; %mend; proc iml; %include 'p:\sas\macro\bcent.sas'; w={0 1 1 1 1 1 1 1,1 0 0 0 0 0 0 0,1 0 0 0 0 0 0 0,1 0 0 0 0 0 0 0,1 0 0 0 0 0 0 0,1 0 0 0 0 0 0 0,1 0 0 0 0 0 0 0,1 0 0 0 0 0 0 0}; x={ 0 1 1 0 0 0 0 0 0 0 0 0 0, 1 0 1 1 0 0 0 0 0 0 0 0 0, 1 1 0 1 0 0 0 0 0 0 0 0 0, 0 1 1 0 1 0 0 0 0 0 0 0 0, 0 0 0 1 0 0 1 1 0 0 0 0 0, 0 0 0 0 0 0 1 0 0 1 1 0 0, 0 0 0 0 1 1 0 0 0 0 1 0 0, 0 0 0 0 1 0 0 0 1 0 0 1 0, 0 0 0 0 0 0 0 1 0 0 0 1 1, 0 0 0 0 0 1 0 0 0 0 1 0 0, 0 0 0 0 0 1 1 0 0 1 0 0 0, 0 0 0 0 0 0 0 1 1 0 0 0 1, 0 0 0 0 0 0 0 0 1 0 0 1 0}; y={0 1 0 0 0 0 0 0 1,1 0 1 0 0 0 0 0 0,0 1 0 1 0 0 0 0 0,0 0 1 0 1 0 0 0 0,0 0 0 1 0 1 0 0 0,0 0 0 0 1 0 1 0 0,0 0 0 0 0 1 0 1 0,0 0 0 0 0 0 1 0 1,1 0 0 0 0 0 0 1 0}; z={ 0 1 0 0 0 0 0, 1 0 1 0 0 0 0, 0 1 0 1 0 0 0, 0 0 1 0 1 0 0, 0 0 0 1 0 1 0, 0 0 0 0 1 0 1, 0 0 0 0 0 1 0}; %test(w); %test(x); %test(y); %test(z); quit;