Hi,
How to include a lagged dependent variable for panel regression? What is the code to run this model in stata Y(t-2)-= Beta1 X1(t-1)+ Beta2 X2(t-2)? Is it possible to run a panel regression, or is it a time series regression? I have Panel data for 27 districts and 21 years. Please help with this. I have attached the panel regression results without the lagged dep variable. I want to include the dep variable "shareofarablearea " as a lagged var for two years in this regression. Thanks in advance
The results are as follows :
xtset disid yearnum
panel variable: disid (strongly balanced)
time variable: yearnum, 1 to 21
delta: 1 unit
. xtreg shareofarablearea shareofbarrenarea shreofnonagrlarea i. yearnum,re
Random-effects GLS regression Number of obs = 567
Group variable: disid Number of groups = 27
R-sq: within = 0.9685 Obs per group: min = 21
between = 0.1354 avg = 21.0
overall = 0.1396 max = 21
Wald chi2(22) = 15979.18
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
-----------------------------------------------------------------------------------
shareofarablearea | Coef. Std. Err. z P>|z| [95% Conf. Interval]
------------------+----------------------------------------------------------------
shareofbarrenarea | -1.427427 .0359945 -39.66 0.000 -1.497975 -1.356879
shreofnonagrlarea | -1.052802 .0092747 -113.51 0.000 -1.07098 -1.034624
|
yearnum |
2 | -.0000462 .0007264 -0.06 0.949 -.00147 .0013776
3 | -.0000469 .0007265 -0.06 0.949 -.0014708 .001377
4 | .0002357 .0007266 0.32 0.746 -.0011884 .0016598
5 | .0003281 .0007267 0.45 0.652 -.0010962 .0017523
6 | .0007811 .000727 1.07 0.283 -.0006438 .0022061
7 | .0009334 .0007279 1.28 0.200 -.0004933 .0023602
8 | .0012574 .0007285 1.73 0.084 -.0001704 .0026853
9 | .001657 .0007291 2.27 0.023 .000228 .0030859
10 | .002337 .0007298 3.20 0.001 .0009067 .0037673
11 | .0025169 .0007318 3.44 0.001 .0010825 .0039513
12 | .0027521 .0007321 3.76 0.000 .0013172 .004187
13 | .0026973 .0007323 3.68 0.000 .001262 .0041327
14 | .0028637 .0007336 3.90 0.000 .0014258 .0043015
15 | .0030952 .0007357 4.21 0.000 .0016532 .0045371
16 | .0031809 .0007368 4.32 0.000 .0017369 .0046249
17 | .0034364 .0007386 4.65 0.000 .0019888 .0048841
18 | .0033719 .0007391 4.56 0.000 .0019232 .0048205
19 | .0041085 .0007415 5.54 0.000 .0026551 .0055618
20 | .0035343 .0007467 4.73 0.000 .0020707 .0049978
21 | .0033455 .0007506 4.46 0.000 .0018743 .0048166
|
_cons | .8130187 .0360681 22.54 0.000 .7423264 .883711
------------------+----------------------------------------------------------------
sigma_u | .18739579
sigma_e | .00267128
rho | .99979684 (fraction of variance due to u_i)
--more--
Radhika C
How to include a lagged dependent variable for panel regression? What is the code to run this model in stata Y(t-2)-= Beta1 X1(t-1)+ Beta2 X2(t-2)? Is it possible to run a panel regression, or is it a time series regression? I have Panel data for 27 districts and 21 years. Please help with this. I have attached the panel regression results without the lagged dep variable. I want to include the dep variable "shareofarablearea " as a lagged var for two years in this regression. Thanks in advance
The results are as follows :
xtset disid yearnum
panel variable: disid (strongly balanced)
time variable: yearnum, 1 to 21
delta: 1 unit
. xtreg shareofarablearea shareofbarrenarea shreofnonagrlarea i. yearnum,re
Random-effects GLS regression Number of obs = 567
Group variable: disid Number of groups = 27
R-sq: within = 0.9685 Obs per group: min = 21
between = 0.1354 avg = 21.0
overall = 0.1396 max = 21
Wald chi2(22) = 15979.18
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
-----------------------------------------------------------------------------------
shareofarablearea | Coef. Std. Err. z P>|z| [95% Conf. Interval]
------------------+----------------------------------------------------------------
shareofbarrenarea | -1.427427 .0359945 -39.66 0.000 -1.497975 -1.356879
shreofnonagrlarea | -1.052802 .0092747 -113.51 0.000 -1.07098 -1.034624
|
yearnum |
2 | -.0000462 .0007264 -0.06 0.949 -.00147 .0013776
3 | -.0000469 .0007265 -0.06 0.949 -.0014708 .001377
4 | .0002357 .0007266 0.32 0.746 -.0011884 .0016598
5 | .0003281 .0007267 0.45 0.652 -.0010962 .0017523
6 | .0007811 .000727 1.07 0.283 -.0006438 .0022061
7 | .0009334 .0007279 1.28 0.200 -.0004933 .0023602
8 | .0012574 .0007285 1.73 0.084 -.0001704 .0026853
9 | .001657 .0007291 2.27 0.023 .000228 .0030859
10 | .002337 .0007298 3.20 0.001 .0009067 .0037673
11 | .0025169 .0007318 3.44 0.001 .0010825 .0039513
12 | .0027521 .0007321 3.76 0.000 .0013172 .004187
13 | .0026973 .0007323 3.68 0.000 .001262 .0041327
14 | .0028637 .0007336 3.90 0.000 .0014258 .0043015
15 | .0030952 .0007357 4.21 0.000 .0016532 .0045371
16 | .0031809 .0007368 4.32 0.000 .0017369 .0046249
17 | .0034364 .0007386 4.65 0.000 .0019888 .0048841
18 | .0033719 .0007391 4.56 0.000 .0019232 .0048205
19 | .0041085 .0007415 5.54 0.000 .0026551 .0055618
20 | .0035343 .0007467 4.73 0.000 .0020707 .0049978
21 | .0033455 .0007506 4.46 0.000 .0018743 .0048166
|
_cons | .8130187 .0360681 22.54 0.000 .7423264 .883711
------------------+----------------------------------------------------------------
sigma_u | .18739579
sigma_e | .00267128
rho | .99979684 (fraction of variance due to u_i)
--more--
Radhika C
Comment