I am looking for some help to calculate the cumulative percentages for a panel data.
Code:
year id income 2001 1 34 2001 1 34 2001 1 34 2001 2 45 2001 2 45 2001 2 45 2002 1 23 2002 1 23 2002 2 67 2002 2 67 2002 2 67 2002 2 67
The result should be like this:
Code:
Year Id income Rank Frequency cumfreq cummPercentage 2001 1 34 2 3 3 50 2001 1 34 2 3 3 50 2001 1 34 2 3 3 50 2001 2 45 1 3 6 100 2001 2 45 1 3 6 100 2001 2 45 1 3 6 100 2002 1 23 2 2 2 33 2002 1 23 2 2 2 33 2002 2 67 1 4 6 100 2002 2 67 1 4 6 100 2002 2 67 1 4 6 100 2002 2 67 1 4 6 100
I have gone through some informative threads on related topics, but most of them demonstrate for cross sectional data. I could not find anything on panel data.
I would appreciate any help.
Thanks a ton,
J
0 Response to Calculating cumulative percentage for panel data
Post a Comment