第11回:線形回帰モデルのOLS推定

Similar documents
第13回:交差項を含む回帰・弾力性の推定

Stata11 whitepapers mwp-037 regress - regress regress. regress mpg weight foreign Source SS df MS Number of obs = 74 F(

最小2乗法

4 OLS 4 OLS 4.1 nurseries dual c dual i = c + βnurseries i + ε i (1) 1. OLS Workfile Quick - Estimate Equation OK Equation specification dual c nurser

第2回:データの加工・整理

Stata 11 Stata ts (ARMA) ARCH/GARCH whitepaper mwp 3 mwp-083 arch ARCH 11 mwp-051 arch postestimation 27 mwp-056 arima ARMA 35 mwp-003 arima postestim

28

<4D F736F F D20939D8C7689F090CD985F93C18EEA8D758B E646F63>

BR001

AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 ) 1. Mean of y t given y t 1, y t 2, E(y t y t 1, y t 2, ) = φy t 1 2. Variance of y t given y t 1, y t

卒業論文

80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = i=1 i=1 n λ x i e λ i=1 x i! = λ n i=1 x i e nλ n i=1 x

こんにちは由美子です

(lm) lm AIC 2 / 1

4.9 Hausman Test Time Fixed Effects Model vs Time Random Effects Model Two-way Fixed Effects Model

y i OLS [0, 1] OLS x i = (1, x 1,i,, x k,i ) β = (β 0, β 1,, β k ) G ( x i β) 1 G i 1 π i π i P {y i = 1 x i } = G (

ECCS. ECCS,. ( 2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file e

1 Stata SEM LightStone 3 2 SEM. 2., 2,. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press.

計量経済分析 2011 年度夏学期期末試験 担当 : 別所俊一郎 以下のすべてに答えなさい. 回答は日本語か英語でおこなうこと. 1. 次のそれぞれの記述が正しいかどうか判定し, 誤りである場合には理由, あるいはより適切な 記述はどのようなものかを述べなさい. (1) You have to wo

第6回:データセットの結合

1 Stata SEM LightStone 4 SEM 4.. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press 3.

k2 ( :35 ) ( k2) (GLM) web web 1 :

% 10%, 35%( 1029 ) p (a) 1 p 95% (b) 1 Std. Err. (c) p 40% 5% (d) p 1: STATA (1). prtesti One-sample test of pr

1 15 R Part : website:

Rによる計量分析:データ解析と可視化 - 第3回 Rの基礎とデータ操作・管理

kubostat2017c p (c) Poisson regression, a generalized linear model (GLM) : :

Stata 11 whitepaper mwp 4 mwp mwp-028 / 41 mwp mwp mwp-079 functions 72 mwp-076 insheet 89 mwp-030 recode 94 mwp-033 reshape wide

Stata User Group Meeting in Kyoto / ( / ) Stata User Group Meeting in Kyoto / 21

.. est table TwoSLS1 TwoSLS2 GMM het,b(%9.5f) se Variable TwoSLS1 TwoSLS2 GMM_het hi_empunion totchr

Stata 11 Stata ROC whitepaper mwp anova/oneway 3 mwp-042 kwallis Kruskal Wallis 28 mwp-045 ranksum/median / 31 mwp-047 roctab/roccomp ROC 34 mwp-050 s

s = 1.15 (s = 1.07), R = 0.786, R = 0.679, DW =.03 5 Y = 0.3 (0.095) (.708) X, R = 0.786, R = 0.679, s = 1.07, DW =.03, t û Y = 0.3 (3.163) + 0

Microsoft Word - 計量研修テキスト_第5版).doc

1 12 *1 *2 (1991) (1992) (2002) (1991) (1992) (2002) 13 (1991) (1992) (2002) *1 (2003) *2 (1997) 1

Vol. 42 No pp Headcount ratio p p A B pp.29

2 Tobin (1958) 2 limited dependent variables: LDV 2 corner solution 2 truncated censored x top coding censor from above censor from below 2 Heck

201711grade2.pdf

7. フィリップス曲線 経済統計分析 (2014 年度秋学期 ) フィリップス曲線の推定 ( 経済理論との関連 ) フィリップス曲線とは何か? 物価と失業の関係 トレード オフ 政策運営 ( 財政 金融政策 ) への含意 ( 計量分析の手法 ) 関数形の選択 ( 関係が直線的でない場合の推定 ) 推

Microsoft Word - 計量研修テキスト_第5版).doc

