IMsPooledModelTransform.Explanatories

Syntax

Explanatories: IMsCompositeFormulaTermSetList;

Description

The Explanatories property returns an array of explanatory variables (factors).

Comments

The dimensions of output and explanatory variables must match in the model.

The variables returned by Explanatories are given as a set of composite terms.

Example

Executing the example requires that the repository contains a modeling container with the OBJ_MS identifier. This container must include a model with the MODEL identifier that uses panel data regression method for calculation.

It is also necessary to add links to the Metabase, Ms, Stat system assemblies.

    Sub UserProc;
    Var
        Mb: IMetabase;
        MsDescr: IMetabaseObjectDescriptor;
        Model: IMsModel;
        ModelTransform: IMsFormulaTransform;
        ModelFormula: IMsFormula;
        PooledModel: IMsPooledModelTransform;
        Explanatories: IMsCompositeFormulaTermSetList;
        i, j: Integer;
        Expl: IMsCompositeFormulaTermSet;
        CompTerm: IMsCompositeFormulaTerm;
    Begin
        Mb := MetabaseClass.Active;
        MsDescr := Mb.ItemById("OBJ_MS");
        Model := MB.ItemByIdNamespace("MODEL", MsDescr.Key).Edit As IMsModel;
        ModelTransform := Model.Transform;
        ModelFormula := ModelTransform.FormulaItem(0);
        PooledModel := ModelFormula.Method As IMsPooledModelTransform;
        Explanatories := PooledModel.Explanatories;
        Debug.WriteLine("Terms of explanatory series:");
        For i := 0 To Explanatories.Count - 1 Do
            Expl := Explanatories.Item(i);
            Debug.WriteLine("  Variable " + (i + 1).ToString + ":");
            For j := 0 To Expl.Count - 1 Do
                CompTerm := Expl.Item(j);
                If Expl.Included Then
                    Debug.WriteLine("    " + CompTerm.ExpressionText);
                End If;
            End For;
        End For;
    End Sub UserProc;

After executing the example sets of terms of explanatory series are displayed in the console window.

See also:

IMsPooledModelTransform