Skip to content

Instantly share code, notes, and snippets.

@statgeek
Last active October 20, 2017 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save statgeek/a5184a4e1678d81e2643 to your computer and use it in GitHub Desktop.
Save statgeek/a5184a4e1678d81e2643 to your computer and use it in GitHub Desktop.
SAS Distance Matrix
*Creates a distance matrix for a 1/0 data set. Will not work for values other than 1/0;
data test;
input id v1-v3;
cards;
11 1 0 1
21 0 1 1
31 1 1 0
41 1 1 0
;
ods output sscp=coocs;
proc corr data=test sscp;
var v1-v3;
run;
proc print data=coocs;
run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment