Hi,

I'm aware that the -duncan- command exists, but I need to do this manually for some other reasons.

So I'm trying to calculate the Duncan's dissimilarity index using this formula here:

https://en.m.wikipedia.org/wiki/Dunc...regation_Index



I have the variables mi, fi, M and F. However, I'm struggling how to incorporate that sigma notation in an equation for Stata. Completely at a loss here.

Any help would be much appreciated!