Gas Prod
Gas Prod
2 Data Analysis
Summary
4|Page
5|Page
6|Page
KEY OBSERVATIONS FROM DATA PLOTIING
➢ From the plot it can be seen gas production was constant for more than a decade(till1970) but
after that it start increasing , thus showing trend and seasonality. It is multiplicative series.
➢ Gas production is most in July followed by August and June . in the starting month of the years
the production was less , then it start increasing in the middle months and again start decreasing
towards end of the year.
➢ Gas Production has increased over the years.
➢ There are no outliers present in the data.
➢ Components present are TREND,SEASONALITY AND WHITE NOISE
Since the data is monthly gas production , hence the periodicity is monthly.
The frequency of the data is 12.
7|Page
3 STATIONARY SERIES
➢ A common assumption in many time series techniques is that the data are stationary.
➢ A stationary process has the property that the mean, variance and autocorrelation structure
do not change over time.
➢ Stationarity can be defined in precise mathematical terms, but for our purpose we mean a flat
looking series, without trend, constant variance over time, a constant autocorrelation
structure over time and no periodic fluctuations (seasonality).
➢ The correlation between the t-th term in the series and the t+m-th term in the series is
constant for all time periods and for all m
Since the p-value is more than 0.05, we can’t reject null hypothesis. Thus coming to the conclusion
that it is non stationary series
8|Page
Augmented Dickey-Fuller Test
data: gas
Dickey-Fuller = -2.7131, Lag order = 7, p-value = 0.2764
alternative hypothesis: stationary
9|Page
10 | P a g e
TRANSFORMATION TO STATIONARY SERIES USING LOG AND DIFFERENCING
11 | P a g e
ADF TEST FOR STATIONARY SERIES
12 | P a g e
4 ARIMA MODEL
➢ AR is a special and simpler form of a general class of models: ARIMA(p, d, q)
➢ Theoretically (p, q) may take any value but usually values higher than 2 not preferred
in practical situation
13 | P a g e
4.1 FITTING ARIMA MODEL
After doing few iterations and making few combinations of (p,d,q), we come to the conclusion that
best suited values for non seasonal (p,d,q -2,1,2) and seasonal values for (p,d,q-2,1,2)
ASSUMPTIONS OF ARIMA
➢ .Plot ACF(residuals)
Residuals plot have to be normally distributed.
Residuals should not be autocorrelated
➢ Do portmanteau test(BOX- LJUNG TEST) for residuals Portmanteau Test to check whether
the residuals are independent. P-value must be greater than 0.05
H0 : Residuals are independent
Ha: Residuals are not independent
IF ALL THE ASSUMPTIONS ARE FULFILLED THAN ONLY ARIMA MODEL IS CONSIDERED
BEST FOR FORECASTING
Since the parameters used in the model are not fulfilling the assumptions made above we
won’t consider this model for forecasting.
Coefficients:
ar1 ar2 ma1 ma2
1.7180 -0.9797 -1.8485 0.9999
s.e. 0.0184 0.0188 0.0559 0.0506
14 | P a g e
BOX TEST
Box-Ljung test
data: gas.arima.fit$residuals
X-squared = 174.44, df = 50, p-value = 1.11e-15
15 | P a g e
FORECAST MODEL
16 | P a g e
4.1.2 MANUAL ARIMA MODEL WITH SEASONAL EFFECT(2,1,2)(2,1,2)
Since this model meets the assumptions we will consider this model for
forecasting
Coefficients:
ar1 ar2 ma1 ma2 sar1 sar2 sma1 sma2
-0.8669 -0.3009 0.3835 -0.1606 0.7900 -0.5407 -1.6498 0.9984
s.e. 0.3598 0.2419 0.3668 0.3006 0.2633 0.2241 0.9490 1.0718
BOX TEST
Box-Ljung test
data: gas.arima.fit_season$residuals
X-squared = 50.505, df = 50, p-value = 0.4534
17 | P a g e
18 | P a g e
MODEL FORECAST
Auto ARIMA takes into account the AIC and BIC values generated to determine the best
combination of parameters. AIC (Akaike Information Criterion) and BIC (Bayesian
Information Criterion) values are estimators to compare models. The lower these values, the
better id the model
ARIMA(0,1,1)(0,1,1)[12]
Coefficients:
ma1 sma1
-0.5437 -0.8052
s.e. 0.0937 0.2372
sigma^2 estimated as 0.002052: log likelihood=114.2
AIC=-222.4 AICc=-222.04 BIC=-215.61
19 | P a g e
BOX TEST
Box-Ljung test
data: auto.fit$residuals
X-squared = 61.286, df = 50, p-value = 0.1316
20 | P a g e
MODEL FORECAST
21 | P a g e
5 ACCURACY OF MODEL
AUTO ARIMA
BEST MODEL
22 | P a g e
23 | P a g e
24 | P a g e