I would like to create a new variable which will be the average value of 50 countries. That is, to create panel data analysis in time series analysis. Is it econometric correct?
-
Login or Register
- Log in with
. use "https://www.stata-press.com/data/r17/nlswork.dta"
(National Longitudinal Survey of Young Women, 14-24 years old in 1968)
. bysort idcode: egen wanted_1=mean(ln_wage)
. egen wanted_2=mean(ln_wage)
. list idcode ln_wage wanted_1 wanted_2 in 1/20
+-----------------------------------------+
| idcode ln_wage wanted_1 wanted_2 |
|-----------------------------------------|
1. | 1 1.451214 2.040433 1.674907 |
2. | 1 1.02862 2.040433 1.674907 |
3. | 1 1.589977 2.040433 1.674907 |
4. | 1 1.780273 2.040433 1.674907 |
5. | 1 1.777012 2.040433 1.674907 |
|-----------------------------------------|
6. | 1 1.778681 2.040433 1.674907 |
7. | 1 2.493976 2.040433 1.674907 |
8. | 1 2.551715 2.040433 1.674907 |
9. | 1 2.420261 2.040433 1.674907 |
10. | 1 2.614172 2.040433 1.674907 |
|-----------------------------------------|
11. | 1 2.536374 2.040433 1.674907 |
12. | 1 2.462927 2.040433 1.674907 |
13. | 2 1.360348 1.688055 1.674907 |
14. | 2 1.206198 1.688055 1.674907 |
15. | 2 1.549883 1.688055 1.674907 |
|-----------------------------------------|
16. | 2 1.832581 1.688055 1.674907 |
17. | 2 1.726721 1.688055 1.674907 |
18. | 2 1.68991 1.688055 1.674907 |
19. | 2 1.726964 1.688055 1.674907 |
20. | 2 1.808289 1.688055 1.674907 |
+-----------------------------------------+
.
Comment