IMsExponentialSmoothingTransform.AsForecasting

Syntax

AsForecasting: Boolean;

Description

The AsForecasting property determines whether forecasting values are calculated.

Comments

Available values:

Example

Executing the example requires that the repository contains a modeling container with the MS identifier containing a model with the MODEL_EXPLSM identifier. This model should be calculated using the Exponential Smoothing method.

Add links to the Metabase, Ms, Stat system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Model: IMsModel;
    Formula: IMsFormula;
    ExpSmooph: IMsExponentialSmoothingTransform;
    SeasonalComp: ISeasonal;
    Parameters: IExponentialSmoothingParameters;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get model
    Model := (Mb.ItemByIdNamespace("MODEL_EXPLSM", MB.GetObjectKeyById("MS"))).Edit As IMsModel;
    // Get calculation parameters
    Formula := Model.Transform.FormulaItem(0);
    ExpSmooph := Formula.Method As IMsExponentialSmoothingTransform;
    // Set significance of confidence limits
    ExpSmooph.ConfidenceLevel := 0.99;
    // Set missing data treatment method
    ExpSmooph.MissingData.Method := MissingDataMethod.LinTrend;
    // Specify that method calculates forecast values
    ExpSmooph.AsForecasting := True;
    // Set model trend type
    ExpSmooph.TrendComponent := TrendType.Exponential;
    // Set seasonal component parameters
    SeasonalComp := ExpSmooph.SeasonalComponent;
    SeasonalComp.Cycle := 5;
    SeasonalComp.Mode := SeasonalityType.Multiplicative;
    // Set values of method parameters
    Parameters := ExpSmooph.Parameters;
    Parameters.Alpha := 0.06;
    Parameters.Delta := 0.06;
    Parameters.Gamma := 0.01;
    // Save changes
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the following is set for the model: confidence limit significance, missing data treatment method, trend type, seasonal component and parameter values. The model calculates forecasting values.

See also:

IMsExponentialSmoothingTransform