Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Sum over all possible combinations


From   "J E" <[email protected]>
To   [email protected]
Subject   st: Sum over all possible combinations
Date   Fri, 20 Jul 2007 22:21:25 -0500

Dear statalisters

I am interested in computing the sum of the absolute value of all possible differences within a group of my sample.

Suppose that the variable "group" denotes the variable indicating the group to which an individual belongs and Y is an outcome variable. I am interested in computing

sum of abs (Yi-Yj) for all i and j belonging to group K

My programming skills are almost none. Can somebody help me out regarding an efficient way of computing such statistic?

Thanks in advance

Julio

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index