----------------------------------------------------------------------------------------------------------------------- log: C:\Documents and Settings\Ross McKitrick\My Documents\STATA files\voting\vote.log log type: text opened on: 6 May 2005, 15:37:47 . . clear . set memory 50m Current memory allocation current memory usage settable value description (1M = 1024k) -------------------------------------------------------------------- set maxvar 5000 max. variables allowed 1.733M set memory 50M max. data space 50.000M set matsize 400 max. RHS vars in models 1.254M ----------- 52.987M . insheet using vote.annual.csv // clears data then reads data from votingdata.csv (20 vars, 299 obs) . . mvdecode _all, mv(-99) // changes missing value code from -99 to '.' city: string variable ignored co: 45 missing values generated no2: 61 missing values generated so2: 93 missing values generated tsp: 10 missing values generated o3: 44 missing values generated . . tabulate city, generate(city) // generates city dummy variables City | Freq. Percent Cum. ------------+----------------------------------- Calgary | 23 7.69 7.69 Edmonton | 23 7.69 15.38 Halifax | 23 7.69 23.08 Hamilton | 23 7.69 30.77 Montreal | 23 7.69 38.46 Ottawa | 23 7.69 46.15 Quebec | 23 7.69 53.85 Regina | 23 7.69 61.54 Saskatoon | 23 7.69 69.23 Toronto | 23 7.69 76.92 Vancouver | 23 7.69 84.62 Victoria | 23 7.69 92.31 Winnipeg | 23 7.69 100.00 ------------+----------------------------------- Total | 299 100.00 . tabulate year, generate(year) // generates year dummy variables Year | Freq. Percent Cum. ------------+----------------------------------- 1974 | 13 4.35 4.35 1975 | 13 4.35 8.70 1976 | 13 4.35 13.04 1977 | 13 4.35 17.39 1978 | 13 4.35 21.74 1979 | 13 4.35 26.09 1980 | 13 4.35 30.43 1981 | 13 4.35 34.78 1982 | 13 4.35 39.13 1983 | 13 4.35 43.48 1984 | 13 4.35 47.83 1985 | 13 4.35 52.17 1986 | 13 4.35 56.52 1987 | 13 4.35 60.87 1988 | 13 4.35 65.22 1989 | 13 4.35 69.57 1990 | 13 4.35 73.91 1991 | 13 4.35 78.26 1992 | 13 4.35 82.61 1993 | 13 4.35 86.96 1994 | 13 4.35 91.30 1995 | 13 4.35 95.65 1996 | 13 4.35 100.00 ------------+----------------------------------- Total | 299 100.00 . . encode city, generate(place) // generates numeric variable place=1,2, etc as a city code . . tsset place year, yearly // establishes panel structure of data base panel variable: place, 1 to 13 time variable: year, 1974 to 1996 . * . * . * GENERATE PROVINCE DUMMIES . gen bc=city11+city12 . gen ab=city1+city2 . gen sk=city8+city9 . gen mn=city13 . gen on=city4+city6+city10 . gen pq=city5+city7 . gen ns=city3 . . sum(_all) // descriptive statistics Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- year | 299 1985 6.64437 1974 1996 city | 0 ndp | 299 .3043478 .460902 0 1 pc | 299 .5652174 .4965595 0 1 fpc | 299 .4347826 .4965595 0 1 -------------+-------------------------------------------------------- yndp | 299 .3007246 .4451981 0 1 ypc | 299 .5638239 .4851834 0 1 yfpc | 299 .4275362 .4633248 0 1 pgdp | 299 17.8327 6.945988 4.263 32.275 pcg | 299 6.389599 5.273752 -15.5387 27.417 -------------+-------------------------------------------------------- co | 254 1.053969 .51185 .1166667 3.723333 no2 | 238 21.66362 7.520041 5 51.45833 so2 | 206 6.421719 4.721512 .7208334 23.25 tsp | 289 57.95132 23.85508 17.65667 141.2917 o3 | 255 16.59222 3.51711 7.75 27.83333 -------------+-------------------------------------------------------- lagndp | 299 .2935652 .4124604 0 1 lagpc | 299 .5637358 .4635529 0 1 lagfpc | 299 .4275217 .4201734 0 1 index | 299 150 86.45808 1 299 count | 299 12 6.64437 1 23 -------------+-------------------------------------------------------- city1 | 299 .0769231 .2669161 0 1 city2 | 299 .0769231 .2669161 0 1 city3 | 299 .0769231 .2669161 0 1 city4 | 299 .0769231 .2669161 0 1 city5 | 299 .0769231 .2669161 0 1 -------------+-------------------------------------------------------- city6 | 299 .0769231 .2669161 0 1 city7 | 299 .0769231 .2669161 0 1 city8 | 299 .0769231 .2669161 0 1 city9 | 299 .0769231 .2669161 0 1 city10 | 299 .0769231 .2669161 0 1 -------------+-------------------------------------------------------- city11 | 299 .0769231 .2669161 0 1 city12 | 299 .0769231 .2669161 0 1 city13 | 299 .0769231 .2669161 0 1 year1 | 299 .0434783 .204273 0 1 year2 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year3 | 299 .0434783 .204273 0 1 year4 | 299 .0434783 .204273 0 1 year5 | 299 .0434783 .204273 0 1 year6 | 299 .0434783 .204273 0 1 year7 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year8 | 299 .0434783 .204273 0 1 year9 | 299 .0434783 .204273 0 1 year10 | 299 .0434783 .204273 0 1 year11 | 299 .0434783 .204273 0 1 year12 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year13 | 299 .0434783 .204273 0 1 year14 | 299 .0434783 .204273 0 1 year15 | 299 .0434783 .204273 0 1 year16 | 299 .0434783 .204273 0 1 year17 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year18 | 299 .0434783 .204273 0 1 year19 | 299 .0434783 .204273 0 1 year20 | 299 .0434783 .204273 0 1 year21 | 299 .0434783 .204273 0 1 year22 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year23 | 299 .0434783 .204273 0 1 place | 299 7 3.74793 1 13 bc | 299 .1538462 .3614061 0 1 ab | 299 .1538462 .3614061 0 1 sk | 299 .1538462 .3614061 0 1 -------------+-------------------------------------------------------- mn | 299 .0769231 .2669161 0 1 on | 299 .2307692 .4220314 0 1 pq | 299 .1538462 .3614061 0 1 ns | 299 .0769231 .2669161 0 1 . * . * . * CONVERT AIR DATA INTO STANDARDIZED FORM . egen sco =std(co) (45 missing values generated) . egen sno2=std(no2) (61 missing values generated) . egen sso2=std(so2) (93 missing values generated) . egen stsp =std(tsp) (10 missing values generated) . egen so3 = std(o3) (44 missing values generated) . * . replace co=sco (254 real changes made) . replace no2=sno2 (238 real changes made) . replace so2=sso2 (206 real changes made) . replace tsp=stsp (289 real changes made) . replace o3=so3 (255 real changes made) . * . iis place // identify panel index . tis year // identify time variable . * . gen yearsq=(year-1973)^2 . list year yearsq in 1/24 +---------------+ | year yearsq | |---------------| 1. | 1974 1 | 2. | 1975 4 | 3. | 1976 9 | 4. | 1977 16 | 5. | 1978 25 | |---------------| 6. | 1979 36 | 7. | 1980 49 | 8. | 1981 64 | 9. | 1982 81 | 10. | 1983 100 | |---------------| 11. | 1984 121 | 12. | 1985 144 | 13. | 1986 169 | 14. | 1987 196 | 15. | 1988 225 | |---------------| 16. | 1989 256 | 17. | 1990 289 | 18. | 1991 324 | 19. | 1992 361 | 20. | 1993 400 | |---------------| 21. | 1994 441 | 22. | 1995 484 | 23. | 1996 529 | 24. | 1974 1 | +---------------+ . * . gen pgdp2=pgdp*pgdp . gen tlagpc=year*lagpc . gen tlagndp=year*lagndp . gen tlagfpc=year*lagfpc . * . gen tt=year . compress place was long now byte bc was float now byte ab was float now byte sk was float now byte mn was float now byte on was float now byte pq was float now byte ns was float now byte yearsq was float now int tt was float now int . * ********************************** . *************** FULL SAMPLE: 1974-1996 **************************** . * ********************************** . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * CO regression equations F . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial co year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 57.929 Prob > F = 0.0000 . * . xtgls co year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // G > LS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 12 Number of obs = 254 Estimated autocorrelations = 12 Number of groups = 12 Estimated coefficients = 39 Obs per group: min = 15 avg = 21.16667 max = 23 Wald chi2(37) = 265.90 Log likelihood = -125.038 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ co | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | -.4888869 .1656855 -2.95 0.003 -.8136246 -.1641493 year3 | -.7017112 .2206489 -3.18 0.001 -1.134175 -.2692473 year4 | -.5028486 .2544542 -1.98 0.048 -1.00157 -.0041275 year5 | -.7383131 .3014438 -2.45 0.014 -1.329132 -.1474941 year6 | -.5272516 .3630526 -1.45 0.146 -1.238822 .1843183 year7 | -.4445933 .4320623 -1.03 0.303 -1.29142 .4022333 year8 | -.1452253 .5160684 -0.28 0.778 -1.156701 .8662501 year9 | -.5283068 .5345755 -0.99 0.323 -1.576056 .5194419 year10 | -.7219954 .5645541 -1.28 0.201 -1.828501 .3845103 year11 | -.7797635 .6072372 -1.28 0.199 -1.969927 .4103996 year12 | -.6089363 .6374487 -0.96 0.339 -1.858313 .6404401 year13 | -.7456635 .6312756 -1.18 0.238 -1.982941 .4916139 year14 | -.7829797 .6548943 -1.20 0.232 -2.066549 .5005895 year15 | -.7547462 .6850228 -1.10 0.271 -2.097366 .5878739 year16 | -.5746946 .7153286 -0.80 0.422 -1.976713 .8273237 year17 | -.7007559 .7419064 -0.94 0.345 -2.154866 .7533539 year18 | -.8968324 .7392653 -1.21 0.225 -2.345766 .5521009 year19 | -.8590904 .7370948 -1.17 0.244 -2.30377 .5855889 year20 | -.8747125 .7552027 -1.16 0.247 -2.354883 .6054576 year21 | -.8899455 .7833743 -1.14 0.256 -2.425331 .64544 year22 | -.8444967 .8074449 -1.05 0.296 -2.42706 .7380662 year23 | -.8776125 .8380976 -1.05 0.295 -2.520254 .7650287 lagpc | .7803129 .2678065 2.91 0.004 .2554219 1.305204 lagndp | .4513224 .2462968 1.83 0.067 -.0314104 .9340552 pgdp | -.089736 .0801845 -1.12 0.263 -.2468947 .0674226 pgdp2 | .0009292 .0015149 0.61 0.540 -.0020399 .0038984 city1 | .6670797 .3696407 1.80 0.071 -.0574028 1.391562 city2 | .6108036 .3661431 1.67 0.095 -.1068237 1.328431 city3 | .5944092 .4545429 1.31 0.191 -.2964785 1.485297 city4 | .9418057 .4331249 2.17 0.030 .0928965 1.790715 city5 | 1.023488 .302375 3.38 0.001 .4308439 1.616132 city6 | 1.531797 .3663544 4.18 0.000 .8137554 2.249838 city7 | 1.324082 .4084474 3.24 0.001 .5235393 2.124624 city8 | .5015079 .2468249 2.03 0.042 .0177399 .9852758 city9 | -1.98744 1.564893 -1.27 0.204 -5.054575 1.079694 city10 | 1.764149 .2945292 5.99 0.000 1.186882 2.341415 city11 | 1.082186 .2770223 3.91 0.000 .539232 1.62514 city12 | (dropped) _cons | .5490979 .6040978 0.91 0.363 -.6349121 1.733108 ------------------------------------------------------------------------------ . * . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 10.08 Prob > chi2 = 0.0065 . . . predict cohat // make psuedo R-sq (option xb assumed; fitted values) . corr co cohat (obs=254) | co cohat -------------+------------------ co | 1.0000 cohat | 0.7288 1.0000 . est store co . . matrix list e(b) // extract year betas e(b)[1,39] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 -.48888694 -.70171124 -.50284861 -.73831315 -.52725164 -.44459327 -.14522529 -.52830679 -.72199535 year11 year12 year13 year14 year15 year16 year17 year18 year19 y1 -.77976347 -.60893633 -.74566355 -.78297968 -.75474622 -.57469463 -.70075586 -.89683245 -.85909039 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 city1 y1 -.87471253 -.88994546 -.84449667 -.87761251 .78031289 .45132243 -.08973604 .00092924 .66707967 city2 city3 city4 city5 city6 city7 city8 city9 city10 y1 .61080364 .59440923 .94180571 1.023488 1.5317968 1.3240816 .50150786 -1.9874403 1.7641488 city11 city12 _cons y1 1.0821858 0 .54909793 . matrix define bco=e(b)' . matrix define V=e(V) . matrix sc2=vecdiag(V)' . . svmat bco . svmat sc2 . gen swc=1/sqrt(sc2) (261 missing values generated) . . . regress bco1 lagfpc in 1/22 // regress year betas Source | SS df MS Number of obs = 22 -------------+------------------------------ F( 1, 20) = 5.93 Model | .168113332 1 .168113332 Prob > F = 0.0244 Residual | .567348838 20 .028367442 R-squared = 0.2286 -------------+------------------------------ Adj R-squared = 0.1900 Total | .73546217 21 .035022008 Root MSE = .16843 ------------------------------------------------------------------------------ bco1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lagfpc | -.2088041 .0857725 -2.43 0.024 -.3877223 -.0298858 _cons | -.5880087 .0525272 -11.19 0.000 -.6975786 -.4784389 ------------------------------------------------------------------------------ . . regress bco1 lagfpc in 1/22 [w=swc] (analytic weights assumed) (sum of wgt is 4.6738e+01) Source | SS df MS Number of obs = 22 -------------+------------------------------ F( 1, 20) = 5.88 Model | .153230692 1 .153230692 Prob > F = 0.0249 Residual | .521219006 20 .02606095 R-squared = 0.2272 -------------+------------------------------ Adj R-squared = 0.1886 Total | .674449698 21 .032116652 Root MSE = .16143 ------------------------------------------------------------------------------ bco1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lagfpc | -.212159 .0874951 -2.42 0.025 -.3946705 -.0296474 _cons | -.5745795 .0432254 -13.29 0.000 -.6647462 -.4844128 ------------------------------------------------------------------------------ . est store cof . . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * NO2 regression equations F . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial no2 year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 8.992 Prob > F = 0.0121 . * . xtgls no2 year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 12 Number of obs = 238 Estimated autocorrelations = 12 Number of groups = 12 Estimated coefficients = 39 Obs per group: min = 11 avg = 19.83333 max = 23 Wald chi2(37) = 489.66 Log likelihood = -95.42643 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ no2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | -.8187451 .2193019 -3.73 0.000 -1.248569 -.3889213 year3 | -.9057869 .2327668 -3.89 0.000 -1.362001 -.4495723 year4 | -.240568 .2455898 -0.98 0.327 -.7219151 .2407791 year5 | -.428285 .2703446 -1.58 0.113 -.9581507 .1015806 year6 | -.7491481 .3128232 -2.39 0.017 -1.36227 -.1360258 year7 | -.978676 .3530591 -2.77 0.006 -1.670659 -.286693 year8 | -1.319973 .4059544 -3.25 0.001 -2.115629 -.5243167 year9 | -1.464473 .4174674 -3.51 0.000 -2.282694 -.6462522 year10 | -1.829032 .4493267 -4.07 0.000 -2.709696 -.9483679 year11 | -1.95598 .4846882 -4.04 0.000 -2.905951 -1.006008 year12 | -2.111488 .5149259 -4.10 0.000 -3.120724 -1.102252 year13 | -1.979719 .5217269 -3.79 0.000 -3.002285 -.9571528 year14 | -1.984775 .5489299 -3.62 0.000 -3.060658 -.9088925 year15 | -2.170115 .5744441 -3.78 0.000 -3.296005 -1.044225 year16 | -2.119511 .591881 -3.58 0.000 -3.279576 -.9594452 year17 | -2.384879 .601152 -3.97 0.000 -3.563116 -1.206643 year18 | -2.425526 .6019761 -4.03 0.000 -3.605378 -1.245675 year19 | -2.736867 .606426 -4.51 0.000 -3.92544 -1.548294 year20 | -2.720907 .6200202 -4.39 0.000 -3.936124 -1.505689 year21 | -2.810419 .6422347 -4.38 0.000 -4.069176 -1.551663 year22 | -2.878549 .6582414 -4.37 0.000 -4.168678 -1.588419 year23 | -2.928804 .6756089 -4.34 0.000 -4.252973 -1.604635 lagpc | .2548844 .1854672 1.37 0.169 -.1086247 .6183935 lagndp | .4543364 .1624066 2.80 0.005 .1360254 .7726475 pgdp | .1638217 .0642174 2.55 0.011 .0379579 .2896854 pgdp2 | -.0018232 .0012394 -1.47 0.141 -.0042523 .0006059 city1 | .6278427 .3155553 1.99 0.047 .0093657 1.24632 city2 | .8962535 .292226 3.07 0.002 .323501 1.469006 city3 | .1709526 .2689567 0.64 0.525 -.3561929 .698098 city4 | 1.240141 .4828553 2.57 0.010 .2937621 2.18652 city5 | 1.336687 .1926549 6.94 0.000 .9590905 1.714284 city6 | .534846 .2139876 2.50 0.012 .1154379 .954254 city7 | .9836608 .2743335 3.59 0.000 .445977 1.521345 city8 | .3348702 .3773968 0.89 0.375 -.404814 1.074554 city9 | -.1246593 .1822887 -0.68 0.494 -.4819386 .23262 city10 | 1.110178 .1953039 5.68 0.000 .7273889 1.492966 city11 | -1.083109 .3487651 -3.11 0.002 -1.766676 -.3995419 city12 | (dropped) _cons | -1.301982 .4650032 -2.80 0.005 -2.213371 -.3905924 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 8.90 Prob > chi2 = 0.0117 . * . predict no2hat (option xb assumed; fitted values) . corr no2 no2hat (obs=238) | no2 no2hat -------------+------------------ no2 | 1.0000 no2hat | 0.8311 1.0000 . . est store no2 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,39] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 -.81874513 -.90578687 -.240568 -.42828504 -.74914809 -.97867605 -1.3199728 -1.4644733 -1.8290321 year11 year12 year13 year14 year15 year16 year17 year18 year19 y1 -1.9559796 -2.111488 -1.9797187 -1.9847753 -2.1701149 -2.1195107 -2.3848793 -2.4255262 -2.7368667 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 city1 y1 -2.7209067 -2.8104194 -2.8785489 -2.9288043 .25488441 .45433643 .16382168 -.00182318 .62784273 city2 city3 city4 city5 city6 city7 city8 city9 city10 y1 .89625352 .17095256 1.2401412 1.3366871 .53484596 .98366076 .33487022 -.12465932 1.1101775 city11 city12 _cons y1 -1.0831089 0 -1.3019818 . matrix define bn=e(b)' . matrix define V=e(V) . matrix sn2=vecdiag(V)' . . svmat bn . svmat sn2 . gen swn=1/sqrt(sn2) (261 missing values generated) . . list bn1 in 1/22 +-----------+ | bn1 | |-----------| 1. | -.8187451 | 2. | -.9057869 | 3. | -.240568 | 4. | -.428285 | 5. | -.7491481 | |-----------| 6. | -.978676 | 7. | -1.319973 | 8. | -1.464473 | 9. | -1.829032 | 10. | -1.95598 | |-----------| 11. | -2.111488 | 12. | -1.979719 | 13. | -1.984775 | 14. | -2.170115 | 15. | -2.119511 | |-----------| 16. | -2.384879 | 17. | -2.425526 | 18. | -2.736867 | 19. | -2.720907 | 20. | -2.810419 | |-----------| 21. | -2.878549 | 22. | -2.928804 | +-----------+ . arima bn1 lagfpc in 2/22 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = -7.9271938 Iteration 1: log likelihood = -3.1374527 Iteration 2: log likelihood = -1.8503137 Iteration 3: log likelihood = -1.6518878 Iteration 4: log likelihood = -1.6281808 (switching optimization to BFGS) Iteration 5: log likelihood = -1.5748069 Iteration 6: log likelihood = -1.3461146 Iteration 7: log likelihood = -1.3230298 Iteration 8: log likelihood = -1.308361 Iteration 9: log likelihood = -1.3074171 Iteration 10: log likelihood = -1.3071964 Iteration 11: log likelihood = -1.3071236 Iteration 12: log likelihood = -1.3071198 Iteration 13: log likelihood = -1.3071197 ARIMA regression Sample: 1975 to 1995 Number of obs = 21 Wald chi2(2) = 135.89 Log likelihood = -1.30712 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bn1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bn1 | lagfpc | .0440547 .5346817 0.08 0.934 -1.003902 1.092012 _cons | -1.912721 .8550471 -2.24 0.025 -3.588582 -.2368592 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .9662035 .0829404 11.65 0.000 .8036434 1.128764 -------------+---------------------------------------------------------------- /sigma | .2414094 .0385445 6.26 0.000 .1658635 .3169553 ------------------------------------------------------------------------------ . . arima bn1 lagfpc in 2/22 [w=swn], ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = -20.702347 Iteration 1: log likelihood = -13.77524 Iteration 2: log likelihood = -13.259021 Iteration 3: log likelihood = -12.796542 Iteration 4: log likelihood = -12.714854 (switching optimization to BFGS) Iteration 5: log likelihood = -12.490447 Iteration 6: log likelihood = -12.235759 Iteration 7: log likelihood = -11.993149 Iteration 8: log likelihood = -11.985369 Iteration 9: log likelihood = -11.981628 Iteration 10: log likelihood = -11.980886 Iteration 11: log likelihood = -11.980855 Iteration 12: log likelihood = -11.980852 Iteration 13: log likelihood = -11.980852 ARIMA regression Sample: 1975 to 1995 Number of obs = 21 Wald chi2(2) = 411.77 Log likelihood = -11.98085 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bn1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bn1 | lagfpc | -.0586454 .3129744 -0.19 0.851 -.6720639 .5547732 _cons | -1.374067 .4084663 -3.36 0.001 -2.174646 -.5734877 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .9433609 .0465171 20.28 0.000 .8521891 1.034533 -------------+---------------------------------------------------------------- /sigma | .2818188 .0229568 12.28 0.000 .2368243 .3268134 ------------------------------------------------------------------------------ . . est store no2f . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * SO2 regression equations F . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial so2 year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 37.996 Prob > F = 0.0001 . * . xtgls so2 year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 12 Number of obs = 206 Estimated autocorrelations = 12 Number of groups = 12 Estimated coefficients = 39 Obs per group: min = 3 avg = 17.16667 max = 23 Wald chi2(37) = 358.21 Log likelihood = -48.89017 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ so2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | -.1680562 .1394704 -1.20 0.228 -.4414131 .1053006 year3 | -.0570362 .1881868 -0.30 0.762 -.4258755 .3118031 year4 | .11611 .2086641 0.56 0.578 -.2928641 .5250842 year5 | -.0737947 .2379738 -0.31 0.756 -.5402147 .3926254 year6 | -.2185832 .2860471 -0.76 0.445 -.7792252 .3420588 year7 | -.3720105 .326741 -1.14 0.255 -1.012411 .2683901 year8 | -.3892853 .3853498 -1.01 0.312 -1.144557 .3659865 year9 | -.297233 .3998362 -0.74 0.457 -1.080898 .4864315 year10 | -.3323929 .4364725 -0.76 0.446 -1.187863 .5230775 year11 | -.2236657 .4574283 -0.49 0.625 -1.120209 .6728773 year12 | -.2166506 .4709889 -0.46 0.646 -1.139772 .7064707 year13 | -.211614 .4754951 -0.45 0.656 -1.143567 .7203391 year14 | -.0709256 .4934128 -0.14 0.886 -1.037997 .8961457 year15 | .0530743 .5199554 0.10 0.919 -.9660195 1.072168 year16 | .0052494 .5432371 0.01 0.992 -1.059476 1.069975 year17 | -.1395743 .5561009 -0.25 0.802 -1.229512 .9503634 year18 | -.2600429 .5550583 -0.47 0.639 -1.347937 .8278513 year19 | -.1065672 .5556337 -0.19 0.848 -1.195589 .9824549 year20 | -.2125973 .5689607 -0.37 0.709 -1.32774 .9025451 year21 | -.0402363 .5836706 -0.07 0.945 -1.18421 1.103737 year22 | -.286721 .6013254 -0.48 0.633 -1.465297 .891855 year23 | -.3340121 .6238366 -0.54 0.592 -1.556709 .8886852 lagpc | .5541285 .198427 2.79 0.005 .1652187 .9430383 lagndp | -.0230844 .1996764 -0.12 0.908 -.4144431 .3682742 pgdp | -.1007975 .0619496 -1.63 0.104 -.2222165 .0206214 pgdp2 | .0022826 .0012879 1.77 0.076 -.0002417 .0048069 city1 | .1828515 .2636141 0.69 0.488 -.3338225 .6995256 city2 | -.0127543 .2515006 -0.05 0.960 -.5056864 .4801777 city3 | 1.136062 .221806 5.12 0.000 .7013305 1.570794 city4 | 2.248098 .2562687 8.77 0.000 1.745821 2.750376 city5 | 2.292732 .2690248 8.52 0.000 1.765453 2.820011 city6 | 1.384233 .3077704 4.50 0.000 .7810146 1.987452 city7 | (dropped) city8 | .0620535 .3179822 0.20 0.845 -.5611802 .6852872 city9 | .5514806 .1879142 2.93 0.003 .1831756 .9197856 city10 | 1.012075 .2238275 4.52 0.000 .5733808 1.450768 city11 | .7148202 .168492 4.24 0.000 .384582 1.045058 city12 | .5116853 .1656961 3.09 0.002 .186927 .8364437 _cons | -.1945191 .4173111 -0.47 0.641 -1.012434 .6233956 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 25.39 Prob > chi2 = 0.0000 . * . predict so2hat (option xb assumed; fitted values) . corr so2 so2hat (obs=206) | so2 so2hat -------------+------------------ so2 | 1.0000 so2hat | 0.8444 1.0000 . . est store so2 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,39] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 -.16805623 -.05703621 .11611005 -.07379468 -.21858319 -.37201053 -.3892853 -.29723304 -.3323929 year11 year12 year13 year14 year15 year16 year17 year18 year19 y1 -.22366571 -.21665057 -.21161403 -.07092565 .0530743 .00524943 -.13957428 -.26004294 -.10656721 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 city1 y1 -.21259733 -.04023633 -.28672104 -.3340121 .5541285 -.02308444 -.10079755 .00228258 .18285155 city2 city3 city4 city5 city6 city7 city8 city9 city10 y1 -.01275432 1.1360623 2.2480982 2.2927321 1.3842335 0 .0620535 .5514806 1.0120745 city11 city12 _cons y1 .71482016 .51168533 -.19451905 . matrix define bs=e(b)' . matrix define V=e(V) . matrix ss2=vecdiag(V)' . . svmat bs . svmat ss2 . gen sws=1/sqrt(ss2) (261 missing values generated) . . list bs1 in 1/22 +-----------+ | bs1 | |-----------| 1. | -.1680562 | 2. | -.0570362 | 3. | .11611 | 4. | -.0737947 | 5. | -.2185832 | |-----------| 6. | -.3720105 | 7. | -.3892853 | 8. | -.297233 | 9. | -.3323929 | 10. | -.2236657 | |-----------| 11. | -.2166506 | 12. | -.211614 | 13. | -.0709256 | 14. | .0530743 | 15. | .0052494 | |-----------| 16. | -.1395743 | 17. | -.2600429 | 18. | -.1065672 | 19. | -.2125973 | 20. | -.0402363 | |-----------| 21. | -.2867211 | 22. | -.3340121 | +-----------+ . arima bs1 lagfpc in 2/22 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = 16.146483 Iteration 1: log likelihood = 16.192733 Iteration 2: log likelihood = 16.200807 Iteration 3: log likelihood = 16.20204 Iteration 4: log likelihood = 16.202318 (switching optimization to BFGS) Iteration 5: log likelihood = 16.202417 Iteration 6: log likelihood = 16.20246 Iteration 7: log likelihood = 16.202461 ARIMA regression Sample: 1975 to 1995 Number of obs = 21 Wald chi2(2) = 4.87 Log likelihood = 16.20246 Prob > chi2 = 0.0877 ------------------------------------------------------------------------------ | OPG bs1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bs1 | lagfpc | .1258949 .1247367 1.01 0.313 -.1185845 .3703743 _cons | -.2312519 .0780695 -2.96 0.003 -.3842653 -.0782385 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .5791254 .2684208 2.16 0.031 .0530304 1.10522 -------------+---------------------------------------------------------------- /sigma | .110783 .0258783 4.28 0.000 .0600626 .1615035 ------------------------------------------------------------------------------ . . arima bs1 lagfpc in 2/22 [w=sws] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = 34.987593 Iteration 1: log likelihood = 36.074863 Iteration 2: log likelihood = 36.207329 Iteration 3: log likelihood = 36.360807 Iteration 4: log likelihood = 36.415531 (switching optimization to BFGS) Iteration 5: log likelihood = 36.45193 Iteration 6: log likelihood = 36.483889 Iteration 7: log likelihood = 36.485612 Iteration 8: log likelihood = 36.485658 Iteration 9: log likelihood = 36.485662 Iteration 10: log likelihood = 36.485662 ARIMA regression Sample: 1975 to 1995 Number of obs = 21 Wald chi2(2) = 34.12 Log likelihood = 36.48566 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bs1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bs1 | lagfpc | .0511529 .060313 0.85 0.396 -.0670585 .1693643 _cons | -.1645088 .0247267 -6.65 0.000 -.2129723 -.1160453 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .6032046 .1032714 5.84 0.000 .4007964 .8056128 -------------+---------------------------------------------------------------- /sigma | .1181802 .0114221 10.35 0.000 .0957933 .1405671 ------------------------------------------------------------------------------ . est store so2f . . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * TSP regression equations F . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial tsp year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 12) = 63.656 Prob > F = 0.0000 . * . xtgls tsp year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 13 Number of obs = 289 Estimated autocorrelations = 13 Number of groups = 13 Estimated coefficients = 39 Obs per group: min = 18 avg = 22.23077 max = 23 Wald chi2(38) = 1274.94 Log likelihood = -70.04975 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ tsp | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | -.2928339 .1027125 -2.85 0.004 -.4941467 -.0915211 year3 | -.3277387 .1367188 -2.40 0.017 -.5957026 -.0597749 year4 | -.6113605 .1622269 -3.77 0.000 -.9293194 -.2934017 year5 | -.954719 .1972438 -4.84 0.000 -1.34131 -.5681282 year6 | -.7587788 .2457036 -3.09 0.002 -1.240349 -.2772086 year7 | -.7248769 .2902695 -2.50 0.013 -1.293795 -.1559592 year8 | -1.193514 .3510378 -3.40 0.001 -1.881535 -.5054924 year9 | -1.66666 .3618983 -4.61 0.000 -2.375968 -.9573525 year10 | -2.04774 .3912902 -5.23 0.000 -2.814655 -1.280826 year11 | -2.032154 .4247236 -4.78 0.000 -2.864597 -1.199711 year12 | -2.394734 .4554735 -5.26 0.000 -3.287446 -1.502022 year13 | -2.488326 .4710583 -5.28 0.000 -3.411583 -1.565069 year14 | -2.345359 .5059263 -4.64 0.000 -3.336956 -1.353762 year15 | -2.595743 .5386886 -4.82 0.000 -3.651553 -1.539933 year16 | -2.574962 .5639399 -4.57 0.000 -3.680264 -1.46966 year17 | -2.8936 .5775069 -5.01 0.000 -4.025493 -1.761708 year18 | -2.978381 .5795969 -5.14 0.000 -4.11437 -1.842392 year19 | -3.134796 .5853509 -5.36 0.000 -4.282063 -1.987529 year20 | -3.123577 .5953131 -5.25 0.000 -4.290369 -1.956785 year21 | -3.126219 .6128701 -5.10 0.000 -4.327422 -1.925016 year22 | -3.205009 .6250194 -5.13 0.000 -4.430024 -1.979993 year23 | -3.321085 .635095 -5.23 0.000 -4.565848 -2.076322 lagpc | .1039032 .1657586 0.63 0.531 -.2209777 .4287842 lagndp | -.0324495 .1643161 -0.20 0.843 -.3545031 .2896041 pgdp | .1435722 .0663903 2.16 0.031 .0134496 .2736947 pgdp2 | -.0019605 .0012727 -1.54 0.123 -.004455 .000534 city1 | .2829047 .2667619 1.06 0.289 -.239939 .8057484 city2 | -.1469468 .2556291 -0.57 0.565 -.6479705 .354077 city3 | -1.023423 .2290631 -4.47 0.000 -1.472378 -.5744671 city4 | 1.098372 .1362067 8.06 0.000 .8314119 1.365333 city5 | .5618952 .232698 2.41 0.016 .1058155 1.017975 city6 | -.4486855 .1696446 -2.64 0.008 -.7811827 -.1161882 city7 | .4061665 .3151174 1.29 0.197 -.2114522 1.023785 city8 | -.5183187 .1481278 -3.50 0.000 -.808644 -.2279935 city9 | -.128859 .1070028 -1.20 0.228 -.3385806 .0808626 city10 | .0499037 .2531817 0.20 0.844 -.4463233 .5461306 city11 | -.6038727 .1010806 -5.97 0.000 -.8019869 -.4057584 city12 | -.8879113 .1689958 -5.25 0.000 -1.219137 -.5566855 _cons | .140218 .412355 0.34 0.734 -.667983 .9484191 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 3.49 Prob > chi2 = 0.1748 . * . predict tsphat (option xb assumed; fitted values) . corr tsp tsphat (obs=289) | tsp tsphat -------------+------------------ tsp | 1.0000 tsphat | 0.8958 1.0000 . . est store tsp . . matrix list e(b) // regress year betas on lagfpc e(b)[1,39] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 -.29283387 -.32773871 -.61136054 -.954719 -.75877879 -.72487692 -1.1935137 -1.6666602 -2.0477404 year11 year12 year13 year14 year15 year16 year17 year18 year19 y1 -2.0321544 -2.394734 -2.488326 -2.3453588 -2.5957432 -2.5749618 -2.8936003 -2.9783809 -3.1347959 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 city1 y1 -3.1235767 -3.1262192 -3.2050089 -3.321085 .10390325 -.03244951 .14357217 -.00196051 .2829047 city2 city3 city4 city5 city6 city7 city8 city9 city10 y1 -.14694677 -1.0234225 1.0983722 .56189516 -.44868545 .40616652 -.51831874 -.12885899 .04990366 city11 city12 _cons y1 -.60387267 -.88791129 .14021805 . matrix define bt=e(b)' . matrix define V=e(V) . matrix st2=vecdiag(V)' . . svmat bt . svmat st2 . gen swt=1/sqrt(st2) (260 missing values generated) . . list bt1 in 1/22 +-----------+ | bt1 | |-----------| 1. | -.2928339 | 2. | -.3277387 | 3. | -.6113605 | 4. | -.954719 | 5. | -.7587788 | |-----------| 6. | -.7248769 | 7. | -1.193514 | 8. | -1.66666 | 9. | -2.04774 | 10. | -2.032154 | |-----------| 11. | -2.394734 | 12. | -2.488326 | 13. | -2.345359 | 14. | -2.595743 | 15. | -2.574962 | |-----------| 16. | -2.8936 | 17. | -2.978381 | 18. | -3.134796 | 19. | -3.123577 | 20. | -3.126219 | |-----------| 21. | -3.205009 | 22. | -3.321085 | +-----------+ . arima bt1 lagfpc in 2/22 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = -10.867067 Iteration 1: log likelihood = -6.0014751 Iteration 2: log likelihood = -2.7239466 Iteration 3: log likelihood = -2.6155193 Iteration 4: log likelihood = -2.2701306 (switching optimization to BFGS) Iteration 5: log likelihood = -2.0507472 Iteration 6: log likelihood = -1.9955859 Iteration 7: log likelihood = -1.9737485 Iteration 8: log likelihood = -1.9694941 Iteration 9: log likelihood = -1.9687375 Iteration 10: log likelihood = -1.9685254 Iteration 11: log likelihood = -1.9685035 Iteration 12: log likelihood = -1.9685031 Iteration 13: log likelihood = -1.9685031 ARIMA regression Sample: 1975 to 1995 Number of obs = 21 Wald chi2(2) = 169.81 Log likelihood = -1.968503 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bt1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bt1 | lagfpc | .0562413 .4682508 0.12 0.904 -.8615134 .973996 _cons | -1.876367 1.408042 -1.33 0.183 -4.636078 .8833436 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .9846132 .0760363 12.95 0.000 .8355848 1.133642 -------------+---------------------------------------------------------------- /sigma | .2445665 .0566273 4.32 0.000 .133579 .355554 ------------------------------------------------------------------------------ . arima bt1 lagfpc in 2/22 [w=swt] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = -31.5367 Iteration 1: log likelihood = -19.80073 Iteration 2: log likelihood = -16.685509 Iteration 3: log likelihood = -16.334233 Iteration 4: log likelihood = -15.202899 (switching optimization to BFGS) Iteration 5: log likelihood = -15.168827 Iteration 6: log likelihood = -15.02558 Iteration 7: log likelihood = -14.980619 Iteration 8: log likelihood = -14.970947 Iteration 9: log likelihood = -14.970438 Iteration 10: log likelihood = -14.970432 Iteration 11: log likelihood = -14.970432 ARIMA regression Sample: 1975 to 1995 Number of obs = 21 Wald chi2(2) = 1551.61 Log likelihood = -14.97043 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bt1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bt1 | lagfpc | -.0038784 .2198798 -0.02 0.986 -.4348349 .4270781 _cons | -.9963271 .447254 -2.23 0.026 -1.872929 -.1197254 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .9681169 .0245776 39.39 0.000 .9199456 1.016288 -------------+---------------------------------------------------------------- /sigma | .2629926 .0256207 10.26 0.000 .212777 .3132082 ------------------------------------------------------------------------------ . est store tspf . . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * O3 regression equations F . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial o3 year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 12) = 13.507 Prob > F = 0.0032 . * . xtgls o3 year2-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 13 Number of obs = 255 Estimated autocorrelations = 13 Number of groups = 13 Estimated coefficients = 39 Obs per group: min = 12 avg = 19.61538 max = 23 Wald chi2(38) = 381.50 Log likelihood = -215.7273 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ o3 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | .8871231 .2762429 3.21 0.001 .3456971 1.428549 year3 | .2376956 .2986398 0.80 0.426 -.3476277 .8230189 year4 | .3398678 .3288205 1.03 0.301 -.3046086 .9843441 year5 | .3579883 .3749338 0.95 0.340 -.3768684 1.092845 year6 | .1914817 .4403302 0.43 0.664 -.6715497 1.054513 year7 | .2730562 .4990968 0.55 0.584 -.7051555 1.251268 year8 | -.0979353 .5725921 -0.17 0.864 -1.220195 1.024325 year9 | .244745 .5890512 0.42 0.678 -.9097741 1.399264 year10 | .502763 .6377011 0.79 0.430 -.7471081 1.752634 year11 | .533592 .6950972 0.77 0.443 -.8287734 1.895957 year12 | .6353522 .7361289 0.86 0.388 -.8074339 2.078138 year13 | .1850675 .7532645 0.25 0.806 -1.291304 1.661439 year14 | .3844481 .7882341 0.49 0.626 -1.160462 1.929359 year15 | .8122323 .8283948 0.98 0.327 -.8113917 2.435856 year16 | .9691043 .8576454 1.13 0.258 -.7118498 2.650058 year17 | .9491635 .8721242 1.09 0.276 -.7601685 2.658495 year18 | 1.490919 .876339 1.70 0.089 -.2266735 3.208512 year19 | .6846867 .8881724 0.77 0.441 -1.056099 2.425473 year20 | .7042866 .8992169 0.78 0.433 -1.058146 2.466719 year21 | 1.058263 .9292372 1.14 0.255 -.7630079 2.879535 year22 | .9184592 .9559906 0.96 0.337 -.955248 2.792166 year23 | .9318921 .9863834 0.94 0.345 -1.001384 2.865168 lagpc | .0657554 .2456268 0.27 0.789 -.4156643 .5471751 lagndp | .0236944 .1842369 0.13 0.898 -.3374034 .3847921 pgdp | -.0339705 .0895062 -0.38 0.704 -.2093994 .1414583 pgdp2 | .0000631 .0016609 0.04 0.970 -.0031921 .0033184 city1 | .3900224 .4008 0.97 0.330 -.395531 1.175576 city2 | .1665079 .4181403 0.40 0.690 -.653032 .9860478 city3 | .6482838 .4439631 1.46 0.144 -.2218678 1.518435 city4 | .4296549 .2642306 1.63 0.104 -.0882276 .9475375 city5 | -.4085768 .2320859 -1.76 0.078 -.8634567 .0463032 city6 | -.309212 .2622421 -1.18 0.238 -.823197 .204773 city7 | -.4441973 .4268929 -1.04 0.298 -1.280892 .3924975 city8 | .4827899 .5129435 0.94 0.347 -.522561 1.488141 city9 | .2253306 .2300711 0.98 0.327 -.2256005 .6762617 city10 | -.1204996 .2886996 -0.42 0.676 -.6863405 .4453413 city11 | -1.50579 .2372794 -6.35 0.000 -1.970849 -1.040731 city12 | .108394 .3842076 0.28 0.778 -.644639 .861427 _cons | .0299639 .6234127 0.05 0.962 -1.191903 1.25183 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 0.09 Prob > chi2 = 0.9553 . * . predict o3hat (option xb assumed; fitted values) . corr o3 o3hat (obs=255) | o3 o3hat -------------+------------------ o3 | 1.0000 o3hat | 0.6505 1.0000 . . est store o3 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,39] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 .88712314 .2376956 .33986776 .3579883 .19148172 .27305623 -.09793529 .244745 .50276305 year11 year12 year13 year14 year15 year16 year17 year18 year19 y1 .53359203 .63535217 .18506746 .38444806 .81223226 .96910431 .94916348 1.4909194 .68468667 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 city1 y1 .70428664 1.0582634 .91845922 .93189212 .06575542 .02369436 -.03397051 .00006313 .39002245 city2 city3 city4 city5 city6 city7 city8 city9 city10 y1 .16650789 .64828379 .42965495 -.40857676 -.30921197 -.44419727 .48278987 .22533057 -.12049958 city11 city12 _cons y1 -1.5057899 .10839398 .02996385 . matrix define bo=e(b)' . matrix define V=e(V) . matrix s2o=vecdiag(V)' . . svmat bo . svmat s2o . gen swo=1/sqrt(s2o) (260 missing values generated) . . list bo1 in 1/22 +-----------+ | bo1 | |-----------| 1. | .8871232 | 2. | .2376956 | 3. | .3398678 | 4. | .3579883 | 5. | .1914817 | |-----------| 6. | .2730562 | 7. | -.0979353 | 8. | .244745 | 9. | .502763 | 10. | .533592 | |-----------| 11. | .6353522 | 12. | .1850675 | 13. | .3844481 | 14. | .8122323 | 15. | .9691043 | |-----------| 16. | .9491635 | 17. | 1.490919 | 18. | .6846867 | 19. | .7042866 | 20. | 1.058263 | |-----------| 21. | .9184592 | 22. | .9318921 | +-----------+ . arima bo1 lagfpc in 2/22 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = -1.8705215 Iteration 1: log likelihood = -1.8468641 Iteration 2: log likelihood = -1.8088787 Iteration 3: log likelihood = -1.8058099 Iteration 4: log likelihood = -1.8056955 (switching optimization to BFGS) Iteration 5: log likelihood = -1.8055373 Iteration 6: log likelihood = -1.8055277 Iteration 7: log likelihood = -1.8055274 Iteration 8: log likelihood = -1.8055274 ARIMA regression Sample: 1975 to 1995 Number of obs = 21 Wald chi2(2) = 8.46 Log likelihood = -1.805527 Prob > chi2 = 0.0145 ------------------------------------------------------------------------------ | OPG bo1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bo1 | lagfpc | .5438993 .24504 2.22 0.026 .0636298 1.024169 _cons | .3384168 .1650867 2.05 0.040 .0148528 .6619809 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .302028 .2320654 1.30 0.193 -.1528118 .7568679 -------------+---------------------------------------------------------------- /sigma | .2630949 .0458416 5.74 0.000 .1732469 .3529428 ------------------------------------------------------------------------------ . . arima bo1 lagfpc in 2/22 [w=swo] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = -.22123697 Iteration 1: log likelihood = .25032958 Iteration 2: log likelihood = .30231039 Iteration 3: log likelihood = .32375723 Iteration 4: log likelihood = .33110096 (switching optimization to BFGS) Iteration 5: log likelihood = .33383815 Iteration 6: log likelihood = .33520884 Iteration 7: log likelihood = .33527298 Iteration 8: log likelihood = .33527526 Iteration 9: log likelihood = .33527527 ARIMA regression Sample: 1975 to 1995 Number of obs = 21 Wald chi2(2) = 23.52 Log likelihood = .3352753 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bo1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bo1 | lagfpc | .5607106 .142446 3.94 0.000 .2815215 .8398997 _cons | .3000782 .0845918 3.55 0.000 .1342814 .465875 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .291761 .1539714 1.89 0.058 -.0100173 .5935394 -------------+---------------------------------------------------------------- /sigma | .2385259 .0229148 10.41 0.000 .1936137 .2834382 ------------------------------------------------------------------------------ . . est store o3f . . . . . * . . ****************************************************************************************** . * MAKE RESULTS TABLE: FULL SAMPLE . ****************************************************************************************** . est table co no2 so2 tsp o3, keep( lagpc lagndp pgdp pgdp2 ) t(%5.2f) b(%7.4f) stfmt(%9.2f) stats(N ll bic) style( > columns) +--------------------------------------------------------------------------+ | Variable | co | no2 | so2 | tsp | o3 | |--------------+-----------+-----------+-----------+-----------+-----------| | lagpc | 0.7803 | 0.2549 | 0.5541 | 0.1039 | 0.0658 | | | 2.91 | 1.37 | 2.79 | 0.63 | 0.27 | | lagndp | 0.4513 | 0.4543 | -0.0231 | -0.0324 | 0.0237 | | | 1.83 | 2.80 | -0.12 | -0.20 | 0.13 | | pgdp | -0.0897 | 0.1638 | -0.1008 | 0.1436 | -0.0340 | | | -1.12 | 2.55 | -1.63 | 2.16 | -0.38 | | pgdp2 | 0.0009 | -0.0018 | 0.0023 | -0.0020 | 0.0001 | | | 0.61 | -1.47 | 1.77 | -1.54 | 0.04 | |--------------+-----------+-----------+-----------+-----------+-----------| | N | 254.00 | 238.00 | 206.00 | 289.00 | 255.00 | | ll | -125.04 | -95.43 | -48.89 | -70.05 | -215.73 | | bic | 460.49 | 398.80 | 300.24 | 361.09 | 647.56 | +--------------------------------------------------------------------------+ legend: b/t . . est table cof no2f so2f tspf o3f, drop(_cons) t(%5.2f) b(%7.4f) stfmt(%9.2f) style(columns) +----------------------------------------------------------------+ | Variable | cof | no2f | so2f | tspf | o3f | |--------------+---------+---------+---------+---------+---------| | _ | | | | | | | lagfpc | -0.2122 | | | | | | | -2.42 | | | | | |--------------+---------+---------+---------+---------+---------| | bn1 | | | | | | | lagfpc | | -0.0586 | | | | | | | -0.19 | | | | |--------------+---------+---------+---------+---------+---------| | ARMA | | | | | | | L.ar | | 0.9434 | 0.6032 | 0.9681 | 0.2918 | | | | 20.28 | 5.84 | 39.39 | 1.89 | |--------------+---------+---------+---------+---------+---------| | bs1 | | | | | | | lagfpc | | | 0.0512 | | | | | | | 0.85 | | | |--------------+---------+---------+---------+---------+---------| | bt1 | | | | | | | lagfpc | | | | -0.0039 | | | | | | | -0.02 | | |--------------+---------+---------+---------+---------+---------| | bo1 | | | | | | | lagfpc | | | | | 0.5607 | | | | | | | 3.94 | +----------------------------------------------------------------+ legend: b/t . . . . . . . . drop bco sc2 bn sn2 bt st2 bs ss2 bo s2o . drop cohat no2hat so2hat tsphat o3hat . drop swc swn sws swt swo . . * *************************************** . *************** EARLY SAMPLE: 1974-1988 **************************** . * *************************************** . * . . drop if year>1988 // drop 2nd part of data set (104 observations deleted) . . sum(_all) //descriptive stats Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- year | 195 1981 4.331615 1974 1988 city | 0 ndp | 195 .2358974 .4256512 0 1 pc | 195 .6512821 .4777912 0 1 fpc | 195 .4 .4911589 0 1 -------------+-------------------------------------------------------- yndp | 195 .2487179 .4237775 0 1 ypc | 195 .6461538 .4682114 0 1 yfpc | 195 .3388889 .4362303 0 1 pgdp | 195 14.22373 5.510844 4.263 26.82 pcg | 195 8.469427 5.198063 -15.5387 27.417 -------------+-------------------------------------------------------- co | 162 .3242038 1.085491 -1.831205 5.21513 no2 | 145 .1727882 1.10665 -2.215894 3.962041 so2 | 125 .2720721 1.126471 -1.127122 3.564172 tsp | 193 .3117846 1.014118 -1.472733 3.493611 o3 | 158 -.0886133 1.108618 -2.514059 3.196122 -------------+-------------------------------------------------------- lagndp | 195 .2707897 .4134564 0 1 lagpc | 195 .6313436 .4563918 0 1 lagfpc | 195 .2666667 .3513669 0 1 index | 195 146 86.3883 1 291 count | 195 8 4.331615 1 15 -------------+-------------------------------------------------------- city1 | 195 .0769231 .2671552 0 1 city2 | 195 .0769231 .2671552 0 1 city3 | 195 .0769231 .2671552 0 1 city4 | 195 .0769231 .2671552 0 1 city5 | 195 .0769231 .2671552 0 1 -------------+-------------------------------------------------------- city6 | 195 .0769231 .2671552 0 1 city7 | 195 .0769231 .2671552 0 1 city8 | 195 .0769231 .2671552 0 1 city9 | 195 .0769231 .2671552 0 1 city10 | 195 .0769231 .2671552 0 1 -------------+-------------------------------------------------------- city11 | 195 .0769231 .2671552 0 1 city12 | 195 .0769231 .2671552 0 1 city13 | 195 .0769231 .2671552 0 1 year1 | 195 .0666667 .2500859 0 1 year2 | 195 .0666667 .2500859 0 1 -------------+-------------------------------------------------------- year3 | 195 .0666667 .2500859 0 1 year4 | 195 .0666667 .2500859 0 1 year5 | 195 .0666667 .2500859 0 1 year6 | 195 .0666667 .2500859 0 1 year7 | 195 .0666667 .2500859 0 1 -------------+-------------------------------------------------------- year8 | 195 .0666667 .2500859 0 1 year9 | 195 .0666667 .2500859 0 1 year10 | 195 .0666667 .2500859 0 1 year11 | 195 .0666667 .2500859 0 1 year12 | 195 .0666667 .2500859 0 1 -------------+-------------------------------------------------------- year13 | 195 .0666667 .2500859 0 1 year14 | 195 .0666667 .2500859 0 1 year15 | 195 .0666667 .2500859 0 1 year16 | 195 0 0 0 0 year17 | 195 0 0 0 0 -------------+-------------------------------------------------------- year18 | 195 0 0 0 0 year19 | 195 0 0 0 0 year20 | 195 0 0 0 0 year21 | 195 0 0 0 0 year22 | 195 0 0 0 0 -------------+-------------------------------------------------------- year23 | 195 0 0 0 0 place | 195 7 3.751288 1 13 bc | 195 .1538462 .3617299 0 1 ab | 195 .1538462 .3617299 0 1 sk | 195 .1538462 .3617299 0 1 -------------+-------------------------------------------------------- mn | 195 .0769231 .2671552 0 1 on | 195 .2307692 .4224095 0 1 pq | 195 .1538462 .3617299 0 1 ns | 195 .0769231 .2671552 0 1 sco | 162 .3242038 1.085491 -1.831205 5.21513 -------------+-------------------------------------------------------- sno2 | 145 .1727882 1.10665 -2.215894 3.962041 sso2 | 125 .2720721 1.126471 -1.127122 3.564172 stsp | 193 .3117846 1.014118 -1.472733 3.493611 so3 | 158 -.0886133 1.108618 -2.514059 3.196122 yearsq | 195 82.66667 71.27229 1 225 -------------+-------------------------------------------------------- pgdp2 | 195 232.5283 171.0942 18.17317 719.3124 tlagpc | 195 1251.192 904.5136 0 1988 tlagndp | 195 536.105 818.5149 0 1987 tlagfpc | 195 529.4723 698.265 0 1988 tt | 195 1981 4.331615 1974 1988 -------------+-------------------------------------------------------- _est_co | 195 .8307692 .3759208 0 1 _est_no2 | 195 .7435897 .4377749 0 1 _est_so2 | 195 .6410256 .4809344 0 1 _est_tsp | 195 .9897436 .1010126 0 1 _est_o3 | 195 .8102564 .3931074 0 1 . . list year in 1/20 +------+ | year | |------| 1. | 1974 | 2. | 1975 | 3. | 1976 | 4. | 1977 | 5. | 1978 | |------| 6. | 1979 | 7. | 1980 | 8. | 1981 | 9. | 1982 | 10. | 1983 | |------| 11. | 1984 | 12. | 1985 | 13. | 1986 | 14. | 1987 | 15. | 1988 | |------| 16. | 1974 | 17. | 1975 | 18. | 1976 | 19. | 1977 | 20. | 1978 | +------+ . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * CO regression equations E . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial co year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 58.067 Prob > F = 0.0000 . * . xtgls co year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // G > LS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 12 Number of obs = 162 Estimated autocorrelations = 12 Number of groups = 12 Estimated coefficients = 31 Obs per group: min = 9 avg = 13.5 max = 15 Wald chi2(29) = 256.69 Log likelihood = -103.0372 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ co | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | -.4746247 .2101069 -2.26 0.024 -.8864267 -.0628227 year3 | -.6953755 .2738464 -2.54 0.011 -1.232105 -.1586464 year4 | -.5678541 .3064045 -1.85 0.064 -1.168396 .0326877 year5 | -.850852 .369396 -2.30 0.021 -1.574855 -.1268491 year6 | -.7088742 .452492 -1.57 0.117 -1.595742 .1779939 year7 | -.6544706 .5404625 -1.21 0.226 -1.713758 .4048165 year8 | -.5056774 .6338047 -0.80 0.425 -1.747912 .7365571 year9 | -.9258925 .6544576 -1.41 0.157 -2.208606 .3568209 year10 | -1.15348 .6965054 -1.66 0.098 -2.518605 .2116457 year11 | -1.300027 .7441875 -1.75 0.081 -2.758608 .1585535 year12 | -1.166404 .7770455 -1.50 0.133 -2.689385 .3565776 year13 | -1.262597 .7764356 -1.63 0.104 -2.784383 .2591887 year14 | -1.237838 .801206 -1.54 0.122 -2.808173 .3324969 year15 | -1.191728 .8308314 -1.43 0.151 -2.820127 .4366721 lagpc | 1.895897 .4247028 4.46 0.000 1.063495 2.7283 lagndp | .9255777 .373104 2.48 0.013 .1943073 1.656848 pgdp | -.1555145 .1271429 -1.22 0.221 -.40471 .0936811 pgdp2 | .0038841 .0027676 1.40 0.160 -.0015403 .0093085 city1 | .0524849 .6482523 0.08 0.935 -1.218066 1.323036 city2 | -.106576 .6493364 -0.16 0.870 -1.379252 1.1661 city3 | .7332741 .7581253 0.97 0.333 -.7526241 2.219172 city4 | .0159408 .5637328 0.03 0.977 -1.088955 1.120837 city5 | 1.473403 .5862326 2.51 0.012 .3244084 2.622398 city6 | 1.136669 .6424135 1.77 0.077 -.1224385 2.395776 city7 | 1.96211 .680887 2.88 0.004 .6275956 3.296624 city8 | .4241797 .5269883 0.80 0.421 -.6086984 1.457058 city9 | -.5139008 .5407849 -0.95 0.342 -1.57382 .546018 city10 | 1.401148 .5924966 2.36 0.018 .239876 2.56242 city11 | .683118 .5675661 1.20 0.229 -.4292911 1.795527 city12 | (dropped) _cons | .4476436 .9814479 0.46 0.648 -1.475959 2.371246 ------------------------------------------------------------------------------ . * . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 28.42 Prob > chi2 = 0.0000 . . . predict cohat // make psuedo R-sq (option xb assumed; fitted values) . corr co cohat (obs=162) | co cohat -------------+------------------ co | 1.0000 cohat | 0.8029 1.0000 . est store co . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 -.47462468 -.69537546 -.56785407 -.85085202 -.70887418 -.65447065 -.50567738 -.92589248 -1.1534799 year11 year12 year13 year14 year15 lagpc lagndp pgdp pgdp2 y1 -1.3000273 -1.1664036 -1.2625971 -1.2378381 -1.1917276 1.8958973 .9255777 -.15551447 .0038841 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 .05248491 -.10657601 .73327407 .01594083 1.4734032 1.1366688 1.9621097 .42417966 -.51390084 city10 city11 city12 _cons y1 1.401148 .683118 0 .44764359 . matrix define bco=e(b)' . matrix define V=e(V) . matrix sc2=vecdiag(V)' . . svmat bco . svmat sc2 . gen swc=1/sqrt(sc2) (165 missing values generated) . . list bco1 in 1/14 +-----------+ | bco1 | |-----------| 1. | -.4746247 | 2. | -.6953754 | 3. | -.567854 | 4. | -.850852 | 5. | -.7088742 | |-----------| 6. | -.6544706 | 7. | -.5056774 | 8. | -.9258925 | 9. | -1.15348 | 10. | -1.300027 | |-----------| 11. | -1.166404 | 12. | -1.262597 | 13. | -1.237838 | 14. | -1.191728 | +-----------+ . arima bco1 lagfpc in 2/14 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = 3.0777114 Iteration 1: log likelihood = 3.1330025 Iteration 2: log likelihood = 3.4354948 Iteration 3: log likelihood = 3.4825743 Iteration 4: log likelihood = 3.4991444 (switching optimization to BFGS) Iteration 5: log likelihood = 3.5429851 Iteration 6: log likelihood = 3.6751063 Iteration 7: log likelihood = 3.7453977 Iteration 8: log likelihood = 3.7496477 Iteration 9: log likelihood = 3.7497173 Iteration 10: log likelihood = 3.749725 Iteration 11: log likelihood = 3.749725 ARIMA regression Sample: 1975 to 1987 Number of obs = 13 Wald chi2(2) = 13.12 Log likelihood = 3.749725 Prob > chi2 = 0.0014 ------------------------------------------------------------------------------ | OPG bco1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bco1 | lagfpc | -.0517774 .4691165 -0.11 0.912 -.9712289 .867674 _cons | -.9248412 .2013177 -4.59 0.000 -1.319417 -.5302657 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .7489441 .2122843 3.53 0.000 .3328745 1.165014 -------------+---------------------------------------------------------------- /sigma | .1756897 .0729015 2.41 0.016 .0328055 .318574 ------------------------------------------------------------------------------ . arima bco1 lagfpc in 2/14 [w=swc] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = 5.8332205 Iteration 1: log likelihood = 6.5799049 Iteration 2: log likelihood = 6.6490412 Iteration 3: log likelihood = 6.7832655 Iteration 4: log likelihood = 6.8431846 (switching optimization to BFGS) Iteration 5: log likelihood = 6.84744 Iteration 6: log likelihood = 6.8548158 Iteration 7: log likelihood = 6.8561394 Iteration 8: log likelihood = 6.8562754 Iteration 9: log likelihood = 6.8562989 Iteration 10: log likelihood = 6.8562993 ARIMA regression Sample: 1975 to 1987 Number of obs = 13 Wald chi2(2) = 35.95 Log likelihood = 6.856299 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bco1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bco1 | lagfpc | -.1783876 .3011757 -0.59 0.554 -.7686811 .4119058 _cons | -.8070522 .1046482 -7.71 0.000 -1.012159 -.6019455 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .6615374 .1106159 5.98 0.000 .4447342 .8783406 -------------+---------------------------------------------------------------- /sigma | .175443 .0456271 3.85 0.000 .0860156 .2648704 ------------------------------------------------------------------------------ . est store cof . . . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * NO2 regression equations E . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial no2 year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 1.332 Prob > F = 0.2730 . * . xtgls no2 year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(i) // GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: no autocorrelation Estimated covariances = 12 Number of obs = 145 Estimated autocorrelations = 0 Number of groups = 12 Estimated coefficients = 31 Obs per group: min = 3 avg = 12.08333 max = 15 Wald chi2(29) = 713.96 Log likelihood = -83.28783 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ no2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | -.68323 .2848447 -2.40 0.016 -1.241515 -.1249447 year3 | -.7554641 .2885639 -2.62 0.009 -1.321039 -.1898892 year4 | -.2781145 .311905 -0.89 0.373 -.8894369 .333208 year5 | -.2307961 .3513246 -0.66 0.511 -.9193796 .4577874 year6 | -.6581232 .4124679 -1.60 0.111 -1.466545 .150299 year7 | -.6697855 .4614235 -1.45 0.147 -1.574159 .234588 year8 | -1.137345 .5233716 -2.17 0.030 -2.163134 -.1115554 year9 | -1.250638 .5442483 -2.30 0.022 -2.317345 -.1839306 year10 | -1.554711 .5855158 -2.66 0.008 -2.702301 -.4071209 year11 | -1.744976 .6430897 -2.71 0.007 -3.005409 -.4845434 year12 | -1.919488 .6740727 -2.85 0.004 -3.240646 -.5983295 year13 | -1.649394 .6721811 -2.45 0.014 -2.966844 -.3319429 year14 | -1.667515 .6917729 -2.41 0.016 -3.023365 -.3116647 year15 | -1.705434 .7154013 -2.38 0.017 -3.107594 -.3032728 lagpc | .7692086 .3418819 2.25 0.024 .0991323 1.439285 lagndp | 1.114176 .224341 4.97 0.000 .6744758 1.553877 pgdp | .0382426 .1025822 0.37 0.709 -.1628149 .2393 pgdp2 | .0014757 .0022449 0.66 0.511 -.0029243 .0058756 city1 | .7765802 .4511461 1.72 0.085 -.1076499 1.66081 city2 | 1.134648 .4465943 2.54 0.011 .2593395 2.009957 city3 | .1728678 .340397 0.51 0.612 -.4942981 .8400338 city4 | 1.795142 .3952923 4.54 0.000 1.020383 2.569901 city5 | 1.599036 .2508542 6.37 0.000 1.107371 2.090701 city6 | .7642897 .3334882 2.29 0.022 .1106648 1.417915 city7 | 1.207472 .2642645 4.57 0.000 .6895235 1.725421 city8 | 1.392178 .3099509 4.49 0.000 .7846852 1.99967 city9 | .2773728 .2995046 0.93 0.354 -.3096455 .8643911 city10 | 1.318607 .333338 3.96 0.000 .665276 1.971937 city11 | -1.096729 .348398 -3.15 0.002 -1.779576 -.4138812 city12 | (dropped) _cons | -1.170742 .6409734 -1.83 0.068 -2.427027 .0855427 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 24.68 Prob > chi2 = 0.0000 . * . predict no2hat (option xb assumed; fitted values) . corr no2 no2hat (obs=145) | no2 no2hat -------------+------------------ no2 | 1.0000 no2hat | 0.8679 1.0000 . . est store no2 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 -.68323001 -.75546407 -.27811445 -.23079612 -.65812322 -.66978551 -1.1373448 -1.2506377 -1.5547107 year11 year12 year13 year14 year15 lagpc lagndp pgdp pgdp2 y1 -1.744976 -1.9194878 -1.6493936 -1.6675146 -1.7054336 .76920864 1.1141762 .03824255 .00147565 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 .77658016 1.1346482 .17286782 1.795142 1.5990359 .76428968 1.2074723 1.3921778 .27737278 city10 city11 city12 _cons y1 1.3186065 -1.0967287 0 -1.1707421 . matrix define bn=e(b)' . matrix define V=e(V) . matrix sn2=vecdiag(V)' . . svmat bn . svmat sn2 . gen swn=1/sqrt(sn2) (165 missing values generated) . . list bn1 in 1/14 +-----------+ | bn1 | |-----------| 1. | -.68323 | 2. | -.7554641 | 3. | -.2781144 | 4. | -.2307961 | 5. | -.6581232 | |-----------| 6. | -.6697855 | 7. | -1.137345 | 8. | -1.250638 | 9. | -1.554711 | 10. | -1.744976 | |-----------| 11. | -1.919488 | 12. | -1.649394 | 13. | -1.667515 | 14. | -1.705434 | +-----------+ . arima bn1 lagfpc in 2/14 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = -3.6222758 Iteration 1: log likelihood = -1.8763373 Iteration 2: log likelihood = -1.7078249 Iteration 3: log likelihood = -1.693035 Iteration 4: log likelihood = -1.688715 (switching optimization to BFGS) Iteration 5: log likelihood = -1.6870316 Iteration 6: log likelihood = -1.6851982 Iteration 7: log likelihood = -1.685194 Iteration 8: log likelihood = -1.6851939 ARIMA regression Sample: 1975 to 1987 Number of obs = 13 Wald chi2(2) = 42.56 Log likelihood = -1.685194 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bn1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bn1 | lagfpc | .0579551 .6905854 0.08 0.933 -1.295568 1.411478 _cons | -1.224556 .4862053 -2.52 0.012 -2.177501 -.2716116 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .8825391 .1361162 6.48 0.000 .6157563 1.149322 -------------+---------------------------------------------------------------- /sigma | .2599241 .0646565 4.02 0.000 .1331998 .3866485 ------------------------------------------------------------------------------ . arima bn1 lagfpc in 2/14 [w=swn] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = -8.3545114 Iteration 1: log likelihood = -6.1075974 Iteration 2: log likelihood = -5.9792241 Iteration 3: log likelihood = -5.9751147 Iteration 4: log likelihood = -5.953141 (switching optimization to BFGS) Iteration 5: log likelihood = -5.9524086 Iteration 6: log likelihood = -5.9509673 Iteration 7: log likelihood = -5.9508831 Iteration 8: log likelihood = -5.9508823 Iteration 9: log likelihood = -5.9508823 ARIMA regression Sample: 1975 to 1987 Number of obs = 13 Wald chi2(2) = 133.47 Log likelihood = -5.950882 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bn1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bn1 | lagfpc | -.1166677 .4611441 -0.25 0.800 -1.020493 .7871581 _cons | -.9428473 .1957894 -4.82 0.000 -1.326587 -.5591072 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .8391347 .0726395 11.55 0.000 .6967639 .9815055 -------------+---------------------------------------------------------------- /sigma | .2790531 .0322576 8.65 0.000 .2158293 .3422768 ------------------------------------------------------------------------------ . . est store no2f . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * SO2 regression equations E . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial so2 year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 9) = 17.171 Prob > F = 0.0025 . * . xtgls so2 year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 11 Number of obs = 125 Estimated autocorrelations = 11 Number of groups = 11 Estimated coefficients = 31 Obs per group: min = 3 avg = 11.36364 max = 15 Wald chi2(28) = 592.70 Log likelihood = -38.7348 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ so2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | -.1784367 .152651 -1.17 0.242 -.4776272 .1207538 year3 | -.0263226 .205228 -0.13 0.898 -.4285621 .3759168 year4 | .1315217 .2199537 0.60 0.550 -.2995796 .5626231 year5 | -.1565353 .2450309 -0.64 0.523 -.636787 .3237163 year6 | -.2620463 .2917347 -0.90 0.369 -.8338359 .3097432 year7 | -.3889811 .3333139 -1.17 0.243 -1.042264 .2643021 year8 | -.4393988 .4058734 -1.08 0.279 -1.234896 .3560985 year9 | -.3813119 .423702 -0.90 0.368 -1.211752 .4491287 year10 | -.4167967 .4678997 -0.89 0.373 -1.333863 .5002698 year11 | -.3085638 .4960669 -0.62 0.534 -1.280837 .6637094 year12 | -.3129696 .523571 -0.60 0.550 -1.33915 .7132107 year13 | -.3701747 .530249 -0.70 0.485 -1.409444 .6690943 year14 | -.2467126 .5471499 -0.45 0.652 -1.319107 .8256814 year15 | -.1066436 .5722619 -0.19 0.852 -1.228256 1.014969 lagpc | 1.28904 .2517427 5.12 0.000 .7956335 1.782447 lagndp | .2783832 .2173094 1.28 0.200 -.1475353 .7043018 pgdp | -.2516296 .0900777 -2.79 0.005 -.4281787 -.0750806 pgdp2 | .0069334 .0021973 3.16 0.002 .0026267 .0112401 city1 | -.1415699 .3466451 -0.41 0.683 -.8209818 .5378419 city2 | -.3935199 .3311354 -1.19 0.235 -1.042533 .2554936 city3 | .8229567 .2569816 3.20 0.001 .3192821 1.326631 city4 | 2.250087 .3360596 6.70 0.000 1.591422 2.908752 city5 | 2.932165 .2449495 11.97 0.000 2.452072 3.412257 city6 | 1.332574 .4279282 3.11 0.002 .4938504 2.171298 city7 | (dropped) city8 | -.3429691 .2323315 -1.48 0.140 -.7983305 .1123923 city9 | (dropped) city10 | .7436405 .2616655 2.84 0.004 .2307856 1.256496 city11 | .5590098 .2342821 2.39 0.017 .0998253 1.018194 city12 | .4734302 .2552515 1.85 0.064 -.0268535 .973714 _cons | .4602285 .5209951 0.88 0.377 -.5609031 1.48136 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 35.20 Prob > chi2 = 0.0000 . * . predict so2hat (option xb assumed; fitted values) . corr so2 so2hat (obs=125) | so2 so2hat -------------+------------------ so2 | 1.0000 so2hat | 0.8885 1.0000 . . est store so2 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 -.17843669 -.02632264 .13152175 -.15653532 -.26204634 -.38898112 -.43939877 -.3813119 -.41679665 year11 year12 year13 year14 year15 lagpc lagndp pgdp pgdp2 y1 -.30856383 -.31296958 -.37017468 -.2467126 -.10664361 1.2890401 .27838323 -.25162964 .00693339 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 -.14156995 -.39351994 .82295673 2.2500871 2.9321646 1.3325743 0 -.34296908 0 city10 city11 city12 _cons y1 .74364054 .55900979 .47343025 .46022852 . matrix define bs=e(b)' . matrix define V=e(V) . matrix ss2=vecdiag(V)' . . svmat bs . svmat ss2 . gen sws=1/sqrt(ss2) (166 missing values generated) . . list bs1 in 1/14 +-----------+ | bs1 | |-----------| 1. | -.1784367 | 2. | -.0263226 | 3. | .1315217 | 4. | -.1565353 | 5. | -.2620463 | |-----------| 6. | -.3889811 | 7. | -.4393988 | 8. | -.3813119 | 9. | -.4167967 | 10. | -.3085638 | |-----------| 11. | -.3129696 | 12. | -.3701747 | 13. | -.2467126 | 14. | -.1066436 | +-----------+ . arima bs1 lagfpc in 2/14 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = 8.9111369 Iteration 1: log likelihood = 9.1594799 Iteration 2: log likelihood = 9.1653499 Iteration 3: log likelihood = 9.1871221 Iteration 4: log likelihood = 9.1920421 (switching optimization to BFGS) Iteration 5: log likelihood = 9.1946365 Iteration 6: log likelihood = 9.197854 Iteration 7: log likelihood = 9.197916 Iteration 8: log likelihood = 9.1979168 ARIMA regression Sample: 1975 to 1987 Number of obs = 13 Wald chi2(2) = 16.43 Log likelihood = 9.197917 Prob > chi2 = 0.0003 ------------------------------------------------------------------------------ | OPG bs1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bs1 | lagfpc | .05496 .2283923 0.24 0.810 -.3926808 .5026008 _cons | -.2163538 .1245069 -1.74 0.082 -.4603828 .0276753 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .7222632 .1947559 3.71 0.000 .3405487 1.103978 -------------+---------------------------------------------------------------- /sigma | .1159306 .0346168 3.35 0.001 .0480829 .1837784 ------------------------------------------------------------------------------ . arima bs1 lagfpc in 2/14 [w=sws] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = 18.581312 Iteration 1: log likelihood = 19.978635 Iteration 2: log likelihood = 20.3853 Iteration 3: log likelihood = 20.710452 Iteration 4: log likelihood = 20.814776 (switching optimization to BFGS) Iteration 5: log likelihood = 20.86907 Iteration 6: log likelihood = 20.929259 Iteration 7: log likelihood = 20.93142 Iteration 8: log likelihood = 20.931606 Iteration 9: log likelihood = 20.931613 Iteration 10: log likelihood = 20.931614 ARIMA regression Sample: 1975 to 1987 Number of obs = 13 Wald chi2(2) = 119.93 Log likelihood = 20.93161 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bs1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bs1 | lagfpc | -.032657 .1094413 -0.30 0.765 -.2471581 .1818441 _cons | -.163002 .0346317 -4.71 0.000 -.2308789 -.0951251 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .6874024 .0674992 10.18 0.000 .5551063 .8196984 -------------+---------------------------------------------------------------- /sigma | .130172 .0141612 9.19 0.000 .1024165 .1579275 ------------------------------------------------------------------------------ . est store so2f . . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * TSP regression equations E . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial tsp year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 12) = 44.791 Prob > F = 0.0000 . * . xtgls tsp year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 13 Number of obs = 193 Estimated autocorrelations = 13 Number of groups = 13 Estimated coefficients = 31 Obs per group: min = 13 avg = 14.84615 max = 15 Wald chi2(30) = 923.83 Log likelihood = -58.64376 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ tsp | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | -.318108 .1143555 -2.78 0.005 -.5422406 -.0939754 year3 | -.4398157 .161579 -2.72 0.006 -.7565047 -.1231267 year4 | -.7953768 .1980682 -4.02 0.000 -1.183583 -.4071703 year5 | -1.219652 .251057 -4.86 0.000 -1.711714 -.7275889 year6 | -1.091637 .3189618 -3.42 0.001 -1.71679 -.4664831 year7 | -1.124618 .3779626 -2.98 0.003 -1.865411 -.3838253 year8 | -1.62366 .4552987 -3.57 0.000 -2.516029 -.731291 year9 | -2.098452 .4706801 -4.46 0.000 -3.020968 -1.175936 year10 | -2.46862 .5081045 -4.86 0.000 -3.464486 -1.472753 year11 | -2.482369 .5484821 -4.53 0.000 -3.557374 -1.407364 year12 | -2.84551 .583961 -4.87 0.000 -3.990053 -1.700968 year13 | -2.954946 .6061744 -4.87 0.000 -4.143026 -1.766866 year14 | -2.818006 .643484 -4.38 0.000 -4.079211 -1.556801 year15 | -2.998309 .6746107 -4.44 0.000 -4.320522 -1.676097 lagpc | .1538571 .2231257 0.69 0.490 -.2834611 .5911754 lagndp | -.1930896 .2218439 -0.87 0.384 -.6278957 .2417165 pgdp | .2608981 .0971874 2.68 0.007 .0704143 .451382 pgdp2 | -.0050774 .0020861 -2.43 0.015 -.0091661 -.0009888 city1 | -.0104936 .3714075 -0.03 0.977 -.7384389 .7174517 city2 | -.4185271 .3316099 -1.26 0.207 -1.068471 .2314163 city3 | -1.22458 .1970018 -6.22 0.000 -1.610696 -.8384635 city4 | .9178858 .1785158 5.14 0.000 .5680012 1.26777 city5 | .8269802 .2363272 3.50 0.000 .3637874 1.290173 city6 | -.7117749 .2403301 -2.96 0.003 -1.182813 -.2407365 city7 | .4877158 .4199882 1.16 0.246 -.3354459 1.310878 city8 | -.7070542 .1557173 -4.54 0.000 -1.012255 -.4018539 city9 | -.0806783 .1856388 -0.43 0.664 -.4445237 .2831671 city10 | -.3162098 .3160796 -1.00 0.317 -.9357144 .3032947 city11 | -.8006279 .1468978 -5.45 0.000 -1.088542 -.5127135 city12 | -1.161202 .2224437 -5.22 0.000 -1.597183 -.7252198 _cons | -.3401806 .5194708 -0.65 0.513 -1.358325 .6779634 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 9.35 Prob > chi2 = 0.0093 . * . predict tsphat (option xb assumed; fitted values) . corr tsp tsphat (obs=193) | tsp tsphat -------------+------------------ tsp | 1.0000 tsphat | 0.8885 1.0000 . . est store tsp . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 -.31810803 -.43981571 -.79537681 -1.2196516 -1.0916367 -1.1246183 -1.6236602 -2.0984524 -2.4686195 year11 year12 year13 year14 year15 lagpc lagndp pgdp pgdp2 y1 -2.4823689 -2.8455103 -2.9549463 -2.8180059 -2.9983091 .15385712 -.1930896 .26089815 -.00507744 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 -.0104936 -.41852712 -1.2245798 .9178858 .82698017 -.71177488 .48771585 -.70705421 -.0806783 city10 city11 city12 _cons y1 -.31620983 -.80062789 -1.1612015 -.34018063 . matrix define bt=e(b)' . matrix define V=e(V) . matrix st2=vecdiag(V)' . . svmat bt . svmat st2 . gen swt=1/sqrt(st2) (164 missing values generated) . . list bt1 in 1/14 +-----------+ | bt1 | |-----------| 1. | -.318108 | 2. | -.4398157 | 3. | -.7953768 | 4. | -1.219652 | 5. | -1.091637 | |-----------| 6. | -1.124618 | 7. | -1.62366 | 8. | -2.098452 | 9. | -2.46862 | 10. | -2.482369 | |-----------| 11. | -2.84551 | 12. | -2.954946 | 13. | -2.818006 | 14. | -2.998309 | +-----------+ . arima bt1 lagfpc in 2/14 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = -7.5863179 Iteration 1: log likelihood = -5.476344 Iteration 2: log likelihood = -4.3683864 Iteration 3: log likelihood = -4.3311876 Iteration 4: log likelihood = -4.3034403 (switching optimization to BFGS) Iteration 5: log likelihood = -4.2991246 Iteration 6: log likelihood = -4.2948371 Iteration 7: log likelihood = -4.2937702 Iteration 8: log likelihood = -4.2936751 Iteration 9: log likelihood = -4.2936639 Iteration 10: log likelihood = -4.2936638 ARIMA regression Sample: 1975 to 1987 Number of obs = 13 Wald chi2(2) = 54.05 Log likelihood = -4.293664 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bt1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bt1 | lagfpc | -.2113952 .7931327 -0.27 0.790 -1.765907 1.343116 _cons | -1.670242 .9788031 -1.71 0.088 -3.588661 .248177 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .95831 .1322855 7.24 0.000 .6990351 1.217585 -------------+---------------------------------------------------------------- /sigma | .3057405 .100631 3.04 0.002 .1085074 .5029736 ------------------------------------------------------------------------------ . arima bt1 lagfpc in 2/14 [w=swt] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = -24.261197 Iteration 1: log likelihood = -18.123433 Iteration 2: log likelihood = -16.668203 Iteration 3: log likelihood = -16.392836 Iteration 4: log likelihood = -16.183719 (switching optimization to BFGS) Iteration 5: log likelihood = -16.094207 Iteration 6: log likelihood = -15.874035 Iteration 7: log likelihood = -15.634248 Iteration 8: log likelihood = -15.568856 Iteration 9: log likelihood = -15.566326 Iteration 10: log likelihood = -15.566121 Iteration 11: log likelihood = -15.566119 ARIMA regression Sample: 1975 to 1987 Number of obs = 13 Wald chi2(2) = 347.78 Log likelihood = -15.56612 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bt1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bt1 | lagfpc | -.4229376 .4137527 -1.02 0.307 -1.233878 .3880028 _cons | -1.036571 .2483332 -4.17 0.000 -1.523296 -.5498473 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .9238107 .0495632 18.64 0.000 .8266686 1.020953 -------------+---------------------------------------------------------------- /sigma | .3172836 .0475084 6.68 0.000 .2241689 .4103984 ------------------------------------------------------------------------------ . est store tspf . . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * O3 regression equations E . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial o3 year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 12.071 Prob > F = 0.0052 . * . xtgls o3 year2-year15 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 13 Number of obs = 158 Estimated autocorrelations = 13 Number of groups = 13 Estimated coefficients = 31 Obs per group: min = 5 avg = 12.15385 max = 15 Wald chi2(30) = 164.02 Log likelihood = -153.009 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ o3 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year2 | .8731372 .327804 2.66 0.008 .2306531 1.515621 year3 | .1852974 .3846265 0.48 0.630 -.5685567 .9391515 year4 | .3815451 .4435945 0.86 0.390 -.4878841 1.250974 year5 | .2737516 .5287466 0.52 0.605 -.7625726 1.310076 year6 | .0875139 .6438032 0.14 0.892 -1.174317 1.349345 year7 | .2279849 .7390818 0.31 0.758 -1.220589 1.676559 year8 | -.1136482 .8537209 -0.13 0.894 -1.78691 1.559614 year9 | .2640978 .8819564 0.30 0.765 -1.464505 1.992701 year10 | .5363466 .9617168 0.56 0.577 -1.348584 2.421277 year11 | .6127971 1.058219 0.58 0.563 -1.461274 2.686868 year12 | .6326831 1.109336 0.57 0.568 -1.541576 2.806942 year13 | .2715077 1.120983 0.24 0.809 -1.925579 2.468594 year14 | .4431019 1.145374 0.39 0.699 -1.80179 2.687994 year15 | .9329479 1.181349 0.79 0.430 -1.382453 3.248349 lagpc | -.0096 .4842188 -0.02 0.984 -.9586514 .9394514 lagndp | .1453776 .2894112 0.50 0.615 -.4218579 .7126131 pgdp | -.045335 .1662281 -0.27 0.785 -.3711361 .2804662 pgdp2 | .0001963 .0035271 0.06 0.956 -.0067167 .0071093 city1 | .4975001 .6508608 0.76 0.445 -.7781636 1.773164 city2 | .2384892 .6656281 0.36 0.720 -1.066118 1.543096 city3 | .5564385 .5969986 0.93 0.351 -.6136572 1.726534 city4 | .4003327 .4488642 0.89 0.372 -.4794249 1.28009 city5 | -.5282185 .3435749 -1.54 0.124 -1.201613 .1451759 city6 | -.2432848 .4538267 -0.54 0.592 -1.132769 .6461993 city7 | -.7868005 .5593878 -1.41 0.160 -1.88318 .3095793 city8 | 1.345559 .5530921 2.43 0.015 .2615183 2.429599 city9 | .1663857 .3745897 0.44 0.657 -.5677966 .9005681 city10 | -.1123164 .491775 -0.23 0.819 -1.076178 .851545 city11 | -1.409339 .4223794 -3.34 0.001 -2.237188 -.5814908 city12 | .4200075 .5338596 0.79 0.431 -.6263381 1.466353 _cons | .1733991 1.003886 0.17 0.863 -1.794182 2.14098 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 0.55 Prob > chi2 = 0.7603 . * . predict o3hat (option xb assumed; fitted values) . corr o3 o3hat (obs=158) | o3 o3hat -------------+------------------ o3 | 1.0000 o3hat | 0.6331 1.0000 . . est store o3 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year2 year3 year4 year5 year6 year7 year8 year9 year10 y1 .87313723 .18529739 .38154507 .27375157 .08751389 .22798489 -.11364822 .26409783 .53634661 year11 year12 year13 year14 year15 lagpc lagndp pgdp pgdp2 y1 .61279709 .63268315 .27150773 .44310194 .93294787 -.00959998 .14537758 -.04533496 .0001963 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 .49750013 .23848922 .55643849 .40033268 -.52821853 -.2432848 -.78680055 1.3455588 .16638573 city10 city11 city12 _cons y1 -.11231636 -1.4093393 .42000749 .17339906 . matrix define bo=e(b)' . matrix define V=e(V) . matrix s2o=vecdiag(V)' . . svmat bo . svmat s2o . gen swo=1/sqrt(s2o) (164 missing values generated) . . list bo1 in 1/14 +-----------+ | bo1 | |-----------| 1. | .8731372 | 2. | .1852974 | 3. | .3815451 | 4. | .2737516 | 5. | .0875139 | |-----------| 6. | .2279849 | 7. | -.1136482 | 8. | .2640978 | 9. | .5363466 | 10. | .6127971 | |-----------| 11. | .6326832 | 12. | .2715077 | 13. | .4431019 | 14. | .9329479 | +-----------+ . regress bo1 lagfpc in 1/14 Source | SS df MS Number of obs = 14 -------------+------------------------------ F( 1, 12) = 1.08 Model | .091803013 1 .091803013 Prob > F = 0.3202 Residual | 1.02438301 12 .085365251 R-squared = 0.0822 -------------+------------------------------ Adj R-squared = 0.0058 Total | 1.11618602 13 .085860463 Root MSE = .29217 ------------------------------------------------------------------------------ bo1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lagfpc | .2692642 .2596514 1.04 0.320 -.2964676 .8349959 _cons | .342948 .0958816 3.58 0.004 .1340399 .551856 ------------------------------------------------------------------------------ . regress bo1 lagfpc in 1/14 [w=swo] (analytic weights assumed) (sum of wgt is 2.0505e+01) Source | SS df MS Number of obs = 14 -------------+------------------------------ F( 1, 12) = 0.25 Model | .024190857 1 .024190857 Prob > F = 0.6248 Residual | 1.15211221 12 .096009351 R-squared = 0.0206 -------------+------------------------------ Adj R-squared = -0.0611 Total | 1.17630307 13 .090484851 Root MSE = .30985 ------------------------------------------------------------------------------ bo1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lagfpc | .1649377 .3285876 0.50 0.625 -.5509931 .8808686 _cons | .3799269 .0945325 4.02 0.002 .1739583 .5858954 ------------------------------------------------------------------------------ . est store o3f . . . . . ****************************************************************************************** . * MAKE RESULTS TABLE: EARLY SAMPLE . ****************************************************************************************** . est table co no2 so2 tsp o3, keep( lagpc lagndp pgdp pgdp2 ) t(%5.2f) b(%7.4f) stfmt(%9.2f) stats(N ll bic) style( > columns) +--------------------------------------------------------------------------+ | Variable | co | no2 | so2 | tsp | o3 | |--------------+-----------+-----------+-----------+-----------+-----------| | lagpc | 1.8959 | 0.7692 | 1.2890 | 0.1539 | -0.0096 | | | 4.46 | 2.25 | 5.12 | 0.69 | -0.02 | | lagndp | 0.9256 | 1.1142 | 0.2784 | -0.1931 | 0.1454 | | | 2.48 | 4.97 | 1.28 | -0.87 | 0.50 | | pgdp | -0.1555 | 0.0382 | -0.2516 | 0.2609 | -0.0453 | | | -1.22 | 0.37 | -2.79 | 2.68 | -0.27 | | pgdp2 | 0.0039 | 0.0015 | 0.0069 | -0.0051 | 0.0002 | | | 1.40 | 0.66 | 3.16 | -2.43 | 0.06 | |--------------+-----------+-----------+-----------+-----------+-----------| | N | 162.00 | 145.00 | 125.00 | 193.00 | 158.00 | | ll | -103.04 | -83.29 | -38.73 | -58.64 | -153.01 | | bic | 358.70 | 315.88 | 217.49 | 280.43 | 462.96 | +--------------------------------------------------------------------------+ legend: b/t . . est table cof no2f so2f tspf o3f, drop(_cons) t(%5.2f) b(%7.4f) stfmt(%9.2f) style(columns) +----------------------------------------------------------------+ | Variable | cof | no2f | so2f | tspf | o3f | |--------------+---------+---------+---------+---------+---------| | bco1 | | | | | | | lagfpc | -0.1784 | | | | | | | -0.59 | | | | | |--------------+---------+---------+---------+---------+---------| | ARMA | | | | | | | L.ar | 0.6615 | 0.8391 | 0.6874 | 0.9238 | | | | 5.98 | 11.55 | 10.18 | 18.64 | | |--------------+---------+---------+---------+---------+---------| | bn1 | | | | | | | lagfpc | | -0.1167 | | | | | | | -0.25 | | | | |--------------+---------+---------+---------+---------+---------| | bs1 | | | | | | | lagfpc | | | -0.0327 | | | | | | | -0.30 | | | |--------------+---------+---------+---------+---------+---------| | bt1 | | | | | | | lagfpc | | | | -0.4229 | | | | | | | -1.02 | | |--------------+---------+---------+---------+---------+---------| | _ | | | | | | | lagfpc | | | | | 0.1649 | | | | | | | 0.50 | +----------------------------------------------------------------+ legend: b/t . . . . . . . . . . . . . . . . * *************************************** . *************** LATE SAMPLE: 1982-1996 **************************** . * *************************************** . * . . clear . set memory 50m Current memory allocation current memory usage settable value description (1M = 1024k) -------------------------------------------------------------------- set maxvar 5000 max. variables allowed 1.733M set memory 50M max. data space 50.000M set matsize 400 max. RHS vars in models 1.254M ----------- 52.987M . insheet using vote.annual.csv // clears data then reads data from votingdata.csv (20 vars, 299 obs) . . mvdecode _all, mv(-99) // changes missing value code from -99 to '.' city: string variable ignored co: 45 missing values generated no2: 61 missing values generated so2: 93 missing values generated tsp: 10 missing values generated o3: 44 missing values generated . . tabulate city, generate(city) // generates city dummy variables City | Freq. Percent Cum. ------------+----------------------------------- Calgary | 23 7.69 7.69 Edmonton | 23 7.69 15.38 Halifax | 23 7.69 23.08 Hamilton | 23 7.69 30.77 Montreal | 23 7.69 38.46 Ottawa | 23 7.69 46.15 Quebec | 23 7.69 53.85 Regina | 23 7.69 61.54 Saskatoon | 23 7.69 69.23 Toronto | 23 7.69 76.92 Vancouver | 23 7.69 84.62 Victoria | 23 7.69 92.31 Winnipeg | 23 7.69 100.00 ------------+----------------------------------- Total | 299 100.00 . tabulate year, generate(year) // generates year dummy variables Year | Freq. Percent Cum. ------------+----------------------------------- 1974 | 13 4.35 4.35 1975 | 13 4.35 8.70 1976 | 13 4.35 13.04 1977 | 13 4.35 17.39 1978 | 13 4.35 21.74 1979 | 13 4.35 26.09 1980 | 13 4.35 30.43 1981 | 13 4.35 34.78 1982 | 13 4.35 39.13 1983 | 13 4.35 43.48 1984 | 13 4.35 47.83 1985 | 13 4.35 52.17 1986 | 13 4.35 56.52 1987 | 13 4.35 60.87 1988 | 13 4.35 65.22 1989 | 13 4.35 69.57 1990 | 13 4.35 73.91 1991 | 13 4.35 78.26 1992 | 13 4.35 82.61 1993 | 13 4.35 86.96 1994 | 13 4.35 91.30 1995 | 13 4.35 95.65 1996 | 13 4.35 100.00 ------------+----------------------------------- Total | 299 100.00 . . encode city, generate(place) // generates numeric variable place=1,2, etc as a city code . . tsset place year, yearly // establishes panel structure of data base panel variable: place, 1 to 13 time variable: year, 1974 to 1996 . * . * . * GENERATE PROVINCE DUMMIES . gen bc=city11+city12 . gen ab=city1+city2 . gen sk=city8+city9 . gen mn=city13 . gen on=city4+city6+city10 . gen pq=city5+city7 . gen ns=city3 . . sum(_all) // descriptive statistics Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- year | 299 1985 6.64437 1974 1996 city | 0 ndp | 299 .3043478 .460902 0 1 pc | 299 .5652174 .4965595 0 1 fpc | 299 .4347826 .4965595 0 1 -------------+-------------------------------------------------------- yndp | 299 .3007246 .4451981 0 1 ypc | 299 .5638239 .4851834 0 1 yfpc | 299 .4275362 .4633248 0 1 pgdp | 299 17.8327 6.945988 4.263 32.275 pcg | 299 6.389599 5.273752 -15.5387 27.417 -------------+-------------------------------------------------------- co | 254 1.053969 .51185 .1166667 3.723333 no2 | 238 21.66362 7.520041 5 51.45833 so2 | 206 6.421719 4.721512 .7208334 23.25 tsp | 289 57.95132 23.85508 17.65667 141.2917 o3 | 255 16.59222 3.51711 7.75 27.83333 -------------+-------------------------------------------------------- lagndp | 299 .2935652 .4124604 0 1 lagpc | 299 .5637358 .4635529 0 1 lagfpc | 299 .4275217 .4201734 0 1 index | 299 150 86.45808 1 299 count | 299 12 6.64437 1 23 -------------+-------------------------------------------------------- city1 | 299 .0769231 .2669161 0 1 city2 | 299 .0769231 .2669161 0 1 city3 | 299 .0769231 .2669161 0 1 city4 | 299 .0769231 .2669161 0 1 city5 | 299 .0769231 .2669161 0 1 -------------+-------------------------------------------------------- city6 | 299 .0769231 .2669161 0 1 city7 | 299 .0769231 .2669161 0 1 city8 | 299 .0769231 .2669161 0 1 city9 | 299 .0769231 .2669161 0 1 city10 | 299 .0769231 .2669161 0 1 -------------+-------------------------------------------------------- city11 | 299 .0769231 .2669161 0 1 city12 | 299 .0769231 .2669161 0 1 city13 | 299 .0769231 .2669161 0 1 year1 | 299 .0434783 .204273 0 1 year2 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year3 | 299 .0434783 .204273 0 1 year4 | 299 .0434783 .204273 0 1 year5 | 299 .0434783 .204273 0 1 year6 | 299 .0434783 .204273 0 1 year7 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year8 | 299 .0434783 .204273 0 1 year9 | 299 .0434783 .204273 0 1 year10 | 299 .0434783 .204273 0 1 year11 | 299 .0434783 .204273 0 1 year12 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year13 | 299 .0434783 .204273 0 1 year14 | 299 .0434783 .204273 0 1 year15 | 299 .0434783 .204273 0 1 year16 | 299 .0434783 .204273 0 1 year17 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year18 | 299 .0434783 .204273 0 1 year19 | 299 .0434783 .204273 0 1 year20 | 299 .0434783 .204273 0 1 year21 | 299 .0434783 .204273 0 1 year22 | 299 .0434783 .204273 0 1 -------------+-------------------------------------------------------- year23 | 299 .0434783 .204273 0 1 place | 299 7 3.74793 1 13 bc | 299 .1538462 .3614061 0 1 ab | 299 .1538462 .3614061 0 1 sk | 299 .1538462 .3614061 0 1 -------------+-------------------------------------------------------- mn | 299 .0769231 .2669161 0 1 on | 299 .2307692 .4220314 0 1 pq | 299 .1538462 .3614061 0 1 ns | 299 .0769231 .2669161 0 1 . * . * . * CONVERT AIR DATA INTO STANDARDIZED FORM . egen sco =std(co) (45 missing values generated) . egen sno2=std(no2) (61 missing values generated) . egen sso2=std(so2) (93 missing values generated) . egen stsp =std(tsp) (10 missing values generated) . egen so3 = std(o3) (44 missing values generated) . * . replace co=sco (254 real changes made) . replace no2=sno2 (238 real changes made) . replace so2=sso2 (206 real changes made) . replace tsp=stsp (289 real changes made) . replace o3=so3 (255 real changes made) . * . iis place // identify panel index . tis year // identify time variable . * . gen yearsq=(year-1982)^2 . list year yearsq in 1/24 +---------------+ | year yearsq | |---------------| 1. | 1974 64 | 2. | 1975 49 | 3. | 1976 36 | 4. | 1977 25 | 5. | 1978 16 | |---------------| 6. | 1979 9 | 7. | 1980 4 | 8. | 1981 1 | 9. | 1982 0 | 10. | 1983 1 | |---------------| 11. | 1984 4 | 12. | 1985 9 | 13. | 1986 16 | 14. | 1987 25 | 15. | 1988 36 | |---------------| 16. | 1989 49 | 17. | 1990 64 | 18. | 1991 81 | 19. | 1992 100 | 20. | 1993 121 | |---------------| 21. | 1994 144 | 22. | 1995 169 | 23. | 1996 196 | 24. | 1974 64 | +---------------+ . gen pgdp2=pgdp*pgdp . compress place was long now byte bc was float now byte ab was float now byte sk was float now byte mn was float now byte on was float now byte pq was float now byte ns was float now byte yearsq was float now int . drop if year<1982 // drop 1st part of data set (104 observations deleted) . sum(_all) //descriptive stats Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- year | 195 1989 4.331615 1982 1996 city | 0 ndp | 195 .2923077 .4559937 0 1 pc | 195 .5487179 .4989018 0 1 fpc | 195 .6 .4911589 0 1 -------------+-------------------------------------------------------- yndp | 195 .2871795 .4366425 0 1 ypc | 195 .5581197 .4844795 0 1 yfpc | 195 .6055556 .4611222 0 1 pgdp | 195 21.79146 4.709522 10.432 32.275 pcg | 195 3.77793 3.707044 -15.5387 12.6054 -------------+-------------------------------------------------------- co | 169 -.3845223 .5547455 -1.407904 1.351693 no2 | 170 -.1754937 .8120424 -2.215894 1.651549 so2 | 146 -.2871862 .6320207 -1.207428 1.746252 tsp | 186 -.4259332 .6907941 -1.689144 1.784855 o3 | 176 .044214 .8769973 -2.158653 3.186644 -------------+-------------------------------------------------------- lagndp | 195 .2742103 .3951932 0 1 lagpc | 195 .5766462 .4567412 0 1 lagfpc | 195 .6092667 .4109385 0 1 index | 195 154 86.3883 9 299 count | 195 16 4.331615 9 23 -------------+-------------------------------------------------------- city1 | 195 .0769231 .2671552 0 1 city2 | 195 .0769231 .2671552 0 1 city3 | 195 .0769231 .2671552 0 1 city4 | 195 .0769231 .2671552 0 1 city5 | 195 .0769231 .2671552 0 1 -------------+-------------------------------------------------------- city6 | 195 .0769231 .2671552 0 1 city7 | 195 .0769231 .2671552 0 1 city8 | 195 .0769231 .2671552 0 1 city9 | 195 .0769231 .2671552 0 1 city10 | 195 .0769231 .2671552 0 1 -------------+-------------------------------------------------------- city11 | 195 .0769231 .2671552 0 1 city12 | 195 .0769231 .2671552 0 1 city13 | 195 .0769231 .2671552 0 1 year1 | 195 0 0 0 0 year2 | 195 0 0 0 0 -------------+-------------------------------------------------------- year3 | 195 0 0 0 0 year4 | 195 0 0 0 0 year5 | 195 0 0 0 0 year6 | 195 0 0 0 0 year7 | 195 0 0 0 0 -------------+-------------------------------------------------------- year8 | 195 0 0 0 0 year9 | 195 .0666667 .2500859 0 1 year10 | 195 .0666667 .2500859 0 1 year11 | 195 .0666667 .2500859 0 1 year12 | 195 .0666667 .2500859 0 1 -------------+-------------------------------------------------------- year13 | 195 .0666667 .2500859 0 1 year14 | 195 .0666667 .2500859 0 1 year15 | 195 .0666667 .2500859 0 1 year16 | 195 .0666667 .2500859 0 1 year17 | 195 .0666667 .2500859 0 1 -------------+-------------------------------------------------------- year18 | 195 .0666667 .2500859 0 1 year19 | 195 .0666667 .2500859 0 1 year20 | 195 .0666667 .2500859 0 1 year21 | 195 .0666667 .2500859 0 1 year22 | 195 .0666667 .2500859 0 1 -------------+-------------------------------------------------------- year23 | 195 .0666667 .2500859 0 1 place | 195 7 3.751288 1 13 bc | 195 .1538462 .3617299 0 1 ab | 195 .1538462 .3617299 0 1 sk | 195 .1538462 .3617299 0 1 -------------+-------------------------------------------------------- mn | 195 .0769231 .2671552 0 1 on | 195 .2307692 .4224095 0 1 pq | 195 .1538462 .3617299 0 1 ns | 195 .0769231 .2671552 0 1 sco | 169 -.3845223 .5547455 -1.407904 1.351693 -------------+-------------------------------------------------------- sno2 | 170 -.1754937 .8120424 -2.215894 1.651549 sso2 | 146 -.2871862 .6320207 -1.207428 1.746252 stsp | 186 -.4259332 .6907941 -1.689144 1.784855 so3 | 176 .044214 .8769973 -2.158653 3.186644 yearsq | 195 67.66667 62.88057 0 196 -------------+-------------------------------------------------------- pgdp2 | 195 496.9337 204.8697 108.8266 1041.676 . . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * CO regression equations L . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial co year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 20.105 Prob > F = 0.0009 . * . xtgls co year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 12 Number of obs = 169 Estimated autocorrelations = 12 Number of groups = 12 Estimated coefficients = 31 Obs per group: min = 8 avg = 14.08333 max = 15 Wald chi2(29) = 384.88 Log likelihood = 26.949 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ co | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year10 | -.1143176 .0772473 -1.48 0.139 -.2657195 .0370843 year11 | -.1407783 .0946845 -1.49 0.137 -.3263565 .0447999 year12 | -.1176454 .1099543 -1.07 0.285 -.3331518 .0978611 year13 | -.1939988 .109939 -1.76 0.078 -.4094753 .0214777 year14 | -.159775 .1192718 -1.34 0.180 -.3935433 .0739934 year15 | -.2221604 .1336819 -1.66 0.097 -.484172 .0398512 year16 | -.0587111 .1478746 -0.40 0.691 -.3485399 .2311178 year17 | -.1591687 .1596368 -1.00 0.319 -.4720511 .1537137 year18 | -.3035782 .1571504 -1.93 0.053 -.6115873 .0044309 year19 | -.2987647 .1574995 -1.90 0.058 -.607458 .0099286 year20 | -.3569755 .1671901 -2.14 0.033 -.684662 -.029289 year21 | -.4103753 .181487 -2.26 0.024 -.7660832 -.0546674 year22 | -.4517525 .1907547 -2.37 0.018 -.8256248 -.0778802 year23 | -.4647949 .206913 -2.25 0.025 -.870337 -.0592528 lagpc | .1215837 .1191973 1.02 0.308 -.1120388 .3552062 lagndp | .0956256 .1054356 0.91 0.364 -.1110244 .3022756 pgdp | -.193951 .0498557 -3.89 0.000 -.2916663 -.0962357 pgdp2 | .00303 .0010568 2.87 0.004 .0009587 .0051012 city1 | .8022449 .2346014 3.42 0.001 .3424345 1.262055 city2 | .9759662 .2214699 4.41 0.000 .5418932 1.410039 city3 | .5303874 .1794789 2.96 0.003 .1786153 .8821596 city4 | 1.028327 .34943 2.94 0.003 .3434569 1.713197 city5 | .7499039 .2093455 3.58 0.000 .3395941 1.160214 city6 | 1.160466 .1896352 6.12 0.000 .7887878 1.532144 city7 | .3358293 .1852862 1.81 0.070 -.027325 .6989836 city8 | .6142891 .23648 2.60 0.009 .1507968 1.077781 city9 | .0460187 .5611026 0.08 0.935 -1.053722 1.14576 city10 | 1.447655 .2026335 7.14 0.000 1.050501 1.84481 city11 | 1.282171 .1899104 6.75 0.000 .909953 1.654388 city12 | (dropped) _cons | 1.735371 .6241829 2.78 0.005 .5119955 2.958747 ------------------------------------------------------------------------------ . * . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 1.12 Prob > chi2 = 0.5702 . . . predict cohat // make psuedo R-sq (option xb assumed; fitted values) . corr co cohat (obs=169) | co cohat -------------+------------------ co | 1.0000 cohat | 0.8236 1.0000 . est store co . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year10 year11 year12 year13 year14 year15 year16 year17 year18 y1 -.1143176 -.14077829 -.11764536 -.1939988 -.15977498 -.22216043 -.05871106 -.15916871 -.30357817 year19 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 y1 -.29876467 -.35697552 -.41037528 -.4517525 -.46479489 .12158372 .09562556 -.19395102 .00302997 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 .80224486 .97596615 .53038745 1.028327 .74990386 1.1604661 .33582927 .61428907 .04601872 city10 city11 city12 _cons y1 1.4476555 1.2821706 0 1.7353714 . matrix define bco=e(b)' . matrix define V=e(V) . matrix sc2=vecdiag(V)' . . svmat bco . svmat sc2 . gen swc=1/sqrt(sc2) (165 missing values generated) . . list bco1 in 1/14 +-----------+ | bco1 | |-----------| 1. | -.1143176 | 2. | -.1407783 | 3. | -.1176454 | 4. | -.1939988 | 5. | -.159775 | |-----------| 6. | -.2221604 | 7. | -.0587111 | 8. | -.1591687 | 9. | -.3035782 | 10. | -.2987647 | |-----------| 11. | -.3569755 | 12. | -.4103753 | 13. | -.4517525 | 14. | -.4647949 | +-----------+ . arima bco1 lagfpc in 2/14 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = 14.062853 Iteration 1: log likelihood = 14.158986 Iteration 2: log likelihood = 14.197436 Iteration 3: log likelihood = 14.208498 Iteration 4: log likelihood = 14.225712 (switching optimization to BFGS) Iteration 5: log likelihood = 14.226111 Iteration 6: log likelihood = 14.232157 Iteration 7: log likelihood = 14.233336 Iteration 8: log likelihood = 14.233352 Iteration 9: log likelihood = 14.233361 Iteration 10: log likelihood = 14.233361 ARIMA regression Sample: 1983 to 1995 Number of obs = 13 Wald chi2(2) = 13.70 Log likelihood = 14.23336 Prob > chi2 = 0.0011 ------------------------------------------------------------------------------ | OPG bco1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bco1 | lagfpc | -.0182299 .2379809 -0.08 0.939 -.4846639 .448204 _cons | -.2683177 .1243957 -2.16 0.031 -.5121288 -.0245067 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .8315208 .3640768 2.28 0.022 .1179433 1.545098 -------------+---------------------------------------------------------------- /sigma | .0773794 .018651 4.15 0.000 .0408241 .1139347 ------------------------------------------------------------------------------ . arima bco1 lagfpc in 2/14 [w=swc] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = 99.290534 Iteration 1: log likelihood = 100.05567 Iteration 2: log likelihood = 100.49275 Iteration 3: log likelihood = 100.73508 Iteration 4: log likelihood = 100.97884 (switching optimization to BFGS) Iteration 5: log likelihood = 101.09503 Iteration 6: log likelihood = 101.39801 Iteration 7: log likelihood = 101.40191 Iteration 8: log likelihood = 101.40414 Iteration 9: log likelihood = 101.40423 Iteration 10: log likelihood = 101.40428 Iteration 11: log likelihood = 101.40428 ARIMA regression Sample: 1983 to 1995 Number of obs = 13 Wald chi2(2) = 544.38 Log likelihood = 101.4043 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bco1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bco1 | lagfpc | -.0478548 .0311856 -1.53 0.125 -.1089773 .0132678 _cons | -.2131741 .0213843 -9.97 0.000 -.2550866 -.1712615 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .7894318 .0506565 15.58 0.000 .6901469 .8887168 -------------+---------------------------------------------------------------- /sigma | .0759136 .0025543 29.72 0.000 .0709072 .08092 ------------------------------------------------------------------------------ . est store cof . . . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * NO2 regression equations L . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial no2 year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 7.513 Prob > F = 0.0192 . * . xtgls no2 year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 12 Number of obs = 170 Estimated autocorrelations = 12 Number of groups = 12 Estimated coefficients = 31 Obs per group: min = 11 avg = 14.16667 max = 15 Wald chi2(29) = 661.61 Log likelihood = 4.37828 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ no2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year10 | -.3771054 .0793958 -4.75 0.000 -.5327183 -.2214925 year11 | -.4335501 .1029633 -4.21 0.000 -.6353545 -.2317456 year12 | -.5873392 .1167318 -5.03 0.000 -.8161293 -.358549 year13 | -.410809 .117854 -3.49 0.000 -.6417987 -.1798194 year14 | -.4322736 .1278247 -3.38 0.001 -.6828054 -.1817417 year15 | -.5834018 .1429717 -4.08 0.000 -.8636212 -.3031824 year16 | -.4528661 .1576955 -2.87 0.004 -.7619436 -.1437886 year17 | -.7511874 .1645356 -4.57 0.000 -1.073671 -.4287035 year18 | -.7030194 .1645441 -4.27 0.000 -1.02552 -.3805189 year19 | -.9915649 .1691912 -5.86 0.000 -1.323174 -.6599561 year20 | -.9130612 .1832298 -4.98 0.000 -1.272185 -.5539374 year21 | -.9443421 .2051043 -4.60 0.000 -1.346339 -.5423451 year22 | -.9943581 .2211198 -4.50 0.000 -1.427745 -.5609713 year23 | -.9937721 .2383581 -4.17 0.000 -1.460945 -.5265989 lagpc | .0654018 .1540167 0.42 0.671 -.2364654 .3672689 lagndp | .1280819 .1476627 0.87 0.386 -.1613317 .4174955 pgdp | .1985889 .0536475 3.70 0.000 .0934417 .303736 pgdp2 | -.0034281 .0011751 -2.92 0.004 -.0057313 -.0011249 city1 | 1.220729 .2066844 5.91 0.000 .8156356 1.625823 city2 | 1.120844 .216793 5.17 0.000 .695938 1.545751 city3 | .150588 .2238788 0.67 0.501 -.2882063 .5893823 city4 | 1.006741 .1789071 5.63 0.000 .6560896 1.357392 city5 | 1.370321 .176366 7.77 0.000 1.02465 1.715992 city6 | .8254595 .1879374 4.39 0.000 .457109 1.19381 city7 | .8766876 .3356364 2.61 0.009 .2188523 1.534523 city8 | .4378431 .3387214 1.29 0.196 -.2260387 1.101725 city9 | -.0351449 .1366984 -0.26 0.797 -.3030689 .2327791 city10 | 1.314203 .1582648 8.30 0.000 1.00401 1.624396 city11 | -.5986838 .2103041 -2.85 0.004 -1.010872 -.1864954 city12 | (dropped) _cons | -2.885516 .6403108 -4.51 0.000 -4.140502 -1.63053 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 0.91 Prob > chi2 = 0.6332 . * . predict no2hat (option xb assumed; fitted values) . corr no2 no2hat (obs=170) | no2 no2hat -------------+------------------ no2 | 1.0000 no2hat | 0.8795 1.0000 . . est store no2 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year10 year11 year12 year13 year14 year15 year16 year17 year18 y1 -.37710539 -.43355006 -.58733916 -.41080904 -.43227356 -.58340177 -.45286612 -.75118744 -.70301935 year19 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 y1 -.99156487 -.91306116 -.94434211 -.99435808 -.99377209 .06540176 .12808194 .19858886 -.00342809 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 1.2207295 1.1208444 .15058799 1.006741 1.3703212 .82545953 .87668762 .43784312 -.03514487 city10 city11 city12 _cons y1 1.3142031 -.59868384 0 -2.8855161 . matrix define bn=e(b)' . matrix define V=e(V) . matrix sn2=vecdiag(V)' . . svmat bn . svmat sn2 . gen swn=1/sqrt(sn2) (165 missing values generated) . . list bn1 in 1/14 +-----------+ | bn1 | |-----------| 1. | -.3771054 | 2. | -.4335501 | 3. | -.5873392 | 4. | -.410809 | 5. | -.4322736 | |-----------| 6. | -.5834017 | 7. | -.4528661 | 8. | -.7511874 | 9. | -.7030194 | 10. | -.9915649 | |-----------| 11. | -.9130611 | 12. | -.9443421 | 13. | -.9943581 | 14. | -.9937721 | +-----------+ . arima bn1 lagfpc in 2/14 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = 5.7493375 Iteration 1: log likelihood = 5.892788 Iteration 2: log likelihood = 5.9172532 Iteration 3: log likelihood = 5.9868667 Iteration 4: log likelihood = 6.0807417 (switching optimization to BFGS) Iteration 5: log likelihood = 6.0851306 Iteration 6: log likelihood = 6.0895101 Iteration 7: log likelihood = 6.0923722 Iteration 8: log likelihood = 6.0925614 Iteration 9: log likelihood = 6.0925651 Iteration 10: log likelihood = 6.0925651 ARIMA regression Sample: 1983 to 1995 Number of obs = 13 Wald chi2(2) = 7.58 Log likelihood = 6.092565 Prob > chi2 = 0.0226 ------------------------------------------------------------------------------ | OPG bn1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bn1 | lagfpc | -.0170623 .2857392 -0.06 0.952 -.5771009 .5429763 _cons | -.7010674 .1909566 -3.67 0.000 -1.075335 -.3267994 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .7908595 .341805 2.31 0.021 .120934 1.460785 -------------+---------------------------------------------------------------- /sigma | .145822 .0382338 3.81 0.000 .0708852 .2207589 ------------------------------------------------------------------------------ . arima bn1 lagfpc in 2/14 [w=swn] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = 35.846657 Iteration 1: log likelihood = 37.265516 Iteration 2: log likelihood = 37.728536 Iteration 3: log likelihood = 37.787719 Iteration 4: log likelihood = 37.818445 (switching optimization to BFGS) Iteration 5: log likelihood = 37.832615 Iteration 6: log likelihood = 37.851475 Iteration 7: log likelihood = 37.855853 Iteration 8: log likelihood = 37.856988 Iteration 9: log likelihood = 37.857638 Iteration 10: log likelihood = 37.857669 Iteration 11: log likelihood = 37.85768 Iteration 12: log likelihood = 37.85768 ARIMA regression Sample: 1983 to 1995 Number of obs = 13 Wald chi2(2) = 252.67 Log likelihood = 37.85768 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bn1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bn1 | lagfpc | -.0639012 .0380652 -1.68 0.093 -.1385077 .0107053 _cons | -.6072746 .0288514 -21.05 0.000 -.6638223 -.5507269 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .7426661 .0528639 14.05 0.000 .6390547 .8462774 -------------+---------------------------------------------------------------- /sigma | .1480929 .0061526 24.07 0.000 .136034 .1601519 ------------------------------------------------------------------------------ . . est store no2f . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * SO2 regression equations L . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial so2 year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 11) = 10.168 Prob > F = 0.0086 . * . xtgls so2 year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force / > / GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 12 Number of obs = 146 Estimated autocorrelations = 12 Number of groups = 12 Estimated coefficients = 31 Obs per group: min = 3 avg = 12.16667 max = 15 Wald chi2(29) = 351.38 Log likelihood = 26.59847 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ so2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year10 | -.0793917 .0959456 -0.83 0.408 -.2674416 .1086583 year11 | -.0052035 .1106411 -0.05 0.962 -.222056 .2116491 year12 | .0513431 .1277034 0.40 0.688 -.1989509 .3016371 year13 | .0587426 .132051 0.44 0.656 -.2000725 .3175577 year14 | .168246 .1481698 1.14 0.256 -.1221615 .4586536 year15 | .3894666 .1705413 2.28 0.022 .0552118 .7237213 year16 | .4314876 .1873498 2.30 0.021 .0642889 .7986864 year17 | .383885 .1977812 1.94 0.052 -.0037591 .7715291 year18 | .264589 .193633 1.37 0.172 -.1149247 .6441027 year19 | .3578478 .1968242 1.82 0.069 -.0279205 .7436161 year20 | .2709013 .2132336 1.27 0.204 -.1470288 .6888314 year21 | .3229653 .2279664 1.42 0.157 -.1238407 .7697714 year22 | .146801 .2366259 0.62 0.535 -.3169773 .6105792 year23 | .1987895 .2549942 0.78 0.436 -.30099 .698569 lagpc | .1327624 .1282051 1.04 0.300 -.118515 .3840398 lagndp | .0464745 .1393636 0.33 0.739 -.2266731 .3196221 pgdp | -.2157743 .0623044 -3.46 0.001 -.3378886 -.0936599 pgdp2 | .0037016 .0013713 2.70 0.007 .0010139 .0063893 city1 | .7948035 .2055931 3.87 0.000 .3918483 1.197759 city2 | .5856447 .1907498 3.07 0.002 .2117819 .9595074 city3 | 1.187404 .2277157 5.21 0.000 .7410892 1.633718 city4 | 2.004203 .1971522 10.17 0.000 1.617791 2.390614 city5 | 1.621617 .1749074 9.27 0.000 1.278805 1.964429 city6 | .8618527 .1254079 6.87 0.000 .6160578 1.107648 city7 | (dropped) city8 | .0920598 .1848322 0.50 0.618 -.2702047 .4543243 city9 | .4619385 .142211 3.25 0.001 .1832101 .7406669 city10 | 1.023715 .1509559 6.78 0.000 .727847 1.319583 city11 | .9384176 .1049038 8.95 0.000 .7328099 1.144025 city12 | .6786943 .1683539 4.03 0.000 .3487268 1.008662 _cons | 1.340397 .6705442 2.00 0.046 .0261543 2.654639 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 1.78 Prob > chi2 = 0.4112 . * . predict so2hat (option xb assumed; fitted values) . corr so2 so2hat (obs=146) | so2 so2hat -------------+------------------ so2 | 1.0000 so2hat | 0.8925 1.0000 . . est store so2 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year10 year11 year12 year13 year14 year15 year16 year17 year18 y1 -.07939165 -.00520346 .05134309 .05874261 .16824602 .38946656 .43148763 .38388502 .26458901 year19 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 y1 .35784777 .2709013 .32296533 .14680097 .19878951 .13276239 .04647451 -.21577426 .00370158 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 .79480348 .58564467 1.1874038 2.0042026 1.6216173 .86185269 0 .09205978 .46193848 city10 city11 city12 _cons y1 1.0237151 .93841764 .67869434 1.3403967 . matrix define bs=e(b)' . matrix define V=e(V) . matrix ss2=vecdiag(V)' . . svmat bs . svmat ss2 . gen sws=1/sqrt(ss2) (165 missing values generated) . . list bs1 in 1/14 +-----------+ | bs1 | |-----------| 1. | -.0793917 | 2. | -.0052035 | 3. | .0513431 | 4. | .0587426 | 5. | .168246 | |-----------| 6. | .3894666 | 7. | .4314876 | 8. | .383885 | 9. | .264589 | 10. | .3578478 | |-----------| 11. | .2709013 | 12. | .3229653 | 13. | .146801 | 14. | .1987895 | +-----------+ . regress bs1 lagfpc in 2/14 Source | SS df MS Number of obs = 13 -------------+------------------------------ F( 1, 11) = 40.15 Model | .192820111 1 .192820111 Prob > F = 0.0001 Residual | .052830791 11 .004802799 R-squared = 0.7849 -------------+------------------------------ Adj R-squared = 0.7654 Total | .245650902 12 .020470908 Root MSE = .0693 ------------------------------------------------------------------------------ bs1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lagfpc | .3330058 .0525561 6.34 0.000 .2173307 .4486809 _cons | .0011669 .0414469 0.03 0.978 -.090057 .0923908 ------------------------------------------------------------------------------ . regress bs1 lagfpc in 2/14 [w=sws] (analytic weights assumed) (sum of wgt is 7.4917e+01) Source | SS df MS Number of obs = 13 -------------+------------------------------ F( 1, 11) = 51.80 Model | .232088381 1 .232088381 Prob > F = 0.0000 Residual | .049280978 11 .004480089 R-squared = 0.8249 -------------+------------------------------ Adj R-squared = 0.8089 Total | .28136936 12 .023447447 Root MSE = .06693 ------------------------------------------------------------------------------ bs1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lagfpc | .34022 .047269 7.20 0.000 .2361816 .4442584 _cons | -.0073843 .0354552 -0.21 0.839 -.0854207 .070652 ------------------------------------------------------------------------------ . est store so2f . . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * TSP regression equations L . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial tsp year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 12) = 0.666 Prob > F = 0.4305 . * . xtgls tsp year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(i) // GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: no autocorrelation Estimated covariances = 13 Number of obs = 186 Estimated autocorrelations = 0 Number of groups = 13 Estimated coefficients = 31 Obs per group: min = 11 avg = 14.30769 max = 15 Wald chi2(30) = 1115.99 Log likelihood = 12.09293 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ tsp | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year10 | -.2655434 .0870255 -3.05 0.002 -.4361102 -.0949766 year11 | -.1397931 .0923517 -1.51 0.130 -.320799 .0412129 year12 | -.5374798 .1022506 -5.26 0.000 -.7378873 -.3370723 year13 | -.5376365 .1058699 -5.08 0.000 -.7451376 -.3301354 year14 | -.3027803 .1197726 -2.53 0.011 -.5375303 -.0680302 year15 | -.4182201 .1370112 -3.05 0.002 -.6867571 -.1496831 year16 | -.3788465 .1532907 -2.47 0.013 -.6792907 -.0784024 year17 | -.6026104 .1635339 -3.68 0.000 -.9231309 -.2820898 year18 | -.7004854 .1625841 -4.31 0.000 -1.019144 -.3818263 year19 | -.7881465 .1643445 -4.80 0.000 -1.110256 -.4660372 year20 | -.8190185 .171505 -4.78 0.000 -1.155162 -.4828748 year21 | -.7790742 .1857573 -4.19 0.000 -1.143152 -.4149966 year22 | -.8364002 .1960818 -4.27 0.000 -1.220713 -.452087 year23 | -.9348198 .208856 -4.48 0.000 -1.34417 -.5254695 lagpc | .1442029 .096276 1.50 0.134 -.0444946 .3329004 lagndp | .127241 .0929041 1.37 0.171 -.0548477 .3093298 pgdp | .0123528 .0423922 0.29 0.771 -.0707345 .09544 pgdp2 | -.0002168 .0009102 -0.24 0.812 -.0020007 .0015671 city1 | .7365779 .1774151 4.15 0.000 .3888506 1.084305 city2 | .1989969 .1608059 1.24 0.216 -.1161769 .5141706 city3 | -.8498858 .0928624 -9.15 0.000 -1.031893 -.6678788 city4 | 1.429677 .1209038 11.82 0.000 1.19271 1.666644 city5 | .2070352 .1047261 1.98 0.048 .0017759 .4122945 city6 | -.1053329 .105621 -1.00 0.319 -.3123463 .1016804 city7 | -.0245087 .0845866 -0.29 0.772 -.1902954 .141278 city8 | -.4184274 .0815854 -5.13 0.000 -.5783318 -.2585229 city9 | -.2440992 .0603673 -4.04 0.000 -.362417 -.1257814 city10 | .5538959 .1206808 4.59 0.000 .3173659 .7904259 city11 | -.4187395 .0763136 -5.49 0.000 -.5683114 -.2691677 city12 | -.483911 .0846131 -5.72 0.000 -.6497495 -.3180724 _cons | -.2368494 .4776577 -0.50 0.620 -1.173041 .6993426 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 2.27 Prob > chi2 = 0.3207 . * . predict tsphat (option xb assumed; fitted values) . corr tsp tsphat (obs=186) | tsp tsphat -------------+------------------ tsp | 1.0000 tsphat | 0.9317 1.0000 . . est store tsp . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year10 year11 year12 year13 year14 year15 year16 year17 year18 y1 -.26554339 -.13979308 -.53747979 -.5376365 -.30278025 -.41822012 -.37884654 -.60261036 -.70048541 year19 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 y1 -.78814646 -.81901847 -.77907424 -.83640024 -.93481983 .14420289 .12724102 .01235275 -.00021681 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 .73657793 .19899686 -.84988575 1.429677 .20703519 -.10533293 -.0245087 -.41842737 -.24409923 city10 city11 city12 _cons y1 .55389592 -.41873953 -.48391097 -.23684939 . matrix define bt=e(b)' . matrix define V=e(V) . matrix st2=vecdiag(V)' . . svmat bt . svmat st2 . gen swt=1/sqrt(st2) (164 missing values generated) . . list bt1 in 1/14 +-----------+ | bt1 | |-----------| 1. | -.2655434 | 2. | -.1397931 | 3. | -.5374798 | 4. | -.5376365 | 5. | -.3027802 | |-----------| 6. | -.4182201 | 7. | -.3788465 | 8. | -.6026103 | 9. | -.7004854 | 10. | -.7881464 | |-----------| 11. | -.8190185 | 12. | -.7790743 | 13. | -.8364002 | 14. | -.9348198 | +-----------+ . arima bt1 lagfpc in 2/14 ,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = 4.4817498 Iteration 1: log likelihood = 4.7148533 Iteration 2: log likelihood = 4.8121288 Iteration 3: log likelihood = 4.8628307 Iteration 4: log likelihood = 4.9004181 (switching optimization to BFGS) Iteration 5: log likelihood = 4.9111782 Iteration 6: log likelihood = 5.0131448 Iteration 7: log likelihood = 5.0161883 Iteration 8: log likelihood = 5.0172895 Iteration 9: log likelihood = 5.0173068 Iteration 10: log likelihood = 5.017307 ARIMA regression Sample: 1983 to 1995 Number of obs = 13 Wald chi2(2) = 6.64 Log likelihood = 5.017307 Prob > chi2 = 0.0361 ------------------------------------------------------------------------------ | OPG bt1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bt1 | lagfpc | .0601291 .2417125 0.25 0.804 -.4136186 .5338769 _cons | -.5957794 .3788536 -1.57 0.116 -1.338319 .14676 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .8519008 .3429236 2.48 0.013 .179783 1.524019 -------------+---------------------------------------------------------------- /sigma | .1565103 .0632957 2.47 0.013 .0324531 .2805675 ------------------------------------------------------------------------------ . arima bt1 lagfpc in 2/14 [w=swt] ,ar(1) (importance weights assumed) (setting optimization to BHHH) Iteration 0: log likelihood = 23.451959 Iteration 1: log likelihood = 25.490851 Iteration 2: log likelihood = 25.962833 Iteration 3: log likelihood = 26.015453 Iteration 4: log likelihood = 26.056936 (switching optimization to BFGS) Iteration 5: log likelihood = 26.085415 Iteration 6: log likelihood = 26.145146 Iteration 7: log likelihood = 26.179621 Iteration 8: log likelihood = 26.183579 Iteration 9: log likelihood = 26.187718 Iteration 10: log likelihood = 26.188093 Iteration 11: log likelihood = 26.188329 Iteration 12: log likelihood = 26.18848 Iteration 13: log likelihood = 26.188482 ARIMA regression Sample: 1983 to 1995 Number of obs = 13 Wald chi2(2) = 270.52 Log likelihood = 26.18848 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ | OPG bt1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- bt1 | lagfpc | -.0817492 .0314025 -2.60 0.009 -.143297 -.0202015 _cons | -.4553169 .0193924 -23.48 0.000 -.4933252 -.4173085 -------------+---------------------------------------------------------------- ARMA | ar | L1 | .7218596 .0438889 16.45 0.000 .6358389 .8078803 -------------+---------------------------------------------------------------- /sigma | .1741086 .0091608 19.01 0.000 .1561536 .1920635 ------------------------------------------------------------------------------ . est store tspf . . . * . * . ******************************************************************************************************* . ******************************************************************************************************* . * . * O3 regression equations L . * . ******************************************************************************************************* . ******************************************************************************************************* . . * . * Do cross-sectional time series model . * . xtserial o3 year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 // test for serial correlation Wooldridge test for autocorrelation in panel data H0: no first-order autocorrelation F( 1, 12) = 36.323 Prob > F = 0.0001 . * . xtgls o3 year10-year23 lagpc lagndp pgdp pgdp2 city1-city12 , i(place) t(year) p(h) corr(psar1) force // > GLS model Cross-sectional time-series FGLS regression Coefficients: generalized least squares Panels: heteroskedastic Correlation: panel-specific AR(1) Estimated covariances = 13 Number of obs = 176 Estimated autocorrelations = 13 Number of groups = 13 Estimated coefficients = 31 Obs per group: min = 7 avg = 13.53846 max = 15 Wald chi2(30) = 656.81 Log likelihood = -89.46282 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ o3 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- year10 | .268932 .1428446 1.88 0.060 -.0110383 .5489023 year11 | .3472551 .1655355 2.10 0.036 .0228114 .6716988 year12 | .4905011 .184429 2.66 0.008 .1290269 .8519753 year13 | .1762359 .1929616 0.91 0.361 -.2019619 .5544337 year14 | .3456225 .2136725 1.62 0.106 -.073168 .764413 year15 | .8466883 .2410042 3.51 0.000 .3743287 1.319048 year16 | .9143741 .2646562 3.45 0.001 .3956574 1.433091 year17 | .9832616 .2712613 3.62 0.000 .4515993 1.514924 year18 | 1.483145 .2700686 5.49 0.000 .9538203 2.01247 year19 | .6129116 .2768725 2.21 0.027 .0702514 1.155572 year20 | .6863004 .2891381 2.37 0.018 .1196003 1.253001 year21 | 1.140619 .3138695 3.63 0.000 .5254464 1.755792 year22 | .9918504 .3348451 2.96 0.003 .335566 1.648135 year23 | 1.129665 .360366 3.13 0.002 .4233602 1.835969 lagpc | -.0604311 .1994997 -0.30 0.762 -.4514432 .3305811 lagndp | .0943071 .1622898 0.58 0.561 -.2237752 .4123893 pgdp | -.0156767 .0766311 -0.20 0.838 -.1658708 .1345174 pgdp2 | -.0011307 .0016596 -0.68 0.496 -.0043834 .0021219 city1 | .8471693 .3398827 2.49 0.013 .1810116 1.513327 city2 | .6232572 .3731906 1.67 0.095 -.1081829 1.354697 city3 | .4830668 .3762487 1.28 0.199 -.254367 1.220501 city4 | .6786037 .2534056 2.68 0.007 .1819378 1.17527 city5 | -.4149263 .2499195 -1.66 0.097 -.9047594 .0749068 city6 | -.2047745 .2699407 -0.76 0.448 -.7338485 .3242994 city7 | -.160027 .4329384 -0.37 0.712 -1.008571 .6885166 city8 | .4357638 .59701 0.73 0.465 -.7343543 1.605882 city9 | .256721 .2389563 1.07 0.283 -.2116248 .7250668 city10 | .0491934 .2781757 0.18 0.860 -.4960208 .5944077 city11 | -1.443832 .2397912 -6.02 0.000 -1.913814 -.9738501 city12 | -.178872 .2810872 -0.64 0.525 -.7297929 .3720488 _cons | .1902448 .920187 0.21 0.836 -1.613289 1.993778 ------------------------------------------------------------------------------ . test lagpc lagndp ( 1) lagpc = 0 ( 2) lagndp = 0 chi2( 2) = 1.80 Prob > chi2 = 0.4075 . * . predict o3hat (option xb assumed; fitted values) . corr o3 o3hat (obs=176) | o3 o3hat -------------+------------------ o3 | 1.0000 o3hat | 0.7080 1.0000 . . est store o3 . . matrix list e(b) // regress year betas on lagfpc e(b)[1,31] year10 year11 year12 year13 year14 year15 year16 year17 year18 y1 .26893198 .34725509 .49050111 .17623593 .34562248 .84668831 .91437407 .98326156 1.483145 year19 year20 year21 year22 year23 lagpc lagndp pgdp pgdp2 y1 .61291164 .68630044 1.1406192 .9918504 1.1296646 -.06043107 .09430705 -.0156767 -.00113075 city1 city2 city3 city4 city5 city6 city7 city8 city9 y1 .84716932 .62325721 .48306678 .67860369 -.41492631 -.20477452 -.160027 .43576384 .25672103 city10 city11 city12 _cons y1 .04919343 -1.4438322 -.17887203 .1902448 . matrix define bo=e(b)' . matrix define V=e(V) . matrix s2o=vecdiag(V)' . . svmat bo . svmat s2o . gen swo=1/sqrt(s2o) (164 missing values generated) . . list bo1 in 1/14 +----------+ | bo1 | |----------| 1. | .268932 | 2. | .3472551 | 3. | .4905011 | 4. | .1762359 | 5. | .3456225 | |----------| 6. | .8466883 | 7. | .9143741 | 8. | .9832616 | 9. | 1.483145 | 10. | .6129116 | |----------| 11. | .6863005 | 12. | 1.140619 | 13. | .9918504 | 14. | 1.129665 | +----------+ . regress bo1 lagfpc in 1/14 Source | SS df MS Number of obs = 14 -------------+------------------------------ F( 1, 12) = 5.07 Model | .582281722 1 .582281722 Prob > F = 0.0438 Residual | 1.37727742 12 .114773118 R-squared = 0.2971 -------------+------------------------------ Adj R-squared = 0.2386 Total | 1.95955914 13 .150735318 Root MSE = .33878 ------------------------------------------------------------------------------ bo1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lagfpc | .5237915 .2325477 2.25 0.044 .0171137 1.030469 _cons | .4021737 .1767554 2.28 0.042 .0170567 .7872906 ------------------------------------------------------------------------------ . regress bo1 lagfpc in 1/14 [w=swo] (analytic weights assumed) (sum of wgt is 5.9661e+01) Source | SS df MS Number of obs = 14 -------------+------------------------------ F( 1, 12) = 7.74 Model | .778916463 1 .778916463 Prob > F = 0.0166 Residual | 1.20689855 12 .100574879 R-squared = 0.3922 -------------+------------------------------ Adj R-squared = 0.3416 Total | 1.98581501 13 .152755001 Root MSE = .31714 ------------------------------------------------------------------------------ bo1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lagfpc | .5706377 .20505 2.78 0.017 .1238721 1.017403 _cons | .3332879 .145764 2.29 0.041 .0156954 .6508805 ------------------------------------------------------------------------------ . est store o3f . . . . . ****************************************************************************************** . * MAKE RESULTS TABLE: LATE SAMPLE . ****************************************************************************************** . est table co no2 so2 tsp o3, keep( lagpc lagndp pgdp pgdp2 ) t(%5.2f) b(%7.4f) stfmt(%9.2f) stats(N ll bic) style( > columns) +--------------------------------------------------------------------------+ | Variable | co | no2 | so2 | tsp | o3 | |--------------+-----------+-----------+-----------+-----------+-----------| | lagpc | 0.1216 | 0.0654 | 0.1328 | 0.1442 | -0.0604 | | | 1.02 | 0.42 | 1.04 | 1.50 | -0.30 | | lagndp | 0.0956 | 0.1281 | 0.0465 | 0.1272 | 0.0943 | | | 0.91 | 0.87 | 0.33 | 1.37 | 0.58 | | pgdp | -0.1940 | 0.1986 | -0.2158 | 0.0124 | -0.0157 | | | -3.89 | 3.70 | -3.46 | 0.29 | -0.20 | | pgdp2 | 0.0030 | -0.0034 | 0.0037 | -0.0002 | -0.0011 | | | 2.87 | -2.92 | 2.70 | -0.24 | -0.68 | |--------------+-----------+-----------+-----------+-----------+-----------| | N | 169.00 | 170.00 | 146.00 | 186.00 | 176.00 | | ll | 26.95 | 4.38 | 26.60 | 12.09 | -89.46 | | bic | 100.00 | 145.32 | 96.31 | 137.81 | 339.21 | +--------------------------------------------------------------------------+ legend: b/t . . est table cof no2f so2f tspf o3f, drop(_cons) t(%5.2f) b(%7.4f) stfmt(%9.2f) style(columns) +----------------------------------------------------------------+ | Variable | cof | no2f | so2f | tspf | o3f | |--------------+---------+---------+---------+---------+---------| | bco1 | | | | | | | lagfpc | -0.0479 | | | | | | | -1.53 | | | | | |--------------+---------+---------+---------+---------+---------| | ARMA | | | | | | | L.ar | 0.7894 | 0.7427 | | 0.7219 | | | | 15.58 | 14.05 | | 16.45 | | |--------------+---------+---------+---------+---------+---------| | bn1 | | | | | | | lagfpc | | -0.0639 | | | | | | | -1.68 | | | | |--------------+---------+---------+---------+---------+---------| | _ | | | | | | | lagfpc | | | 0.3402 | | 0.5706 | | | | | 7.20 | | 2.78 | |--------------+---------+---------+---------+---------+---------| | bt1 | | | | | | | lagfpc | | | | -0.0817 | | | | | | | -2.60 | | +----------------------------------------------------------------+ legend: b/t . . . . . end of do-file . exit, clear