Zaitun Time Series Online Documentation

Zaitun Time Series Online Documentation

Introduction to Zaitun Time Series

Zaitun Time Series is designed for ease of use for statistical analysis, series modeling and forecasting of time series data.

Zaitun Time Series provides several statistics and neural networks models, and graphical tools that will make your work on time series analysis easier.

Zaitun Time Series was originally developed by the “Time Series” team as the final project of their four years diploma degrees in Sekolah Tinggi Ilmu Statistik Jakarta, Indonesia. Now, the developer team in zaitunsoftware.com is continuing the development of Zaitun Time Series.

Zaitun Time Series is a freeware. It can be used for any purpose, including commercial use.

Installation Guide

Installation Guide

System Requirements

System Requirements

  • Windows XP (SP2 or later), Windows Vista, Windows 2000 (SP4 or later), or Windows Server 2003 (SP1 or later)
  • .NET Framework 2.0 or later
  • 600 MHz processor (Recommended: 1 GHz or faster)
  • 192 MB of RAM (Recommended: 256 MB or more)
  • 1024 x 768 screen resolution
  • 10 MB hard drive space

Zaitun Time Series Installation

Zaitun Time Series installation is very simple and only takes a few minutes. To install Zaitun Time Series:

  1. Please ensure that .NET Framework 2.0 is installed in your system
  2. Start “zaitun.msi”. It will install Zaitun Time Series into your computer. The welcome screen appears. Click Next.
  3. Read the license agreement, and then click I accept the terms in the License Agreement to continue installing Zaitun Time Series.
  4. Choose Destination Location Screen appears. You can choose to install Zaitun Time Series into the default directory “C:\Program Files\Zaitun Time Series” or choose another directory. If you want to change the destination location of Zaitun Time Series, click Browse button. Click Next button to install into default directory.
  5. Ready to Install Screen appears. Click Install to begin the installation.
  6. After the installation is complete, setup will inform you that the installation is successful. You may then launch Zaitun Time Series by clicking on “Launch Zaitun Time Series” checkbox. Click Next to continue and finish the setup.
  7. You can start using Zaitun Time Series by clicking the shortcut on start menu items

Working with Data

Working with Data

Creating A New Project

Zaitun Time Series represents time series data with the data point frequency (annual, monthly, weekly, daily, etc) ranging from start date to end date.

To create a new time series data project:

  1. Click File -> New to open the Create New Project dialog box
  2. Specify the frequency of time series data
  3. Set the start date and end date
  4. Set new project name
  5. Click OK button. Zaitun Time Series will create a new empty project

Opening A Saved Project

You can also open a project file saved in your media disk.

To open a saved project:

  1. Click File -> Open to show Open Project dialog
  2. Specify your project file location (.zft file)
  3. Click the Open button. Zaitun Time Series will open the selected project file.

Adding A Variable

A Zaitun Time Series variable is a series of data points constituting one time series data collection. For example, the recorded (annual, monthly, weekly, daily) time series values of the Indonesian Exchange Rate. A time series data project can contain more than one variable.

To add a new variable into current project:

  1. Click the Add Variable button on top left side of current project view to open Create New Variable dialog
  2. Determine the new variable’s name and its description
  3. Click the OK button. Zaitun Time Series will add this variable into current project

Adding A Group

The Zaitun Time Series group represents a collection of several time series variables. A group can contain two or more series variables. A time series data project can contain more than one group.

To add a new group into current project:

  1. Click the Add Group button to open Create New Group dialog
  2. Determine the new group’s name
  3. Select variables belonging to this group. You can select two or more variables by pressing the Shift or Control key
  4. Click the OK button. Zaitun Time Series will add this group into current project

Editing A Variable/Group

You can edit the name or description of a variable/group. To edit a variable/group:

  1. Select the variable/group you want to be edited
  2. Click the Edit button to show the Edit dialog
  3. Edit the name or description of this variable, and then click the OK button

Duplicating A Variable/Group

You can duplicate a variable/group. A duplicated variable/group has the same value as its source. To duplicate a variable/group:

  1. Select the variable/group you want to duplicate
  2. Click the Duplicate button to show the Duplicate dialog
  3. Enter the new variable/group’s name and then the click OK button. Zaitun Time Series will create a new variable/group that has same value as the source variable/group

Deleting A Variable/Group

You can also delete a variable/group you have created. To delete a variable/group:

  1. Select the variable/group you want to delete
  2. Click the Delete button. A confirmation dialog appears. Click Yes if you are sure you wish to delete the selected variable/group
  3. If you click Yes on the confirmation dialog, then the selected variable/group will be deleted from the current project

Viewing Variable

Zaitun Time Series provides three ways to view a variable, spreadsheet view, graphic view, and statistics view. Viewing a variable is very simple. Double click the variable you wish to view. Zaitun Time Series will switch the main pane to the Variable View and view the selected variable.

You can also view a variable by manually switching the main pane to the Variable View Pane and clicking Add Pane button on the top left side of the Variable Pane. Select Variable dialog appears. Select the variable you want to view and then click OK. Zaitun Time Series will add a new pane on the Variable Pane to view the variable.

The default view is the spreadsheet view. To change the current view of a variable click on the Variable View Combo Box on the top of the Variable View pane. You can switch to graphic view or statistics view.

Spreadsheet View shows variable values on a grid, it makes it easy for you to input or edit variable values by pressing numeric keys directly from keyboard. You can also paste values from an external program like Excel by right clicking the grid and selecting Paste menu.

Graphic View shows variable values on a line chart. It makes it easy for you to analyze graphically the components of time series data of a variable. You will soon know whether the variable contains trend, cyclic, seasonal and irregular component.

Statistics View shows simple descriptive statistics of a variable making it easy for you to analyze statistical properties of a variable.

Viewing Group

Zaitun Time Series provides two ways to view a group, spreadsheet view and graphic view. Viewing a group is not so different from viewing a variable. Just by double clicking the group you want to view, Zaitun Time Series will switch the main pane to Variable View and viewing the selected group.

Transforming A Variable

Zaitun Time Series provides several transformation types that can be applied to a variable. They are differencing, seasonal differencing, logarithm, and square root. To transform a variable

  1. Click Tools -> Transform Variable to show Transform Variable dialog
  2. Select a variable you want to transform and select the transformation type
  3. Determine the new variable’s name and then click the OK button. Zaitun Time Series will create a transformed variable and add it into the current project

Exporting The Data

Zaitun Time Series provides a facility to export the data created by Zaitun Time Series to another format. There are 2 formats available, CSV file and Excel File. Zaitun Time Series will export all of variables in the current project into a new CSV or Excel File, but it will not export the group data and the result data.

To export the current Zaitun Time Series project into a CSV file:

  1. Click File -> Export -> Export to CSV
  2. Export to CSV dialog appear. Save the CSV file into the directory as you want

To export the current Zaitun Time Series project into an Excel file:

  1. Click File -> Export -> Export to Excel
  2. Export to Excel dialog appear. Save the excel file into the directory as you want

Importing The Data

Zaitun Time Series provides a facility to import the data created by another software in a specified format. Zaitun Time Series provides a tool to import the data from CSV file (.csv) and Excel file (.xls).

Zaitun Time Series only accept numeric fields, both in the Excel format and the CSV format. Please do not include non numeric fields (e.g. “Nov 2007”) in your CSV and Excel file which will be imported to Zaitun Time Series, except the first line/row which will be the list of variable name of the data.

To import a CSV file into the current Zaitun Time Series project:

  1. Click File -> Import -> Import to CSV
  2. The Open CSV dialog appear. Select the CSV file you want to import
  3. The Import CSV dialog appear. The CSV file can’t contain non numeric fields except in the first line, which will be the variable name. Make sure the “Use First Row as Variable Name” option is checked if your CSV File contains variable name information. Then, select variables you want to import by making a mark on some check boxes in the variable grid.
    Click the OK button to import the selected variable in the CSV file into the current Zaitun Time Series project

To import an Excel file into the current Zaitun Time Series project:

  1. Click File -> Import -> Import to Excel
  2. The Open Excel dialog appear. Select the Excel file you want to import
  3. The Import Excel File dialog appear. The Excel file can’t contains non numeric field field except the first row, which will be the variable name. Make sure the “Use First Row as Variable Name” option is checked if your Excel File contains variable name information. Then, select variables you want to import by making a mark on some check boxes in the variable grid. You can switch between sheets by selecting the sheet combo box in the Preview Pane.
    Click OK button to import the selected variable in Excel file into the current Zaitun Time Series project.

Adding Stock Market Data

Zaitun Time Series provides a facility to help the user to view their stock market data easily with spreadsheet view and graphic view with a candlestick graph which helps the user to analyze the movement of their stock market data esily.

A Stock market data in Zaitun Time Series consists of five variables, they are Open Variable, High Variable, Low Variable, Close Variable, and Volume Variable.

Open Variable is a variable which shows a value of shares at the stock market opening, Close Variable is a variable which shows a value of shares at the stock market closing, High Variable is a variable which shows the highest value of shares at certain period at the stock market, Low Variable is a variable which shows the lowest value of shares at certain period at stock market, Volume Variable is a variable which shows the volume of transactions in a particular period

The feature of add stock market data in Zaitun Time Series is only available on project with Daily5, Weekly, and Monthly frequency.

To add a new stock market data in the current Zaitun Time Series project:

  1. Click Add Stock button on the top at the current project view on project group’s button to open Create New Stock dialog.
  2. Determine the new stock’s name, the description, and stock’s variables from the list of variables.
  3. Click OK button. Zaitun Time Series will add this stock into the current project

Viewing A Stock Market Data

Zaitun Time Series provides two ways to view a stock market data, spreadsheet view and graphic view. Viewing a stock market data is very simple like viewing a variable. Double click the stock data you wish to view on Project View or by clicking Add Pane button on the top of Variable Pane. Zaitun Time Series will view the selected stock data.

