SlideShare a Scribd company logo
1 of 20
Advanced econometrics and Stata
Practice
Dr. Chunxia Jiang
Business School, University of Aberdeen, UK
Beijing , 17-26 Nov 2019
๏€ช Topics and schedule
Sessions plan
10ๆœˆ17ๆ—ฅ Evening โ€”
L1-2 Introduction to Econometrics and Stata
10ๆœˆ18ๆ—ฅ Evening โ€”
L3-4 Data, single regression
Morning โ€”
L5-6 (1) Hypothesis testing, Multi-regression ,
Afternoon L5-6 (2) Violation of assumptions
Morning โ€”
L7-8 Panel data models & Endogeneity
Evening Exercises and practice
Morning โ€”
L9-10 Time series models
Afternoon L11-12 Frontier1 SFA & practice
10ๆœˆ24 Evening L13-14๏ผš Frontier2 DEA & practice
10ๆœˆ25ๆ—ฅ Evening L15-16 DID & practice
Morning Revision
Afternoon Exam
10ๆœˆ20ๆ—ฅ
10ๆœˆ19ๆ—ฅ
10ๆœˆ22ๆ—ฅ
10ๆœˆ26ๆ—ฅ
๏€ช sysuse auto
๏€ช Sum
๏€ช we have data on the mileage rating and weight of 74
automobiles. The variables in our data are mpg,
weight, and foreign. The last variable assumes the
value 1 for foreign and 0 for domestic automobiles.
We wish to fit the model
Linear regression
๏€ช sysuse auto
๏€ช Sum
๏€ช we have data on the mileage rating and weight of 74
automobiles. The variables in our data are mpg, weight, and
foreign. The last variable assumes the value 1 for foreign and 0
for domestic automobiles. We wish to fit the model
๏€ช regress mpg weight foreign
Linear regression
Linear regression
R2
๏€ช Use which R-square?
๏€ช Good practice to use adjusted R-square, particularly when the
number of explanatory variables is not very small compared
with the number of observations
๏€ช But this has no theoretical justification.
๏€ช Adjusted R-square is reported by most statistical packages
๏€ช Compare R-square of two models
๏€ช The sample size and the dependent variable must be the
same
๏€ช The explanatory variables may take any form
๏€ช Allocating the multiple R-square between the regressors?
๏€ช Little point to do so
6
๏€ช Fitted model
๏€ช a graph comparing mpg with weight:
๏€ช twoway (scatter mpg weight)
๏€ช scatter mpg weight
๏€ช This is to be expected because energy usage per distance should
increase linearly with weight, but mpg is measuring distance per
energy used.
๏€ช We could obtain a better model by generating a new variable
measuring the number of gallons used per 100 miles (gp100m)
and then using this new variable in our model:
Linear regression
๏€ช . generate gp100m = 100/mpg
๏€ช . Regress gp100m weight foreign
Linear regression
Linear regression
๏€ช We wish to fit a regression of the weight of an
automobile against its length
๏€ช regress weight length
๏€ช we wish to impose the constraint that the weight is
zero when the length is zero.
๏€ช regress weight length, noconstant
Linear regression
๏€ช
๏€ช Specifying the vce(robust) option is equivalent to
requesting White-corrected standard errors in the
presence of heteroskedasticity.
๏€ช We use the automobile data: the energy efficiency of
cars:
๏€ช the amount of energy (measured in gallons of gasoline)
that the cars in the data need to move 1,000 pounds of
their weight 100 miles.
Heteroskedasticity and robust
standard errors
๏€ช generate gpmw = ((1/mpg)/weight)*100*1000
๏€ช Sum
๏€ช We are going to examine the relative efficiency of
foreign and domestic cars.
๏€ช regress gpmw foreign
๏€ช regress gpmw foreign, vce(robust)
๏€ช Which is right? Notice that gpmw is a variable with
considerable heteroskedasticity
๏€ช tabulate foreign, summarize(gpmw)
๏€ช . webuse nlswork
๏€ช . xtset idcode
๏€ช we will model ln wage in terms of completed years of
schooling (grade), current age and age squared, current
years worked (experience) and experience squared,
current years of tenure on the current job and tenure
squared, whether black (race = 2), whether residing in an
area not designated a standard metropolitan statistical
area (SMSA), and whether residing in the South.
Panel data
๏€ช xtreg ln_w grade age c.age#c.age ttl_exp
c.ttl_exp#c.ttl_exp tenure > c.tenure#c.tenure 2.race
not_smsa south, fe
๏€ช xtreg ln_w grade age c.age#c.age ttl_exp
c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure 2.race
not_smsa south, fe vce(robust)
๏€ช Although the estimated coefficients are the same with and
without the vce(robust) option, the robust estimator
produced larger standard errors and a p-value for c.ttl
exp#c.ttl exp above the conventional 10%. The F test of v i =
0 is suppressed because it is too difficult to compute the
robust form of the statistic when there are more than a
few panels.
Fixed-effects models with robust
standard errors
๏€ช Create our own listโ€ฆ
Command focus

