Documentation/Calc Functions/FORECAST.ETS.SEASONALITY

    From The Document Foundation Wiki

    Function name:

    FORECAST.ETS.SEASONALITY

    Category:

    Statistical Analysis

    Summary:

    Calculates the number of samples in a recurring pattern within historical time series data, without forecasting future data. FORECAST.ETS.SEASONALITY utilizes the same algorithm that is used by the other FORECAST.ETS.* functions when they are instructed to determine the number of samples in a period automatically by setting their Period length argument to 1.

    Syntax:

    FORECAST.ETS.SEASONALITY (Values; Timeline; [Data completion]; [Aggregation])

    Returns:

    Returns a positive integer that is the length in time of a seasonal pattern. The units of the returned value are the same as those utilized in the timeline.

    Arguments:

    Values is an array of real numbers, representing the historic data to be used for forecasting. This argument can take the form of an explicit cell range, the name of a named range, the name of a database range, or an inline constant array. Values must comprise at least three values and all data in the array should be numeric.

    Timeline is an array of dates, times, or numeric values, each giving the date / time associated with its corresponding entry in the Values array. This argument can take the form of an explicit cell range, the name of a named range, the name of a database range, or an inline constant array. Note the following:

    • Timeline must have the same dimensions as Values.
    • All entries in Timeline should be dates, times, or numbers.
    • Timeline does not need to be sorted in any specific order on entry to the FORECAST.ETS.SEASONALITY function.
    • The Timeline entries must be separated by an identifiable and consistent time step.
    • It is possible for expected entries to be missing from Timeline, in which case FORECAST.ETS.SEASONALITY will generate data values for the missing time slots, controlled by the setting of the Data completion argument. Note however that only a proportion of the overall timeline can be missing; FORECAST.ETS.SEASONALITY reports an error if too much data is missing from the Timeline array.
    • It is possible for the Timeline array to contain duplicate entries, in which case FORECAST.ETS.SEASONALITY will aggregate the duplicate entries as determined by the setting of the Aggregation argument.

    Data completion is a logical value, or a reference to a cell containing that logical value, that determines how missing data points should be handled.

    • A value of 0 or FALSE indicates that FORECAST.ETS.SEASONALITY should add missing data points with zero as the historical value.
    • A value of 1 or TRUE indicates that FORECAST.ETS.SEASONALITY should add missing data points by interpolating between neighboring data points. This is the default applied if the argument is omitted.

    Aggregation is an integer in the range [1, 7], or a reference to a cell containing such a value, indicating which method should be used to aggregate identical time values. The meaning of these seven values is given by the following table. 1 is the default applied if the argument is omitted.

    ETS aggregation functions
    Value Function
    1 AVERAGE
    2 COUNT
    3 COUNTA
    4 MAX
    5 MEDIAN
    6 MIN
    7 SUM

    The following errors and conditions may arise:

    • If Values comprises less than three entries, then FORECAST.ETS.SEASONALITY reports a #VALUE! error.
    • If any cell in Values is empty, or if Values contains any nun-numeric data, then FORECAST.ETS.SEASONALITY reports an invalid argument error (Err:502).
    • If the Values and Timeline arrays do not have the same dimensions, then FORECAST.ETS.SEASONALITY reports an invalid argument error (Err:502).
    • If any cell in Timeline is empty, or if Timeline contains any nun-numeric data, then FORECAST.ETS.SEASONALITY reports an invalid argument error (Err:502).
    • If a constant step cannot be identified in the Timeline array, then FORECAST.ETS.SEASONALITY reports a #VALUE! error.
    • If there are too many missing steps within the Timeline array, then FORECAST.ETS.SEASONALITY reports a #VALUE! error.
    • If the Data completion argument is a real number, it is converted to an integer. If, after any conversion, the value is not equal to either 0 or 1, then FORECAST.ETS.SEASONALITY reports an invalid argument error (Err:502).
    • If the Aggregation argument is a real number, it is converted to an integer. If, after any conversion, the value is less than 1 or greater than 7, then FORECAST.ETS.SEASONALITY reports an invalid argument error (Err:502).

    Additional details:

    • Exponential Smoothing is a method to smooth real values in time series 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.
    • It is also possible to obtain the number of samples in period using the FORECAST.ETS.STAT.ADD and FORECAST.ETS.STAT.MULT functions, by setting the Period length argument to 1 and the Statistic type argument to 9.
    • The name space for FORECAST.ETS.SEASONALITY is COM.MICROSOFT.FORECAST.ETS.SEASONALITY.
    • For more information on exponential smoothing, visit Wikipedia's Exponential smoothing page.

    Examples:

    The table below contains a timeline and its associated values:

    ETS algorithm sample data
    A B
    1 Timeline Values
    2 2013-01-01 112
    3 2013-02-01 118
    4 2013-03-01 132
    5 2013-04-01 100
    6 2013-05-01 121
    7 2013-06-01 135
    8 2013-07-01 148
    9 2013-08-01 148
    10 2013-09-01 136
    11 2013-10-01 119
    12 2013-11-01 104
    13 2013-12-01 118
    Formula Description Returns
    =FORECAST.ETS.SEASONALITY(Values; Timeline) where Values is a named range covering cells B2:B13 and Timeline is a named range covering cells A2:A13, with all cells containing the data shown in the table above. Here the function assesses the seasonality within the supplied data, returning the number of samples in a recurring pattern. The Data completion argument is omitted but this argument is redundant when there are no missing data points within the timeline. The Aggregation argument is omitted but this argument is redundant when there are no duplicated time values within the timeline. Note that the formulas =FORECAST.ETS.STAT.ADD(Values; Timeline; 9; 1) and =FORECAST.ETS.STAT.MULT(Values; Timeline; 9; 1) return the same value. 6
    =FORECAST.ETS.SEASONALITY({1,1,1,1,1}; {1,3,5,7,9}) Here the time series data exhibits no seasonality. 1

    Related LibreOffice functions:

    FORECAST

    FORECAST.ETS.ADD

    FORECAST.ETS.MULT

    FORECAST.ETS.PI.ADD

    FORECAST.ETS.PI.MULT

    FORECAST.ETS.STAT.ADD

    FORECAST.ETS.STAT.MULT

    FORECAST.LINEAR

    ODF standard:

    None

    Related (or similar) Excel functions:

    FORECAST.ETS.SEASONALITY