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
Related Posts with Euclidean distance matrix
Using CD directories in local myfilesHi, Is it possible to put the CD directory on local myfiles? My command is local myfiles: dir "C:…
How to Sum or add Across Column with if commandHello Fellow Statalist, I have a dataset that contains the following vatiables: Date, CIF, FOB, Cou…
Relative coefficientsDear All, Can someone help me to understand how to obtain coefficients relative to the absolute val…
Problem with summarystatistics by groupDear all, In my dataset I have 5 dummies, indicating whether a firm belongs to a specific group. I …
Estimating p-value from t-value in regression with cluster-robust standard errorsHi, I have run a regression model with cluster-robust standard errors, using the following command:…
Subscribe to:
Post Comments (Atom)
0 Response to Euclidean distance matrix
Post a Comment