Help Manual

Contents






Sigma Magic Help Version 19

Time Series Models

Application

A Time Series Analysis tool can be used to analyze the time series for the given sets of data points. Data must be collected in a time sequence with an equal interval between data points (for example, data collected every hour or every day, etc.). Currently, only the ARIMA model is available for this analysis. It is a class of statistical models used for analyzing and forecasting univariate time series data. ARIMA models are powerful because they can model various patterns such as trend, seasonality (with extensions), and autocorrelation. ARIMA stands for:
  • AutoRegressive (AR): This part looks at how past values influence the current value. Think of it as "Today's value depends a bit on what happened yesterday or the day before."
  • Integrated (I): This part involves stabilizing the data by removing trends. If the data keeps going up or down, we "adjust" it to remove that trend so it's easier to work with.
  • Moving Average (MA): This part smooths out the random noise by looking at past mistakes in predictions. It says, "If we were off by this much last time, let's correct for it this time."
ARIMA is a powerful time series analysis tool that is widely used in finance, retail, weather forecasting, and economics. It doesn't need external variables - it uses the history of the data to make predictions. This analysis is based on the Forecast package within R software.

This tool can be added to your active workbook by clicking on Analytics and then selecting Time Series Models.

Inputs

Click on Analysis Setup to open the menu options for this tool.

You can perform four different actions on the time series data: a) analyze the data, b) transform the data, c) smooth the data, and d) forecast new data points. Each of these actions is described below.

Setup

A sample screenshot of the setup menu is shown below.
inputs1
1
Forecast Model: Specify the type of model you want to build. Currently, only the ARIMA model is available for this analysis.
2
Num Forecasts: Specify if you want to generate forecasts using the model that you develop. If you specify 0, then no forecasts are generated. Use an integer to specify the number of forecasts to generate.
2
Model Type: Specify the type of model you want to fit into the data. The available options are:
OptionDescription
Non SeasonalFocuses on patterns over time, like trends and short-term fluctuations. It does not account for repeating seasonal patterns (e.g., increased sales every December). It is ideal for data without strong periodic fluctuations.
SeasonalExtends ARIMA by including seasonal patterns. Seasonal means patterns that repeat at regular intervals, like More ice cream sales every summer, more online shopping every November/December etc.
Use SARIMA when your time series has repeating patterns (like annual or monthly cycles). Otherwise, ARIMA is sufficient.
4
Seasonal Length: Specify the length of the season. For example, if you are working with monthly sales and we have an annual cycle of increased sales in December, the seasonal length is 12.
5
Model Parameters: Specify the model parameters. For a nonseasonal model, we specify the three parameters p, d, and q. For a seasonal model, we have three additional parameters: P, D, and Q.
OptionDescription
p (AR Order)It controls how much the past values of the series influence the current value. For example, if the current value of sales depends on the sales pattern of the last 3 days, p = 3.
d (Differencing Order)How many times does the data need to be "differenced" to remove trends and make it stationary?ARIMA needs the data to be stationary over time. If we have to difference the data once to remove an upward trend, d = 1.
q (Moving Average Order)How much does the model correct for random errors in past predictions? For example, how much does today's value depend on the mistakes we made in predicting previous days? If the last two prediction errors still affect today's prediction, then q = 2.
P (Seasonal AR Order)Looks at the seasonal lags (what happened 12 months ago). Did the sales in December this year resemble sales in December last year?
D (Seasonal Differencing Order)Removes repeating seasonal patterns to stabilize the data. For example, if sales spike every December, then D = 1 will remove that spike.
Q (Seasonal Moving Average Order)Adjusts for seasonal patterns in forecast errors. Did our prediction errors 12 months ago help us understand the pattern we see today?
s (Seasonal Period) The number of time steps that make up one season. Specified in the seasonal length specified above.
6
Constant Term: Specify if you want to include the constant term in the ARIMA model. If set to true, then the mean is included for undifferenced series, and drift is included for differenced series. Note that if there is more than one difference taken, no constant is included , regardless of the value of this selection.
7
Auto Selection: Specify whether you want the software to select the number of model parameters automatically. Returns the best ARIMA model based on the Akaike Information Criterion (AIC). Note that the search is limited to a maximum order of 5 for (p, q), a maximum order of 2 for (P, Q), a maximum order of 2 for d, and a maximum order of 1 for D. The best model is based on an estimation via the conditional sum of squares, but the final model is still computed using maximum likelihood estimation.
8
Help Button: Click on this button to open the help file for this topic.
9
Cancel Button: Click on this button to cancel all changes to the settings and exit this dialog box.
10
OK Button: Click on this button to save all changes and compute the outputs for this analysis.

