Documentation/Calc Functions/FORECAST.ETS.STAT.MULT

From The Document Foundation Wiki
Jump to: navigation, search


Im-jabber.svg

Under construction.
For now, see the system Help files.


Function name:

FORECAST.ETS.STAT.MULT

Category:

Statistical Analysis

Summary:

Returns statistical value(s) that are results of the ETS/EDS algorithms.

Syntax:

FORECAST.ETS.STAT.MULT (values, timeline, stat_type, [period_length], [data_completion], [aggregation])

Returns:

Arguments:

values (mandatory): A numeric array or range. values are the historical values, for which you want to forecast the next points.

timeline (mandatory): A numeric array or range. The time line (x-value) range for the historical values.

The time line doesn't have to to be sorted, the functions will sort it for calculations. The time line values must have a consistent step between them. If a constant step can't be identified in the sorted time line, the functions will return the #NUM! error. If the ranges of the time line and historical values aren't of same size, the functions will return the #N/A error. If the time line contains less than 2 periods of data, the functions will return the #VALUE! Error.

stat_type (mandatory): A numerical value from 1 to 9. A value indicating which statistic will be returned for the given values and x-range.

The following statistics can be returned:

stat_type Statistics
1 Alpha smoothing parameter of ETS algorithm (base)
2 Gamma smoothing parameter of ETS algorithm (trend)
3 Beta smoothing parameter of ETS algorithm (periodic deviation)
4 Mean absolute scaled error (MASE) - a measure of the accuracy of forecasts.
5 Symmetric mean absolute percentage error (SMAPE) - an accuracy measure based on percentage errors.
6 Mean absolute error (MAE) – a measure of the accuracy of forecasts.
7 Root mean squared error (RMSE) - a measure of the differences between predicted and observed values.
8 Step size detected time line (x-range). When a stepsize in months/quarters/years is detected, the stepsize is in months, otherwise the stepsize is in days in case of date(time) timeline and numeric in other cases.
9 Number of samples in period – this is the same as argument period_length, or the calculated number in case of argument period_length being 1.

period_length (optional): A numeric value >= 0, the default is 1. A positive integer indicating the number of samples in a period.

A value of 1 indicates that Calc is to determine the number of samples in a period automatically. A value of 0 indicates no periodic effects, a forecast is calculated with EDS algorithms. For all other positive values, forecasts are calculated with ETS algorithms. For values that not being a positive whole number, the functions will return the #NUM! Error.

data_completion (optional): a logical value TRUE or FALSE, a numeric 1 or 0, default is 1 (TRUE). A value of 0 (FALSE) will add missing data points with zero as historical value. A value of 1 (TRUE) will add missing data points by interpolating between the neighboring data points.

Although the time line requires a constant step between data points, the function support up to 30% missing data points, and will add these data points.

aggregation (optional): A numeric value from 1 to 7, with default 1. The aggregation parameter indicates which method will be used to aggregate identical time values:

Aggregation Function
1 AVERAGE
2 COUNT
3 COUNTA
4 MAX
5 MEDIAN
6 MIN
7 SUM

Although the time line requires a constant step between data points, the functions will aggregate multiple points which have the same time stamp.

Additional details:

Exponential Smoothing is a method to smooth real values in time series in order to forecast probable future values.

Exponential Triple Smoothing (ETS) is a set of algorithms in which both trend and periodical (seasonal) influences are processed. Exponential Double Smoothing (EDS) is an algorithm like ETS, but without the periodical influences. EDS produces linear forecasts. Tip Icon

See the Wikipedia on Exponential smoothing algorithms for more information.

FORECAST.ETS.STAT.MULT calculates with the model

forecast = ( basevalue + trend * ∆x ) * periodical_aberration.

Examples:

The table below contains a timeline and its associated values:

A B
1 Timeline Values
2 01/2013 112
3 02/2013 118
4 03/2013 132
5 04/2013 100
6 05/2013 121
7 06/2013 135
8 07/2013 148
9 08/2013 148
10 09/2013 136
11 10/2013 119
12 11/2013 104
13 12/2013 118

=FORECAST.ETS.STAT.MULT(Values;Timeline;5;1;TRUE();1)

Returns 0.084073452803966, the multiplicative statistics based on Values and Timeline named ranges above, with symmetric mean absolute percentage error (SMAPE), one sample per period, no missing data, and AVERAGE as aggregation.

=FORECAST.ETS.STAT.MULT(Values;Timeline;7;1;TRUE();7)

Returns 15.8372533480997, the multiplicative statistics based on Values and Timeline named ranges above, with root mean squared error, no missing data, and SUM as aggregation.

Related LibreOffice functions:

FORECAST
FORECAST.ETS.ADD
FORECAST.ETS.MULT
FORECAST.ETS.PI.ADD
FORECAST.ETS.PI.MULT
FORECAST.ETS.SEASONALITY
FORECAST.ETS.STAT.ADD
FORECAST.LINEAR

ODF standard:

Equivalent Excel functions: