Hi all,
I have 271 unique forum IDs and need to calculate the Euclidean distance between each forum ACROSS all 16 organizational types.
If I use code [matrix diss O1 = orgtype1, L2], I get the Euclidean distance between each forum for Org 1, but how do I do this across all org types such that I have one matrix of Euclidean distances between each forum across all 16 (i.e., sum 1-16, (difference)^2)^1/2
Thank you very much
----------------------- copy starting from the next line -----------------------
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(forumid orgtype1 orgtype2 orgtype3 orgtype4 orgtype5 orgtype6 orgtype7 orgtype8 orgtype9 orgtype10 orgtype11 orgtype12 orgtype13 orgtype14 orgtype15 orgtype16)
102 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
103 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
104 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
106 0 0 0 .16666667 .7777778 0 .05555556 0 0 0 0 0 0 0 0 0
107 0 0 0 0 .5 0 0 0 0 0 0 0 0 0 0 0
109 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
110 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
111 0 0 0 0 0 0 1 0 0 0
0 Response to Euclidean distance matrix
Post a Comment