* * Dougherty, Introduction to Econometrics, 4th ed * Example from Sections 11.2 and 11.3 * Simple time series models * open data demand.xls calendar(a) 1959:1 data(format=xls,org=columns) 1959:01 2003:01 adm book busi clot date dent doc dpi flow food furn gas gaso \$ hous legl mags mass opht padm pbook pbusi pclot pdent pdoc pflow pfood pfurn pgas pgaso phous plegl \$ pmags pmass pop popht prelg ptele ptob ptoys ptpe relg tele time tob toys tpe * set prelhous = 100.0*phous/ptpe graph(footer="Figure 11.1 Relative price series for housing services",extend) # prelhous * linreg hous # constant dpi prelhous * set lghous = log(hous) set lgdpi = log(dpi) set lgprhous = log(prelhous) * linreg lghous # constant lgdpi lgprhous * * Various dynamic specifications * linreg lghous # constant lgdpi{1} lgprhous{1} linreg lghous # constant lgdpi{2} lgprhous{2} * linreg lghous # constant lgdpi{0 1} lgprhous{0 1} * * SUMMARIZE can be used to add up the coefficients on a set of regressors. This * computes not just the sum, but also the standard error (and t-statistic for * zero, not that that's of interest here). * summarize(title="Sum of income elasticities") # lgdpi{0 1} summarize(title="Sum of price elasticities") # lgprhous{0 1} * linreg lghous # constant lgdpi{0 1 2} lgprhous{0 1 2} summarize(title="Sum of income elasticities") # lgdpi{0 1 2} summarize(title="Sum of price elasticities") # lgprhous{0 1 2}