SlideShare a Scribd company logo
1 of 21
Download to read offline
Panel regression
Lecture 5
Devesh Roy
IFPRI-ICAR Training
September 21, 2015
Economics 20 - Prof. Anderson 2
Panel Data Methods
yit = b0 + b1xit1 + . . . bkxitk + uit
Economics 20 - Prof. Anderson 3
A True Panel vs.
A Pooled Cross Section
• Often loosely use the term panel data to refer to any data set that
has both a cross-sectional dimension and a time-series dimension
• More precisely it’s only data following the same cross-section units
over time
• Otherwise it’s a pooled cross-section
Economics 20 - Prof. Anderson 4
Pooled Cross Sections
• We may want to pool cross sections just to get bigger sample sizes
• We may want to pool cross sections to investigate the effect of time
• We may want to pool cross sections to investigate whether
relationships have changed over time
Economics 20 - Prof. Anderson 5
Difference-in-Differences
• Say random assignment to treatment and control groups, like in a
medical experiment
• One can then simply compare the change in outcomes across the
treatment and control groups to estimate the treatment effect
• For time 1,2, groups A, B (y2,B – y2,A) - (y1,B – y1,A), or equivalently (y2,B
– y1,B) - (y2,A – y1,A), is the difference-in-differences
Economics 20 - Prof. Anderson 6
Difference-in-Differences (cont)
• A regression framework using time and treatment dummy variables
can calculate this difference-in-difference as well
• Consider the model: yit = b0 + b1treatmentit + b2afterit +
b3treatmentit*afterit + uit
• The estimated b3 will be the difference-in-differences in the group
means
Economics 20 - Prof. Anderson 7
Difference-in-Differences (cont)
• When don’t truly have random assignment, the regression form
becomes very useful
• Additional x’s can be added to the regression to control for
differences across the treatment and control groups
• Sometimes referred to as a “natural experiment” especially when a
policy change is being analyzed
Economics 20 - Prof. Anderson 8
Two-Period Panel Data
• It’s possible to use a panel just like pooled cross-sections, but can do
more than that
• Panel data can be used to address some kinds of omitted variable
bias
• If can think of the omitted variables as being fixed over time, then
can model as having a composite error
Economics 20 - Prof. Anderson 9
Unobserved Fixed Effects
• Suppose the population model is yit = b0 + d0d2t + b1xit1 +…+ bkxitk +
ai + uit
• Here we have added a time-constant component to the error, uit = ai
+ uit
• If ai is correlated with the x’s, OLS will be biased, since we ai is part of
the error term
• With panel data, we can difference-out the unobserved fixed effect
Economics 20 - Prof. Anderson 10
First-differences
• We can subtract one period from the other, to obtain Dyi = d0 + b1Dxi1
+…+ bkDxik + Dui
• This model has no correlation between the x’s and the error term, so
no bias
• Need to be careful about organization of the data to be sure compute
correct change
Economics 20 - Prof. Anderson 11
Differencing w/ Multiple Periods
• Can extend this method to more periods
• Simply difference adjacent periods
• So if 3 periods, then subtract period 1 from period 2, period 2 from
period 3 and have 2 observations per individual
• Simply estimate by OLS, assuming the Duit are uncorrelated over time
Economics 20 - Prof. Anderson 12
Fixed Effects Estimation
• When there is an observed fixed effect, an alternative to first
differences is fixed effects estimation
• Consider the average over time of yit = b1xit1 +…+ bkxitk + ai + uit
• The average of ai will be ai, so if you subtract the mean, ai will be
differenced out just as when doing first differences
Economics 20 - Prof. Anderson 13
Fixed Effects Estimation (cont)
• If we were to do this estimation by hand, we’d need to be careful
because we’d think that df = NT – k, but really is N(T – 1) – k because
we used up dfs calculating means
• Luckily, Stata (and most other packages) will do fixed effects
estimation for you
• This method is also identical to including a separate intercept or
every individual
Economics 20 - Prof. Anderson 14
First Differences vs Fixed Effects
• First Differences and Fixed Effects will be exactly the same when T = 2
• For T > 2, the two methods are different
• Probably see fixed effects estimation more often than differences –
probably more because it’s easier than that it’s better
• Fixed effects easily implemented for unbalanced panels, not just
balanced panels
Economics 20 - Prof. Anderson 15
Random Effects
• Start with the same basic model with a composite error, yit = b0 +
b1xit1 + . . . bkxitk + ai + uit
• Previously we’ve assumed that ai was correlated with the x’s, but
what if it’s not?
• OLS would be consistent in that case, but composite error will be
serially correlated
Economics 20 - Prof. Anderson 16
Random Effects (continued)
• Need to transform the model and do GLS to solve the problem and
make correct inferences
• Idea is to do quasi-differencing with the
Economics 20 - Prof. Anderson 17
Random Effects (continued)
• Need to transform the model and do GLS to solve
the problem and make correct inferences
• End up with a sort of weighted average of OLS and
Fixed Effects – use quasi-demeaned data
  
   
   iitikitkk
