panel data analysis - share - raziskava o zdravju, …€¦ · 2 (i) basic panel commands in stata...
TRANSCRIPT
![Page 1: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/1.jpg)
Tim Birkenbach (MEA)
19/10/2017
SHARE User Workshop Ljubljana 2017
PANEL DATA ANALYSIS USING STATA
![Page 2: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/2.jpg)
2
(I) Basic panel commands in Stata • xtset • xtdescribe • reshape
(II)Panel analysis popular in Economics • Pooled OLS • Fixed-Effects Model & Difference-in-Difference • Random Effects Model
Outline
1
![Page 3: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/3.jpg)
3
xtset
2
![Page 4: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/4.jpg)
4
// declare panel data structure xtset panelvar timevar
xtset
3
![Page 5: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/5.jpg)
5 1
xtdescribe
![Page 6: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/6.jpg)
6
reshape
5
long
wide
![Page 7: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/7.jpg)
7
// reshape format: long -> wide reshape wide health, i(mergeid) j(wave)
reshape
1
![Page 8: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/8.jpg)
8
// reshape format: wide -> long reshape long health, i(mergeid) j(wave)
reshape
1
![Page 9: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/9.jpg)
9
gen original = 1 reshape wide health original, i(mergeid) j(wave) reshape long health original, i(mergeid) j(wave) keep if original == 1
reshape
1
![Page 10: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/10.jpg)
10
(I) Basic panel commands in Stata • xtset • xtdescribe • reshape
(II)Panel analysis popular in Economics • Pooled OLS • Fixed-Effects Model & Difference-in-Difference • Random Effects Model
Outline
9
![Page 11: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/11.jpg)
11
between & within estimator
Y (health)
t=1 t=2
between estimate
within estimate
R1
R1
R2
10
X (working)
X (retired)
![Page 12: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/12.jpg)
12
(I) Basic panel commands in Stata • xtset • xtdescribe • reshape
(II)Panel analysis popular in Economics • Pooled OLS • Fixed-Effects Model & Difference-in-Difference • Random Effects Model
Outline
11
![Page 13: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/13.jpg)
13
Pooled Ordinary Least Squares (POLS)
12
wave 4
wave 5
wave 6
+
+
wave 4
wave 5
wave 6 =
![Page 14: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/14.jpg)
14
Pooled Ordinary Least Squares (POLS)
t=1 t=2
between estimate
R2
R2
R3
13
R1
R3
R1
mean
mean
Y (health)
X (working)
X (retired)
![Page 15: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/15.jpg)
15
Pooled Ordinary Least Squares (POLS)
14
𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛽𝛽0 + 𝛿𝛿𝑖𝑖 + 𝛽𝛽1𝑥𝑥𝑖𝑖𝑖𝑖 + 𝜀𝜀𝑖𝑖𝑖𝑖
time effect multiple lines per respondent i
𝜺𝜺 dependent ?
![Page 16: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/16.jpg)
16
Pooled Ordinary Least Squares (POLS)
15
𝜀𝜀 independent 𝜀𝜀 dependent
- cluster by respondent
- serial correlation
![Page 17: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/17.jpg)
17
// POLS reg health retired // + cluster robust inference reg health retired , cluster(id) // + linear time trend reg health retired wave , cluster(id) // + period effect reg health retired i.wave , cluster(id)
Pooled Ordinary Least Squares (POLS)
16
![Page 18: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/18.jpg)
18
Pooled Ordinary Least Squares (POLS)
1
![Page 19: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/19.jpg)
19
(I) Basic panel commands in Stata • xtset • xtdescribe • reshape
(II)Panel analysis popular in Economics • Pooled OLS • Fixed-Effects Model & Difference-in-Difference • Random Effects Model
Outline
18
![Page 20: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/20.jpg)
20
Fixed Effects Estimation (FE)
19
𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛽𝛽1𝑥𝑥𝑖𝑖𝑖𝑖 + 𝑢𝑢𝑖𝑖 + 𝑒𝑒𝑖𝑖𝑖𝑖
𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛽𝛽1𝑥𝑥𝑖𝑖𝑖𝑖 + 𝜀𝜀𝑖𝑖𝑖𝑖
𝑦𝑦𝑖𝑖𝑖𝑖 − 𝑦𝑦𝑖𝑖� = 𝛽𝛽1 𝑥𝑥𝑖𝑖𝑖𝑖 − 𝑥𝑥𝑖𝑖� + (𝑢𝑢𝑖𝑖 − 𝑢𝑢𝑖𝑖� ) + (𝑒𝑒𝑖𝑖𝑖𝑖 − 𝑒𝑒𝑖𝑖� )
�̈�𝑦𝑖𝑖𝑖𝑖 = 𝛽𝛽1�̈�𝑥𝑖𝑖𝑖𝑖 + �̈�𝑒𝑖𝑖𝑖𝑖
error decomposition
within transformstion
if 𝐶𝐶𝑜𝑜𝑜𝑜 𝑥𝑥𝑖𝑖𝑖𝑖, 𝜀𝜀𝑖𝑖𝑖𝑖 ≠ 0 for any t, POLS is biased
![Page 21: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/21.jpg)
21
within transformation
Fixed Effects Estimation (FE)
20
0
within transformation
![Page 22: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/22.jpg)
22
Fixed Effects Estimation (FE)
t=1 t=2
within estimate
R2
R2
R3
21
R1
R3
R1
Y (health)
X (working)
X (retired)
![Page 23: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/23.jpg)
23
Fixed Effects Estimation (FE)
22
// declare panel data structure xtset id wave // FE xtreg health retired , fe // + cluster robust inference xtreg health retired , fe cluster(id)
![Page 24: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/24.jpg)
24
Fixed Effects Estimation (FE)
23
![Page 25: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/25.jpg)
25
Difference-in-Difference (DID)
t=1 t=2
parallel trend assumption
24
R2 R2
R1
R1
R1
counterfactual
DID estimate
Y (health)
X (working)
X (retired)
![Page 26: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/26.jpg)
26
Difference-in-Difference (DID)
1
𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛽𝛽1𝑥𝑥𝑖𝑖𝑖𝑖 + 𝛿𝛿𝑖𝑖 + 𝑢𝑢𝑖𝑖 + 𝑒𝑒𝑖𝑖𝑖𝑖
𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛽𝛽1𝑥𝑥𝑖𝑖𝑖𝑖 + 𝛿𝛿𝑖𝑖 + 𝜀𝜀𝑖𝑖𝑖𝑖
𝑦𝑦𝑖𝑖𝑖𝑖 − 𝑦𝑦𝑖𝑖� = 𝛽𝛽1 𝑥𝑥𝑖𝑖𝑖𝑖 − 𝑥𝑥𝑖𝑖� + (𝛿𝛿𝑖𝑖 − 𝛿𝛿𝑖𝑖� ) + (𝑢𝑢𝑖𝑖 − 𝑢𝑢𝑖𝑖� ) + (𝑒𝑒𝑖𝑖𝑖𝑖 − 𝑒𝑒𝑖𝑖� )
�̈�𝑦𝑖𝑖𝑖𝑖 = 𝛽𝛽1�̈�𝑥𝑖𝑖𝑖𝑖 �̈�𝛿𝑖𝑖 + �̈�𝛿𝑖𝑖 + �̈�𝑒𝑖𝑖𝑖𝑖
error decomposition
within transformstion
period effect
![Page 27: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/27.jpg)
27
Difference-in-Difference (DID)
25
// declare panel data structure xtset id wave // DID xtreg health retired i.wave , fe // + cluster robust inference xtreg health retired i.wave , fe cluster(id)
![Page 28: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/28.jpg)
28
Difference-in-Difference (DID)
1
![Page 29: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/29.jpg)
29
Within models (pros & cons)
27
// pro: within models can overcome problems that arises from unobserved heterogeneity bias & attrition // contra: within models only focus on a small fraction of the variance in the data they usually have larger standard errors (lower efficiency) // contra: within models cannot incorporate time-constant variables directly e.g. gender, country, ethnical background
![Page 30: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/30.jpg)
30
(I) Basic panel commands in Stata • xtset • xtdescribe • reshape
(II)Panel analysis popular in Economics • Pooled OLS • Fixed-Effects Model & Difference-in-Difference • Random Effects Model
Outline
28
![Page 31: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/31.jpg)
31
Random Effects Estimation (RE)
29
𝜀𝜀𝑖𝑖𝑖𝑖 = 𝑢𝑢𝑖𝑖 + 𝑒𝑒𝑖𝑖𝑖𝑖
𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛽𝛽0 + 𝛽𝛽1𝑥𝑥𝑖𝑖𝑖𝑖 + 𝜀𝜀𝑖𝑖𝑖𝑖
𝑦𝑦𝑖𝑖𝑖𝑖 − 𝜆𝜆𝑦𝑦𝑖𝑖� = 𝛽𝛽0 1 − 𝜆𝜆 + 𝛽𝛽1 𝑥𝑥𝑖𝑖𝑖𝑖 − 𝜆𝜆𝑥𝑥𝑖𝑖� + (𝜀𝜀𝑖𝑖𝑖𝑖 − 𝜆𝜆𝜀𝜀𝑖𝑖� )
error decomposition
quasi within transformstion
= FGLS
random effects assumption 𝐶𝐶𝑜𝑜𝑜𝑜 𝑥𝑥𝑖𝑖𝑖𝑖,𝑢𝑢𝑖𝑖 = 0 , 𝑡𝑡 = 1,2, … ,𝑇𝑇
𝜆𝜆 = 1 − 𝜎𝜎2𝑒𝑒
𝜎𝜎2𝑒𝑒 + 𝑇𝑇𝜎𝜎2𝑢𝑢
![Page 32: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/32.jpg)
32
within transformation
Random Effects Estimation (RE)
30
0
quasi-within transformation
𝜆𝜆
𝜆𝜆
![Page 33: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/33.jpg)
33
Random Effects Estimation (RE)
31
𝑦𝑦𝑖𝑖𝑖𝑖 − 𝜆𝜆𝑦𝑦𝑖𝑖� = 𝛽𝛽0 1 − 𝜆𝜆 + 𝛽𝛽1 𝑥𝑥𝑖𝑖𝑖𝑖 − 𝜆𝜆𝑥𝑥𝑖𝑖� + (𝜀𝜀𝑖𝑖𝑖𝑖 − 𝜆𝜆𝜀𝜀𝑖𝑖� )
If 𝜆𝜆 = 1, then RE = FE
If 𝜆𝜆 = 0, then RE = POLS
𝛽𝛽𝑅𝑅𝑅𝑅 lies in between 𝛽𝛽𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 & 𝛽𝛽𝐹𝐹𝑅𝑅
![Page 34: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/34.jpg)
34
Random Effects Estimation (RE)
32
// declare panel data structure xtset id wave // RE xtreg health retired , re // + time-constant explanatory variable xtreg health retired female , re // + cluster robust inference & period effect xtreg health retired female i.wave, re cluster(id)
![Page 35: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/35.jpg)
35
Random Effects Estimation (RE)
1
![Page 36: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/36.jpg)
36
Hausman test
34
𝐻𝐻0: 𝛽𝛽𝑅𝑅𝑅𝑅 − 𝛽𝛽𝐹𝐹𝑅𝑅 = 0
𝐻𝐻𝐴𝐴: 𝛽𝛽𝑅𝑅𝑅𝑅 − 𝛽𝛽𝐹𝐹𝑅𝑅 ≠ 0
random effects model
fixed effects model
Hausman test
![Page 37: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/37.jpg)
37
Hausman test
35
// fixed effects model xtreg health retired i.wave , fe estimates store fixed // random effects model xtreg health retired i.wave , re estimates store random // hausman test hausman fixed random
![Page 38: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/38.jpg)
38
Hausman test
36
fixed effects model
![Page 39: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/39.jpg)
THANK YOU ! [email protected] [email protected]
![Page 40: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/40.jpg)
40
Appendix
1
![Page 41: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/41.jpg)
41
// generate lagged variables gen lag1_health = l.health gen lag2_health = l2.health
time series operators
1
![Page 42: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/42.jpg)
42
// generate differenced variables gen diff1_health = d.health gen diff2_health = d2.health
time series operators
1
![Page 43: PANEL DATA ANALYSIS - SHARE - Raziskava o zdravju, …€¦ · 2 (I) Basic panel commands in Stata • xtset • xtdescribe • reshape (II)Panel analysis popular in Economics •](https://reader030.vdocuments.site/reader030/viewer/2022021716/5b2a25c97f8b9ad8298b9018/html5/thumbnails/43.jpg)
43
Logit models
1
// Pooled logit logit goodhealth retired // declare panel data structure xtset id wave // FE logit xtlogit goodhealth retired , fe // RE logit xtlogit goodhealth retired , re
methodology &
interpretation quite complex !