IMsBinaryRegressionTransform.Explanatories

Syntax

Explanatories: IMsCompositeFormulaTermSetList;

Description

The Explanatories property returns the set of explanatory series.

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier. The container contains a model with the BINREG identifier that uses the binary regression method for calculation.

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

Sub UserProc;
Var
    MB: IMetabase;
    SpaceDescr: IMetabaseObjectDescriptor;
    MObj: IMetabaseObject;
    Model: IMsModel;
    Trans: IMsFormulaTransform;
    VarTrans: IMsFormulaTransformVariable;
    Tree: IMsFormulaTransformSlicesTree;
    Slice: IMsFormulaTransformSlice;
    Selector: IMsFormulaTransformSelector;
    Formula: IMsFormula;
    Binary: IMsBinaryRegressionTransform;
    Explained: IMsFormulaTermSet;
    Explanatories: IMsCompositeFormulaTermSetList;
    i, j: Integer;
    Term: IMsFormulaTerm;
    TermSet: IMsCompositeFormulaTermSet;
    CompTerm: IMsCompositeFormulaTerm;
Begin
    MB := MetabaseClass.Active;
    SpaceDescr := mb.ItemById("CONT_MODEL");
    MObj := MB.ItemByIdNamespace("BinReg", SpaceDescr.Key).Bind;
    Model := MObj As IMsModel;
    Trans := Model.Transform;
    VarTrans := Trans.Outputs.Item(0);
    Tree := VarTrans.SlicesTree(VarTrans);
    Slice := Tree.CreateSlice(1);
    Selector := Model.Transform.CreateSelector;
    Selector.Slice := Slice;
    Formula := Model.Transform.Transform(Selector);
    Binary := Formula.Method As IMsBinaryRegressionTransform;
    Explained := Binary.Explained;
    Debug.WriteLine("Output series terms:");
    For i := 0 To Explained.Count - 1 Do
        Term := Explained.Item(i);
        Debug.WriteLine("  " + Term.TermToText);
    End For;
    Explanatories := Binary.Explanatories;
    Debug.WriteLine("Explanatory series terms:");
    For i := 0 To Explanatories.Count - 1 Do
        TermSet := Explanatories.Item(i);
        For j := 0 To TermSet.Count - 1 Do
            CompTerm := TermSet.Item(j);
            Debug.WriteLine("  " + CompTerm.ExpressionText);
        End For;
    End For;
End Sub;

After executing the example the console window displays terms of output and explained series.

See also:

IMsBinaryRegressionTransform