iitiit
auu
xx
xxyy
T
b
bb




...1
1
1110
21222
Economics 20 - Prof. Anderson 18
Random Effects (continued)
• If  = 1, then this is just the fixed effects estimator
• If  = 0, then this is just the OLS estimator
• So, the bigger the variance of the unobserved effect, the closer it is
to FE
• The smaller the variance of the unobserved effect, the closer it is to
OLS
• Stata will do Random Effects for us
Economics 20 - Prof. Anderson 19
Fixed Effects or Random?
• More usual to think need fixed effects, since think the problem is
that something unobserved is correlated with the x’s
• If truly need random effects, the only problem is the standard errors
• Can just adjust the standard errors for correlation within group
Economics 20 - Prof. Anderson 20
Other Uses of Panel Methods
• It’s possible to think of models where there is an unobserved fixed
effect, even if we do not have true panel data
• A common example is where we think there is an unobserved family
effect
• Can difference siblings
• Can estimate family fixed effect model
Economics 20 - Prof. Anderson 21
Additional Issues
• Many of the things we already know about both cross section and
time series data can be applied with panel data
• Can test and correct for serial correlation in the errors
• Can test and correct for heteroskedasticity
• Can estimate standard errors robust to both

More Related Content

What's hot

Distribution practice
Distribution   practiceDistribution   practice
Distribution practiceKen Plummer
 
Mod 4 data presentation graphs bar charts tables
Mod 4 data presentation graphs bar charts tablesMod 4 data presentation graphs bar charts tables
Mod 4 data presentation graphs bar charts tablesmpape
 
L8 scientific visualization of data
L8 scientific visualization of dataL8 scientific visualization of data
L8 scientific visualization of dataSeppo Karrila
 
Representing and generating uncertainty effectively presentatıon
Representing and generating uncertainty effectively presentatıonRepresenting and generating uncertainty effectively presentatıon
Representing and generating uncertainty effectively presentatıonAzdeen Najah
 
Measurements and error in experiments
Measurements and error in experimentsMeasurements and error in experiments
Measurements and error in experimentsAwad Albalwi
 
Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9Beamsync
 
Introduction to Business Analytics Course Part 10
Introduction to Business Analytics Course Part 10Introduction to Business Analytics Course Part 10
Introduction to Business Analytics Course Part 10Beamsync
 
Measures of Central Tendencies
Measures of Central TendenciesMeasures of Central Tendencies
Measures of Central TendenciesAngel Mae Longakit
 
Measures of dispersion
Measures of dispersionMeasures of dispersion
Measures of dispersionSanoj Fernando
 
1291 report format and example
1291 report format and example1291 report format and example
1291 report format and exampleeonliendu
 
Statistical measures
Statistical measuresStatistical measures
Statistical measureslisawhipp
 
Scatter Plot Activi
Scatter Plot ActiviScatter Plot Activi
Scatter Plot Activinechamkin
 
Mean and median
Mean and medianMean and median
Mean and medianKelly Jans
 

What's hot (20)

Distribution practice
Distribution   practiceDistribution   practice
Distribution practice
 
Mod 4 data presentation graphs bar charts tables
Mod 4 data presentation graphs bar charts tablesMod 4 data presentation graphs bar charts tables
Mod 4 data presentation graphs bar charts tables
 
P1 Stroop
P1 StroopP1 Stroop
P1 Stroop
 
Data analysis, statistics, and probability review
Data analysis, statistics, and probability reviewData analysis, statistics, and probability review
Data analysis, statistics, and probability review
 