Data

You will see the following dialog box if you click the Data button. Here, you can specify the data required for this analysis. Data
1
Search Data: The available data displays all the columns of data that are available for analysis. You can use the search bar to filter this list and speed up the process of finding the right data for analysis. Enter a few characters in the search field, and the software will filter and display the filtered data in the Available Data box.
2
Available Data: The available data box contains the list of data available for analysis. If your workbook has no data in tabular format, this box will display "No Data Found." The information displayed in this box includes the row number, whether the data is Numeric (N) or Text (T), and the name of the column variable. Note that the software displays data from all the tables in the current workbook. Even though data within the same table have unique column names, columns across different tables can have similar names. Hence, it is crucial that you not only specify the column name but also the table name.
3
Add or View Data: Click on this button to add more data to your workbook for analysis or to view more details about the data listed in the available data box. When you click this button, the Data Editor dialog box opens, allowing you to import additional data into your workbook. You can also switch from the list view to a table view to see the individual data values for each column.
4
Required Data: The code for the required data specifies the data that can be entered for that box. An example code is N: 2-4. If the code starts with an N, you must select only numeric columns. If the code begins with a T, you can select numeric and text columns. The numbers to the right of the colon specify the minimum and maximum values. For example, if the min-max values are 2-4, you must select a minimum of 2 columns of data and a maximum of 4 columns in this box. If the minimum value is 0, then no data is required to be specified for this box.
5
Select Button: Click on this button to select the data for analysis. Any data you choose for the analysis is moved to the right. To select a column, click on the columns in the Available Databox to highlight them and then click on the Select Button. A second method for determining data is to double-click on the columns in the list of Available Data. Finally, you can drag and drop the columns you are interested in by holding down the left mouse key to select the columns and then dragging and dropping them into one of the boxes on the right.
6
Selected Data: The list box header will be displayed in black if the right number of data columns is specified. If sufficient data has not been specified, the list box header will be displayed in red. Note that you can double-click on any of the columns in this box to remove them from the box.

7
View Selection: Click on this button to view the data you have specified for this analysis. The data can be viewed in a tabular format or a graphical summary.

Verify

If you click the Verify button, the software will perform some checks on the data you entered. A sample screenshot of the dialog box is shown in the figure below. Verify The software checks if you have correctly specified the input options and entered the required data on the worksheet. The results of the analysis checks are listed on the right. If the checks are passed, they are shown as green checkmarks. If the verification checks fail, they are shown as a red cross. If the verification checks result in a warning, they are indicated by an orange exclamation mark. Additionally, any checks that require user action are displayed as blue information icons.
1
Item: The left-hand side shows the major tabs and the items checked within each section
2
Status: The right-hand side shows the status of the checks.
3
Overall Status: The overall status of all the checks for the given analysis is shown here. The overall status check displays a green thumbs-up sign if everything is okay and a red thumbs-down sign if any checks have not passed. Note that you cannot proceed with generating analysis results for some analyses if the overall status is not okay.

Outputs

Click on Compute Outputs to update the output calculations. A sample screenshot of the worksheet is shown below. outputs The analysis's text output contains a summary of the inputs, and the analysis results section contains the estimated model parameters and the goodness of fit values like accuracy parameters. The graphs generated represent the time series plot of the specified data and may include forecasts if you have specified them. The confidence intervals are also superimposed on the estimates. A plot of the residuals is also shown to verify the adequacy of the generated model. If forecasts are required, a column of the forecasted values is also displayed on the worksheet.

Examples

The following examples are in the Examples folder.
  • Analyze the data given in the reference file (ARIMA 1.xlsx).