The Spreadsheet View is the default view and you can show the Graphic View by clicking the Grapic button on the top of the Variable View.

Importing Live Stock Market Data

Zaitun Time Series has a feature to import a live stock market data from online stock data provider such as Yahoo Finance. This feature is very useful especially for people who have an intensive interaction with the stock market in order to analyze the market or trade the market. They can easily import the stock market data from online data provider to Zaitun Time Series and then choose the right method available in Zaitun Time Series to make a prediction of the next movement of the stock market data. The result of prediction helps them to decide whether to buy or sell the market or do nothing.

To import a live stock market data in the current Zaitun Time Series project:

  1. Click the Import Stock button on the top of Project View to open Import Stock Dialog.
  2. Determine the server and symbol on stock information. You can view the list of symbol by clicking the List button. On the Stock List Dialog you can add, edit and delete the symbol.
  3. Click the Download Data from Server button to preview imported data.
  4. Determine imported stock’s name and the description on stock description.
  5. Click the OK button. Zaitun Time Series will add this imported stock into the current project. The imported stock data contains a stock data type and 5 variables data type which consist of open, close, high, low and volume values of the stock data.

Trend Analysis

Trend Analysis

Trend Analysis Overview

Linear Trend

Linear trend is a simple function described as a straight line along several points of time series value in time series graph. Linear trend has a common pattern:

Tt = a + b.Yt

Where
Tt = Trend value of period t
a  = Constant of trend value at base period
b  = Coefficient of trend line direction
Yt = an independent variable, represents time variable, usually assumed to have integer value
       1,2,3,... as in the sequence of time series data.

There are several methods that can be used to find the linear trend equation of a time series. Most commonly used is least squares method. This method finds the coefficient values of the trend equation (a and b) by minimizing mean of squared error (MSE). The formula is:

 

Nonlinear Trend

In several cases, linear trend is not suitable for time series data. These cases occur when a time series has a different gradient between the beginning phase of the data and the next phase. For these cases, it is better to use nonlinear trend than linear trend.

There are several nonlinear trends, they are:

  • Exponential
  •        Tt = aby

  • Quadratic
  •        Tt = a + bYt + cYt2

  • Cubic
  •        Tt = a + bYt + cYtt2 + dYt3

The most suitable trend is a one with the smallest error, that is the smallest difference between actual data and estimated data from trend value. The common rule used to find the best trend is by choosing a trend with the smallest standard error value and having the biggest R-square value.

Trend Analysis with Zaitun Time Series

Zaitun Time provides a feature to analyze trend component of a time series. There are several trend types available e.g. linear, quadratic, cubic, and exponential. To make a trend analysis of a time series variable:

  1. Click Analysis -> Trend Analysis menu
  2. The Select Analyzed Variable Dialog appears. Choose a variable you want to analyze with trend analysis, and then click OK
  3. The Trend Analysis form will appear. Choose the most suitable trend type for the selected variable.
  4. To select the analysis result to be viewed on Result View, click the Results button. Select the result views required by clicking the appropriate checkbox. For Forecasted selection, enter the data step you wish to forecast.
  5. To save the residual and predicted data of the trend model as a new variable, you can click Storage button. Check on the item you want to save as a new variable, and then type the new variable name.
  6. After selecting the result views and determining whether you want to save the new variable or not, the software will show the Trend Analysis form again. Click the OK button to finish your analysis and show the result views.
  7. The result views selected in previous step will be viewed as several panels on Result View tab page.

Trend Analysis Result

The result views of trend analysis in Zaitun Time Series are grouped into two categories, tables and graphics. See the details below:

  • Tables
    • Model Summary
      Shows the summary of trend model.
    • Actual, Predicted and Residual
      Show actual, predicted and residual values of trend model.
    • Forecasted
      Shows forecasted values from trend model, as many steps of data you want to forecast.

  • Graphics
    • Actual and Predicted
      Shows the line plot for actual and predicted values of trend model
    • Actual and Forecasted
      Shows the line plot for actual and forecasted values of trend model
    • Actual vs. Predicted
      Shows the scatter plot between actual and predicted values
    • Residual
      Shows the line plot for residual values of trend model
    • Residual vs. Actual
      Shows the scatter plot between residual and actual values
    • Residual vs. Predicted
      Shows the scatter plot between residual and predicted values

Moving Average Analysis

Moving Average Analysis

Moving Average Overview

There are several methods which can be used to smooth time series data by moving averages. They are the Single Moving Average and the Double Moving Average methods. Both of them use several past data points to forecast the future.

Single Moving Average

Single Moving Average method uses the last t periods to create a forecast. The new average value is calculated by removing the oldest value and replacing it with the newest value. This method is suitable for stationary data and for data which does not contain trend or seasonal components.

Let us have N points of data and use T observations to calculate the average value, notated as MA(T). It is described as:

Y1 Y2 ………………. YT YT+1 ……………. Y
Initialization group Testing group

Time Moving Average Forecast
T Y =
T+1 Y =
T+2 Y =
  …..  

Double Moving Average

This method is based on the calculation of the second moving average. The second moving average is calculated from the average of first moving average, notated by MA (T x T), means MA (T) period from MA (T) period. This method can be used to forecast data with a linear trend component.

The procedure to calculate double moving average is:

  1. Calculate single moving average
  2. Calculate adjustment, which is the difference between single-MA and double-MA , where
  3. Adjust trend from period n to n+m, if you want to forecast m period ahead.

The forecasting value for m period ahead is an – where it is the adjusted average value for period n – added by the value of multiplication between m and trend component bn.

Moving Average Analysis with Zaitun Time Series

Zaitun Time provides a feature to perform moving average analysis of a time series. Single moving average and double moving average are available. To perform the moving average analysis on a time series variable:

  1. Click Analysis -> Moving Average
  2. Select Variable Dialog appears. Choose a variable you want to analyze with moving average analysis, and then click OK.
  3. The Moving Average form will appear. Choose the moving average method you wish to apply to your variable, and set the moving average order.
  4. To select the analysis result that will be shown on Result View, click the Results button. Check the boxes of any number of Result Views you wish to see. For the Forecasted selection, you have to enter the data step you wish to forecast.
  5. To save residual, predicted or smoothed data from the model as a new variable, click the Storage button. Check the item you wish to save as a new variable, and then type in the new variable name.
  6. After selecting result views and determining whether you want to save the new variable or not, the software will show the Moving Average form again. Click the OK button to finish your analysis and to show the result views.
  7. The result views selected on the previous step will be viewed as several tabs on the Result View panel.

Moving Average Analysis Result

The result views of moving average analysis in Zaitun Time Series are grouped into two categories, they are tables and graphics. The details of them are described here:

  • Tables
    • Model Summary
      Shows the summary of moving average model.
    • Moving Average Table
      Shows actual, MA, predicted and residual values of moving average model.
    • Forecasted
      Shows forecasted values from moving average model, as many steps of data you want to forecast.

  • Graphics
    • Actual and Predicted
      Shows a line plot for actual and predicted values of moving average model
    • Actual and Smoothed
      Shows a line plot for actual and smoothed values of moving average model.
    • Actual and Forecasted
      Shows a line plot for actual and forecasted values of moving average model
    • Actual vs. Predicted
      Shows a scatter plot between actual and predicted values
    • Residual
      Shows a line plot for residual values of moving average model
    • Residual vs. Actual
      Shows a scatter plot between residual and actual values
    • Residual vs. Predicted
      Shows a scatter plot between residual and predicted values

Exponential Smoothing Analysis

Exponential Smoothing Analysis

Exponential Smoothing Overview

Exponential smoothing is particular type of moving average technique applied to time series data, used to produce smoothed data for presentation, or to make forecasts. The Exponential smoothing method weights past observations by exponentially decreasing weights to forecast future values.

There are some categories of this method:

  1. Single exponential smoothing
  2. Browns Double exponential smoothing method
  3. Holts Double exponential smoothing method
  4. Winters Triple exponential smoothing method

Single Exponential Smoothing

Single Exponential Smoothing is a procedure that repeats enumeration continually by using the newest data. This method can be used if the data is not significantly influenced by trend and seasonal factor.

To smooth the data with single exponential smoothing requires a parameter called the smoothing constant (). Each data point is given a certain weighting, for the newest data, (1-) for older data and etc. The value of must be between 0 and 1. The following is the equation of smoothed value:

By doing a simple substitution, the equation above can be written as:

 

Forecasting value

Forecasting with single exponential smoothing can be done by substituting this equation:

The equation above also can be written in the following way:

where is the forecasting error for n period. From this equation, we can see that the forecasting resulted with this method is the last forecasted value added with an adjustment for error in the last forecasted value.

 

Starting value

Practically, to calculate the smoothing statistic at the first observation , we can use the equation . Then it is substituted into the smoothing statistic equation to calculate , and the smoothing process is continued until we get value. To calculate the equation above, a starting value is needed. can be calculated from the average of several observations. The first several observations can be chosen to determine .

Double Exponential Smoothing (Browns)

This smoothing method can be used for data which contains linear trend. This method is often called as Brown’s one-parameter linear method.

The following equations are used in double exponential smoothing with Browns method:

Single smoothing statistic equation:

Double smoothing statistic equation:

 

Forecasting value

The procedure to calculate forecasting m forward period with double exponential smoothing with Brown method can be calculated from this equation:

This equation is similar to linear trend method, where:

 

Starting value

The smoothing statistic equation above can be solved if the estimation value for is defined. Starting value is defined as:


We can use linear trend model constant calculated with the least squares estimation method to estimate the coefficient of , and .

Double Exponential Smoothing (Holts)