More Related Content

Similar to Lab practice session.pptx

Reading in the future Turkish Air
Reading in the future    Turkish AirReading in the future    Turkish Air
Reading in the future Turkish AirMohammed Hadi
ย 
Reduction of Active Power Loss byUsing Adaptive Cat Swarm Optimization
Reduction of Active Power Loss byUsing Adaptive Cat Swarm OptimizationReduction of Active Power Loss byUsing Adaptive Cat Swarm Optimization
Reduction of Active Power Loss byUsing Adaptive Cat Swarm Optimizationijeei-iaes
ย 
Forecasting Default Probabilities in Emerging Markets and Dynamical Regula...
Forecasting Default Probabilities  in Emerging Markets and   Dynamical Regula...Forecasting Default Probabilities  in Emerging Markets and   Dynamical Regula...
Forecasting Default Probabilities in Emerging Markets and Dynamical Regula...SSA KPI
ย 
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...ijsrd.com
ย 
Apache Spark Based Hyper-Parameter Selection and Adaptive Model Tuning for De...
Apache Spark Based Hyper-Parameter Selection and Adaptive Model Tuning for De...Apache Spark Based Hyper-Parameter Selection and Adaptive Model Tuning for De...
Apache Spark Based Hyper-Parameter Selection and Adaptive Model Tuning for De...Databricks
ย 
Mb0048 operations research
Mb0048 operations researchMb0048 operations research
Mb0048 operations researchsmumbahelp
ย 
SVD and the Netflix Dataset
SVD and the Netflix DatasetSVD and the Netflix Dataset
SVD and the Netflix DatasetBen Mabey
ย 
GWO-based estimation of input-output parameters of thermal power plants
GWO-based estimation of input-output parameters of thermal power plantsGWO-based estimation of input-output parameters of thermal power plants
GWO-based estimation of input-output parameters of thermal power plantsTELKOMNIKA JOURNAL
ย 
IRJET- Optimal Placement and Size of DG and DER for Minimizing Power Loss and...
IRJET- Optimal Placement and Size of DG and DER for Minimizing Power Loss and...IRJET- Optimal Placement and Size of DG and DER for Minimizing Power Loss and...
IRJET- Optimal Placement and Size of DG and DER for Minimizing Power Loss and...IRJET Journal
ย 
Hybrid Particle Swarm Optimization for Solving Multi-Area Economic Dispatch P...
Hybrid Particle Swarm Optimization for Solving Multi-Area Economic Dispatch P...Hybrid Particle Swarm Optimization for Solving Multi-Area Economic Dispatch P...
Hybrid Particle Swarm Optimization for Solving Multi-Area Economic Dispatch P...ijsc
ย 
Group Project
Group ProjectGroup Project
Group ProjectXiyuan Sun
ย 
IRJET- Fuel Cost Reduction for Thermal Power Generator by using G.A, PSO, QPS...
IRJET- Fuel Cost Reduction for Thermal Power Generator by using G.A, PSO, QPS...IRJET- Fuel Cost Reduction for Thermal Power Generator by using G.A, PSO, QPS...
IRJET- Fuel Cost Reduction for Thermal Power Generator by using G.A, PSO, QPS...IRJET Journal
ย 
IRJET- Optimum Design of Fan, Queen and Pratt Trusses
IRJET-  	  Optimum Design of Fan, Queen and Pratt TrussesIRJET-  	  Optimum Design of Fan, Queen and Pratt Trusses
IRJET- Optimum Design of Fan, Queen and Pratt TrussesIRJET Journal
ย 
GRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHM
GRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHMGRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHM
GRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHMijscai
ย 
Actual Penalty and Deviation Settlement Mechanism (DSM) Penalty in Interstate...
Actual Penalty and Deviation Settlement Mechanism (DSM) Penalty in Interstate...Actual Penalty and Deviation Settlement Mechanism (DSM) Penalty in Interstate...
Actual Penalty and Deviation Settlement Mechanism (DSM) Penalty in Interstate...Das A. K.
ย 
Using genetic algorithms to optimize material and construction variables for ...
Using genetic algorithms to optimize material and construction variables for ...Using genetic algorithms to optimize material and construction variables for ...
Using genetic algorithms to optimize material and construction variables for ...IRJET Journal
ย 
CarProject
CarProjectCarProject
CarProjectShirley Law
ย 

