Help Manual

Contents






Sigma Magic Help Version 17

Time Series Analysis

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.). This tool can be used to analyze several different facets of the time series data.

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

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
Data Type: Specify the type of input data. Currently, this analysis is only available for continuous data. Since only one option is available, this textbox has been turned off.
2
X Axis: Specify the type of X-axis you would like for the time series analysis. The available options are:
OptionDescription
IndexIf you specify an index, then the subgroups are displayed as 1, 2, 3.
DatesIf you specify dates, then a column will be shown in the Inputs area on the worksheet You can enter dates for each data point, and the subgroups will be displayed based on the dates entered.
3a
Time Series Plot: Select this checkbox to create a time series plot of your data. The data is plotted in an index with the first data point at 1, the second at 2, and so on...
3b
ACF: Create an auto-correlation plot of the data. Autocorrelation measures the internal correlation within a time series and varies between -1 and +1. At a lag of 0, the autocorrelation value is always 1.
3c
Periodogram: Create a periodogram of the data. The periodogram of the data shows the frequency plot. This plot explains how the power or variance in a series is distributed according to the frequency. This plot can be used to detect the periodicity present in the data.
3d
PCF: Create a partial auto-correlation plot of the data.
3e
Moving Average: Clicking on this checkbox will create a moving average smoothing of your data. The moving average is a calculation to analyze data points by creating a series of averages of different subsets of the full data set.

Specify the length to calculate the moving average. For example, if the length is 3, then the first moving average is obtained by averaging the first 3 data points, the second moving average is obtained by averaging the 2nd, 3rd, and 4th data points, and so on...
3f
Exp Moving Average: Clicking on this checkbox will create an exponential moving average smoothing of your data. The exponential moving average places greater weight and significance on the most recent data points. The current value of the moving average is calculated as a constant (alpha) times the current value plus (1-alpha) times the previous value of the moving average. Since alpha is less than 1, the weights keep dropping exponentially as you go back in time.

Specify the value of alpha to use for the exponential moving average. A larger alpha value gives more importance to the most recent points and drops off the older data points much faster from the averaging.
4
Model Selection: Specify the metric to use for the selection of the best model. The available options are:
OptionDescription
MAEUse the Mean Absolute Error. The model with the smallest MAE is the best.
RMSEUse the Root Mean Square Error. The model with the smallest RMSE is the best. This is the default setting.
MAPEUse the Mean Absolute Percentage Error. The model with the smallest MAPE is the best.
5
Help Button: Click on this button to open the help file for this topic.
6
Cancel Button: Click on this button to cancel all changes to the settings and exit this dialog box.
7
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 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 on this button, it opens the Data Editor dialog box, where you can import more 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 what data can be specified 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 min-max 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 to choose the 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 select columns using your left mouse key and dragging and dropping them in 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, then the list box header will be displayed in red color. Note that you can double-click on any of the columns in this box to remove them from the box.

The data you specify for this analysis depends on the options in the Setup tab.
OptionDescription
1If your X-axis variable is specified as Index, then the Dates Variable is disabled. Enter the data for which you want to perform the time series analysis under the Analysis Variable.
2If your X-axis variable is specified as Dates, then you need to specify the column that has dates information under Dates Variable. Enter the data for which you want to perform the time series analysis under the Analysis Variable.
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.

Transform the Data

This tab can re-sample your data to create a new data set. Data re-sampling allows us to examine the data collected at a different frequency (say monthly instead of daily). The difference operation can remove trends and seasonality in the data. The logarithm of the data can help stabilize variance over time. A sample screenshot of the transform data dialog box is shown below. inputs2
1a
None: If you select the None radio button, no transformation is made to your data.
1b
Subset: You can use this option to generate a subset of the existing data. This can reduce the total number of data points in your data set. For example, you can sample every 2nd point and save it as another data set. This will reduce your data size by half. Similarly, you can sample every 3rd point and save it to another data set. This will reduce your data size by a factor of a third and so on.

This textbox specifies the number of data points for creating the subset of the data.
1c
Differences: You can use this option to make a difference with a lag for the given data set. If you select this radio button, we can compute the differences and store the resultant data in another data set. For example, you can make a difference with a lag of 1 so that the data that is stored is Y(2) - Y(1), Y(3) - Y(2), Y(4) - Y(3), etc. Differencing can help stabilize the mean of a time series by removing changes in the level, eliminating or reducing trend and seasonality.

Specify the lag that should be used for the differencing operation. A lag of 2 implies the third data point is subtracted from the first data point, and so on...
1d
Logarithm: You can use this option to take a logarithm of the original data set and save the values to a new one. The purpose of taking the logarithm of a time series is to stabilize the variance of a series.
2
Transform Button: Click on the Transform button to perform the requested transformation for the given data.