This method is similar to Browns method, but Holts Method uses different parameters than the one used in original series to smooth the trend value.

The prediction of exponential smoothing can be obtained by using two smoothing constants (with values between 0 and 1) and three equations as follows:
( 1 )
( 2 )
( 3 )

Equation (1) calculates smoothing value from the trend of the previous period added by the last smoothing value . Equation (2) calculates trend value from , , and . Finally, equation (3) (forward prediction) is obtained from trend, , multiplied with the amount of next period forecasted, m, and added to basic value .

 

Starting value and

There are two parameters needed to estimate exponential smoothing with Holts method, the smoothing value and the trend . To find these parameters, the least squares method is used. The estimation value for is the intercept value of linear estimation, while is the slope value.

Triple Exponential Smoothing (Winters)

If a time series is stationary, the moving average method or single exponential smoothing can be used to analyze it. If a time series data has a trend component, then double exponential smoothing with Holts method can be used. However, if the time series data contains a seasonal component, then the Triple Exponential Smoothing (Winters) method can be used to handle it.

This method is based on three smoothing equations, Stationary Component, Trend and Seasonal. Both Seasonal component and Trend can be additive or multiplicative.

 

Additive

The whole smoothing equation

Trend smoothing

Seasonal smoothing

Forecasted value

 

Multiplicative

The whole smoothing equation

Trend smoothing

Seasonal smoothing

Forecasted value

Where l is seasonal length (for example, amount of month, or quartile in a year), T is trend component, S is seasonal adjustment factor, and is forecasted value for m next period.

 

Starting value , and

The starting values for and can be obtained from regression equations which have actual variables as dependent variables and time variables as independent variables. This equation constant is a starting value estimation for and slope of regression coefficient is a starting value estimation for the trend component . Whereas the starting value for the seasonal component is calculated by using dummy-variable regression on detrended data (without trend).

Exponential Smoothing Analysis with Zaitun Time Series

Zaitun Time performs exponential smoothing analysis of time series data, including single exponential smoothing, double exponential smoothing Brown, double exponential smoothing (Holts), and triple exponential smoothing (Winters). To perform exponential smoothing analysis on a time series variable:

  1. Click Analysis -> Exponential Smoothing
  2. Select Variable Dialog appears. Choose a variable you want to analyze with exponential smoothing analysis, and then click OK.
  3. The Exponential Smoothing form will appear. Choose the Exponential Smoothing method you want to apply to your variable, and determine the smoothing constant (alpha, beta, and gamma). For Triple Exponential Smoothing, determine its type, multiplicative or additive, and seasonal length.
  4. Zaitun Time Series also provides Grid Search facility to facilitate user in searching smoothing constant values in yielding the least MSE value. You can search smoothing constant value by determining minimum and maximum boundary and increment interval. Application will search the combination of smoothing constant value in interval above which has the least MSE. N combination (default =10) will be shown. To choose the best value of smoothing constant click the value in list and click Select This button.
  5. To select analysis result that will be shown on Result View, click Results button. You can select some result views by clicking the checkbox of every selection. For Forecasted selection, you have to enter the data step you wish to forecast.
  6. To save the residual, predicted or smoothed data from the model as a new variable, click Storage button. Check the items you want to save as new variables, and then type the new variable names.
  7. After selecting the result views and determining whether you want to save the new variables or not, the software will show the Exponential Smoothing form again. Click the OK button to finish your analysis and to show the result views.
  8. The selected result views on previous step will be viewed as several tabs on Result View panel.

Exponential Smoothing Analysis Result

The result views of exponential smoothing analysis in Zaitun Time Series are grouped into two categories, tables and graphics. The details of them are described here:

  • Tables
    • Model Summary
      Shows the summary of exponential smoothing model
    • Exponential Smoothing Table
      Shows actual, smoothed, trend, seasonal, predicted and residual values of exponential smoothing model
    • Forecasted
      Shows forecasted values from exponential smoothing model, as many steps of data you want to forecast
  • Graphics
    • Actual and Predicted
      Shows a line plot for actual and predicted values of exponential smoothing model
    • Actual and Smoothed
      Shows a line plot for actual and smoothed values of exponential smoothing model
    • Actual and Forecasted
      Shows a line plot for actual and forecasted values of exponential smoothing model
    • Actual vs. Predicted
      Shows a scatter plot between actual and predicted values
    • Residual
      Shows a line plot for residual values of exponential smoothing model
    • Residual vs. Actual
      Show a scatter plot between residual and actual values
    • Residual vs. Predicted
      Shows a scatter plot between residual and predicted values

Decomposition Analysis

Decomposition Analysis

Decomposition Analysis Overview

Decomposition method tries to separate a time series data into several components. Decomposition method is often used not only in yielding forecast, but also in yielding information about time series component i.e. trend, cycle, seasonal, and irregular component. There are two relation types among those components, they are multiplicative and additive. Multiplicative type assumes if data value grows up then seasonal pattern will grow up too. While additive type assumes that data value resides in a constant wide at the middle of trend.