Microsoft Word - 計量研修テキスト_第5版).doc

回帰分析 単回帰

untitled

こんにちは由美子です

TS002

Stata 11 Stata VAR VEC whitepaper mwp 4 mwp-084 var VAR 14 mwp-004 varbasic VAR 25 mwp-005 svar VAR 31 mwp-007 vec intro VEC 47 mwp-008 vec VEC 75 mwp

第9回 日経STOCKリーグレポート 審査委員特別賞<地域の元気がでるで賞>

DAA09

.3 ˆβ1 = S, S ˆβ0 = ȳ ˆβ1 S = (β0 + β1i i) β0 β1 S = (i β0 β1i) = 0 β0 S = (i β0 β1i)i = 0 β1 β0, β1 ȳ β0 β1 = 0, (i ȳ β1(i ))i = 0 {(i ȳ)(i ) β1(i ))

一般化線形 (混合) モデル (2) - ロジスティック回帰と GLMM

untitled

: (EQS) /EQUATIONS V1 = 30*V F1 + E1; V2 = 25*V *F1 + E2; V3 = 16*V *F1 + E3; V4 = 10*V F2 + E4; V5 = 19*V99

10

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

X X X Y R Y R Y R MCAR MAR MNAR Figure 1: MCAR, MAR, MNAR Y R X 1.2 Missing At Random (MAR) MAR MCAR MCAR Y X X Y MCAR 2 1 R X Y Table 1 3 IQ MCAR Y I

Microsoft Word - 計量研修テキスト_第5版).doc

R John Fox R R R Console library(rcmdr) Rcmdr R GUI Windows R R SDI *1 R Console R 1 2 Windows XP Windows * 2 R R Console R ˆ R


151021slide.dvi

自由集会時系列part2web.key

講義のーと : データ解析のための統計モデリング. 第3回