L8 scientific visualization of data
L8 scientific visualization of dataL8 scientific visualization of data
L8 scientific visualization of data
 
Representing and generating uncertainty effectively presentatıon
Representing and generating uncertainty effectively presentatıonRepresenting and generating uncertainty effectively presentatıon
Representing and generating uncertainty effectively presentatıon
 
Measurements and error in experiments
Measurements and error in experimentsMeasurements and error in experiments
Measurements and error in experiments
 
Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9Introduction to Business Analytics Course Part 9
Introduction to Business Analytics Course Part 9
 
Introduction to Business Analytics Course Part 10
Introduction to Business Analytics Course Part 10Introduction to Business Analytics Course Part 10
Introduction to Business Analytics Course Part 10
 
Measures of Central Tendencies
Measures of Central TendenciesMeasures of Central Tendencies
Measures of Central Tendencies
 
Week 3 unit 1
Week 3 unit 1Week 3 unit 1
Week 3 unit 1
 
Dscriptive statistics
Dscriptive statisticsDscriptive statistics
Dscriptive statistics
 
Measures of dispersion
Measures of dispersionMeasures of dispersion
Measures of dispersion
 
07.10.08 POLI 399
07.10.08 POLI 39907.10.08 POLI 399
07.10.08 POLI 399
 
T test
T testT test
T test
 
1291 report format and example
1291 report format and example1291 report format and example
1291 report format and example
 
Statistical measures
Statistical measuresStatistical measures
Statistical measures
 
Scatter Plot Activi
Scatter Plot ActiviScatter Plot Activi
Scatter Plot Activi
 
Addition with different strategies
Addition with different strategies Addition with different strategies
Addition with different strategies
 
Mean and median
Mean and medianMean and median
Mean and median
 

Viewers also liked

STATA - Panel Regressions
STATA - Panel RegressionsSTATA - Panel Regressions
STATA - Panel Regressionsstata_org_uk
 
Time series analysis in Stata
Time series analysis in StataTime series analysis in Stata
Time series analysis in Statashahisec1
 
(1) Giới thiệu về thống kê cho các ngành khoa học xã hội_Bài giảng 1: Giới th...
(1) Giới thiệu về thống kê cho các ngành khoa học xã hội_Bài giảng 1: Giới th...(1) Giới thiệu về thống kê cho các ngành khoa học xã hội_Bài giảng 1: Giới th...
(1) Giới thiệu về thống kê cho các ngành khoa học xã hội_Bài giảng 1: Giới th...Development and Policies Research Center (DEPOCEN)
 
Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Wondmagegn Tafesse
 
STATA - Summary Statistics
STATA - Summary StatisticsSTATA - Summary Statistics
STATA - Summary Statisticsstata_org_uk
 
On tap kinh te luong co ban
On tap kinh te luong co banOn tap kinh te luong co ban
On tap kinh te luong co banCam Lan Nguyen
 
Ч.БАТТӨР, С.ДАШДОРЖ - БАЛАНСЫН ШИНЖИЛГЭЭНД ҮНДЭСЛЭСЭН ҮР АШГИЙН ТООЦООЛОЛ
Ч.БАТТӨР, С.ДАШДОРЖ - БАЛАНСЫН ШИНЖИЛГЭЭНД ҮНДЭСЛЭСЭН ҮР АШГИЙН ТООЦООЛОЛЧ.БАТТӨР, С.ДАШДОРЖ - БАЛАНСЫН ШИНЖИЛГЭЭНД ҮНДЭСЛЭСЭН ҮР АШГИЙН ТООЦООЛОЛ
Ч.БАТТӨР, С.ДАШДОРЖ - БАЛАНСЫН ШИНЖИЛГЭЭНД ҮНДЭСЛЭСЭН ҮР АШГИЙН ТООЦООЛОЛbatnasanb
 

Viewers also liked (14)

STATA - Panel Regressions
STATA - Panel RegressionsSTATA - Panel Regressions
STATA - Panel Regressions
 
МБЗ 2016 оны ажлын тайлан
МБЗ 2016 оны ажлын тайланМБЗ 2016 оны ажлын тайлан
МБЗ 2016 оны ажлын тайлан
 
Time series analysis in Stata
Time series analysis in StataTime series analysis in Stata
Time series analysis in Stata
 
