1 y x y = α + x β+ε (1) x y (2) x y (1) (2) (1) y (2) x y (1) (2) y x y ε x 12 x y 3 3 β x β x 1 1 β 3 1
2 2 N y(n 1 ) x(n K ) y = E(y x) + u E(y x) y u(n 1 ) y = x β + u β Ordinary Least Squares:OLS (min u 2 ) Absolute Error Loss Minimization min u median 2 Asymmetric Absolute Loss Minimization:min(1 α) u if u < 0, min α u if u 0 α 0.5 Quantile Regression
3 2.1 y = α + x β + u min u 2 = min(y α x β) 2E(u) = 0 2E(xu) = 0 E(u) = 0 Cov(x, u) = 0 β = (V ar(x)) 1 Cov(x, y) = (x x) 1 x y α = E(y) E(x) β V ar(x) x x x nonsingular) Cov(x, y) x y Best Linear Unbiased Estimator: BLUE E(u x) = 0 y E(y x) = α + x β β (unbiased) 2 Goodness of Fit Coefficient of Determination R 2 R 2 = 1 n t=1û2 t n t=1 (y t y) 2 adjr 2 = 1 1 n n k t=1û2 t 1 n 1 n t=1 (y t y) 2 k 2 Amemiya (1985) 1991
4 t t t βi = β i β i0 (V ( β i )) 1/2 β i β i0 0 V ( β i ) ( β i β i0 ) V ar( β i ) n k t βi t t 2.2 conditionally heteroskedastic V (u i x i ) = E(u 2 i x i) = σi 2 x i Breusch and Pagan (1979) û 2 i = d 1 + d 2 z i2 + d 3 z i3 + d 4 z i4 +... + d l z il + v i û 2 i d j = 0 j = 2, 3, 4,...l z j ŷ i 3 White (1980) M xωx = p lim N 1 N i=1 u2 i x ix i u i û i = y i x i β 3 STATA Breusch-Pagan/Cook-Weisberg test for heteroskedasticity hettest z Davidson and MacKinnon (2004, p.269)
5 û i u i M xωx = N 1 N i=1û2 i x i x i = N 1 x Ωx Ω = Diag(û 2 i ) M xx = N 1 x x β V ( β OLS ) = (x x) 1 x Ωx(x x) 1 = ( N i=1 x ix i) 1 N i=1û2 i x i x i( N i=1 x ix i) 1 White(1980) heteroskedasticityrobust standard error t 2.3 y = x β + u E(uu ) = Ω Ω Ω nonsingular Ω = σ 2 I Ω σ 2 I Ψ Ω 1 = ΨΨ Ψ y = Ψ x β + Ψ u
6 β GLS = (x ΨΨ x) 1 x ΨΨ y = (x Ω 1 x) 1 x Ω 1 y Generalized Least Squares: GLS E(Ψ uu Ψ) = Ψ E(uu )Ψ = Ψ ΩΨ = Ψ (ΨΨ ) 1 Ψ = Ψ (Ψ ) 1 Ψ 1 Ψ = I Ω = Ω( β) β Feasible Generalizaed Least Squares: FGLS β F GLS = (x Ω 1 x) 1 x Ω 1 y Ω Σ Weighted Least Squares:WLS) β W LS = (x Σ 1 x) 1 x Σ 1 y Σ Ω WLS GLS FGLS GDP GDP 2.4
7 Quantile Regression 4 y q µ q y µ q q q = Pr(y µ q ) = F y (µ q ) F y y µ q = Fy 1 (q) y = x β + u µ q (x) = F 1 y x (q) q β q β Q N (β q ) = N i:y i x βq y i x iβ q + N i i:y i <x β(1 q) y i x iβ q i 5 3 Winklemann and Boes (2005) http://www.sts.uzh.ch/data/cobb.html (1959-95) Wooldridge (2003) 4 Koenker (2005) Koenker(2005) 5
8 (http://www.msu.edu/ ec/faculty/wooldridge/book2.htm) Living Standard Measurement Study 1997 5006 Cameron and Trivedi (2005) (http://cameron.econ.ucdavis.edu/mmabook/mma.html) 3.1 y = F (K, L) = AK α L β y A K L α + β 1 α + β > 1 α + β = 1 α + β < 1 ln y = ln A + α ln K + β ln L + u 1 OLS WLS GLS Genaralized Linear Model: GLM) OLS WLS GLS lnk t 1 Ramsey RESET test omitted variable 6 α + β = 1 F α + β < 1 1 (x, y) = (K/L, y/l) 1 1 6 y = x β + u z y = x β + z t + v t = 0 z y 2 x 2
9 3.2 3 c i = a + by i + u i ln c i = d + e ln y i + fi3 + v i ln c i = g + h ln y i + ε i c y i3 3 ln c = gc ln y = gy 2 1 0.997 0.779 2 0.998 0.956-0.002 2 2 3 h 0 2 0.571 7 3 2 Durbin-Watson 2 2 7
10 3 2 3 8 3 OLS ln hhex12m = 0.935 + 0.573 ln hh exp 1 ln hhex12m ln hh exp 1 0.57 OLS 3 10% 50% 90% 10% 0.151 t 2.74 50% 0.621(t 16.00) 90% 0.80(t 15.47) 4 8
11 5 STATA /**Production Function**/ use cobb.dta, clear /**data generation**/ gen k=exp(lnk) gen l=exp(lnl) gen y=exp(lny) gen pery=y/l gen perk=k/l /*Ordinary Least Squares:OLS */ reg lny lnk lnl test lnk+ lnl=1 hettest estimates store olssual reg lny lnk lnl, robust test lnk+ lnl=1 estimates store olsrobust /*Weighted Least Squares:WLS */ gen abslnk=abs(lnk)
12 reg lny lnk lnl [aweight=1/abslnk],robust/* */ test lnk+ lnl=1 estimates store wlsrobust gen abslnl=abs(lnl) reg lny lnk lnl [aweight=1/abslnl],robust/* */ test lnk+ lnl=1 /*Geleralized Least Squares:GLS */ gen lnksq=lnk*lnk reg lny lnk lnl [aweight=1/lnksq], robust/* */ predict lnyhat test lnk+ lnl=1 estimates store glsrobust gen lnlsq=lnl*lnl reg lny lnk lnl [aweight=1/lnlsq], robust/* */ test lnk+ lnl=1 /*Generalized Linear Models: GLM */ /*Maximum Likelihood Method*/ glm lny lnk lnl, family(gaussian) link(identity) glm lny lnk lnl, family(gaussian) link(identity) robust estimates store glmrobust /*table*/ estimates table olsrobust wlsrobust glsrobust, se stats(n r2) b(%7.3f) keep(lnk lnl cons) /*Graphics 1*/ twoway (scatter pery perk)(fpfit pery perk), /* */ytitle (Percapita Output) /* */xtitle(percapita Capital)/* */legend(label(1 Actual Percapita Output ) label(2 Predicted Percapita Output )) graph save Production.gph, replace /**Time series consumption function **/
13 use consump.dta, clear /**time series setting**/ tsset year /**regression**/ /*level regression*/ reg rcons i3 inf rdisp hettest dwstat reg c y predict chat hettest dwstat /*log linear regression*/ reg lc ly i3 predict lchat hettest dwstat /*dynamic linear regression*/ reg gc gy gc 1 gc 2 gy 1 gy 2 r3 r3 1 r3 2 hettest dwstat reg gc gy predict gcgy hettest dwstat /*graph*/ twoway (scatter lc ly)(line lchat ly) graph save consumption1.gph, replace /* */ twoway (scatter c y)(line chat y) graph save consumption0.gph, replace /* */
14 graph combine consumption0.gph consumption1.gph graph save TSconsumption.gph, replace /* */ /**Vietnam Living Standard Survey Data**/ use vietnam ex1.dta, clear reg lhhex12m lhhexp1 predict pols reg lhhex12m lhhexp1, robust twoway (scatter lhhex12m lhhexp1)(line pols lhhexp1), ytitle(log Household Total Expenditure) xtitle(log Household Medical Expenditure)/* */ legend(pos(11) ring(0) col(1)) legend(size(small)) /* */ legend( label(1 Actual Data ) label(2 Mean )) graph save consumption2.gph, replace /* */ * Bootstrap standard errors for OLS set seed 10101 * bs reg lnmed lntotal b[lntotal], reps(100) * (1) Quantile and median regression for quantiles 0.1, 0.5 and 0.9 * Save prediction to construct Figure 4.2. qreg lhhex12m lhhexp1, quant(.10) predict pqreg10 qreg lhhex12m lhhexp1, quant(.5) predict pqreg50 qreg lhhex12m lhhexp1, quant(.90) predict pqreg90 graph twoway (scatter lhhex12m lhhexp1) (lfit pqreg90 lhhexp1) /* */ (lfit pqreg50 lhhexp1) (lfit pqreg10 lhhexp1), /* */ xtitle( Log Household Medical Expenditure ) /* */ ytitle( Log Household Total Expenditure ) /* */ legend(pos(11) ring(0) col(1)) legend(size(small)) /* */ legend( label(1 Actual Data ) label(2 90th percentile ) /* */ label(3 Median ) label(4 10th percentile )) graph save consumption3.gph, replace /*Cameron and Trivedi (2005, Figure 4.2 p.90) 3 */ graph combine consumption2.gph consumption3.gph graph save CSconsumption.gph, replace /* */
15 [1] (2005) [2] 1991 [3] Amemiya, Takeshi.(1985) Advanced Econometrics, Blackwell. [4] Baum,Christopher F.(2006) An Introduction to Modern Econometrics using Stata, Stata Press. [5] Breusch, T.S. and Pagan,A.R.(1979) A Simple Test for Heteroskedasticity and Random Coefficient Variation, Econometrica, 47, pp.1287-1294. [6] Cameron, A.C. and Trivedi, P.K.(2005) Microeconometrics: Methods and Applications, Cambridge University Press. [7] Davidson, Russell and MacKinnon, James G.(2004) Econometric Theory and Methods, Oxford University Press. [8] Koenker, Roger. (2005) Quantile Regression, Cambridge University Press. [9] White, Hilbert.(1980) A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity, Econometrica, 48, pp.817-838, [10] Winklemann, Rainer and Boes, Stefan.(2005) Analysis of Microdata, Springer. [11] Wooldridge, Jeffrey. M.(2003) Econometric Analysis of Cross Section and Panel Data, The MIT Press
表 1 コブ ダグラス型生産関数の推定 被説明変数 :Iny OLS WLS GLS GLM Coef. Robust-t Coef. Robust-t Coef. Robust-t Coef. Robust-t 説明変数 lnk 0.347 7.75 0.343 7.96 0.340 8.14 0.347 8.03 lnl 0.414 11.75 0.407 11.03 0.397 10.23 0.414 12.18 _cons 0.450 1.53 0.509 1.71 0.571 1.91 0.450 1.58 観察値 30 30 30 30 F(2,27) 95.20 86.65 79.10 R-squared 0.875 0.88 0.882 Residual df 27 Scale prameter (1/df) Deviance (1/df) Pearson AIC BIC test Ink+Inl=1 Breusch-Pagan/Cook- Weisberg test for heteroskedasticity Ramsey RESET test F(1,27)=16.76 Prob>F=0.000 chi2(1)=0.25 Prob>chi2=0.6188 F(3,24)=1.48 Prob>F=0.246 F(1,27)=18.17 Prob>F=0.000 F(3,24)=1.76 Prob>F=0.182 F(1,27)=19.63 Prob>F=0.000 F(3,24)=2.10 Prob>F=0.127 0.240 0.240 0.240-0.802-91.187
表 2 時系列データによる消費関数の推定 説明変数 被説明変数 観察値 R-squared Adj R-squared Root MSE Breusch-Pagan/Cook- Weisberg test for heteroskedasticity Ramsey RESET test c lc gc Coef. t Coef. t Coef. t y 0.779 112.79 ly 0.956 109.03 i3-0.002-3.00 gy 0.571 8.47 _cons 463.179 4.69 0.229 2.81 0.008 4.25 Durbin-Watson statistic 37 0.997 0.997 133.09 chi2(1)=1.14 Prob>chi2=0.285 F(3,32)=10.02 Prob>F=0.000 37 0.998 0.998 0.011 chi2(1)=0.36 Prob>chi2=0.550 F(3,31)=10.02 Prob>F=0.000 (2,37)=0.804 (3,37)=0.686 36 0.679 0.669 0.007 chi2(1)=1.23 Prob>chi2=0.267 F(3,31)=3.67 Prob>F=0.023 (2,36)=2.115
図 1 一人当たり生産量 Percapita Output 0.5 1 1.5 0 2 4 6 8 Percapita Capital Actual Percapita Output Predicted Percapita Output
図 2 一人当たり消費量と可処分所得の関係 8000 10000 12000 14000 16000 8.8 9 9.2 9.4 9.6 8000 10000 12000 14000 16000 18000 per capita real disp. inc. 9 9.2 9.4 9.6 9.8 log(y) per capita real cons. Fitted values log(c) Fitted values
図 3 家計医療費支出と総家計消費支出の関係 Log Household Total Expenditure 0 5 10 15 Actual Data Mean Log Household Total Expenditure 0 5 10 15 Actual Data 90th percentile Median 10th percentile 6 8 10 12 Log Household Medical Expenditure 6 8 10 12 Log Household Medical Expenditure