IMsStringGenerator.AdvancedOptions

Syntax

AdvancedOptions: MsStringGeneratorOptions;

Description

The AdvancedOptions property determines the advanced settings used to generate model names.

Comments

Set AdvancedOptions equal to MsStringGeneratorOptions.ExpandArimaName and set the IMsStringGenerator.Coord property to get identified equation for the ARIMA model.

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier. The container includes the ARIMA model with the MODEL identifier.

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

Sub UserProc;
Var
    MB: IMetabase;
    Model: IMsModel;
    Transform: IMsFormulaTransform;
    VarTrans: IMsFormulaTransformVariable;
    Tree: IMsFormulaTransformSlicesTree;
    Slice: IMsFormulaTransformSlice;
    Selector: IMsFormulaTransformSelector;
    Formula: IMsFormula;
    Arima: IMsArimaTransform;
    Coord: IMsFormulaTransformCoord;
    Calc: IMsModelCalculation;
    StrGen: IMsModelStringGenerator;
Begin
    MB := MetabaseClass.Active;
    Model := MB.ItemByIdNamespace("MODEL", MB.ItemById("CONT_MODEL").Key).Bind As IMsModel;
    Transform := Model.Transform;
    VarTrans := Transform.Outputs.Item(0);
    Tree := VarTrans.SlicesTree(VarTrans);
    Slice := Tree.CreateSlice(1);
    Selector := Transform.CreateSelector;
    Selector.Slice := Slice;
    Formula := Transform.Transform(Selector);
    Arima := Formula.Method As IMsArimaTransform;
    Coord := Transform.CreateCoord(VarTrans);
    Calc := Model.CreateCalculation;
    Calc.Period.IdentificationStartDate := DateTime.ComposeDay(20000101);
    Calc.Period.IdentificationEndDate := DateTime.ComposeDay(20051231);
    Calc.Period.ForecastStartDate := DateTime.ComposeDay(20060101);
    Calc.Period.ForecastEndDate := DateTime.ComposeDay(20101231);
    Arima.Execute(Calc As IMsMethodCalculation, Coord);
    StrGen := Model.CreateStringGenerator;
    StrGen.AdvancedOptions := MsStringGeneratorOptions.ExpandArimaName;
    StrGen.Coord := Coord;
    StrGen.ShowEstimatedCoeffs := True;
    Debug.WriteLine("Identified equation:" + StrGen.Execute);
End Sub UserProc;

After executing the example the identified equation of the ARIMA model is displayed in the console window.

See also:

IMsStringGenerator