(1) Giới thiệu về thống kê cho các ngành khoa học xã hội_Bài giảng 1: Giới th...
(1) Giới thiệu về thống kê cho các ngành khoa học xã hội_Bài giảng 1: Giới th...(1) Giới thiệu về thống kê cho các ngành khoa học xã hội_Bài giảng 1: Giới th...
(1) Giới thiệu về thống kê cho các ngành khoa học xã hội_Bài giảng 1: Giới th...
 
Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)Panel data methods for microeconometrics using Stata! Short and good one :)
Panel data methods for microeconometrics using Stata! Short and good one :)
 
Panel data
Panel dataPanel data
Panel data
 
Hướng dẫn sử dụng STATA
Hướng dẫn sử dụng STATAHướng dẫn sử dụng STATA
Hướng dẫn sử dụng STATA
 
Phương pháp điều tra chọn mẫu. Bài giảng 4: Kích thước mẫu
Phương pháp điều tra chọn mẫu. Bài giảng 4: Kích thước mẫuPhương pháp điều tra chọn mẫu. Bài giảng 4: Kích thước mẫu
Phương pháp điều tra chọn mẫu. Bài giảng 4: Kích thước mẫu
 
Phương pháp điều tra chọn mẫu. Bài giảng 1: Thiết kế điều tra
Phương pháp điều tra chọn mẫu. Bài giảng 1: Thiết kế điều traPhương pháp điều tra chọn mẫu. Bài giảng 1: Thiết kế điều tra
Phương pháp điều tra chọn mẫu. Bài giảng 1: Thiết kế điều tra
 
STATA - Summary Statistics
STATA - Summary StatisticsSTATA - Summary Statistics
STATA - Summary Statistics
 
2017 Monetary Policy
2017 Monetary Policy2017 Monetary Policy
2017 Monetary Policy
 
On tap kinh te luong co ban
On tap kinh te luong co banOn tap kinh te luong co ban
On tap kinh te luong co ban
 
лекц 7ланд-төсөв-2016
лекц 7ланд-төсөв-2016лекц 7ланд-төсөв-2016
лекц 7ланд-төсөв-2016
 
Ч.БАТТӨР, С.ДАШДОРЖ - БАЛАНСЫН ШИНЖИЛГЭЭНД ҮНДЭСЛЭСЭН ҮР АШГИЙН ТООЦООЛОЛ
Ч.БАТТӨР, С.ДАШДОРЖ - БАЛАНСЫН ШИНЖИЛГЭЭНД ҮНДЭСЛЭСЭН ҮР АШГИЙН ТООЦООЛОЛЧ.БАТТӨР, С.ДАШДОРЖ - БАЛАНСЫН ШИНЖИЛГЭЭНД ҮНДЭСЛЭСЭН ҮР АШГИЙН ТООЦООЛОЛ
Ч.БАТТӨР, С.ДАШДОРЖ - БАЛАНСЫН ШИНЖИЛГЭЭНД ҮНДЭСЛЭСЭН ҮР АШГИЙН ТООЦООЛОЛ
 

Similar to ICAR-IFPRI: Panel regression lecture 5 Devesh Roy

Physics 01-Introduction and Kinematics (2018) Lab.pdf
Physics 01-Introduction and Kinematics (2018) Lab.pdfPhysics 01-Introduction and Kinematics (2018) Lab.pdf
Physics 01-Introduction and Kinematics (2018) Lab.pdfdknathanlol
 
Probability Distributions
Probability Distributions Probability Distributions
Probability Distributions Anthony J. Evans
 
Mixed Effects Models - Fixed Effects
Mixed Effects Models - Fixed EffectsMixed Effects Models - Fixed Effects
Mixed Effects Models - Fixed EffectsScott Fraundorf
 
Cmcchapter02 100613132406-phpapp02
Cmcchapter02 100613132406-phpapp02Cmcchapter02 100613132406-phpapp02
Cmcchapter02 100613132406-phpapp02Cleophas Rwemera
 
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...Maninda Edirisooriya
 
1_--_sci_method.ppt
1_--_sci_method.ppt1_--_sci_method.ppt
1_--_sci_method.pptMervatMarji2
 
Mixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsMixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsScott Fraundorf
 
Is ignorance bliss
Is ignorance blissIs ignorance bliss
Is ignorance blissStephen Senn
 
