Last active
October 20, 2017 19:52
-
-
Save statgeek/a5184a4e1678d81e2643 to your computer and use it in GitHub Desktop.
SAS Distance Matrix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*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