60 likes | 224 Views
Econometrics (NA3011). Reza Mortazavi 2014 Stata Lecture 4. Explaining ice cream demand. use http ://users.du.se/~ rem/icecream.dta Browse tsset time
E N D
Econometrics (NA3011) Reza Mortazavi 2014 Stata Lecture 4
Explaining ice cream demand • use http://users.du.se/~rem/icecream.dta • Browse • tsset time • Note: ”tsset ” is the commandthatinforms the data aretime series, the variable ”time” in this data set is the timevariable. • Do we have any reason to suspect autocorrelation (also called serial correlation)? • regr cons price income • predict resid,residual
Explaining ice cream demand • twoway (scatter resid time, yline(0)) • regr cons price income temp • predict ehat,residual • twoway (scatter ehat time, yline(0)) • Still autocorrelation • estatdwatson • H0: H1: • At 5% significancelevelwehave (for T=30, K=4), . So werejectH0: .
GLS • estatbgodfrey • This so called Breusch-Godfrey test is more general and is sufficient for this course. What is the conclusion? • prais cons price income temp, rhotype(regress) corc
Introducing dynamics • gen lagtemp=L.temp • regr cons price income temp lagtemp • estatdwatson • estatbgodfrey
Robust (Newey-West HAC) standard errors • newey cons price income temp, lag(1) • newey cons price income temp, lag(2)