regression.pptx
regression.pptxregression.pptx
regression.pptxaneeshs28
 
Causally regularized machine learning
Causally regularized machine learningCausally regularized machine learning
Causally regularized machine learningWanjin Yu
 
33151-33161.ppt
33151-33161.ppt33151-33161.ppt
33151-33161.pptdawitg2
 
correlation.pptx
correlation.pptxcorrelation.pptx
correlation.pptxSmHasiv
 

Similar to ICAR-IFPRI: Panel regression lecture 5 Devesh Roy (20)

Physics 01-Introduction and Kinematics (2018) Lab.pdf
Physics 01-Introduction and Kinematics (2018) Lab.pdfPhysics 01-Introduction and Kinematics (2018) Lab.pdf
Physics 01-Introduction and Kinematics (2018) Lab.pdf
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
forecast.ppt
forecast.pptforecast.ppt
forecast.ppt
 
Probability Distributions
Probability Distributions Probability Distributions
Probability Distributions
 
Mixed Effects Models - Fixed Effects
Mixed Effects Models - Fixed EffectsMixed Effects Models - Fixed Effects
Mixed Effects Models - Fixed Effects
 
Cmcchapter02 100613132406-phpapp02
Cmcchapter02 100613132406-phpapp02Cmcchapter02 100613132406-phpapp02
Cmcchapter02 100613132406-phpapp02
 
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
 
1_--_sci_method.ppt
1_--_sci_method.ppt1_--_sci_method.ppt
1_--_sci_method.ppt
 
Validity andreliability
Validity andreliabilityValidity andreliability
Validity andreliability
 
Mixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect InteractionsMixed Effects Models - Fixed Effect Interactions
Mixed Effects Models - Fixed Effect Interactions
 
Is ignorance bliss
Is ignorance blissIs ignorance bliss
Is ignorance bliss
 
Panel Data Models
Panel Data ModelsPanel Data Models
Panel Data Models
 
regression.pptx
regression.pptxregression.pptx
regression.pptx
 
2U1.pptx
2U1.pptx2U1.pptx
2U1.pptx
 
Causally regularized machine learning
Causally regularized machine learningCausally regularized machine learning
Causally regularized machine learning
 
Diagnostic in poisson regression models
Diagnostic in poisson regression modelsDiagnostic in poisson regression models
Diagnostic in poisson regression models
 
MModule 1 ppt.pptx
MModule 1 ppt.pptxMModule 1 ppt.pptx
MModule 1 ppt.pptx
 
33151-33161.ppt
33151-33161.ppt33151-33161.ppt
33151-33161.ppt
 
correlation.pptx
correlation.pptxcorrelation.pptx
correlation.pptx
 
Optimization techniques
Optimization techniquesOptimization techniques
Optimization techniques
 

More from International Food Policy Research Institute- South Asia Office

More from International Food Policy Research Institute- South Asia Office (20)

8. Dr Rao.pdf
8. Dr Rao.pdf8. Dr Rao.pdf
8. Dr Rao.pdf
 
13. Manish Patel.pdf
13. Manish Patel.pdf13. Manish Patel.pdf
13. Manish Patel.pdf
 
15. Smita Sirohi.pdf
15. Smita Sirohi.pdf15. Smita Sirohi.pdf
15. Smita Sirohi.pdf
 
6. CD Mayee.pdf
6. CD Mayee.pdf6. CD Mayee.pdf
6. CD Mayee.pdf
 
10. Keshavulu_1.pdf
10. Keshavulu_1.pdf10. Keshavulu_1.pdf
10. Keshavulu_1.pdf
 
12. Swati Nayak.pdf
12. Swati Nayak.pdf12. Swati Nayak.pdf
12. Swati Nayak.pdf
 
16. Dr Anjani.pdf
16. Dr Anjani.pdf16. Dr Anjani.pdf
16. Dr Anjani.pdf
 
9. Malavika Dadlani_1.pdf
9. Malavika Dadlani_1.pdf9. Malavika Dadlani_1.pdf
9. Malavika Dadlani_1.pdf
 
7. Neeru Bhooshan.pdf
7. Neeru Bhooshan.pdf7. Neeru Bhooshan.pdf
7. Neeru Bhooshan.pdf
 
