Hi,
Currently I am running a small panel data analysis on data based upon oil consumption of countries. The plan was to look at about 50 countries and their consumption.
As I have followed guides by my tutors, I ran into the following issue. My FE analysis gave me a lower observation count compared to my actual data and I cannot figure out why. I am a rookie within using Stata, so I will take all feedback well and try to elaborate as much has possible.
Here is my current output in the following order, FE analysis will be posted at the bottom.
As you can tell the FE observations are lower than the others, as I am pretty green in using Stata, my problem solving skills are not refined at all.
Hopefully someone will be able to take their time and see a simple solution within it all. And if it is a more elaborate solution I am all ears.
Thank you for reading through this and your time hopefully someone can assist me with this.
Currently I am running a small panel data analysis on data based upon oil consumption of countries. The plan was to look at about 50 countries and their consumption.
As I have followed guides by my tutors, I ran into the following issue. My FE analysis gave me a lower observation count compared to my actual data and I cannot figure out why. I am a rookie within using Stata, so I will take all feedback well and try to elaborate as much has possible.
Here is my current output in the following order, FE analysis will be posted at the bottom.
As you can tell the FE observations are lower than the others, as I am pretty green in using Stata, my problem solving skills are not refined at all.
Hopefully someone will be able to take their time and see a simple solution within it all. And if it is a more elaborate solution I am all ears.
Thank you for reading through this and your time hopefully someone can assist me with this.
Code:
. describe id t Y2020 Y2022 storage display value variable name type format label variable label ------------------------------------------------------------------------------------------ id byte %10.0g id t byte %10.0g t Y2020 double %10.0g Y2020 Y2022 double %10.0g Y2022 . summarize id t Y2020 Y2022 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- id | 102 26 14.79229 1 51 t | 102 1.5 .5024692 1 2 Y2020 | 52 1573.711 3054.181 0 17183.32 Y2022 | 52 1715.656 3255.625 0 19140.24 . sort id t . xtset id t panel variable: id (strongly balanced) time variable: t, 1 to 2 delta: 1 unit . xtdescribe id: 1, 2, ..., 51 n = 51 t: 1, 2, ..., 2 T = 2 Delta(t) = 1 unit Span(t) = 2 periods (id*t uniquely identifies each observation) Distribution of T_i: min 5% 25% 50% 75% 95% max 2 2 2 2 2 2 2 Freq. Percent Cum. | Pattern ---------------------------+--------- 51 100.00 100.00 | 11 ---------------------------+--------- 51 100.00 | XX . xtsum id t Y2020 Y2022 Variable | Mean Std. Dev. Min Max | Observations -----------------+--------------------------------------------+---------------- id overall | 26 14.79229 1 51 | N = 102 between | 14.86607 1 51 | n = 51 within | 0 26 26 | T = 2 | | t overall | 1.5 .5024692 1 2 | N = 102 between | 0 1.5 1.5 | n = 51 within | .5024692 1 2 | T = 2 | | Y2020 overall | 1573.711 3054.181 0 17183.32 | N = 52 between | 3065.201 58.95946 17183.32 | n = 51 within | 341.1028 -148.7734 3296.196 | T = 1.01961 | | Y2022 overall | 1715.656 3255.625 0 19140.24 | N = 52 between | 3264.946 69.38343 19140.24 | n = 51 within | 383.7324 -222.098 3653.409 | T-bar = 1.01961 . reg Y2020 Y2022 Source | SS df MS Number of obs = 2 -------------+---------------------------------- F(1, 0) = . Model | 5933905.8 1 5933905.8 Prob > F = . Residual | 0 0 . R-squared = 1.0000 -------------+---------------------------------- Adj R-squared = . Total | 5933905.8 1 5933905.8 Root MSE = 0 ------------------------------------------------------------------------------ Y2020 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- Y2022 | -.8889079 . . . . . _cons | 3444.969 . . . . . ------------------------------------------------------------------------------ . xtreg Y2020 Y2022, fe Fixed-effects (within) regression Number of obs = 2 Group variable: id Number of groups = 1 R-sq: Obs per group: within = 1.0000 min = 2 between = . avg = 2.0 overall = 1.0000 max = 2 F(1,0) = . corr(u_i, Xb) = . Prob > F = . ------------------------------------------------------------------------------ Y2020 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- Y2022 | -.8889079 . . . . . _cons | 3444.969 . . . . . -------------+---------------------------------------------------------------- sigma_u | . sigma_e | . rho | . (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(0, 0) = . Prob > F = .
Comment