IMsMethod.StatMethod

Syntax

StatMethod(Coord: IMsFormulaTransformCoord): IStatMethod;

Parameters

Coord. The variable slice, for which it is necessary to receive the information.

Description

The StatMethod property returns information on statistical method used for model calculation.

Example

Executing the example requires a modeling container with the MODEL_SPACE identifier. The container has a model with the MODEL_BPF identifier, that is used for the Baxter-King filter calculation.

Sub UserProc;
Var
    MB: IMetabase;
    Model: IMsModel;
    Trans: IMsFormulaTransform;
    TransVar: IMsFormulaTransformVariable;
    Bandpass: IMsBandpassFilterTransform;
    Coord: IMsFormulaTransformCoord;
    Calc: IMsMethodCalculation;
    Period, MPeriod: IMsModelPeriod;
    Res: IMsModelCalculationResult;
    StatBandpass: ISmBandpassFilter;
Begin
    MB := MetabaseClass.Active;
    Model := MB.ItemByIdNamespace("MODEL_BPF", MB.ItemById("MODEL_SPACE").Key).Bind As IMsModel;
    Trans := Model.Transform;
    TransVar := Trans.Outputs.Item(0);
    Bandpass := Trans.FormulaItem(0).Method As IMsBandpassFilterTransform;
    Coord := Trans.CreateCoord(TransVar);
    Calc := Trans.CreateCalculation;
    MPeriod := Model.Transform.Period;
    Period := Calc.Period;
    Period.IdentificationStartDate := MPeriod.IdentificationStartDate;
    Period.IdentificationEndDate := MPeriod.IdentificationEndDate;
    Period.ForecastStartDate := MPeriod.ForecastStartDate;
    Period.ForecastEndDate := MPeriod.ForecastEndDate;
    Res := Bandpass.Execute(Calc, Coord);
    StatBandpass := Res.StatMethod As ISmBandpassFilter;
    Debug.WriteLine(StatBandpass.DisplayName);
    Debug.WriteLine(StatBandpass.Name);
    Debug.WriteLine(StatBandpass.Errors);
End Sub UserProc;

After executing the example the model is calculated. After the calculation, the information of statistic method, that is used for calculation, is received. Name, internal name and information of possible calculation errors is displayed in the development environment console.

See also:

IMsMethod