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

Similar documents
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

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

卒業論文

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

% 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

こんにちは由美子です

こんにちは由美子です

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

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

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

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

最小2乗法

untitled

28

こんにちは由美子です

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

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

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

こんにちは由美子です

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

CVaR

tokei01.dvi

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


10

,, Poisson 3 3. t t y,, y n Nµ, σ 2 y i µ + ɛ i ɛ i N0, σ 2 E[y i ] µ * i y i x i y i α + βx i + ɛ i ɛ i N0, σ 2, α, β *3 y i E[y i ] α + βx i

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

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

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

BR001

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

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

Isogai, T., Building a dynamic correlation network for fat-tailed financial asset returns, Applied Network Science (7):-24, 206,

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

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

(pdf) (cdf) Matlab χ ( ) F t

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

201711grade1ouyou.pdf

II (2011 ) ( ) α β û i R

seminar0220a.dvi

I L01( Wed) : Time-stamp: Wed 07:38 JST hig e, ( ) L01 I(2017) 1 / 19

名称未設定

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

H22 BioS (i) I treat1 II treat2 data d1; input group patno treat1 treat2; cards; ; run; I

浜松医科大学紀要

分布

kubostat7f p GLM! logistic regression as usual? N? GLM GLM doesn t work! GLM!! probabilit distribution binomial distribution : : β + β x i link functi

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

²¾ÁÛ¾õ¶·É¾²ÁË¡¤Î¤¿¤á¤Î¥Ñ¥Ã¥±¡¼¥¸DCchoice ¡Ê»ÃÄêÈÇ¡Ë

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

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