Similar to Lab practice session.pptx (20)

R analysis of covariance
R   analysis of covarianceR   analysis of covariance
R analysis of covariance
ย 
Reading in the future Turkish Air
Reading in the future    Turkish AirReading in the future    Turkish Air
Reading in the future Turkish Air
ย 
Reduction of Active Power Loss byUsing Adaptive Cat Swarm Optimization
Reduction of Active Power Loss byUsing Adaptive Cat Swarm OptimizationReduction of Active Power Loss byUsing Adaptive Cat Swarm Optimization
Reduction of Active Power Loss byUsing Adaptive Cat Swarm Optimization
ย 
Forecasting Default Probabilities in Emerging Markets and Dynamical Regula...
Forecasting Default Probabilities  in Emerging Markets and   Dynamical Regula...Forecasting Default Probabilities  in Emerging Markets and   Dynamical Regula...
Forecasting Default Probabilities in Emerging Markets and Dynamical Regula...
ย 
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
Optimization Approach for Capacitated Vehicle Routing Problem Using Genetic A...
ย 
Apache Spark Based Hyper-Parameter Selection and Adaptive Model Tuning for De...
Apache Spark Based Hyper-Parameter Selection and Adaptive Model Tuning for De...Apache Spark Based Hyper-Parameter Selection and Adaptive Model Tuning for De...
Apache Spark Based Hyper-Parameter Selection and Adaptive Model Tuning for De...
ย 
Mb0048 operations research
Mb0048 operations researchMb0048 operations research
Mb0048 operations research
ย 
SVD and the Netflix Dataset
SVD and the Netflix DatasetSVD and the Netflix Dataset
SVD and the Netflix Dataset
ย 
GWO-based estimation of input-output parameters of thermal power plants
GWO-based estimation of input-output parameters of thermal power plantsGWO-based estimation of input-output parameters of thermal power plants
GWO-based estimation of input-output parameters of thermal power plants
ย 
IRJET- Optimal Placement and Size of DG and DER for Minimizing Power Loss and...
IRJET- Optimal Placement and Size of DG and DER for Minimizing Power Loss and...IRJET- Optimal Placement and Size of DG and DER for Minimizing Power Loss and...
IRJET- Optimal Placement and Size of DG and DER for Minimizing Power Loss and...
ย 
Hybrid Particle Swarm Optimization for Solving Multi-Area Economic Dispatch P...
Hybrid Particle Swarm Optimization for Solving Multi-Area Economic Dispatch P...Hybrid Particle Swarm Optimization for Solving Multi-Area Economic Dispatch P...
Hybrid Particle Swarm Optimization for Solving Multi-Area Economic Dispatch P...
ย 
Employee mode of commuting
Employee mode of commutingEmployee mode of commuting
Employee mode of commuting
ย 
Group Project
Group ProjectGroup Project
Group Project
ย 
IRJET- Fuel Cost Reduction for Thermal Power Generator by using G.A, PSO, QPS...
IRJET- Fuel Cost Reduction for Thermal Power Generator by using G.A, PSO, QPS...IRJET- Fuel Cost Reduction for Thermal Power Generator by using G.A, PSO, QPS...
IRJET- Fuel Cost Reduction for Thermal Power Generator by using G.A, PSO, QPS...
ย 
IRJET- Optimum Design of Fan, Queen and Pratt Trusses
IRJET-  	  Optimum Design of Fan, Queen and Pratt TrussesIRJET-  	  Optimum Design of Fan, Queen and Pratt Trusses
IRJET- Optimum Design of Fan, Queen and Pratt Trusses
ย 
Computation Assignment Help
Computation Assignment Help Computation Assignment Help
Computation Assignment Help
ย 
GRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHM
GRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHMGRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHM
GRADIENT OMISSIVE DESCENT IS A MINIMIZATION ALGORITHM
ย 
Actual Penalty and Deviation Settlement Mechanism (DSM) Penalty in Interstate...
Actual Penalty and Deviation Settlement Mechanism (DSM) Penalty in Interstate...Actual Penalty and Deviation Settlement Mechanism (DSM) Penalty in Interstate...
Actual Penalty and Deviation Settlement Mechanism (DSM) Penalty in Interstate...
ย 
Using genetic algorithms to optimize material and construction variables for ...
Using genetic algorithms to optimize material and construction variables for ...Using genetic algorithms to optimize material and construction variables for ...
Using genetic algorithms to optimize material and construction variables for ...
ย 
CarProject
CarProjectCarProject
CarProject
ย 

