IMsBinaryRegressionTransform.MissingData

Syntax

MissingData: IMissingData;

Description

The property is read-only.

The MissingData property returns an object containing parameters of missing data treatment in the source series.

Example

To execute the example, the modeling container (CONT_MODEL) must contain a model (BinReg), that uses the binary regression method for calculation.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Model: IMsModel;

Trans: IMsFormulaTransform;

VarTrans: IMsFormulaTransformVariable;

Tree: IMsFormulaTransformSlicesTree;

Slice: IMsFormulaTransformSlice;

Selector: IMsFormulaTransformSelector;

Formula: IMsFormula;

Binary: IMsBinaryRegressionTransform;

Calc: IMsModelCalculation;

Coord: IMsFormulaTransformCoord;

Coef: IModelCoefficients;

Estim: Array Of Double;

i: Integer;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemByIdNamespace("BinReg", MB.ItemById("CONT_MODEL").Key).Edit;

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;

// Determine the value of confidence limits

Binary.ConfidenceLevel := 0.9;

// Determine the missing data treatment method

Binary.MissingData.Method := MissingDataMethod.SampleAverage;

Calc := Model.CreateCalculation;

Calc.Period.IdentificationStartDate := DateTime.ComposeDay(2000, 01, 01);

Calc.Period.IdentificationEndDate := DateTime.ComposeDay(2007, 12, 31);

Calc.Period.ForecastStartDate := DateTime.ComposeDay(2007, 01, 01);

Calc.Period.ForecastEndDate := DateTime.ComposeDay(2010, 12, 31);

Coord := Trans.CreateCoord(VarTrans);

// Identification of new equation

Binary.Identify(Calc As IMsMethodCalculation, Coord);

// Receive the values of statistic descriptions

Coef := Binary.StatCoefficients(Coord);

// Array of evaluated values of model coefficients

Estim := Coef.Coefficients.Estimate;

// Display the array to console

For i := 0 To Estim.Length - 1 Do

Debug.WriteLine(Estim[i]);

End For;

MObj.Save;

End Sub Main;

After executing the example, new missing data treatment (average by sample) is set for the model. After equation identification the array of evaluated model coefficients is displayed to console window.

See also:

IMsBinaryRegressionTransform