Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Calculate individual distance from other group members
From
Kartika Sari <[email protected]>
To
[email protected]
Subject
st: Calculate individual distance from other group members
Date
Tue, 23 Feb 2010 17:22:26 +0100
Dear All,
In my data, I have a distance matrix of wards for each individual. I also
know in which ward they live. The problem is i want to calculate ward
distance from each individual to each of other members in a group. Say there
are 5 people in a group, so I need to calculate distance for 4 others for
each person. I am wondering whether there is any syntax for this.
The structure of data is something like this:
group_id individual_id ward dtoward1 dtoward2 dtoward3 dtoward4 dtoward5
distance1? distance2? distance3? distance4?
1 1 3 10 4 0 9 7
1 2 1 0 6 10 8 5
1 3 2 6 0 4 11 3
1 4 1 0 6 10 8 5
1 5 2 6 0 4 11 3
Thank you very much in advanced.
Best regards,
Kartika
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/