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
Praising Stata outside the Stata ForumInteresting, I think: https://www.theanalysisfactor.com/wo...is-with-stata/ …
kappaetc: Testing for signficance of a difference in before / after interventionI am using kappaetc (SSC) Inter-rater reliability, comparing diagnostic agreement before vs. after a…
Using ppmlhdfe with exporter-time, importer-time and pair fixed effects - Gravity modelDear all, I try to figure out the equivalent of my ppml command to ppmlhdfe command, including expo…
Simple commands not working....wonder why (Stata/IC 15.1)Hi, I wanted to run a simple command for moving one of my variables called "comment" to the end of …
Margins for DiD return not estimable!Hi everyone, I am evaluating the effect of Grab's entry in Vietnam on firm performance indicators s…
Subscribe to:
Post Comments (Atom)
0 Response to Euclidean distance matrix
Post a Comment