4. Raj Ganesh.pdf
4. Raj Ganesh.pdf4. Raj Ganesh.pdf
4. Raj Ganesh.pdf
 
11. Surinder K Tikoo_1.pdf
11. Surinder K Tikoo_1.pdf11. Surinder K Tikoo_1.pdf
11. Surinder K Tikoo_1.pdf
 
3. DK Yadava.pdf
3. DK Yadava.pdf3. DK Yadava.pdf
3. DK Yadava.pdf
 
14. Paresh Verma_1.pdf
14. Paresh Verma_1.pdf14. Paresh Verma_1.pdf
14. Paresh Verma_1.pdf
 
5. Ram Kaundinya.pdf
5. Ram Kaundinya.pdf5. Ram Kaundinya.pdf
5. Ram Kaundinya.pdf
 
1. Dr Anjani.pdf
1. Dr Anjani.pdf1. Dr Anjani.pdf
1. Dr Anjani.pdf
 
2. David Spielman.pdf
2. David Spielman.pdf2. David Spielman.pdf
2. David Spielman.pdf
 
GFPR 2021 South Asia Launch Ppt - Dr. Shahidur Rashid
GFPR 2021 South Asia Launch Ppt - Dr. Shahidur RashidGFPR 2021 South Asia Launch Ppt - Dr. Shahidur Rashid
GFPR 2021 South Asia Launch Ppt - Dr. Shahidur Rashid
 
GFPR 2021 South Asia Launch Ppt - Dr. Johan Swinnen
GFPR 2021 South Asia Launch Ppt - Dr. Johan SwinnenGFPR 2021 South Asia Launch Ppt - Dr. Johan Swinnen
GFPR 2021 South Asia Launch Ppt - Dr. Johan Swinnen
 
Book Launch : Agricultural Transformation in Nepal: Trends, Prospects and Pol...
Book Launch : Agricultural Transformation in Nepal: Trends, Prospects and Pol...Book Launch : Agricultural Transformation in Nepal: Trends, Prospects and Pol...
Book Launch : Agricultural Transformation in Nepal: Trends, Prospects and Pol...
 
Understanding the landscape of pulse policy in India and implications for trade
Understanding the landscape of pulse policy in India and implications for tradeUnderstanding the landscape of pulse policy in India and implications for trade
Understanding the landscape of pulse policy in India and implications for trade
 

Recently uploaded

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 

