IMsHodrickPrescottFilterTransform.SmoothingParameterMode

Syntax

SmoothingParameterMode: HPSmoothingParameterModeType;

Description

The SmoothingParameterMode property determines the method of setting smoothing parameter.

Comments

Depending on the SmoothingParameterMode value, use different properties to adjust smoothing parameter:

Example

Executing the example requires that the repository contains a modeling container with the OBJ_MS identifier containing a model with the MODEL identifier. The model uses the Hodrick Prescott filter for calculation. It is also necessary to add links to the Ms, Metabase and Stat system assemblies.

    Sub UserProc;
    Var
        Mb: IMetabase;
        MsDescrKey: Integer;
        Model: IMsModel;
        ModelTrans: IMsFormulaTransform;
        Formula: IMsFormula;
        HPFilter: IMsHodrickPrescottFilterTransform;
    Begin
        Mb := MetabaseClass.Active;
        MsDescrKey := Mb.ItemById("OBJ_MS").Key;
    // Get model
        Model := MB.ItemByIdNamespace("MODEL", MsDescrKey).Edit As IMsModel;
        ModelTrans := Model.Transform;
    // Set up model calculation parameters
        Formula := ModelTrans.FormulaItem(0);
        HPFilter := Formula.Method As IMsHodrickPrescottFilterTransform;
        HPFilter.SmoothingParameterMode := HPSmoothingParameterModeType.SetByFrequencyRule;
        HPFilter.Power := 3;
    // Save model calculation parameters
        (Model As IMetabaseObject).Save;
    End Sub UserProc;

After executing the example the smoothing parameter is determined by degree value.

See also:

IMsHodrickPrescottFilterTransform