More from akashayosha

HSK1-L6.pptx
HSK1-L6.pptxHSK1-L6.pptx
HSK1-L6.pptxakashayosha
ย 
HSK1-L5.pptx
HSK1-L5.pptxHSK1-L5.pptx
HSK1-L5.pptxakashayosha
ย 
HSK1-L4.pptx
HSK1-L4.pptxHSK1-L4.pptx
HSK1-L4.pptxakashayosha
ย 
HSK1-L3.pptx
HSK1-L3.pptxHSK1-L3.pptx
HSK1-L3.pptxakashayosha
ย 
HSK1-L2.pptx
HSK1-L2.pptxHSK1-L2.pptx
HSK1-L2.pptxakashayosha
ย 
HSK1-L1.pptx
HSK1-L1.pptxHSK1-L1.pptx
HSK1-L1.pptxakashayosha
ย 
Capital Market Responses to Environmental performance.pptx
Capital Market Responses to Environmental performance.pptxCapital Market Responses to Environmental performance.pptx
Capital Market Responses to Environmental performance.pptxakashayosha
ย 
Advanced Microeconomics Presentation.pptx
Advanced Microeconomics Presentation.pptxAdvanced Microeconomics Presentation.pptx
Advanced Microeconomics Presentation.pptxakashayosha
ย 
Exercises.pptx
Exercises.pptxExercises.pptx
Exercises.pptxakashayosha
ย 
Advanced Econometrics L13-14.pptx
Advanced Econometrics L13-14.pptxAdvanced Econometrics L13-14.pptx
Advanced Econometrics L13-14.pptxakashayosha
ย 
Advanced Econometrics L11- 12.pptx
Advanced Econometrics L11- 12.pptxAdvanced Econometrics L11- 12.pptx
Advanced Econometrics L11- 12.pptxakashayosha
ย 
Advanced Econometrics L10.pptx
Advanced Econometrics L10.pptxAdvanced Econometrics L10.pptx
Advanced Econometrics L10.pptxakashayosha
ย 
Advanced Econometrics L9.pptx
Advanced Econometrics L9.pptxAdvanced Econometrics L9.pptx
Advanced Econometrics L9.pptxakashayosha
ย 
Advanced Econometrics L7-8.pptx
Advanced Econometrics L7-8.pptxAdvanced Econometrics L7-8.pptx
Advanced Econometrics L7-8.pptxakashayosha
ย 
Advanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxAdvanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxakashayosha
ย 
Advanced Econometrics L3-4.pptx
Advanced Econometrics L3-4.pptxAdvanced Econometrics L3-4.pptx
Advanced Econometrics L3-4.pptxakashayosha
ย 
Advanced Econometrics L1-2.pptx
Advanced Econometrics L1-2.pptxAdvanced Econometrics L1-2.pptx
Advanced Econometrics L1-2.pptxakashayosha
ย 

More from akashayosha (17)

