Hi,
I have a dataset with info on individuals (B) that have been involved in
projects (A) during multiple years (C). The dataset contains three columns:
A, B, C. Example:
A B C
1 1 a 1999
2 1 b 1999
3 1 c 1999
4 2 c 2001
5 2 d 2001
6 3 a 2004
7 3 b 2004
I am interested in the average tenure of all individuals for each project
(assuming that the tenure of an individual = 0 in the first project this
individual is involved in). So based on the data above:
A D
1 1 0
2 2 1
3 3 5
where D = average project tenure. How do I do this?