Dear Community,
I'm currently working with a panel. Every variable var1 has the indicator var2 which doesn't change over time. I would like to calculate the sum of these indicators without taking into accoun the fact that var1 and var2 repeat over time. The problem is when I type
gen wanted=sum(var2) it takes repeated values into account
When I type:
bysort var1: egen wanted=total(var2) I have the sum for every category and it is not what I want to achieve.
Please help me. I'm out of the ideas.
I'm currently working with a panel. Every variable var1 has the indicator var2 which doesn't change over time. I would like to calculate the sum of these indicators without taking into accoun the fact that var1 and var2 repeat over time. The problem is when I type
gen wanted=sum(var2) it takes repeated values into account
When I type:
bysort var1: egen wanted=total(var2) I have the sum for every category and it is not what I want to achieve.
Please help me. I'm out of the ideas.
Comment