Recently uploaded (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 

ICAR-IFPRI: Panel regression lecture 5 Devesh Roy

  • 1. Panel regression Lecture 5 Devesh Roy IFPRI-ICAR Training September 21, 2015
  • 2. Economics 20 - Prof. Anderson 2 Panel Data Methods yit = b0 + b1xit1 + . . . bkxitk + uit
  • 3. Economics 20 - Prof. Anderson 3 A True Panel vs. A Pooled Cross Section • Often loosely use the term panel data to refer to any data set that has both a cross-sectional dimension and a time-series dimension • More precisely it’s only data following the same cross-section units over time • Otherwise it’s a pooled cross-section
  • 4. Economics 20 - Prof. Anderson 4 Pooled Cross Sections • We may want to pool cross sections just to get bigger sample sizes • We may want to pool cross sections to investigate the effect of time • We may want to pool cross sections to investigate whether relationships have changed over time
  • 5. Economics 20 - Prof. Anderson 5 Difference-in-Differences • Say random assignment to treatment and control groups, like in a medical experiment • One can then simply compare the change in outcomes across the treatment and control groups to estimate the treatment effect • For time 1,2, groups A, B (y2,B – y2,A) - (y1,B – y1,A), or equivalently (y2,B – y1,B) - (y2,A – y1,A), is the difference-in-differences
  • 6. Economics 20 - Prof. Anderson 6 Difference-in-Differences (cont) • A regression framework using time and treatment dummy variables can calculate this difference-in-difference as well • Consider the model: yit = b0 + b1treatmentit + b2afterit + b3treatmentit*afterit + uit • The estimated b3 will be the difference-in-differences in the group means
  • 7. Economics 20 - Prof. Anderson 7 Difference-in-Differences (cont) • When don’t truly have random assignment, the regression form becomes very useful • Additional x’s can be added to the regression to control for differences across the treatment and control groups • Sometimes referred to as a “natural experiment” especially when a policy change is being analyzed
  • 8. Economics 20 - Prof. Anderson 8 Two-Period Panel Data • It’s possible to use a panel just like pooled cross-sections, but can do more than that • Panel data can be used to address some kinds of omitted variable bias • If can think of the omitted variables as being fixed over time, then can model as having a composite error
  • 9. Economics 20 - Prof. Anderson 9 Unobserved Fixed Effects • Suppose the population model is yit = b0 + d0d2t + b1xit1 +…+ bkxitk + ai + uit • Here we have added a time-constant component to the error, uit = ai + uit • If ai is correlated with the x’s, OLS will be biased, since we ai is part of the error term • With panel data, we can difference-out the unobserved fixed effect
  • 10. Economics 20 - Prof. Anderson 10 First-differences • We can subtract one period from the other, to obtain Dyi = d0 + b1Dxi1 +…+ bkDxik + Dui • This model has no correlation between the x’s and the error term, so no bias • Need to be careful about organization of the data to be sure compute correct change
  • 11. Economics 20 - Prof. Anderson 11 Differencing w/ Multiple Periods • Can extend this method to more periods • Simply difference adjacent periods • So if 3 periods, then subtract period 1 from period 2, period 2 from period 3 and have 2 observations per individual • Simply estimate by OLS, assuming the Duit are uncorrelated over time
  • 12. Economics 20 - Prof. Anderson 12 Fixed Effects Estimation • When there is an observed fixed effect, an alternative to first differences is fixed effects estimation • Consider the average over time of yit = b1xit1 +…+ bkxitk + ai + uit • The average of ai will be ai, so if you subtract the mean, ai will be differenced out just as when doing first differences
  • 13. Economics 20 - Prof. Anderson 13 Fixed Effects Estimation (cont) • If we were to do this estimation by hand, we’d need to be careful because we’d think that df = NT – k, but really is N(T – 1) – k because we used up dfs calculating means • Luckily, Stata (and most other packages) will do fixed effects estimation for you • This method is also identical to including a separate intercept or every individual
  • 14. Economics 20 - Prof. Anderson 14 First Differences vs Fixed Effects • First Differences and Fixed Effects will be exactly the same when T = 2 • For T > 2, the two methods are different • Probably see fixed effects estimation more often than differences – probably more because it’s easier than that it’s better • Fixed effects easily implemented for unbalanced panels, not just balanced panels
  • 15. Economics 20 - Prof. Anderson 15 Random Effects • Start with the same basic model with a composite error, yit = b0 + b1xit1 + . . . bkxitk + ai + uit • Previously we’ve assumed that ai was correlated with the x’s, but what if it’s not? • OLS would be consistent in that case, but composite error will be serially correlated
  • 16. Economics 20 - Prof. Anderson 16 Random Effects (continued) • Need to transform the model and do GLS to solve the problem and make correct inferences • Idea is to do quasi-differencing with the
  • 17. Economics 20 - Prof. Anderson 17 Random Effects (continued) • Need to transform the model and do GLS to solve the problem and make correct inferences • End up with a sort of weighted average of OLS and Fixed Effects – use quasi-demeaned data           iitikitkk iitiit auu xx xxyy T b bb     ...1 1 1110 21222
  • 18. Economics 20 - Prof. Anderson 18 Random Effects (continued) • If  = 1, then this is just the fixed effects estimator • If  = 0, then this is just the OLS estimator • So, the bigger the variance of the unobserved effect, the closer it is to FE • The smaller the variance of the unobserved effect, the closer it is to OLS • Stata will do Random Effects for us
  • 19. Economics 20 - Prof. Anderson 19 Fixed Effects or Random? • More usual to think need fixed effects, since think the problem is that something unobserved is correlated with the x’s • If truly need random effects, the only problem is the standard errors • Can just adjust the standard errors for correlation within group
  • 20. Economics 20 - Prof. Anderson 20 Other Uses of Panel Methods • It’s possible to think of models where there is an unobserved fixed effect, even if we do not have true panel data • A common example is where we think there is an unobserved family effect • Can difference siblings • Can estimate family fixed effect model
  • 21. Economics 20 - Prof. Anderson 21 Additional Issues • Many of the things we already know about both cross section and time series data can be applied with panel data • Can test and correct for serial correlation in the errors • Can test and correct for heteroskedasticity • Can estimate standard errors robust to both