HSK1-L6.pptx
HSK1-L6.pptxHSK1-L6.pptx
HSK1-L6.pptx
ย 
HSK1-L5.pptx
HSK1-L5.pptxHSK1-L5.pptx
HSK1-L5.pptx
ย 
HSK1-L4.pptx
HSK1-L4.pptxHSK1-L4.pptx
HSK1-L4.pptx
ย 
HSK1-L3.pptx
HSK1-L3.pptxHSK1-L3.pptx
HSK1-L3.pptx
ย 
HSK1-L2.pptx
HSK1-L2.pptxHSK1-L2.pptx
HSK1-L2.pptx
ย 
HSK1-L1.pptx
HSK1-L1.pptxHSK1-L1.pptx
HSK1-L1.pptx
ย 
Capital Market Responses to Environmental performance.pptx
Capital Market Responses to Environmental performance.pptxCapital Market Responses to Environmental performance.pptx
Capital Market Responses to Environmental performance.pptx
ย 
Advanced Microeconomics Presentation.pptx
Advanced Microeconomics Presentation.pptxAdvanced Microeconomics Presentation.pptx
Advanced Microeconomics Presentation.pptx
ย 
Exercises.pptx
Exercises.pptxExercises.pptx
Exercises.pptx
ย 
Advanced Econometrics L13-14.pptx
Advanced Econometrics L13-14.pptxAdvanced Econometrics L13-14.pptx
Advanced Econometrics L13-14.pptx
ย 
Advanced Econometrics L11- 12.pptx
Advanced Econometrics L11- 12.pptxAdvanced Econometrics L11- 12.pptx
Advanced Econometrics L11- 12.pptx
ย 
Advanced Econometrics L10.pptx
Advanced Econometrics L10.pptxAdvanced Econometrics L10.pptx
Advanced Econometrics L10.pptx
ย 
Advanced Econometrics L9.pptx
Advanced Econometrics L9.pptxAdvanced Econometrics L9.pptx
Advanced Econometrics L9.pptx
ย 
Advanced Econometrics L7-8.pptx
Advanced Econometrics L7-8.pptxAdvanced Econometrics L7-8.pptx
Advanced Econometrics L7-8.pptx
ย 
Advanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptxAdvanced Econometrics L5-6.pptx
Advanced Econometrics L5-6.pptx
ย 
Advanced Econometrics L3-4.pptx
Advanced Econometrics L3-4.pptxAdvanced Econometrics L3-4.pptx
Advanced Econometrics L3-4.pptx
ย 
Advanced Econometrics L1-2.pptx
Advanced Econometrics L1-2.pptxAdvanced Econometrics L1-2.pptx
Advanced Econometrics L1-2.pptx
ย 

Recently uploaded

WhatsApp ๐Ÿ“ž Call : 9892124323 โœ…Call Girls In Chembur ( Mumbai ) secure service
WhatsApp ๐Ÿ“ž Call : 9892124323  โœ…Call Girls In Chembur ( Mumbai ) secure serviceWhatsApp ๐Ÿ“ž Call : 9892124323  โœ…Call Girls In Chembur ( Mumbai ) secure service
WhatsApp ๐Ÿ“ž Call : 9892124323 โœ…Call Girls In Chembur ( Mumbai ) secure servicePooja Nehwal
ย 
VIP Call Girl in Mira Road ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday ...dipikadinghjn ( Why You Choose Us? ) Escorts
ย 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfGale Pooley
ย 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfGale Pooley
ย 
VIP Call Girl in Mumbai ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday Wit...VIP Call Girl in Mumbai ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday Wit...dipikadinghjn ( Why You Choose Us? ) Escorts
ย 
Top Rated Pune Call Girls Sinhagad Road โŸŸ 6297143586 โŸŸ Call Me For Genuine S...
Top Rated  Pune Call Girls Sinhagad Road โŸŸ 6297143586 โŸŸ Call Me For Genuine S...Top Rated  Pune Call Girls Sinhagad Road โŸŸ 6297143586 โŸŸ Call Me For Genuine S...
Top Rated Pune Call Girls Sinhagad Road โŸŸ 6297143586 โŸŸ Call Me For Genuine S...Call Girls in Nagpur High Profile
ย 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...ssifa0344
ย 
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7Call Girls in Nagpur High Profile Call Girls
ย 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfGale Pooley
ย 
VIP Independent Call Girls in Bandra West ๐ŸŒน 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West ๐ŸŒน 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West ๐ŸŒน 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West ๐ŸŒน 9920725232 ( Call Me ) Mumbai Esc...dipikadinghjn ( Why You Choose Us? ) Escorts
ย 
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...ssifa0344
ย 
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
ย 
VIP Call Girl Service Andheri West โšก 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West โšก 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West โšก 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West โšก 9920725232 What It Takes To Be The Best ...dipikadinghjn ( Why You Choose Us? ) Escorts
ย 
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...priyasharma62062
ย 
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
ย 
Top Rated Pune Call Girls Dighi โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Dighi โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Dighi โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Dighi โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
ย 
( Jasmin ) Top VIP Escorts Service Dindigul ๐Ÿ’ง 7737669865 ๐Ÿ’ง by Dindigul Call G...
( Jasmin ) Top VIP Escorts Service Dindigul ๐Ÿ’ง 7737669865 ๐Ÿ’ง by Dindigul Call G...( Jasmin ) Top VIP Escorts Service Dindigul ๐Ÿ’ง 7737669865 ๐Ÿ’ง by Dindigul Call G...
( Jasmin ) Top VIP Escorts Service Dindigul ๐Ÿ’ง 7737669865 ๐Ÿ’ง by Dindigul Call G...dipikadinghjn ( Why You Choose Us? ) Escorts
ย 
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...priyasharma62062
ย 

