Using
Multiple
BI Platforms?

## Have you tried  Being ready for any possible outcome of the future is always better than facing everything on the go. That’s where forecasting places a major role to make predictions based on past and present data.

### ARIMA data Models

ARIMA stands for Auto-Regressive Integrated Moving Average mode of forecasting the data across a specific time period. We can create a predictive model for our data by performing any one or combining any of these three methods on the data based on our requirement with this method. ### Non-Seasonal ARIMA Models

The model names are defined as ARIMA(p,d,q).

• p is the number of autoregressive terms,
• d is the number of nonseasonal differences needed for stationarity
• q is the number of lagged forecast errors in the prediction equation.

Akaike’s Information Criterion (AIC), which was useful in selecting predictors for regression, is also useful for determining the order of an ARIMA model. It can be written as;

AIC=−2log(L)+2(p+q+k+1)

where L is the likelihood of the data, k=1 if c≠0 and k=0 if c=0.

Note that the last term in parentheses is the number of parameters in the model

For ARIMA models, the corrected AIC can be written as;

AICc=AIC+2(p+q+k+1)(p+q+k+2)T−p−q−k−2

and the Bayesian Information Criterion can be written as;

BIC=AIC+[log(T)−2](p+q+k+1)

Good models are obtained by minimising the AIC, AICc or BIC. Our preference is to use the AICc.

It is important to note that these information criteria tend not to be good guides to selecting the appropriate order of differencing (d) of a model, but only for selecting the values of p and q.

This is because of the differencing changes the data on which the likelihood is computed, making the AIC values between models with different orders of differencing not comparable. So, we need to use some other approach to choose d, and then we can use the AICc to select p and q.

### Seasonal ARIMA Models

The model names are defined as ARIMA(p,d,q)(P, D, Q)m

• m refers to the number of periods in each season
• (P, D, Q ) represents the (p,d,q) for the seasonal part of the time series

### How we implement it in Alteryx…? Arima tool is a time series forecasting model, it can be a univariate model or one with covariates (predictors).

#### Configuring the tool

In the Arima tool, you need to specify a value to all the options in the required parameters window. First one is the name of the model that you are going to create, target field on which we are going to estimate the value and then the frequency of time of estimate. By default, it will run for a set of a predefined set of values of p,d,q and P, D, Q. We can customize the constants based on our requirement. You can customize the parameters of the default model or you can create a custom model by using either one of the below options. ### Customising the parameters ### Creating a specific model If you want to add drift in the data, you can add a constant value for the box transformation by enabling it, Whether or not to perform a power transform of the series (True/False) or specify the lambda for the transform.

You can specify a start period of our forecast and number periods to forecast from it in the third tab. You can customise the size and resolution of the graphics\chart that will be created in the “Graphics option” tab. ### Outputs

• O anchor: Consists of an output stream containing the ARIMA model object that can be used for both point forecasts and a user-specified percentile confidence interval surrounding those forecasts.
• R anchor: Consists of the report snippets generated by the ARIMA tool: a statistical summary, autocorrelation diagnostic plots and forecast plots.
• I anchor: An interactive HTML dashboard consisting of plots and metrics. You can interact with the visualizations by clicking on the different graphical elements to reveal more information, values, metrics and analytics.

### Example

Please find a simple example of ARIMA forecast below with a sample data. In which we are going to forecast our profit in the coming quarters. We will get the following visualisations as output from the I anchor. A trend chart with the forecasted values. Values of all the constants that are calculated in our model.  The O anchor will have the model object with all the calculations which can be connected to TS tool, in which we can add a percentage confidence interval for our model and the time period we need to forecast as shown below in the TS configuration window. We will get the output as shown below from the O anchor of the TS tool. You can select the best ARIMA model for your data by comparing AIC, AICc values of different models. The model which has more values lower than others will be the best model for your data. ### Conclusion

Forecasting by ARIMA model is easier than expected in alteryx. You don’t need to do a complex calculation, or you don’t need to write any script. Define the model and apply the values in ARIMA tool and get output.

### References

https://globaljournals.org/GJMBR_Volume13/3-Selection-of-Best-ARIMA-Model.pdf

1. http://people.duke.edu/~rnau/411fcst.htm

### ARIMA – Real-time use case

Arima model is used in the below example to predict the crime rate in metropolitan areas of England which you can refer below.

https://community.alteryx.com/t5/Alteryx-Use-Cases/Crime-Mapping-What-If-You-Could-Predict-the-Future/ta-p/286590

Read more about similar Self Service BI topic here and learn more about Visual BI Solutions Microsoft Power BI offerings here. 