In the decomposition method, every cycle of data is assumed to be part of a trend. The decomposition method equations :

Multiplicative type:

Additive type:

The Seasonal Index value is calculated by using a ratio to moving average method.

Decomposition Analysis with Zaitun Time Series

Zaitun Time performs decomposition analysis on a time series data. To perform decomposition analysis on a time series variable:

  1. Click Analysis -> Decomposition
  2. Select Variable Dialog appears. Choose a variable you want to analyze with decomposition analysis, and then click OK.
  3. The Decomposition form will appear. Determine the seasonal length, decomposition method (multiplicative or additive) and the used trend model. There are several trend models available, linier, quadratic, cubic, and exponential.
  4. To select the analysis result that will be shown on Result View, click Results button. Select the required result views by clicking the appropriate checkbox of every selection. For Forecasted selection, you have to enter the step of data you want to forecast.
  5. To save trend, detrended, deseasonalized, residual, or predicted data from the model as new variables, click the Storage button. Check the item you want to save as a new variable, and then type the new variable name.
  6. After selecting result views and determining whether you want to save the new variables or not, the software will show the Decomposition form again. Click the OK button to finish the analysis and to show the result views.
  7. The selected result views from the previous step will be viewed as several tabs on the Result View panel.

Decomposition Analysis Result

The result views of decomposition analysis in Zaitun Time Series are grouped into two categories, they are tables and graphics. The details of them are described here:

  • Tables
    • Model Summary
      Shows the summary of decomposition model
    • Decomposition Table
      Shows actual, smoothed, trend, seasonal, predicted and residual values of decomposition model
    • Forecasted
      Shows forecasted values from decomposition model, as many steps of data you want to forecast
  • Graphics
    • Actual, Predicted and Trend
      Shows a line plot for actual, predicted and trend values of decomposition model
    • Actual and Forecasted
      Shows a line plot for actual and forecasted values of decomposition model
    • Actual vs. Predicted
      Shows a scatter plot between actual and predicted values
    • Residual
      Shows a line plot for residual values of decomposition model
    • Residual vs. Actual
      Shows a scatter plot between residual and actual values
    • Residual vs. Predicted
      Shows a scatter plot between residual and predicted values
    • Detrended
      Shows a line plot for detrended values of decomposition model.
    • Deseasonalized Graph
      Shows a line plot for deseasonalized values of decomposition model.

Linear Regression Analysis

Linear Regression Analysis Overview

Linear Regression estimates the coefficients of the linear equation, involving one or more independent variables, that best predict the value of the dependent variable. For example, we can try to predict weekly ice cream consumption (the dependent variable) from independent (predictor) variables such as ice cream price, weekly temperature, and average weekly family income. After developing the model, this method can forecast the value of the dependent variable for the given test values of independent variables.

In practice, regression model with one predictor is rarely used in research. Frequently, many researchers use more than one predictor. The general purpose of multiple linear regression is to learn more about the relationship between several independent or predictor variables and a dependent or criterion variable. Formally, the model for multiple linear regression, given n observations, is:

Where:
= Dependent variable
= Independent variable (predictor)
= Regression parameter
= Error
= number of parameter
= number of observation

We can also denote the multiple linear regression in matrix form as below:

Where:

Using Ordinary Least Square (OLS) method we can compute estimator of parameters () by equation:

estimator of Y by equation:

and vector of residual:

Before analyzing the regression model, we have to test of significance of the regression coefficients simultaneously and partially.


Testing Simultaneously (Overall Test)

  1. Hypothesis

  2. Test Statistic
    We can use F statistic and ANOVA table.

    Source of Variation Sum Squares Degree of Freedom Mean Squares Fobs
    Regression SSR p-1 MSR=SSR/(p-1) MSR/MSE
    Error SSE n-p MSE=SSE/(n-p)  
    Total SST n-1    

    Where:




  3. Decission
    We reject if
  4. Conclusion
    If is rejected means that there is at least one of predictor has linear relationship with dependent variable.



Testing Partially (Partial Test)

  1. Hypothesis

  2. Test Statistic
    We can use F statistic and ANOVA table.

    where
  3. Decission
    We reject if or
  4. Conclusion
    If is rejected means that there is an effect of independent variable to dependent variable.


We can compute confidence interval of regression coefficients of using equation:

For measuring proportionate reduction of total variation in Y associated with the use of set of X variables, we can use the coefficient of determination (R2) that is defined as follows:
where

The correlation coefficient (R) describe of degree of the linear relationship between independent variables and dependent variable, is defined as square root of R2:
where
Usually by adding more of predictor can increase the value of R2. On other hand, it can be more complicated in interpretation of the relation. So, we can use the adjusted R2:



Diagnosing of the Model Assumption

  1. Linearity
    This assumption can be diagnosed by ploting the residual (ei) and the predicted (). If plot look like random pattern near of ei=0 so this assumption is accepted.
  2. Normality
    Normality can be checked by Normal Probability Plot (NPP). If plot look like straight line so this assumption is accepted.
  3. Homoscedasticity
    This assumption can be diagnosed by ploting the residual (ei) and the predicted (). If plot look like random pattern near of ei=0 so this assumption is accepted.
  4. Autocorrelation
    This assumption can be diagnosed by ploting the residual at time t (et) and the time (t). If plot look like random pattern so this assumption is rejected.
  5. Multicollinearity
    This assumption can be checked using Variance Inflation Factor (VIF). If the highest value of VIFj>10, so this assumption is accepted.

Linear Regression Analysis with Zaitun Time Series

For example, we can try to analyze multiple linear regression of weekly ice cream consumption as a dependent variable and ice cream price, weekly temperature, and average weekly family income as independent variables. To analyze linear regression of that time series data with Zaitun Time Series:

  1. Click Analysis -> Linear Regression
  2. Determine the dependent variable and the independent variables on the dialog. Choose consumption variable as dependent variable and income, temp, and price as independent variables and then click OK.
  3. Click Results button to show the Select Result View Dialog and set the result of analysis. Check the check box of the options appear if you want Zaitun Time Series to shows that result.
  4. If Forcasted option in checked, yo have to scet the test values by clicking the Set Values button. Enter the test value for each predictors as many as the step you set and then click OK.
  5. Click OK the Select Result View Dialog and click the Storage button to save the value of predicted and residual variable. Determine the variable’s name and then clik OK.
  6. Click OK button on the Linear Regression Analysis Dialog to run analysis.

Linear Regression Analysis Result

The result views of Linear Regression Analysis in Zaitun Time Series are:

  1. Linear Regression Model Summary
    Shows analyzed variables, model type, number of observation, regression equation, R, R2, AdjR2, standard error, and durbin watson statistic.
  2. ANOVA Table
    Shows value of MSR, MSE, Fobs, and significance.
  3. Coefficients Table
    Shows the value of actual, predicted, and residual variable.
  4. Actual, Predicted, and Residual Table
    Shows the value of parameter , , statistic t, significance, confidence interval of , VIF, z-order correlation, and partial correlation.
  5. Forcasted Table
    Shows the value of forcasted of dependent variable.
  6. Residual Graph
    Shows the plot of residual at time t (et) and time t.
  7. Residual Vs Predicted Graph
    Shows the plot of residual variable and predicted variable.
  8. Normal Probability Plot
    Shows the Normal Probability Plot (NPP).

Correlogram

Correlogram

Correlogram Overview

Correlogram or Autocorrelation Function (ACF) is a graphic of autocorrelation values from several time intervals in time series data. ACF explains how big the successive data correlation in a time series data. ACF can be used to determine whether a time series data is stationary or not.

ACF represents comparison between covariant on lag k and its variant. ACF formulated as follows:

Where :
: ACF coefficient in lag k
: The number of observations (the amount of observed period)
: Observation in t period
: Mean
: Observation in t-k period

ACF () has value started from -1 to 1. If ACF value on every lag is 0, hence the data is stationary. As a rough rule, lag length needed to analyze is one third or a quarter of the number of observations of a time series data.

Also, to determine whether a time series data is stationary or not, you can use the statistical test based on standard error (se). By following the normal distribution standard, the interval with signification equal to 95 % for with the sample number equal to is
or

If ACF coefficient value is in interval with signification equal to 95%, then null hypothetic that shows ACF value () equal to 0 can not be rejected. It means that the data is stationary.

Besides that, to know whether time series data is stationary or not, Q statistical test which follows Chi Square distribution can be used. Q statistical value formulated below:

Where:
: Number of the tested lag
: Q statistical value in lag m
: The number of samples
: ACF coefficient in lag k
If the Q statistical value is smaller than Q value obtained from chi squares table in certain significant level, then null hypothetic which shows that ACF value () equal to 0 can not be rejected. It shows that the data is stationary.

Corellogram with Zaitun Time Series

Zaitun Time displays the autocorrelation function (ACF) values and graphic of a time series. To display corellogram of a time series variable:

  1. Click Analysis -> Corellogram
  2. Select Variable Dialog appears. Choose a variable for the corellogram which you wish to display and then click OK
  3. The Correlogram form will appear. Select the data you wish to display, original data (level), first differencing data, or second differencing data. Also determine the number of the included lag. Click OK to display the result.
  4. The Corellogram result will be viewed on the Result View panel in several tabs.

Corellogram Result View

The result views of correlogram in Zaitun Time Series are:

  1. ACF/PACF Table
    Shows ACF, PACF, Q statistics, and probability values
  2. ACF Graph
    Shows bar chart of ACF values
  3. PACF Graph
    Shows bar chart of PACF values

Neural Network Analysis

Neural Network Analysis

Neural Network Overview

Artificial Neural Networks or often called Neural Networks is a computation technique which has made significant progress in recent times. Neural networks have proven their capability of handling various problems in a number of scientific disciplines. Neural networks have a powerful ability called universal approximation, they can approximate all multivariate continue functions to every level of accuracy including for non-linear functions.

