IMsPooledModelTransform.AddFactorTermSet

Syntax

AddFactorTermSet: IMsFormulaTermSet;

Description

The AddFactorTermSet property returns the set of the series that are used as additional factors.

Comments

The added factor is used for forecast adjustment. It is not included to the generated model name.

By default the added factor is absent.

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier that contains a panel data regression model with the MODEL identifier. The container must also include a variable with the VAR_ADD identifier.

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

Sub UserProc;
Var
    mb: IMetabase;
    ContModelKey: Integer;
    Model: IMsModel;
    Variable: IVariableStub;
    Transform: IMsFormulaTransform;
    Formula: IMsFormula;
    Method: IMsPooledModelTransform;
    AddFactorTS: IMsFormulaTermSet;
    TransVar: IMsFormulaTransformVariable;
    Tree: IMsFormulaTransformSlicesTree;
    i: Integer;
    Slice: IMsFormulaTransformSlice;
Begin
    mb := MetabaseClass.Active;
    ContModelKey := mb.ItemById("CONT_MODEL").Key;
    Model := mb.ItemByIdNamespace("MODEL", ContModelKey).Edit As IMsModel;
    Variable := MB.ItemByIdNamespace("VAR_ADD", ContModelKey).Bind As IVariableStub;
    Transform := Model.Transform;
    Formula := Transform.FormulaItem(0);
    Method := Formula.Method As IMsPooledModelTransform;
    AddFactorTS := Method.AddFactorTermSet;
    AddFactorTS.Clear;
    Transform.Inputs.Add(Variable);
    TransVar := Transform.Inputs.FindById("VAR_ADD");
    Tree := TransVar.SlicesTree(Null);
    For i := 1 To Tree.Count Do
        Slice := Tree.CreateSlice(i);
        AddFactorTS.Add(Slice);
    End For;
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, the VAR_ADD added factor is used to adjust model forecast.

See also:

IMsPooledModelTransform