Dear Statalist experts
I am researching about how to detect outlier now. However, I am a bit confused whether...
1. it is the same for finding outliers using xtreg and reg? (I'm thinking of using https://www3.nd.edu/~rwilliam/stats2/l24.pdf methods)
2. Just to make sure whether I understand these correctly or not. According to my graph, I think there should be outliers. (weirdly, instead of positive interaction as indicated in all of my coefficients in all regressions, the scatter plot produces negative relationship instead... this might be affected by the outlier at the bottom of the graph?) so I am thinking of getting rid of extremes values and then compare whether the result change a lot or not.
+----------------------------+
| obs: govexp~p migran~p |
|----------------------------|
| 79. 9.454983 2.456626 |
| 71. 10.2687 5.899138 |
| 139. 10.86259 2.100434 |
| 170. 11.15736 1.818957 |
| 20. 11.57134 20.86153 |
+----------------------------+
+----------------------------+
| 43. 25.86872 22.03337 |
| 142. 26.48121 11.01826 |
| 67. 27.08459 8.463334 |
| 167. 27.36583 9.182918 |
| 130. 29.9406 . |
+----------------------------+
i.year _Iyear_1990-2010 (naturally coded; _Iyear_1990 omitted)
Fixed-effects (within) regression Number of obs = 163
Group variable: country Number of groups = 35
R-sq: within = 0.2436 Obs per group: min = 1
between = 0.0196 avg = 4.7
overall = 0.0019 max = 5
F(5,123) = 7.92
corr(u_i, Xb) = -0.7451 Prob > F = 0.0000
------------------------------------------------------------------------------
govexp_gdp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
migrant_pop | .4818744 .1003668 4.80 0.000 .2832044 .6805443
_Iyear_1995 | .1822943 .5228856 0.35 0.728 -.8527256 1.217314
_Iyear_2000 | -1.286386 .5284281 -2.43 0.016 -2.332377 -.2403948
_Iyear_2005 | -1.169919 .5584982 -2.09 0.038 -2.275432 -.0644057
_Iyear_2010 | -.4115732 .5954315 -0.69 0.491 -1.590193 .7670469
_cons | 15.59851 .8436665 18.49 0.000 13.92853 17.2685

Thank you
Guest
I am researching about how to detect outlier now. However, I am a bit confused whether...
1. it is the same for finding outliers using xtreg and reg? (I'm thinking of using https://www3.nd.edu/~rwilliam/stats2/l24.pdf methods)
2. Just to make sure whether I understand these correctly or not. According to my graph, I think there should be outliers. (weirdly, instead of positive interaction as indicated in all of my coefficients in all regressions, the scatter plot produces negative relationship instead... this might be affected by the outlier at the bottom of the graph?) so I am thinking of getting rid of extremes values and then compare whether the result change a lot or not.
Code:
extremes govexp_gdp migrant_pop
| obs: govexp~p migran~p |
|----------------------------|
| 79. 9.454983 2.456626 |
| 71. 10.2687 5.899138 |
| 139. 10.86259 2.100434 |
| 170. 11.15736 1.818957 |
| 20. 11.57134 20.86153 |
+----------------------------+
+----------------------------+
| 43. 25.86872 22.03337 |
| 142. 26.48121 11.01826 |
| 67. 27.08459 8.463334 |
| 167. 27.36583 9.182918 |
| 130. 29.9406 . |
+----------------------------+
Code:
. xi: xtreg govexp_gdp migrant_pop i.year, fe
Fixed-effects (within) regression Number of obs = 163
Group variable: country Number of groups = 35
R-sq: within = 0.2436 Obs per group: min = 1
between = 0.0196 avg = 4.7
overall = 0.0019 max = 5
F(5,123) = 7.92
corr(u_i, Xb) = -0.7451 Prob > F = 0.0000
------------------------------------------------------------------------------
govexp_gdp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
migrant_pop | .4818744 .1003668 4.80 0.000 .2832044 .6805443
_Iyear_1995 | .1822943 .5228856 0.35 0.728 -.8527256 1.217314
_Iyear_2000 | -1.286386 .5284281 -2.43 0.016 -2.332377 -.2403948
_Iyear_2005 | -1.169919 .5584982 -2.09 0.038 -2.275432 -.0644057
_Iyear_2010 | -.4115732 .5954315 -0.69 0.491 -1.590193 .7670469
_cons | 15.59851 .8436665 18.49 0.000 13.92853 17.2685
Thank you
Guest
Comment