kubostat2018d p.2 :? bod size x and fertilization f change seed number? : a statistical model for this example? i response variable seed number : { i

こんにちは由美子です

σ t σ t σt nikkei HP nikkei4csv H R nikkei4<-readcsv("h:=y=ynikkei4csv",header=t) (1) nikkei header=t nikkei4csv 4 4 nikkei nikkei4<-dataframe(n

untitled

こんにちは由美子です

インターネットを活用した経済分析 - フリーソフト Rを使おう

kubostat2017b p.1 agenda I 2017 (b) probability distribution and maximum likelihood estimation :

untitled

Microsoft Word - 計量研修テキスト_第5版).doc

kubostat2015e p.2 how to specify Poisson regression model, a GLM GLM how to specify model, a GLM GLM logistic probability distribution Poisson distrib

1. 2 Blank and Winnick (1953) 1 Smith (1974) Shilling et al. (1987) Shilling et al. (1987) Frew and Jud (1988) James Shilling Voith (1992) (Shilling e

Excelにおける回帰分析(最小二乗法)の手順と出力

Use R

講義のーと : データ解析のための統計モデリング. 第5回

オーストラリア研究紀要 36号(P)☆/3.橋本

PowerPoint プレゼンテーション

R による共和分分析 1. 共和分分析を行う 1.1 パッケージ urca インスツールする 共和分分析をするために R のパッケージ urca をインスツールする パッケージとは通常の R には含まれていない 追加的な R のコマンドの集まりのようなものである R には追加的に 600 以上のパッ

03.Œk’ì

(p.2 ( ) 1 2 ( ) Fisher, Ronald A.1932, 1971, 1973a, 1973b) treatment group controll group (error function) 2 (Legendre, Adrian

10:30 12:00 P.G. vs vs vs 2

1 Stata SEM LightStone 1 5 SEM Stata Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press. Introduc

R Console >R ˆ 2 ˆ 2 ˆ Graphics Device 1 Rcmdr R Console R R Rcmdr Rcmdr Fox, 2007 Fox and Carvalho, 2012 R R 2

kubostat2017e p.1 I 2017 (e) GLM logistic regression : : :02 1 N y count data or

GLM PROC GLM y = Xβ + ε y X β ε ε σ 2 E[ε] = 0 var[ε] = σ 2 I σ 2 0 σ 2 =... 0 σ 2 σ 2 I ε σ 2 y E[y] =Xβ var[y] =σ 2 I PROC GLM

chap10.dvi

読めば必ずわかる 分散分析の基礎 第2版

事例研究(ミクロ経済政策・問題分析III) -規制産業と料金・価格制度-

9 8 7 (x-1.0)*(x-1.0) *(x-1.0) (a) f(a) (b) f(a) Figure 1: f(a) a =1.0 (1) a 1.0 f(1.0)

1 kawaguchi p.1/81

Microsoft Word - StatsDirectMA Web ver. 2.0.doc

Dependent Variable: LOG(GDP00/(E*HOUR)) Date: 02/27/06 Time: 16:39 Sample (adjusted): 1994Q1 2005Q3 Included observations: 47 after adjustments C -1.5

パネル・データの分析

k3 ( :07 ) 2 (A) k = 1 (B) k = 7 y x x 1 (k2)?? x y (A) GLM (k

Microsoft PowerPoint - TA報告(7)

renshumondai-kaito.dvi

211 ‚æ2fiúŒÚ

J1順位と得点者数の関係分析

seminar0220a.dvi

7 ( 7 ( Workfile Excel hatuden 1000kWh kion_average kion_max kion_min date holiday *1 obon 7.1 Workfile 1. Workfile File - New -

II (2011 ) ( ) α β û i R

Transcription:

11 OLS 2018 7 13 1 / 45

1. 2. 3. 2 / 45

n 2 ((y 1, x 1 ), (y 2, x 2 ),, (y n, x n )) linear regression model y i = β 0 + β 1 x i + u i, E(u i x i ) = 0, E(u i u j x i ) = 0 (i j), V(u i x i ) = σ 2, i = 1, 2,, n 3 / 45

y i explained variable e.g., dependent variable x i explanation variable e.g., independent variable β 0, β 1 regression coefficient β0 constant term u i error term disturbance term x i stochastic 4 / 45

1 simple regression model E(u i x i ) = 0 E(y i x i ) = β 0 + β 1 x i. x i y i conditional mean E(y i x i ) y i x i regress β 0 β 1 5 / 45

y O x 6 / 45

y u 5 u 7 u 2 u 3 u 4 u 6 u 1 β 0 β 1 O x 7 / 45

n ei 2 = i=1 y i = ˆβ 0 + ˆβ 1 x i + e i n ) 2 (y i ˆβ 0 ˆβ 1 x i i=1 ˆβ 0 ˆβ 1 e i residual ui n ei 2 i Ordinary Least Squares, OLS 8 / 45

OLS OLS OLS estimator OLS OLS estimate OLS ˆβ 0 = ȳ ˆβ 1 x, ni=1 (x i x) (y i ȳ) ˆβ 1 = ni=1 (x i x) 2. ȳ = 1 n x = 1 n n y i. i=1 n x i. i=1 9 / 45

multiple regression model k y i = β 0 + β 1 x i1 + β 2 x i2 + + β k x ik + u i, i = 1, 2,, n. 10 / 45

y 1 = β 0 + β 1 x 11 + β 2 x 12 + + β k x 1k + u 1, y 2 = β 0 + β 1 x 21 + β 2 x 22 + + β k x 2k + u 2,. y n = β 0 + β 1 x n1 + β 2 x n2 + + β k x nk + u n. y 1 y 2. y n = 1 x 11 x 12 x 1k 1 x 21 x 22 x 2k....... 1 x n1 x n2 x nk β 0 β 1 β 2. β n + u 1 u 2.. u n 11 / 45

y 1 1 x 11 x 12 x 1k β 0 y = y 2., X = 1 x 21 x 22 x 2k β 1......., β = β 2, y n 1 x n1 x n2 x nk. β n u 1 u = u 2. u n y = X β + u, E(u X) = 0, V(u X) = σ 2 I n. 12 / 45

n ei 2 = e e = i=1 y = X ˆβ + e, ( ) ( ) y X ˆβ y X ˆβ, OLS ˆβ = (X X) 1 X y. e = e 1 e 2.. e n 13 / 45

OLS E(u X) = 0. σ 2 0 0 0 σ 2 0 V(u X) =..... = σ 2 I. n. 0 0 σ 2 u X N ( 0, σ 2 I n ). 14 / 45

c i = β 0 + β 1 y i + u i (1) ci : y i : c i = β 0 + β 1 y i + β 2 m i + u i (2) mi : 15 / 45

1 1. Stata 2. File Log Begin... 2018microdata1 lecture20180713.smcl 3. File Open 4. consumption2009.dta 16 / 45

5. Statistics Linear models and related Linear regression 6. Model Dependent variable: expenditure_th expenditure_th 7. Independent variable: income_th income_th 17 / 45

8. Reporting Set table formats 9. Coef/SE/CI Decimal format 2 decimals 2 10. p-value Decimal format 3 decimals p 3 11. Test statistic Decimal format 2 decimals t 2 12. Format settings for coefficient tables OK 13. regress - Linear regression OK 18 / 45

Coef.: Std. Err.: t: 0 t t P> t : p Number of obs: R-squared: Adj R-squared: 19 / 45

R-squared ni=1 R 2 (ŷ i ȳ) 2 ni=1 = ni=1 (y i ȳ) 2 = 1 ei 2 ni=1 (y i ȳ) 2. k ŷ i = ˆβ 0 + ˆβ 1 x i1 + ˆβ 2 x i2 + + ˆβ k x ik. 0 R 2 1. R 2 = 0 : R 2 = 1 : R 2 = 0 R 2 = 1 20 / 45

R 2 R 2 R 2 adjusted R-squared ( R 2 = 1 1 R 2) n 1 n k 1. R 2 R 2 21 / 45

standard error j OLS ˆβ j ( ) [ ] e s.e. ˆβ j = e n k 1 (X X) 1. j,j i V(u i X) 22 / 45

V(u i X) heteroskedasticity robust standard error Stata White regress - Linear regression SE/Robust Standard error type: Robust Bias correction n/n-k Stata White 23 / 45

u i Stata R 2 R 2 24 / 45

β j j = 0, 1, 2,, k H 0 : β j = 0 vs H 1 : β j 0 25 / 45

H 0 0 0 0 H 0 0 0 0 26 / 45

p p 0.1 10% H 0 p 0.05 5% H 0 p 0.01 1% H 0 27 / 45

t β j = 0 H 0 t t = ˆβ j ( ) t(n k 1). s.e. ˆβ j t 2 H 0 % H 0 t p 28 / 45

2 1. Statistics Linear models and related Linear regression 2. SE/Robust Standard error type: Robust White 3. OK 29 / 45

0.45 1% H0 78.68 1% H0 0 R 2 = 0.3132. 31% R 2 pp.16, 28 30 / 45

3 1. Statistics Linear models and related Linear regression 2. Model Independent variable: deposit_th income_th deposit_th Back space 3. SE/Robust Standard error type: Default standard errors 4. OK 31 / 45

4 1. Statistics Linear models and related Linear regression 2. SE/Robust Standard error type: Robust White 3. OK 32 / 45

0.43 1% H0 1 0.02 H0 5% H0 80.43 1% H0 0 33 / 45

R 2 = 0.3179. R 2 32% White t 34 / 45

t p R 2 R 2 Note *** ** * 1% 5% 10% 35 / 45

Note Note 2 4 t p t 2 p R 2 R 2 3 36 / 45

5 1. Word results20180713.docx 2018microdata1 2. 7 6 3. 4. OK 1 5. 1 37 / 45

6. 2 2 2 3 t 2 5 2 6 t 7. 2 2 2 7 8. 3 1 4 1 5 1 6 1 9. 3 1 6 1 38 / 45

10. 1 1 2 1 11. 1 2 1 4 1 12. 1 5 1 7 2 39 / 45

13. Stata income_th Word 1 Edit Copy income_th const coef. t t Number of obs Adj R-squared 6 2 40 / 45

14. t p P> t 0.01 *** 0.05 ** 0.10 * 15. 3 2 6 3 16. 3 4 5 4 41 / 45

17. Stata income_th deposit_th Word 2 Edit Copy deposit_th 6 6 18. t p 0.01 *** 0.05 ** 0.10 * 42 / 45

19. 3 5 6 6 20. 3 7 5 7 43 / 45

21. Word 1 *** ** 1% 5% 2 3 92 2018microdata1 1 10% 44 / 45

6 1. File Log Close 2. Stata lecture20180713.smcl 2018microdata1 3. lecture20180713.smcl 45 / 45