I have a question about the results after the rangestat command.
Suppose I input the following dataset:
Code:
input firmid sales year industry 1 10 1999 11 2 5 1999 11 5 19 1999 11 3 7 1999 22 4 2 1999 22 6 4 1999 22 1 8 2000 11 2 6 2000 11 5 12 2000 11 3 9 2000 22 4 3 2000 22 6 3 2000 22 end
Code:
rangestat (mean) sales_av=sales, by(industry) excludeself interval(year 0 0)
rangestat (mean) sales_ma=sales, by(industry) excludeself interval(year -1 0)
list
+------------------------------------------------------+
| firm sales year industry sales_av sales_ma |
|------------------------------------------------------|
1. | 1 10 1999 11 12 12 |
2. | 2 5 1999 11 14.5 14.5 |
3. | 5 19 1999 11 7.5 7.5 |
4. | 3 7 1999 22 3 3 |
5. | 4 2 1999 22 5.5 5.5 |
|------------------------------------------------------|
6. | 6 4 1999 22 4.5 4.5 |
7. | 1 8 2000 11 9 10.4 |
8. | 2 6 2000 11 10 10.8 |
9. | 5 12 2000 11 7 9.6 |
10. | 3 9 2000 22 3 3.8 |
|------------------------------------------------------|
11. | 4 3 2000 22 6 5 |
12. | 6 3 2000 22 6 5 |
+------------------------------------------------------+
0 Response to "rangestat" with "excludeself" and "interval(t -1 0)"
Post a Comment