Recently uploaded (20)

WhatsApp ๐Ÿ“ž Call : 9892124323 โœ…Call Girls In Chembur ( Mumbai ) secure service
WhatsApp ๐Ÿ“ž Call : 9892124323  โœ…Call Girls In Chembur ( Mumbai ) secure serviceWhatsApp ๐Ÿ“ž Call : 9892124323  โœ…Call Girls In Chembur ( Mumbai ) secure service
WhatsApp ๐Ÿ“ž Call : 9892124323 โœ…Call Girls In Chembur ( Mumbai ) secure service
ย 
VIP Call Girl in Mira Road ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday ...
ย 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdf
ย 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdf
ย 
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
ย 
VIP Call Girl in Mumbai ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday Wit...VIP Call Girl in Mumbai ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai ๐Ÿ’ง 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
ย 
Top Rated Pune Call Girls Sinhagad Road โŸŸ 6297143586 โŸŸ Call Me For Genuine S...
Top Rated  Pune Call Girls Sinhagad Road โŸŸ 6297143586 โŸŸ Call Me For Genuine S...Top Rated  Pune Call Girls Sinhagad Road โŸŸ 6297143586 โŸŸ Call Me For Genuine S...
Top Rated Pune Call Girls Sinhagad Road โŸŸ 6297143586 โŸŸ Call Me For Genuine S...
ย 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
ย 
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
ย 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
ย 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdf
ย 
VIP Independent Call Girls in Bandra West ๐ŸŒน 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West ๐ŸŒน 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West ๐ŸŒน 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West ๐ŸŒน 9920725232 ( Call Me ) Mumbai Esc...
ย 
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
ย 
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
ย 
VIP Call Girl Service Andheri West โšก 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West โšก 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West โšก 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West โšก 9920725232 What It Takes To Be The Best ...
ย 
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
ย 
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
ย 
Top Rated Pune Call Girls Dighi โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Dighi โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Dighi โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Dighi โŸŸ 6297143586 โŸŸ Call Me For Genuine Sex Servi...
ย 
( Jasmin ) Top VIP Escorts Service Dindigul ๐Ÿ’ง 7737669865 ๐Ÿ’ง by Dindigul Call G...
( Jasmin ) Top VIP Escorts Service Dindigul ๐Ÿ’ง 7737669865 ๐Ÿ’ง by Dindigul Call G...( Jasmin ) Top VIP Escorts Service Dindigul ๐Ÿ’ง 7737669865 ๐Ÿ’ง by Dindigul Call G...
( Jasmin ) Top VIP Escorts Service Dindigul ๐Ÿ’ง 7737669865 ๐Ÿ’ง by Dindigul Call G...
ย 
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
ย 

