5.2 The data below (data set texasgas) shows the demand for natural gas and the price of...
Question:
5.2 The data below (data set texasgas) shows the demand for natural gas and the price of natural gas for 20 towns in Texas in 1969.
City Average price P Consumption per customer C (cents per thousand cubic feet) (thousand cubic feet)
Amarillo 30 134 Borger 31 112 Dalhart 37 136 Shamrock 42 109 Royalty 43 105 Texarkana 45 87 Corpus Christi 50 56 Palestine 54 43 Marshall 54 77 Iowa Park 57 35 Palo Pinto 58 65 Millsap 58 56 Memphis 60 58 Granger 73 55 Llano 88 49 Brownsville 89 39 Mercedes 92 36 Karnes City 97 46 Mathis 100 40 La Pryor 102 42
(a) Do a scatterplot of consumption against price.
The data are clearly not linear. Three possible nonlinear models for the data are given below Ci = exp(a+ bPi + e;)
Ci = { a1 + b1 P; + e;
a2 + b2 P; + e;
Ci = a+ b1 P + b2P2 •
when P; :0:::: 60 when P; > 60;
The second model divides the data into two sections, depending on whether the price is above or below 60 cents per 1,000 cubic feet.
(b) Can you explain why the slope of the fitted line should change with P?
(c) Fit the three models and find the coefficients, and residual variance in each case.
For the second model, the parameters a1, a2 , bi , b2 can be estimated by simply fitting a regression with four regressors but no constant:
(i) a dummy taking value 1 when P :0:::: 60 and 0 otherwise; (ii) Pl = P when P :0:::: 60 and 0 otherwise; (iii) a dummy taking value 0 when P :0:::: 60 and 1 otherwise; (iv) P2 = P when P > 60 and 0 otherwise.
(d) For each model, find the value of R2 and AIC, and produce a residual plot. Comment on the adequacy of the three models.
(e) For prices 40, 60, 80, 100, and 120 cents per 1,000 cubic feet, compute the forecasted per capita demand using the best model of the three above.
(f) Compute 95% prediction intervals. Make a graph of these prediction intervals and discuss their interpretation.
(g) What is the correlation between P and P2 ?
Does this suggest any general problem to be considered in dealing with polynomial regressions-especially of higher orders?
Step by Step Answer:
Forecasting Principles And Practice
ISBN: 9780987507105
1st Edition
Authors: Rob J Hyndman, George Athanasopoulos