Forecast the Data

This Forecast tab can generate forecasts for your time series data. You can use three forecasting models: Trends, Seasonality, and Holt-Winter.
  • The Trend model can be used to either model a linear or quadratic trend in the data. If you specify the number of forecasts required, the software will develop the best-fit model using regression and then extrapolate the data to the given number of forecasts.
  • The Seasonal model will try to remove the seasonality present in the data. You need to specify the seasonal length present in the data.
  • Finally, you can also use a Holt-Winter model to generate the forecasts requiring three constants.
A sample dialog box for forecasting the data is shown in the figure below. inputs4
1
Generate Checkbox: Click and select the Generate Forecasts checkbox to generate forecasts.
2
Num Forecasts: Specify the number of forecasts to generate. These forecasts will be generated at the end of the time series.
3
Forecast Model: Specify the type of model to use to generate the forecasts. The available options are:
OptionDescription
TrendGenerate forecasts using a trend analysis of the time series.
SeasonalGenerate forecasts using a seasonal analysis of the time series.
Holt-WinterGenerate forecasts using a Holt-Winter model of the time series.
4
Model Type: Specify the type of model to use to generate the forecasts. For a trend model, the available options are:
OptionDescription
LinearGenerate forecasts using a linear trend.
QuadraticGenerate forecasts using a quadratic trend.


If you are using a seasonal model or Holt-Winter model, the following options are available:
OptionDescription
AdditiveUse an additive model for forecasting. Additive models are used when the variance of the time series does not change over different periods.
MultiplicativeUse a multiplicative model for forecasting. A multiplicative model is typically used if the variance increases with increasing data values.

Charts

You will see the following dialog box if you click the Charts button. Charts
1
Title: The system will automatically pick a title for your chart. However, if you want to override that with your title, you can specify a title for your chart here. Note that this input is optional.
2
Sub Title: The system will automatically pick a subtitle for your chart. However, if you want to override that with your subtitle, specify a subtitle for your chart here. Note that this input is optional.
3
X Label: The system will automatically pick a label for the x-axis. However, if you would like to override that with your label for the x-axis, you can specify a different label here. Note that this input is optional.
4
Y Label: The system will automatically pick a label for the y-axis. However, if you would like to override that with your label for the y-axis, you can specify a different label here. Note that this input is optional.
5
X Axis: The system will automatically pick a scale for the x-axis. However, if you would like to override that with your values for the x-axis, you can specify them here. The format for this input is to determine the minimum, increment, and maximum values separated by a semi-colon. For example, if you specify 10;20, the minimum x-axis scale is set at 10, and the maximum x-axis scale is set at 20. If you specify 10;2;20, then, in addition to minimum and maximum values, the x-axis increment is set at 2. Note that this input is optional.
6
Y Axis: The system will automatically pick a scale for the y-axis. However, if you would like to override that with your values for the y-axis, you can specify them here. The format for this input is to determine the minimum, increment, and maximum values separated by a semi-colon. For example, if you specify 10;20, the minimum y-axis scale is set at 10, and the maximum y-axis is set at 20. If you specify 10;2;20, then, in addition to minimum and maximum values, the y-axis increment is set at 2. Note that this input is optional.
7
Horizontal Lines: You can specify the values here if you want to add a few extra horizontal reference lines on top of your chart. The format for this input is numeric values separated by semi-colon. For example, if you specify 12;15, two horizontal lines are plotted at Y = 12 and Y = 15, respectively. Note that this input is optional.
8
Vertical Lines: You can specify the values here if you want to add a few extra vertical reference lines on top of your chart. The format for this input is numeric values separated by semi-colon. For example, if you specify 2;5, two vertical lines are plotted at X = 2 and X = 5, respectively. Note that this input is optional.

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 shown in the orange exclamation mark, and finally, any checks that are required to be performed by the user are shown as blue info 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 shows a green thumps-up sign if everything is okay and a red thumps-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 entered data, such as minimum value, maximum value, mean, median, etc. Depending on the options selected, the appropriate graphs are added. The different graphs that could be created are the time series plot, auto-correlation plot, partial auto-correlation plot, periodogram, moving average plot, exponential moving average plot, forecasts based on trend, seasonality, and Holt-Winter models.

Examples

The following examples are in the Examples folder.
  • Analyze the data given in the reference file (Time Series 1.xlsx).
  • Analyze the Los Angeles rainfall data in the reference file (Time Series 3.xlsx).



© Rapid Sigma Solutions LLP. All rights reserved.