Trend Analysis

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:

T_{t} = a + b.Y_{t}

Where

T_{t} = 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:

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
- Quadratic
- Cubic

T_{t} = ab^{y}

T_{t} = a + bY_{t} + cY_{t}^{2}

T_{t} = a + bY_{t} + cYt_{t}^{2} + dY_{t}^{3}

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.

**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:

- Click Analysis -> Trend Analysis menu
- The Select Analyzed Variable Dialog appears. Choose a variable you want to analyze with trend analysis, and then click OK
- The Trend Analysis form will appear. Choose the most suitable trend type for the selected variable.
- 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.
- 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.
- 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.
- The result views selected in previous step will be viewed as several panels on Result View tab page.

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.

- Model Summary
- 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

- Actual and Predicted