Lab practice session.pptx

  • 1. Advanced econometrics and Stata Practice Dr. Chunxia Jiang Business School, University of Aberdeen, UK Beijing , 17-26 Nov 2019
  • 2. ๏€ช Topics and schedule Sessions plan 10ๆœˆ17ๆ—ฅ Evening โ€” L1-2 Introduction to Econometrics and Stata 10ๆœˆ18ๆ—ฅ Evening โ€” L3-4 Data, single regression Morning โ€” L5-6 (1) Hypothesis testing, Multi-regression , Afternoon L5-6 (2) Violation of assumptions Morning โ€” L7-8 Panel data models & Endogeneity Evening Exercises and practice Morning โ€” L9-10 Time series models Afternoon L11-12 Frontier1 SFA & practice 10ๆœˆ24 Evening L13-14๏ผš Frontier2 DEA & practice 10ๆœˆ25ๆ—ฅ Evening L15-16 DID & practice Morning Revision Afternoon Exam 10ๆœˆ20ๆ—ฅ 10ๆœˆ19ๆ—ฅ 10ๆœˆ22ๆ—ฅ 10ๆœˆ26ๆ—ฅ
  • 3. ๏€ช sysuse auto ๏€ช Sum ๏€ช we have data on the mileage rating and weight of 74 automobiles. The variables in our data are mpg, weight, and foreign. The last variable assumes the value 1 for foreign and 0 for domestic automobiles. We wish to fit the model Linear regression
  • 4. ๏€ช sysuse auto ๏€ช Sum ๏€ช we have data on the mileage rating and weight of 74 automobiles. The variables in our data are mpg, weight, and foreign. The last variable assumes the value 1 for foreign and 0 for domestic automobiles. We wish to fit the model ๏€ช regress mpg weight foreign Linear regression
  • 6. R2 ๏€ช Use which R-square? ๏€ช Good practice to use adjusted R-square, particularly when the number of explanatory variables is not very small compared with the number of observations ๏€ช But this has no theoretical justification. ๏€ช Adjusted R-square is reported by most statistical packages ๏€ช Compare R-square of two models ๏€ช The sample size and the dependent variable must be the same ๏€ช The explanatory variables may take any form ๏€ช Allocating the multiple R-square between the regressors? ๏€ช Little point to do so 6
  • 7. ๏€ช Fitted model ๏€ช a graph comparing mpg with weight: ๏€ช twoway (scatter mpg weight) ๏€ช scatter mpg weight ๏€ช This is to be expected because energy usage per distance should increase linearly with weight, but mpg is measuring distance per energy used. ๏€ช We could obtain a better model by generating a new variable measuring the number of gallons used per 100 miles (gp100m) and then using this new variable in our model: Linear regression
  • 8. ๏€ช . generate gp100m = 100/mpg ๏€ช . Regress gp100m weight foreign Linear regression
  • 10. ๏€ช We wish to fit a regression of the weight of an automobile against its length ๏€ช regress weight length ๏€ช we wish to impose the constraint that the weight is zero when the length is zero. ๏€ช regress weight length, noconstant Linear regression
  • 12. ๏€ช Specifying the vce(robust) option is equivalent to requesting White-corrected standard errors in the presence of heteroskedasticity. ๏€ช We use the automobile data: the energy efficiency of cars: ๏€ช the amount of energy (measured in gallons of gasoline) that the cars in the data need to move 1,000 pounds of their weight 100 miles. Heteroskedasticity and robust standard errors
  • 13. ๏€ช generate gpmw = ((1/mpg)/weight)*100*1000 ๏€ช Sum ๏€ช We are going to examine the relative efficiency of foreign and domestic cars. ๏€ช regress gpmw foreign ๏€ช regress gpmw foreign, vce(robust)
  • 14.
  • 15.
  • 16. ๏€ช Which is right? Notice that gpmw is a variable with considerable heteroskedasticity ๏€ช tabulate foreign, summarize(gpmw)
  • 17. ๏€ช . webuse nlswork ๏€ช . xtset idcode ๏€ช we will model ln wage in terms of completed years of schooling (grade), current age and age squared, current years worked (experience) and experience squared, current years of tenure on the current job and tenure squared, whether black (race = 2), whether residing in an area not designated a standard metropolitan statistical area (SMSA), and whether residing in the South. Panel data
  • 18. ๏€ช xtreg ln_w grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure > c.tenure#c.tenure 2.race not_smsa south, fe
  • 19. ๏€ช xtreg ln_w grade age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure c.tenure#c.tenure 2.race not_smsa south, fe vce(robust) ๏€ช Although the estimated coefficients are the same with and without the vce(robust) option, the robust estimator produced larger standard errors and a p-value for c.ttl exp#c.ttl exp above the conventional 10%. The F test of v i = 0 is suppressed because it is too difficult to compute the robust form of the statistic when there are more than a few panels. Fixed-effects models with robust standard errors
  • 20. ๏€ช Create our own listโ€ฆ Command focus