___ ____ ____ ____ ____ tm /__ / ____/ / ____/ ___/ / /___/ / /___/ 8.2 Copyright 1984-2005 Statistics/Data Analysis StataCorp 4905 Lakeway Drive College Station, Texas 77845 USA 800-STATA-PC http://www.stata.com 979-696-4600 stata@stata.com 979-696-4601 (fax) 20-student Stata for Windows (network) perpetual license: Serial number: 1980535145 Licensed to: Economics UC Santa Cruz Notes: 1. (/m# option or -set memory-) 29.30 MB allocated to data 2. Stata running in batch mode . do "D:\Kitty\pprobit.do" . /* Chapter 2 Empirical Testing B: Panel Probit Model > Jamus Jerome Lim > May 5, 2005 */ . . * Open * . . clear . set more off . set mem 100m (102400k) . set matsize 500 . log using "D:\kitty\pprobit.log", replace . use "D:\kitty\raw.dta" . . * Generate additional variables * . . ren political_risk polrisk . sort country time . gen year = int(time/100) . gen month = int(time-year*100) . gen day = 1 . gen etime = mdy(month, day, year) . format etime %dn/CY . drop year month day . gen lm = ln(m) (8 missing values generated) . gen lf = ln(f) (1 missing value generated) . gen ld = ln(d) . gen ly = ln(y) (1842 missing values generated) . gen lpolrisk = ln(polrisk) (50 missing values generated) . gen lpolrisklag1 = lpolrisk[_n-1] (51 missing values generated) . gen lpolrisklag2 = lpolrisk[_n-2] (52 missing values generated) . gen dpolrisk = lpolrisk - lpolrisk[_n-1] (75 missing values generated) . gen di = i - i[_n-1] (5 missing values generated) . gen distar = istar - istar[_n-1] (1 missing value generated) . gen dm = lm - lm[_n-1] (10 missing values generated) . gen df = lf - lf[_n-1] (3 missing values generated) . gen dd = ld - ld[_n-1] (1 missing value generated) . gen dy = ly - ly[_n-3] (1860 missing values generated) . drop if time==199501 (25 observations deleted) . . * Provide descriptive statistics * . . sum de i istar lm lf ld ly Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- de | 2350 .6859562 3.122676 -18.78147 45.64358 i | 2348 13.70197 12.2046 .1 67 istar | 2350 4.40234 1.427369 .83 6 lm | 2342 8.470215 2.388665 3.679427 13.89747 lf | 2349 8.129679 2.127142 1.731372 12.74768 -------------+-------------------------------------------------------- ld | 2350 9.71831 2.644571 4.255184 14.29011 ly | 520 8.527267 2.985042 4.558498 13.95498 . sort regime . by regime: sum de i istar lm lf ld ly --------------------------------------------------------------------------------------------------------- -> regime = 0 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- de | 2150 .6046125 2.861446 -18.78147 45.64358 i | 2149 13.79339 12.50765 .1 67 istar | 2150 4.396637 1.434335 .83 6 lm | 2143 8.406127 2.387675 3.679427 13.82734 lf | 2149 8.189664 2.110566 1.731372 12.74768 -------------+-------------------------------------------------------- ld | 2150 9.645785 2.629117 4.255184 14.29011 ly | 482 8.469594 2.993394 4.558498 13.95498 --------------------------------------------------------------------------------------------------------- -> regime = 1 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- de | 200 1.560401 5.083453 -14.75669 31.84359 i | 199 12.71473 8.209134 .5 60 istar | 200 4.46365 1.352115 .83 6 lm | 199 9.160369 2.294024 4.296545 13.89747 lf | 200 7.485139 2.202113 2.302865 11.98541 -------------+-------------------------------------------------------- ld | 200 10.49796 2.690957 4.829058 14.28129 ly | 38 9.258805 2.812343 4.578826 13.15348 . corr de i istar lm lf ld ly if regime==1 (obs=37) | de i istar lm lf ld ly -------------+--------------------------------------------------------------- de | 1.0000 i | 0.2794 1.0000 istar | -0.0050 0.1833 1.0000 lm | 0.3737 0.3676 0.1691 1.0000 lf | -0.3697 -0.5893 -0.1819 -0.2910 1.0000 ld | 0.3490 0.2292 0.1425 0.9589 -0.1254 1.0000 ly | -0.2649 -0.4017 0.0551 0.2366 0.6382 0.3822 1.0000 . corr de i istar lm lf ld ly if regime==0 (obs=478) | de i istar lm lf ld ly -------------+--------------------------------------------------------------- de | 1.0000 i | 0.2408 1.0000 istar | 0.1629 0.0847 1.0000 lm | -0.1053 0.1191 -0.0832 1.0000 lf | 0.0185 -0.3507 -0.0686 -0.4542 1.0000 ld | -0.0904 0.1440 -0.0728 0.9641 -0.3693 1.0000 ly | 0.0418 -0.0837 -0.0413 0.1709 0.4673 0.2767 1.0000 . sort dev . by dev: sum de i istar lm lf ld ly --------------------------------------------------------------------------------------------------------- -> dev = 0 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- de | 658 .2742259 2.642228 -13.93715 12.06604 i | 657 5.559067 3.488874 .1 16.949 istar | 658 4.40234 1.428151 .83 6 lm | 650 7.701006 2.38156 4.775866 12.02742 lf | 658 9.760326 1.19758 7.775015 12.74768 -------------+-------------------------------------------------------- ld | 658 9.188669 2.892284 6.186011 13.53788 ly | 217 8.45649 2.888977 5.186687 13.17373 --------------------------------------------------------------------------------------------------------- -> dev = 1 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- de | 1504 .898962 3.076682 -18.78147 36.10835 i | 1503 18.63537 12.59769 3.299 67 istar | 1504 4.40234 1.42754 .83 6 lm | 1504 8.559746 2.386642 3.679427 13.89747 lf | 1503 7.089176 1.821974 1.731372 10.79847 -------------+-------------------------------------------------------- ld | 1504 9.644603 2.518372 4.255184 14.29011 ly | 244 7.98135 3.106546 4.558498 13.95498 --------------------------------------------------------------------------------------------------------- -> dev = 2 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- de | 188 .4229661 4.565884 -15.30925 45.64358 i | 188 2.717872 1.479457 .38 5 istar | 188 4.40234 1.430876 .83 6 lm | 188 10.41347 .210837 10.05767 10.97756 lf | 188 10.7409 .4451843 9.622947 11.40011 -------------+-------------------------------------------------------- ld | 188 12.16171 .6736173 11.09214 13.37025 ly | 59 11.04527 .7043222 9.944006 12.00605 . . preserve /* Plot graphs */ . keep if (country==11) . graph de polrisk etime, t1("Exchange Rate, Political Risk & Regime Switches, Japan") b2("Time") l1("% > Change Exchange Rate") r1("Political Risk") xlab(12785,13149,13515,13880,14245,14610,14976,15341,15707 > ) ylab(-15,-5,5,15,25,35) symbol(.o) c(ll) sort xline (12874,12904,14153,14245) rescale saving (figure1 > a, replace) . restore . preserve . keep if (country==12) . graph de polrisk etime, t1("Exchange Rate, Political Risk & Regime Switches, Korea") b2("Time") l1("% > Change Exchange Rate") r1("Political Risk") xlab(12785,13149,13515,13880,14245,14610,14976,15341,15707 > ) ylab(-15,-5,5,15,25,35) symbol(.o) c(ll) sort xline(13788,14245) rescale saving (figure1b, replace) . restore . preserve . keep if (country==19) . graph de polrisk etime, t1("Exchange Rate, Political Risk & Regime Switches, Sierra Leone") b2("Time" > ) l1("% Change Exchange Rate") r1("Political Risk") xlab(12785,13149,13515,13880,14245,14610,14976,1534 > 1,15707) ylab(-15,-5,5,15,25,35) symbol(.o) c(ll) sort xline(12935,12996,13027,13088,13574,13635,13727, > 13849,13880,13939,14396,14518,14549,14610,14701,14762,14915,15066,15310,15341,15461,15522) rescale savi > ng (figure1c, replace) . restore . . * Regression analysis * . . * Benchmark regressions * . . * Columns (B1) & (B2) * . xtgee regime lpolrisk dm, fam(binomial) link(probit) corr(indep) i(country) nolog robust GEE population-averaged model Number of obs = 2317 Group variable: country Number of groups = 25 Link: probit Obs per group: min = 85 Family: binomial avg = 92.7 Correlation: independent max = 93 Wald chi2(2) = 15.06 Scale parameter: 1 Prob > chi2 = 0.0005 Pearson chi2(2317): 2317.34 Deviance = 1320.12 Dispersion (Pearson): 1.000148 Dispersion = .569755 (standard errors adjusted for clustering on country) ------------------------------------------------------------------------------ | Semi-robust regime | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lpolrisk | -1.033053 .298608 -3.46 0.001 -1.618313 -.4477916 dm | -.6300426 .7565871 -0.83 0.405 -2.112926 .8528408 _cons | 2.965531 1.260825 2.35 0.019 .49436 5.436702 ------------------------------------------------------------------------------ . estimates store B1, title(Benchmark, B1) . xtgee regime lpolrisk di distar dm df dd, fam(binomial) link(probit) corr(indep) i(country) nolog robus > t GEE population-averaged model Number of obs = 2311 Group variable: country Number of groups = 25 Link: probit Obs per group: min = 85 Family: binomial avg = 92.4 Correlation: independent max = 93 Wald chi2(6) = 25.40 Scale parameter: 1 Prob > chi2 = 0.0003 Pearson chi2(2311): 2305.77 Deviance = 1307.80 Dispersion (Pearson): .9977367 Dispersion = .5659021 (standard errors adjusted for clustering on country) ------------------------------------------------------------------------------ | Semi-robust regime | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lpolrisk | -1.035518 .2977542 -3.48 0.001 -1.619105 -.4519303 di | .0046497 .0259172 0.18 0.858 -.0461471 .0554464 distar | -.1233966 .2002525 -0.62 0.538 -.5158842 .2690911 dm | -.2855606 .7263394 -0.39 0.694 -1.70916 1.138039 df | -.1057927 .4252319 -0.25 0.804 -.9392319 .7276465 dd | -1.186429 .9634717 -1.23 0.218 -3.074799 .7019409 _cons | 2.975936 1.251044 2.38 0.017 .5239351 5.427938 ------------------------------------------------------------------------------ . estimates store B2, title(Benchmark, B2) . . * Columns (B3), (B4) & (B5) * . xtgee regime lpolrisk dm, fam(binomial) link(probit) corr(exchangeable) i(country) nolog robust GEE population-averaged model Number of obs = 2317 Group variable: country Number of groups = 25 Link: probit Obs per group: min = 85 Family: binomial avg = 92.7 Correlation: exchangeable max = 93 Wald chi2(2) = 5.47 Scale parameter: 1 Prob > chi2 = 0.0649 (standard errors adjusted for clustering on country) ------------------------------------------------------------------------------ | Semi-robust regime | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lpolrisk | -.5260294 .2781408 -1.89 0.059 -1.071175 .0191167 dm | -.2548373 .7054512 -0.36 0.718 -1.637496 1.127822 _cons | .8353984 1.20691 0.69 0.489 -1.530103 3.200899 ------------------------------------------------------------------------------ . estimates store B3, title(Benchmark, B3) . xtgee regime lpolrisk di distar dm df dd, fam(binomial) link(probit) corr(exchangeable) i(country) nolo > g robust GEE population-averaged model Number of obs = 2311 Group variable: country Number of groups = 25 Link: probit Obs per group: min = 85 Family: binomial avg = 92.4 Correlation: exchangeable max = 93 Wald chi2(6) = 7.45 Scale parameter: 1 Prob > chi2 = 0.2816 (standard errors adjusted for clustering on country) ------------------------------------------------------------------------------ | Semi-robust regime | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lpolrisk | -.48766 .2830393 -1.72 0.085 -1.042407 .0670869 di | .0064411 .0276525 0.23 0.816 -.0477568 .060639 distar | -.1029556 .1966496 -0.52 0.601 -.4883816 .2824705 dm | -.0671997 .7016289 -0.10 0.924 -1.442367 1.307968 df | -.0822398 .4369878 -0.19 0.851 -.9387201 .7742404 dd | -.5682264 .6928106 -0.82 0.412 -1.92611 .7896575 _cons | .6736613 1.221666 0.55 0.581 -1.72076 3.068083 ------------------------------------------------------------------------------ . estimates store B4, title(Benchmark, B4) . xtgee regime lpolrisk di distar dm df dd dy, fam(binomial) link(probit) corr(exchangeable) i(country) n > olog robust GEE population-averaged model Number of obs = 508 Group variable: country Number of groups = 16 Link: probit Obs per group: min = 11 Family: binomial avg = 31.8 Correlation: exchangeable max = 78 Wald chi2(7) = 13.40 Scale parameter: 1 Prob > chi2 = 0.0629 (standard errors adjusted for clustering on country) ------------------------------------------------------------------------------ | Semi-robust regime | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lpolrisk | -.9774585 1.053282 -0.93 0.353 -3.041852 1.086935 di | .0136265 .0345417 0.39 0.693 -.0540739 .0813269 distar | .0771479 .2975824 0.26 0.795 -.5061028 .6603987 dm | -.6715446 1.449902 -0.46 0.643 -3.5133 2.17021 df | -1.263031 .9778903 -1.29 0.196 -3.179661 .6535988 dd | -.3279273 .6636766 -0.49 0.621 -1.628709 .972855 dy | -1.053078 .512318 -2.06 0.040 -2.057202 -.0489527 _cons | 2.788859 4.607346 0.61 0.545 -6.241373 11.81909 ------------------------------------------------------------------------------ . estimates store B5, title(Benchmark, B5) . . * Columns (B6), (B7) & (B8) * . xtgee regime lpolrisk lpolrisklag1 di distar dm df dd, fam(binomial) link(probit) corr(exchangeable) i( > country) nolog robust GEE population-averaged model Number of obs = 2286 Group variable: country Number of groups = 25 Link: probit Obs per group: min = 84 Family: binomial avg = 91.4 Correlation: exchangeable max = 92 Wald chi2(7) = 13.50 Scale parameter: 1 Prob > chi2 = 0.0608 (standard errors adjusted for clustering on country) ------------------------------------------------------------------------------ | Semi-robust regime | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lpolrisk | -2.90402 1.125293 -2.58 0.010 -5.109554 -.6984851 lpolrisklag1 | 2.508158 1.254036 2.00 0.045 .0502931 4.966024 di | .0099645 .0242154 0.41 0.681 -.0374967 .0574258 distar | -.1053888 .2000316 -0.53 0.598 -.4974435 .286666 dm | -.0958887 .6965796 -0.14 0.891 -1.46116 1.269382 df | -.0950506 .4352886 -0.22 0.827 -.9482005 .7580993 dd | -.6428156 .7989977 -0.80 0.421 -2.208822 .9231911 _cons | .2895234 1.33589 0.22 0.828 -2.328773 2.90782 ------------------------------------------------------------------------------ . estimates store B6, title(Benchmark, B6) . xtgee regime lpolrisk lpolrisklag1 lpolrisklag2 di distar dm df dd, fam(binomial) link(probit) corr(exc > hangeable) i(country) nolog robust GEE population-averaged model Number of obs = 2261 Group variable: country Number of groups = 25 Link: probit Obs per group: min = 83 Family: binomial avg = 90.4 Correlation: exchangeable max = 91 Wald chi2(8) = 15.68 Scale parameter: 1 Prob > chi2 = 0.0472 (standard errors adjusted for clustering on country) ------------------------------------------------------------------------------ | Semi-robust regime | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lpolrisk | -3.098123 1.059606 -2.92 0.003 -5.174913 -1.021333 lpolrisklag1 | 1.260184 1.804741 0.70 0.485 -2.277042 4.797411 lpolrisklag2 | 1.460862 1.583509 0.92 0.356 -1.642758 4.564482 di | .0131049 .0255642 0.51 0.608 -.0369999 .0632097 distar | -.1181535 .2014006 -0.59 0.557 -.5128915 .2765845 dm | -.1993003 .7582088 -0.26 0.793 -1.685362 1.286762 df | -.110196 .4468821 -0.25 0.805 -.9860688 .7656769 dd | -.6262989 .7975033 -0.79 0.432 -2.189377 .9367789 _cons | .2053128 1.472739 0.14 0.889 -2.681203 3.091829 ------------------------------------------------------------------------------ . estimates store B7, title(Benchmark, B7) . xtgee regime dpolrisk di distar dm df dd, fam(binomial) link(probit) corr(exchangeable) i(country) nolo > g robust GEE population-averaged model Number of obs = 2286 Group variable: country Number of groups = 25 Link: probit Obs per group: min = 84 Family: binomial avg = 91.4 Correlation: exchangeable max = 92 Wald chi2(6) = 6.63 Scale parameter: 1 Prob > chi2 = 0.3560 (standard errors adjusted for clustering on country) ------------------------------------------------------------------------------ | Semi-robust regime | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- dpolrisk | -2.710417 1.262392 -2.15 0.032 -5.184659 -.2361748 di | .0108014 .0254657 0.42 0.671 -.0391104 .0607132 distar | -.0888589 .2003691 -0.44 0.657 -.4815751 .3038572 dm | -.09239 .7008252 -0.13 0.895 -1.465982 1.281202 df | -.0876527 .4606195 -0.19 0.849 -.9904503 .8151449 dd | -.6322941 .8100743 -0.78 0.435 -2.220011 .9554222 _cons | -1.369175 .1206348 -11.35 0.000 -1.605614 -1.132735 ------------------------------------------------------------------------------ . estimates store B8, title(Benchmark, B8) . estimates clear . estout * using D:\kitty\output\table1.tex, replace style(tex) varlabels(_cons Constant) cells (b(star f > mt(%9.3f)) se(par fmt(%9.2f))) stats (r2 r2_p chi2 N, labels("R$^2$" "Pseudo R$^2$" "$\chi^2$" "N")) st > arlevels(* 0.10 ** 0.05 *** 0.01) estimation result * not found r(111); end of do-file r(111);