The ability of neural networks in universal approximation has been used by some researchers to forecast time series data in various kinds of data. The researches show that Neural Networks have a satisfactory performance in forecasting time series data.

Neural networks mechanisms imitate biological neural network mechanisms. Like biological neural networks, neural networks consists of neurons which are connected to each other and operate in parallel. The information processing mechanism in every neuron is adopted from the biological neuron.

Neurons in a neural network are grouped into several layers. Every layer can have one or more neurons. There are three layers in neural network architecture; they are the input layer, the output layer, and the hidden layer.

The function of the input layer is for data entry, data processing takes place in the hidden middle layer and the output layer functions as the data output result. The following illustration shows the architecture of neural networks.

Information processing in every neuron is done by summing the multiplication result of connection weights with input data. The result is transferred to the next neuron through the activation function. There are several kinds of activation functions, i.e. linear, semi linear, sigmoid, bipolar sigmoid and hyperbolic tangent.

In time series data forecasting, the input value for the input layer can be variable data of previous period (lagged variable) or the other variable used to help forecasting, can be qualitative or quantitative.

To forecast one variable (univariate), the input data for the input layer and output data in the output layer is similar to the autoregressive model AR(p). On certain point of t, forecasted data calculated by using observation from n previous point , where n shows the number of neuron inputs in a neural network.

Neural Network Analysis with Zaitun Time Series

Zaitun Time provides neural network modeling of time series data. To perform neural network modeling on a time series variable:

  1. Click Analysis -> Neural Network
  2. Select Variable Dialog appears. Choose a variable you want to build its neural network model, and then click OK.
  3. The Neural network analysis form will appear. Determine the parameters of the neural network model you want to build. You can determine the parameters of the neural network architecture, activation function, and learning algorithm. You can also set up the stopping condition or use early stopping cross-validation method.
  4. Click Start. The learning process will start and run until the stopping condition is fulfilled or the operation has reached the maximum number of iterations.
  5. You can stop the learning process any time by clicking Stop while the learning process is running.
  6. After the learning process is finished, click View Result button to display the model result.
  7. The Select Result View dialog will appear. Select the result views you want to display, and then click OK. You can forecast the data by clicking the Forecasted item and determine the number of data you want to forecast.
  8. The selected model result will be displayed on Result View panel in several tabs.

Neural Network Modeling Result

The result views of neural network modeling in Zaitun Time Series are grouped into two categories, tables and graphics. The details of them are described here:

  • Tables
    • Model Summary
      Shows the summary of the neural network model
    • Decomposition Table
      Shows actual, predicted and residual values of neural network model
    • Forecasted
      Shows forecasted values from the neural network model, as many steps of data you want to forecast

  • Graphics
    • Actual and Predicted
      Shows a line plot for actual and predicted values of neural network model
    • Actual and Forecasted
      Shows a line plot for actual and forecasted values of neural network model
    • Actual vs. Predicted
      Shows a scatter plot between actual and predicted values
    • Residual
      Shows a line plot for residual values of neural network model
    • Residual vs. Actual
      Shows a scatter plot between residual and actual values
    • Residual vs. Predicted
      Shows a scatter plot between residual and predicted values

References

Abraham, Bovas et al. 1983. Statistical Methods for Forecasting. Canada: John Wiley & Sons.

Crone, Sven F. 2004. Stepwise Selection of Artificial Neural Networks Models for Time Series Prediction. Department of Management Science, Lancaster University Management School, Lancaster, UK.

Du, K.-L. and M.N.S. Swamy. 2006. Neural Network in Softcomputing Framework. London: Springer.

Drossu, Radu, Zoran Obradovic. 1995. Efficient Design of Neural Network for Time Series Prediction. School of Electrical Engineering and Computer Science, Washington State University, Washington, USA.

Enders, Walters. 2004. Applied Econometric Time Series. New York: John
Wiley Sons,Inc.

Gujarati, Damodar N. 2003. Basic Econometric, fourth edition. New York:
McGraw-Hill.

Hamilton, James D. 1994. Time Series Analysis. New Jersey: Princeton
University Press.

Hanke, John E. and Reitsch, Arthur G. 1986. Business Forecasting. United Stated of America: Prentice-Hall Inc.

Montgomery, Douglas C. 1990. Forecasting and Time Series Analysis. McGraw-Hill Inc.

Prechelt¸ Lutz. 1998. Automatic Early Stopping Using Cross Validation: Quantifying the Criteria. Fakultat fur Informatik, Universitat Karlshure, Karlshure, Germany.

Sarle, S Waren. 2002. Neural Network FAQ.

Zhang, Guoqiang, B. Eddy Patuwo, and Michael Y. Hu. 1998. Forecasting with Artificial Neural Networks: The State of The Art. International Journal of Forecasting. Graduate School of Management, Kent State University, Ohio, USA.