# EC421 – Introduction to Econometrics – Time Series and Autocorrelation – Economics

**Econometrics Assessment Answer**

Problem Set 3

Time Series and Autocorrelation

EC421 Introduction to Econometrics

### Problem 1

PtGas 01PtoiluNo, we cant expect OLS estimator to be consistent. From the history, it is evident that gas price depends on previous periods gas prices. So, there can be autocorrelation problem.

OLS estimate of model 1a is provided below

Call

lm(formula price_gas price_oil, data data)

Residuals

Min 1Q Median 3Q Max

-3.4760 -1.4466 -0.8046 1.4670 9.0623

### Coefficients

Estimate Std. Error t value Pr(gtt)

(Intercept) 3.336013 0.263876 12.642 lt 2e-16

price_oil 0.017453 0.003956 4.412 1.5e-05

—

Signif. codes 0 0.001 0.01 0.05 . 0.1 1

Residual standard error 2.118 on 263 degrees of freedom

Multiple R-squared 0.06891,Adjusted R-squared 0.06537

F-statistic 19.46 on 1 and 263 DF, p-value 1.497e-05

1 0.01745

p-value 0.0000

Coefficient of average price of oil, per barrel comes out 0.01745, which is positive. This means that there is 0.01745 increase in the average price of natural gas, per 1MM BTU for every 1 increase in the average price of oil, per barrel. In Economics, statistical significance is seen by the p-value. P-value for coefficient 1 is 0.000, which implies that we can reject the null hypothesis of non-significance even at 1 percent significance level. Therefore, coefficient 1 is significant at 1 percent significance level.

Significance of 1 doesnt imply that price of oil explains lot of variation in the price of natural gas. R-sq explains, how much variation in the price of natural gas can be explained by price of oil.

R-sq 0.06891

Only 6.89 percent variation in the price of natural gas can be explained by price of oil.

Now, consider the following model

PtGas 01Ptoil2Pt-1oil3Pt-2oilutOLS estimate of the model is as

Residuals

Min 1Q Median 3Q Max

-3.4767 -1.4734 -0.8187 1.4493 9.1105

Coefficients

Estimate Std. Error t value Pr(gtt)

(Intercept) 3.373472 0.268789 12.551 lt2e-16

price_oil 0.026040 0.026720 0.975 0.331

lag(price_oil, 1) 0.002325 0.043720 0.053 0.958

lag(price_oil, 2) -0.011482 0.026651 -0.431 0.667

—

Signif. codes 0 0.001 0.01 0.05 . 0.1 1

Residual standard error 2.131 on 259 degrees of freedom

(2 observations deleted due to missingness)

Multiple R-squared 0.0684,Adjusted R-squared 0.05761

F-statistic 6.339 on 3 and 259 DF, p-value 0.0003663

For Model 1a For Model 1d

1 0.01745 10.0260 p- value 0.000 P-value 0.331

The coefficient of natural price of oil is 0.026 for new model, which is greater than the coefficient we got for model 1a. But coefficient 1 is not significant at 5 percent significance level as the p-value is greater than 0.05. Therefore, natural price of oil affects natural price of gas positively but not significantly.

20.0023253-0.011482Oil price of previous month has positive but not significant impact on current natural price of gas whereas Oil price of previous to previous month has negative impact on natural price of gas. So, there is 0.00232 increase in the current price of natural gas for every 1 increase in the previous months oil price, and there is -0.011482 decrease in the current price of natural gas for every 1 increase in the previous to previous months oil price. 2 and 3 are insignificant at 5 percent significance level as the p-values are greater than 0.05.

R-sq is almost same for both the models. Though, there is notable difference between adjusted R- squared of both the models. Adjusted R-sq for model used in 1d is slightly lesser than the adjusted R-sq for model used in 1a. So, lag terms dont improve the model more than expected by chance.

### A Wald test is used to compare the models used in 1a and 1d.

