MLE Topic
MLE Topic
2. Important Notes.
3
2. Important Notes
4
2. Important Notes
1 1 2
መ
exp − 2 𝑦𝑖 − 𝛼ො − 𝛽𝑋
𝜎 2𝜋 2𝜎
1 1 2
exp − 2 𝜀
𝜎 2𝜋 2𝜎
5
3. Maximum Likelihood Estimator (Normal Distribution)
ML Steps:
6
3. Maximum Likelihood Estimator (Normal Distribution)
1. Simple Form
ML Steps:
1. Normal Distribution
2. PDF function
1 1 2
exp − 2 መ
𝑦𝑖 − 𝛼ො − 𝛽𝑋 .
𝜎 2𝜋 2𝜎
7
3. Maximum Likelihood Estimator (Normal Distribution)
1. Simple Form
ML Steps:
3. Insert Joint:
1 1 2
𝐿 𝜃 = 𝑁
Π𝑖=1 መ
exp − 2 ∑ 𝑦𝑖 − 𝛼ො − 𝛽𝑋
𝜎 2𝜋 2𝜎
𝑁
1 1 2
𝐿 𝜃 = መ
− 2 ∑ 𝑦𝑖 − 𝛼ො − 𝛽𝑋
𝜎 2𝜋 2𝜎
8
3. Maximum Likelihood Estimator (Normal Distribution)
1. Simple Form
4. Get 𝑙 𝜃
1 2
መ
𝑙 𝜃 = −𝑁 ln 𝜎 − 𝑁 𝑙𝑛 2Π − 2 ∑ 𝑌𝑖 − 𝛼ො − 𝛽𝑋
2𝜎
4. Get 𝑙 𝜃
1
መ
𝑙 𝜃 = −𝑁 ln 𝜎 − 𝑁 𝑙𝑛 2Π − 2 (𝑌 − 𝑋𝛽)′(𝑌 መ
− 𝑋𝛽)
2𝜎
10
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
(1)Gradient Vector:
1
መ
𝑙 𝜃 = −𝑁 ln 𝜎 − 𝑁 𝑙𝑛 2Π − 2 (𝑌 − 𝑋𝛽)′(𝑌 መ
− 𝑋𝛽)
2𝜎
𝜕𝑙
𝜕𝑙 𝜕𝛽መ
𝐺𝑟𝑎𝑑𝑖𝑒𝑛𝑡 𝑉𝑒𝑐𝑡𝑜𝑟 = =
𝜕𝜃 𝜕𝑙
𝜕𝜎ො
12
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
1
መ
𝑙 𝜃 = −𝑁 ln 𝜎 − 𝑁 𝑙𝑛 2Π − 2 (𝑌 − 𝑋𝛽)′(𝑌 መ
− 𝑋𝛽)
2𝜎
1
𝑙 𝜃 = −𝑁 ln 𝜎 − 𝑁 𝑙𝑛 2Π − 2 (𝑌 ′ 𝑌 + 𝛽መ ′ 𝑋 ′ 𝑋𝛽 − 2𝛽′ 𝑋 ′ 𝑌 )
2𝜎
𝜕𝑙 1
= − 2 𝑋 ′ 𝑋𝛽መ − 𝑋 ′ 𝑌 → (1)
𝜕𝛽መ 𝜎
13
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
1
𝑙 𝜃 = −𝑁 ln 𝜎 − 𝑁 𝑙𝑛 2Π − 2 (𝜀 ′ 𝜀)
2𝜎
𝜕𝑙 𝑁 𝜀′𝜀
= − + 3 → (2)
𝜕𝜎ො 𝜎 𝜎
1
− 2 𝑋 ′ 𝑋𝛽 − 𝑋 ′ 𝑌
∇𝐺 = 𝜎
𝑁 𝜀′𝜀
− + 3
𝜎 𝜎
14
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
𝜕2𝑙 𝜕2𝑙
𝜕𝛽𝜕𝛽′ 𝜕𝛽𝜕𝜎
𝐻=
𝜕2𝑙 𝜕2𝑙
𝜕𝜎𝜕𝛽 𝜕𝜎𝜕𝜎′
𝑎 𝑏
𝐻=
𝑐 𝑑
15
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
𝜕𝑙 1
= − 2 𝑋 ′ 𝑋𝛽መ − 𝑋 ′ 𝑌 → (1)
𝜕𝛽መ 𝜎
𝜕2𝑙 𝑋′𝑋
𝑎 = =− 2
𝜕𝛽𝜕𝛽′ 𝜎
16
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
𝜕𝑙 1
= − 2 𝑋 ′ 𝑋𝛽መ − 𝑋 ′ 𝑌 → (1)
𝜕𝛽መ 𝜎
𝜕2𝑙 2
𝑏=𝑐= = 3 (𝑋 ′ 𝑋𝛽መ − 𝑋 ′ 𝑌)
𝜕𝛽𝜕𝜎 𝜎
2 2 ′
= − 3 (𝑋 𝑌 − 𝑋𝛽መ = − 3 𝑋 𝜀
′
𝜎 𝜎
17
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
𝜕𝑙 𝑁 𝜀 ′𝜀
= − + 3 → (2)
𝜕𝜎ො 𝜎 𝜎
𝜕2𝑙 𝑁 𝜀 ′𝜀 𝑁 3𝜎 2 𝑁
𝑑= = 2−3 4 = 2−
𝜕𝜎𝜕𝜎′ 𝜎 𝜎 𝜎 𝜎4
𝑁 3𝑁 2𝑁
= 2− 2 =− 2
𝜎 𝜎 𝜎
18
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
𝑋′𝑋 2 ′
− 2 − 3𝑋 𝜀
𝐻= 𝜎 𝜎
2 ′ 2𝑁
− 3𝑋 𝜀 − 2
𝜎 𝜎
19
4. Evaluation of MLE (Normal Distribution)
1. Introduction for further Matrices.
𝑋′𝑋
0
𝐼 = −𝐸 𝐻 𝜃 = 𝜎2
2𝑁
0
𝜎2
20
4. Evaluation of MLE (Normal Distribution)
2. Trinity Tests
(1)Likelihood Ratio Test:
𝐻𝑜 : 𝑙 𝜃 ∗ = 𝑙 𝜃𝑖
𝐿 𝜃𝑖
𝐿𝑅 = −2
𝐿(𝜃 ∗ )
𝐿𝑅 = 2 𝑙 𝜃 ∗ − 𝑙 𝜃𝑖 ~𝜒𝑟2
𝑟: 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑅𝑒𝑠𝑡𝑟𝑖𝑐𝑡𝑖𝑜𝑛𝑠.
𝐷𝑒𝑐𝑖𝑠𝑖𝑜𝑛:
𝐿𝑅 > 𝜒𝑟2 → 𝑊𝑒 𝑅𝑒𝑗𝑒𝑐𝑡 𝐻𝑜
21
4. Evaluation of MLE (Normal Distribution)
2. Trinity Tests
𝐻𝑜 : 𝜃 ∗ = 𝜃𝑖
𝑊 = 𝜃 ∗ − 𝜃𝑖 ′ 𝐼(𝜃) (𝜃 ∗ − 𝜃𝑖 )
𝐼 𝜃 = 𝑉 𝜃 ∗ −1
In Stata 𝜃 is composed only from 𝛼ො and 𝛽መ
𝑊 = 𝜃 ∗ − 𝜃𝑖 ′ 𝑉 𝜃∗ −1 (𝜃 ∗ − 𝜃𝑖 )
22
4. Evaluation of MLE (Normal Distribution)
2. Trinity Tests
′
𝑊= ∇𝜃
𝐼 𝜃 ∇𝑔
𝑊 = ∇′𝜃 𝑉 𝜃 ∗ −1 ∇𝑔
23
24