statalisters
i
need to generate some columns data in excel I think I could calculate them
in stata
I
have a panel data with firms, and profits for the period
1990/2004 No all the firms have the same period of data
I
need to calculate others 4 columns for profit
superposing a rolling period window of 3 periods.
Example:
original data base
Firms Years Profits
firm 1 1990 7
firm 1 1991 9
firm 1 1992
2
firm 1
1993 6
firm
1 1994
5
firm 1 1995
4
firm 2 1990
3
firm 2 1991
2
firm 2 1992
1
firm 2 1993
3
...
New data base
Firms Years Profits1
Profit2 Profit3
firm 1 1990
7
9 2
firm 1 1991
9
2 6
firm 1 1992
2
6 5
firm 1
1993
6
5 4
firm 2 1990
3
2 1
firm 2 1991
2 1
3
How can I do it
Thanks