Hi all,
http://www.unc.edu/~arellis/socnet/bcent.sas
I found this macro from the internet. I'm sure its functionality is what I want, but I know know how to use it.If I have one matrix data like this:
data have;
input a b c d e $;
datalines;
1 1 0 0 0
1 0 1 0 0
0 1 1 0 1
0 0 0 0 0
0 0 1 0 0
;
run;
How to use this macto?
Thanks.
Tom
proc iml;
%inc "bcent.sas";
use have;
read all var _NUM_ into m;
close have;
directed=1;
normalize=1;
bc=bcent(m,directed,normalize);
print bc;
Hi Rick,
It works. Thanks.
By the way, Can I save bc in one column in one dataset? Thank.
Tom
create outdata var {bc}; append; close outdata;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.