6.1 (P (P (P (P (P (P (, P (, P.101

6.1 (P (P (P (P (P (P (, P (, P.

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

自由集会時系列part2web.key

³ÎΨÏÀ

σ 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

A B P (A B) = P (A)P (B) (3) A B A B P (B A) A B A B P (A B) = P (B A)P (A) (4) P (B A) = P (A B) P (A) (5) P (A B) P (B A) P (A B) A B P

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

renshumondai-kaito.dvi

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

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

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

分散分析・2次元正規分布

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


ばらつき抑制のための確率最適制御

Microsoft Word - 信号処理3.doc

時系列解析

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

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

.3. (x, x = (, u = = 4 (, x x = 4 x, x 0 x = 0 x = 4 x.4. ( z + z = 8 z, z 0 (z, z = (0, 8, (,, (8, 0 3 (0, 8, (,, (8, 0 z = z 4 z (g f(x = g(

untitled

( ) (, ) arxiv: hgm OpenXM search. d n A = (a ij ). A i a i Z d, Z d. i a ij > 0. β N 0 A = N 0 a N 0 a n Z A (β; p) = Au=β,u N n 0 A

untitled

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

151021slide.dvi

Studies of Foot Form for Footwear Design (Part 9) : Characteristics of the Foot Form of Young and Elder Women Based on their Sizes of Ball Joint Girth

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

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

2 1,2, , 2 ( ) (1) (2) (3) (4) Cameron and Trivedi(1998) , (1987) (1982) Agresti(2003)

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


基礎数学I

DVIOUT-ar

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

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

!!! 2!

9 1 (1) (2) (3) (4) (5) (1)-(5) (i) (i + 1) 4 (1) (2) (3) (4) (5) (1)-(2) (1)-(5) (5) 1

( 28 ) ( ) ( ) 0 This note is c 2016, 2017 by Setsuo Taniguchi. It may be used for personal or classroom purposes, but not for commercial purp

waseda2010a-jukaiki1-main.dvi

THE INSTITUTE OF ELECTRONICS, INFORMATION AND COMMUNICATION ENGINEERS TECHNICAL REPORT OF IEICE.

ii

2

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


DAA12

医系の統計入門第 2 版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 第 2 版 1 刷発行時のものです.

Transcription:

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

81 λ λ λ = 1 n n X i = X λ λ X λ E(X) = V(X) = λ E( λ) = E( 1 n n X i ) = 1 n n E(X i ) = 1 n n λ = λ

82 n n n V( λ) = V( 1 n X i ) = 1 n 2 V(X i ) = 1 n 2 λ = λ n 1 ( ) 2 log f (X; λ) ne λ 1 = ( ) 2 = (X log λ λ log X!) ne λ = λ 2 ne[(x λ) 2 ] = λ2 nv(x) = λ2 nλ = λ n 1 [( X ) 2] ne λ 1 V( λ) = 1 ( ) 2 log f (X; λ) ne λ V( λ) λ

83 n f (x i ; λ) = λ n x i e nλ n x i! = λnx e nλ (nx)! (nx)! n x i! = g(x; λ) h(x 1, x 2,, x n ) E(X) = λ, V(X) = λ n P( X λ > ɛ) < λ nɛ 2 6.1 AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 )

84 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 2, V(y t y t 1, y t 2, ) = σ 2 3. Thus, y t y t 1, y t 2, N(0, σ 2 ). = Conditional distribution of y t given y t 1, y t 2, 4. The stationarity condition is: the solution of φ(x) = 1 φx = 0, i.e., x = 1/φ, is greater than one in absolute value, or equivalently, φ < 1. 5. Rewriting the AR(1) model, y t = φy t 1 + ɛ t

85 = φ 2 y t 2 + ɛ t + φɛ t 1 = φ 3 y t 3 + ɛ t + φɛ t 1 + φ 2 ɛ t 2. = φ s y t s + ɛ t + φɛ t 1 + + φ s 1 ɛ t s+1. As s is large, φ s approaches zero. = Stationarity condition 6. For stationarity, y t = φy t 1 + ɛ t is rewritten as: y t = ɛ t + φɛ t 1 + φ 2 ɛ t 2 + 7. Mean of y t E(y t ) = E(ɛ t + φɛ t 1 + φ 2 ɛ t 2 + ) = E(ɛ t ) + φe(ɛ t 1 ) + φ 2 E(ɛ t 2 ) + = 0

86 8. Variance of y t 9. Thus, y t N ( 0, 10. Estimation of AR(1) model: (a) Log-likelihood function V(y t ) = V(ɛ t + φɛ t 1 + φ 2 ɛ t 2 + ) = V(ɛ t ) + V(φɛ t 1 ) + V(φ 2 ɛ t 2 ) + = σ 2 (1 + φ 2 + φ 4 + ) = σ2 1 φ 2 σ 2 1 ρ 2 ). = Unconditional distribution of yt log f (y T,, y 1 ) = log f (y 1 ) + T log f (y t y t 1,, y 1 ) t=1 = 1 2 log(2π) 1 ( ) 2 log σ 2 1 1 φ 2 σ 2 /(1 φ 2 ) y2 1

87 T 1 log(2π) T 1 log(σ 2 ) 1 2 2 σ 2 T (y t φy t 1 ) 2 t=2 = T 2 log(2π) T 2 log(σ2 ) 1 ( ) 2 log 1 1 φ 2 1 2σ 2 /(1 φ 2 ) y2 1 1 T (y 2σ 2 t φy t 1 ) 2 Note as follows: ) 1 f (y 1 ) = ( 2πσ2 /(1 φ 2 ) exp 1 2σ 2 /(1 φ 2 ) y2 1 ( 1 f (y t y t 1,, y 1 ) = exp 1 ) 2πσ 2 2σ (y 2 t φy t 1 ) 2 t=2 log f (y T,, y 1 ) = T 1 σ 2 2 σ + 1 2 2σ 4 /(1 φ 2 ) y2 1 + 1 2σ 4 T (y t φy t 1 ) 2 = 0 t=2

88 log f (y T,, y 1 ) φ = φ 1 φ 2 + φ σ 2 y2 1 + 1 σ 2 T (y t φy t 1 )y t 1 = 0 The MLE of φ and σ 2 satisfies the above two equation. t=2

89 6.2 2 y t = X t β + u t, u t = ρu t 1 + ɛ, ɛ t N(0, σ 2 ) Log of distribution function of u t log f (u T,, u 1 ) = log f (u 1 ) + T log f (u t u t 1,, y 1 ) t=1 = 1 2 log(2π) 1 ( ) 2 log σ 2 1 1 ρ 2 σ 2 /(1 ρ 2 ) u2 1 T 1 2 log(2π) T 1 2 log(σ 2 ) 1 σ 2 T (u t ρu t 1 ) 2 t=2 = T 2 log(2π) T 2 log(σ2 ) 1 ( ) 2 log 1 1 ρ 2 1 2σ 2 /(1 ρ 2 ) u2 1 1 T (u 2σ 2 t ρu t 1 ) 2 t=2

90 Log of distribution function of y t log f (y T,, y 1 ) T = log f (y 1 ) + log f (y t y t 1,, y 1 ) t=1 = 1 2 log(2π) 1 ( ) 2 log σ 2 1 1 ρ 2 σ 2 /(1 ρ 2 ) (y 1 X 1 β) 2 T T 1 2 log(2π) T 1 2 log(σ 2 ) 1 σ 2 t=2 = T 2 log(2π) T 2 log(σ2 ) 1 ( ) 2 log 1 1 ρ 2 ( (yt X t β) ρ(y t 1 X t 1 β) ) 2 1 2σ 2 T (y t Xt β) 2, t=2 where 1 ρ2 y y t, for t = 1, t = y t ρy t 1, for t = 2, 3,, T, 1 ρ2 X Xt t, for t = 1, = X t ρx t 1, for t = 2, 3,, T,

91 log f (y T,, y 1 ) is maximized with respect to β, ρ and σ 2. OLS, AR(1), AR(1)+X StataSE Data Data Editor Excel 123,456 123456 var1, var2, var3,... command Y= + X+ Z reg Y X Z results Y, X, Z

92 gen t=_n tsset t t reg Y X Z dwstat scatter Y X X Y line Y X time time X Y Stata (2007 3 ) \2,940 (1995) t x y 1 10 6 2 12 9 3 14 10 4 16 10

93. gen t=_n. tsset t. reg y x Source SS df MS Number of obs = 4 -------------+------------------------------ F( 1, 2) = 7.35 Model 8.45 1 8.45 Prob > F = 0.1134 Residual 2.3 2 1.15 R-squared = 0.7860 -------------+------------------------------ Adj R-squared = 0.6791 Total 10.75 3 3.58333333 Root MSE = 1.0724 ------------------------------------------------------------------------------ y Coef. Std. Err. t P> t [95% Conf. Interval] -------------+---------------------------------------------------------------- x.65.2397916 2.71 0.113 -.3817399 1.68174 _cons.3 3.163068 0.09 0.933-13.30958 13.90958 ------------------------------------------------------------------------------. arima y, ar(1) nocons (setting optimization to BHHH) Iteration 0: log likelihood = -10.213007

94 Iteration 1: log likelihood = -9.8219683 Iteration 2: log likelihood = -9.7761938 Iteration 3: log likelihood = -9.6562972 Iteration 4: log likelihood = -9.5973095 (switching optimization to BFGS) Iteration 5: log likelihood = -9.5850964 Iteration 6: log likelihood = -9.5799049 Iteration 7: log likelihood = -9.5770119 Iteration 8: log likelihood = -9.5770099 Iteration 9: log likelihood = -9.5770099 ARIMA regression Sample: 1-4 Number of obs = 4 Wald chi2(1) = 101.94 Log likelihood = -9.57701 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ OPG y Coef. Std. Err. z P> z [95% Conf. Interval] -------------+---------------------------------------------------------------- ARMA ar L1..9759129.096657 10.10 0.000.7864686 1.165357 -------------+---------------------------------------------------------------- /sigma 1.812458.8837346 2.05 0.020.0803696 3.544545 ------------------------------------------------------------------------------ Note: The test of the variance against zero is one sided, and the two-sided confidence interval is truncated at zero.

95. arima y x,ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = -4.3799561 Iteration 1: log likelihood = -4.3799068 (backed up) Iteration 2: log likelihood = -4.379678 (backed up) Iteration 3: log likelihood = -4.3796767 (backed up) Iteration 4: log likelihood = -4.3796761 (backed up) (switching optimization to BFGS) Iteration 5: log likelihood = -4.3796757 (backed up) Iteration 6: log likelihood = -4.3235592 Iteration 7: log likelihood = -4.2798453 Iteration 8: log likelihood = -4.2471467 Iteration 9: log likelihood = -4.239353 Iteration 10: log likelihood = -4.2384456 Iteration 11: log likelihood = -4.238435 Iteration 12: log likelihood = -4.238435 ARIMA regression Sample: 1-4 Number of obs = 4 Wald chi2(2) = 1001.98 Log likelihood = -4.238435 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ OPG y Coef. Std. Err. z P> z [95% Conf. Interval] -------------+----------------------------------------------------------------

y x.635658.0583723 10.89 0.000.5212505.7500656 _cons.6512199..... -------------+---------------------------------------------------------------- ARMA ar L1. -.5631492 2.177484-0.26 0.796-4.830939 3.704641 -------------+---------------------------------------------------------------- /sigma.6656358.7509811 0.89 0.188 0 2.137532 ------------------------------------------------------------------------------ Note: The test of the variance against zero is one sided, and the two-sided confidence interval is truncated at zero. 96

97 7 Qualitative Dependent Variable ( ) 1. Discrete Choice Model ( ) 2. Limited Dependent Variable Model ( ) 3. Count Data Model ( ) Usually, the regression model is given by: y i = X i β + u i, u i N(0, σ 2 ), i = 1, 2,, n, where y i is a continuous type of random variable within the interval from to. When y i is discrete or truncated, what happens?

98 7.1 Discrete Choice Model ( ) 7.1.1 Binary Choice Model ( ) Example 1: Consider the regression model: y i = X i β + u i, u i (0, σ 2 ), i = 1, 2,, n, where y i is unobserved, but y i is observed as 0 or 1, i.e., y i = Consider the probability that y i takes 1, i.e., 1, if y i > 0, 0, if y i 0. P(y i = 1) = P(y i > 0) = P(u i > X i β) = P(u i > X i β ) = 1 P(u i X i β ) = 1 F( X i β ) = F(X i β ), (if the dist. of u i is symmetric.),