

#Finding the proper time on the plot for the election The rate of GDP per CPI would be an effective indicator for people’s perception of the country’s situation because it is related to people’s consumer level and the country’s growth rate either. But first of all, we need an decisive variable. In order to do that, a graph might be useful.

Now, we can investigate the convenient time for the election in terms of ruling parties. The residuals are within thresholds of the ACF plot, which means no remained information in the data. In the last step for the fitness of the model, we will check for the residuals. To the AICc results, the best model has seasonal AR(1) part with the first difference. As we analyzed the ACF/PACF plots, we would see that we have seasonal AR(1) and seasonal MA(1) components because both plots have spikes at seasonal lags( 4). The data seem to be stationary in terms of the mean. #The first difference of the log-transformed data But, because of the exponential uptrend, we would better do log-transforming to stabilize the variance, as well. Therefore, we will do the first difference to stabilize the mean. It is seen a very strong uptrend in the data while no seasonality is detected on the graph. Now, we will do the same steps for the CPI data. #ForecastingĪs.ame() %>% #to use the select function below, we convert data to a data frame Now, we can pass on to calculating forecasts with certainty. We clearly see that there is no spike within threshold limits, which means that the residuals are white noise by the ACF graph above. Drift indicates the intercept in the model formula.Īfter finding our model, it would be better to check the residuals to see that if there is any correlation in the data. The model consists of non-seasonal AR(1) and seasonal MA(1) components in seasonally differenced data which is very similar to our guess based on ACF. If we analyze the above results, we would conclude that the auto model is better than the others by AICc results. We will set the stepwise parameters to FALSE, which provides an extra process for finding the optimal solution.

And, we will also add the automatic selection process to find the best results. We can start with the below models according to the ACF/PACF graphs mentioned above. On the other hand, based on PACF, there is a significant spike at lag 4 which also leads to a seasonal AR(1) component. There is a spike at lag 4 which leads to a seasonal MA(1) component. In order to find appropriate the ARIMA model, we first would look at the ACF graph. To the plot above, the mean seems to be stabilized we don’t need to take a further difference. Labs(title="Seasonally differenced", y="") Although the mean of the data seems non-stationary either, if there is strong seasonality in the data, we would first take a seasonal difference because, after the seasonal differencing, the mean can also be stabilized. Therefore, we will first take a seasonal difference of the data. Besides that, it is clearly seen that there is strong seasonality in the data. Hence, we won’t take the logarithmic transformation of the data. When we examine the above plot, there is no significant indication of a change of variance. Scale_y_continuous(labels = scales::label_number_si()) + #for SI prefix #Creating tsibble variables for CPI and GDP variables In the dataset, we will use the quarters’ values of related variables between 2010-Q-Q2. We will predict for the next 8 quarters the CPI and GDP with the ARIMA method from fable package. The variables we are going to use are the chain-weighted GDP, which clears the inflation effect from GDP, and CPI. In order to answer this question, we have to choose some variables to monitor economic conditions, to seek a proper election date in terms of government. But, is it politically right decision to go early election before the officially announced 23 June 2023 in terms of ruling parties? Nowadays, every journalist and intellectual talks about a probable early election in Turkey’s ongoing poor economic conditions.