Wald test

Model 1 price_gas price_oil lag(price_oil, 1) lag(price_oil, 2)

Model 2 price_gas price_oilRes.Df Df F Pr(gtF)

1 259

2 261 -2 0.2342 0.7914P-value for Wald test is 0.7914, which implies that we have to accept the null hypothesis. So, adding the lag terms doesnt significantly improve the model.

No, we cant expect the OLS to be consistent for 1. From the history, it is evident that gas price depends on previous periods gas prices. So, there can be autocorrelation problem. OLS estimator are inconsistent in the presence of autocorrelation.

Now, consider the following model

PtGas 01Ptoil2Pt-1oil3Pt-1GasuOLS Estimate of the model

Residuals

Min 1Q Median 3Q Max

-3.9702 -0.3490 -0.0746 0.2350 3.6602

Coefficients

Estimate Std. Error t value Pr(gtt)

(Intercept) 0.219682 0.117673 1.867 0.06304 .

price_oil 0.026277 0.008660 3.034 0.00265

lag(price_oil, 1) -0.025445 0.008645 -2.943 0.00354

lag(price_gas, 1) 0.937327 0.021633 43.328 lt 2e-16

—

Signif. codes 0 0.001 0.01 0.05 . 0.1 1

Residual standard error 0.7427 on 260 degrees of freedom

(1 observation deleted due to missingness)

Multiple R-squared 0.8868,Adjusted R-squared 0.8855

F-statistic 679 on 3 and 260 DF, p-value lt 2.2e-16

1 0.026277, 3 0.937327For model used in 1i, estimate of 1 is highest among the estimates of 1 for all the three models. Estimate of 1 is significant at 5 percent significance level as the p-value (0.026) is less than 0.05. Therefore, natural price of oil affects natural price of gas positively and significantly.

Gas price of previous month has positive and significant impact on current months natural price of gas. There is 0.937327 increase in the current price of natural gas for every 1 increase in the previous months gas price.

R-sq for model used in 1i, is significantly higher than the R-sq of previous models. Now, 88.68 percent variation in the natural price of gas can be explained by the model used in 1i. Therefore, it can be said that, there is autocorrelation in the model.

### Problem 2

Autocorrelation has impact on biasedness and consistency of OLS estimates of model used in 1a and 1d. OLS estimates becomes inconsistent due to autocorrelation. OLS estimates are not BLUE anymore. While OLS estimates of model used in 1i are consistent but unbiased.

See the code

Residual plot over the months and ACF plot over the lag is shown below

Residual plot does not show any particular pattern. Autocorrelation function plot over the lags is shown below. On the graph, there is vertical line corresponding to each lag. The height of each spike shows the corresponding value of autocorrelation function. For 1i model, value of the autocorrelation function is close to zero for all the lags and most of the spikes are not significant. This means there is no autocorrelation in the model.

For model 1a and 1d, Residual plot over the months and ACF plot over the lag is shown below

Autocorrelation plot shows that most of the spikes are statistically significant. So, there is autocorrelation problem in the model. Residual plot also shows a particular pattern.

Autocorrelation plots for model 1a and 1d show that most of the spikes are statistically significant. So, there is autocorrelation problem in the models. Residual plot also shows a particular pattern. Model 1a and model 1d doesnt include gas price of previous month while from the above analysis, it is evident that gas price of previous month has significant impact on the current months gas price. R-sq also significantly improved by adding the previous months gas price.

If error term in not autocorrelated then we can expect OLS estimates to be consistent but biased.

E(), plim P-value is less than 0.05, which means that there is second order autocorrelation in the model.

Res.Df Df F Pr(gtF) 1 260

2 261 -1 8.6624 0.003542

—

Signif. codes 0 0.001 0.01 0.05 . 0.1 1

No, we wont interpret our estimates as casual. Now, (12) combinedly shows the impact of oil price on natural price of gas instead of 1.