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 Main;

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.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 Main;

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