Hi,
My data looks like:
I am trying to run the regression: PM25st = πΌ + πΎs +π½(Policyst) + πit
In this model πΌ is the constant term, πΎπ is a fixed effect for each station in Delhi, π stands for
station π , π‘ stands for time, π πππππ¦ is a dummy that is 1 between January 1 and January 15
(both days included) and zero everywhere else.
I just want to check that the way I am approaching this (with the panel nature of the data and pobservations on multiple stations) is correct:
My data looks like:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int time byte station_id str10 date float(pm25 policy) 1 1 "2015-11-01" 255.38733 0 2 1 "2015-11-02" 285.64792 0 3 1 "2015-11-03" 364.8735 0 4 1 "2015-11-04" 393.0765 0 5 1 "2015-11-05" 204.98445 0 6 1 "2015-11-06" 215.31944 0 7 1 "2015-11-07" 483.1946 0 8 1 "2015-11-08" 258.02063 0 9 1 "2015-11-09" 306.41415 0 10 1 "2015-11-10" 349.3691 0 11 1 "2015-11-11" 242.0024 0 12 1 "2015-11-12" 346.17285 0 13 1 "2015-11-13" 453.81625 0 14 1 "2015-11-14" 332.8383 0 15 1 "2015-11-15" 325.8029 0 16 1 "2015-11-16" 289.93582 0 17 1 "2015-11-17" 186.54706 0 18 1 "2015-11-18" 308.7605 0 19 1 "2015-11-19" 362.0068 0 20 1 "2015-11-20" 298.77 0 21 1 "2015-11-21" 468.6359 0 22 1 "2015-11-22" 337.9147 0 23 1 "2015-11-23" 310.935 0 24 1 "2015-11-24" 341.2752 0 25 1 "2015-11-25" 207.26666 0 26 1 "2015-11-26" 294.845 0 27 1 "2015-11-27" 290.82584 0 28 1 "2015-11-28" 228.25706 0 29 1 "2015-11-29" 355.5382 0 30 1 "2015-11-30" 448.9146 0 31 1 "2015-12-01" 259.2621 0 32 1 "2015-12-02" 227.75783 0 33 1 "2015-12-03" 271.53583 0 34 1 "2015-12-04" 273.63434 0 35 1 "2015-12-05" 426.3975 0 37 1 "2015-12-07" 338.68335 0 38 1 "2015-12-08" 476.0822 0 39 1 "2015-12-09" 331.6991 0 40 1 "2015-12-10" 272.02832 0 41 1 "2015-12-11" 269.66824 0 42 1 "2015-12-12" 268.65543 0 43 1 "2015-12-13" 213.85167 0 44 1 "2015-12-14" 192.96727 0 53 1 "2015-12-23" 397.8218 0 54 1 "2015-12-24" 209.17546 0 55 1 "2015-12-25" 188.85374 0 56 1 "2015-12-26" 209.6796 0 57 1 "2015-12-27" 215.4125 0 58 1 "2015-12-28" 204.12695 0 59 1 "2015-12-29" 193.9854 0 60 1 "2015-12-30" 280.76434 0 61 1 "2015-12-31" 293.795 0 62 1 "2016-01-01" 329.5895 1 63 1 "2016-01-02" 292.3737 1 64 1 "2016-01-03" 339.5119 1 65 1 "2016-01-04" 463.6259 1 66 1 "2016-01-05" 418.11285 1 67 1 "2016-01-06" 365.9205 1 68 1 "2016-01-07" 431.468 1 72 1 "2016-01-11" 442.4733 1 73 1 "2016-01-12" 592.19 1 74 1 "2016-01-13" 289.71167 1 75 1 "2016-01-14" 274.2575 1 76 1 "2016-01-15" 182.7229 1 77 1 "2016-01-16" 143.23666 0 78 1 "2016-01-17" 201.5161 0 79 1 "2016-01-18" 335.98 0 80 1 "2016-01-19" 322.1179 0 81 1 "2016-01-20" 307.585 0 82 1 "2016-01-21" 234.40916 0 83 1 "2016-01-22" 301.30435 0 84 1 "2016-01-23" 361.8912 0 85 1 "2016-01-24" 388.8046 0 86 1 "2016-01-25" 274.71957 0 87 1 "2016-01-26" 372.9309 0 88 1 "2016-01-27" 339.7796 0 89 1 "2016-01-28" 361.7968 0 90 1 "2016-01-29" 387.95935 0 91 1 "2016-01-30" 346.5737 0 95 1 "2016-02-03" 114.052 0 96 1 "2016-02-04" 144.55 0 97 1 "2016-02-05" 213.89067 0 98 1 "2016-02-06" 298.728 0 99 1 "2016-02-07" 170.50786 0 100 1 "2016-02-08" 117.76826 0 101 1 "2016-02-09" 172.35167 0 102 1 "2016-02-10" 261.45782 0 103 1 "2016-02-11" 218.81667 0 104 1 "2016-02-12" 193.488 0 105 1 "2016-02-13" 153.3725 0 106 1 "2016-02-14" 89.75692 0 107 1 "2016-02-15" 120.46435 0 108 1 "2016-02-16" 137.67166 0 109 1 "2016-02-17" 133.53696 0 110 1 "2016-02-18" 160.53833 0 111 1 "2016-02-19" 213.855 0 112 1 "2016-02-20" 193.9894 0 113 1 "2016-02-21" 70.775 0 114 1 "2016-02-22" 104.34834 0 116 1 "2016-02-24" 79 0 end
In this model πΌ is the constant term, πΎπ is a fixed effect for each station in Delhi, π stands for
station π , π‘ stands for time, π πππππ¦ is a dummy that is 1 between January 1 and January 15
(both days included) and zero everywhere else.
I just want to check that the way I am approaching this (with the panel nature of the data and pobservations on multiple stations) is correct:
Code:
xtset station_id time Panel variable: station_id (unbalanced) Time variable: time, 1 to 181, but with gaps Delta: 1 unit . xtreg pm25 policy, fe robust Fixed-effects (within) regression Number of obs = 992 Group variable: station_id Number of groups = 7 R-squared: Obs per group: Within = 0.0672 min = 73 Between = 0.0830 avg = 141.7 Overall = 0.0593 max = 159 F(1, 6) = 16.07 corr(u_i, Xb) = 0.0041 Prob > F = 0.0070 (Std. err. adjusted for 7 clusters in station_id) ------------------------------------------------------------------------------ | Robust pm25 | Coefficient std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- policy | 80.04457 19.96843 4.01 0.007 31.18358 128.9056 _cons | 169.9105 1.570098 108.22 0.000 166.0686 173.7524 -------------+---------------------------------------------------------------- sigma_u | 34.883837 sigma_e | 80.56265 rho | .15788854 (fraction of variance due to u_i) ------------------------------------------------------------------------------ . regress pm25 policy Source | SS df MS Number of obs = 992 -------------+---------------------------------- F(1, 990) = 62.41 Model | 465993.26 1 465993.26 Prob > F = 0.0000 Residual | 7391431.64 990 7466.09257 R-squared = 0.0593 -------------+---------------------------------- Adj R-squared = 0.0584 Total | 7857424.9 991 7928.78396 Root MSE = 86.407 ------------------------------------------------------------------------------ pm25 | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- policy | 80.52398 10.19253 7.90 0.000 60.52253 100.5254 _cons | 169.8728 2.858075 59.44 0.000 164.2642 175.4814 ------------------------------------------------------------------------------
Comment