IMsBinaryRegressionTransform.MissingData

Syntax

MissingData: IMissingData;

Description

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

Example

Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier. The container contains a model with the BINREG identifier that uses the binary regression method for calculation.

Add links to the Metabase, Ms, Stat system assemblies.

Sub UserProc;
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 confidence limit significance
    Binary.ConfidenceLevel := 0.9;
    // Determine missing data treatment method
    Binary.MissingData.Method := MissingDataMethod.SampleAverage;
    Calc := Model.CreateCalculation;
    Calc.Period.IdentificationStartDate := DateTime.ComposeDay(20000101);
    Calc.Period.IdentificationEndDate := DateTime.ComposeDay(20071231);
    Calc.Period.ForecastStartDate := DateTime.ComposeDay(20070101);
    Calc.Period.ForecastEndDate := DateTime.ComposeDay(20101231);
    Coord := Trans.CreateCoord(VarTrans);
    // Identification of new equation
    Binary.Identify(Calc As IMsMethodCalculation, Coord);
    // Get summary statistics values
    Coef := Binary.StatCoefficients(Coord);
    // Array of estimated values of model coefficients
    Estim := Coef.Coefficients.Estimate;
    // Display array in the console
    For i := 0 To Estim.Length - 1 Do
        Debug.WriteLine(Estim[i]);
    End For;
    MObj.Save;
End Sub;

After executing the example the new missing data treatment method (average) is set for the model. After equation identification the array of estimated model coefficients is displayed in the console window.

See also:

IMsBinaryRegressionTransform