Dear all,
Suppose I have the following dataset.
input str8 groupid str8 memberid year
"A000" "B000" 1980
"A000" "B001" 1980
"A000" "B002" 1980
"A000" "B001" 1981
"A000" "B002" 1981
"A000" "B003" 1981
"A000" "B004" 1981
"A000" "B000" 1982
"A000" "B003" 1982
"A000" "B005" 1982
"A000" "B004" 1983
"A000" "B005" 1983
"A000" "B002" 1984
"A000" "B005" 1985
"A000" "B006" 1985
"A001" "B015" 1984
"A001" "B018" 1985
"A001" "B019" 1985
"A001" "B017" 1986
"A001" "B019" 1986
"A002" "B000" 1980
"A002" "B000" 1981
"A002" "B005" 1981
end
I'm struggling to compute the number of distinct members for each group over the last 5 years.
Could anyone please help me with this ?
Thank you very much for your help,
Vinh
Suppose I have the following dataset.
input str8 groupid str8 memberid year
"A000" "B000" 1980
"A000" "B001" 1980
"A000" "B002" 1980
"A000" "B001" 1981
"A000" "B002" 1981
"A000" "B003" 1981
"A000" "B004" 1981
"A000" "B000" 1982
"A000" "B003" 1982
"A000" "B005" 1982
"A000" "B004" 1983
"A000" "B005" 1983
"A000" "B002" 1984
"A000" "B005" 1985
"A000" "B006" 1985
"A001" "B015" 1984
"A001" "B018" 1985
"A001" "B019" 1985
"A001" "B017" 1986
"A001" "B019" 1986
"A002" "B000" 1980
"A002" "B000" 1981
"A002" "B005" 1981
end
I'm struggling to compute the number of distinct members for each group over the last 5 years.
Could anyone please help me with this ?
Thank you very much for your help,
Vinh
Comment