MissingData: IMissingData;
The MissingData property returns parameters of missing data treatment method in composite term values.
The property us taken into account if IMsCompositeFormulaTerm.ApplyMissingData is set to True.
Executing the example requires that the repository contains a modeling container with the OBJ_MS identifier containing a model with the MODEL identifier. The model is calculated by the linear regression (OLS estimation).
Add links to the Ms, Metabase and Stat system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
MsDescrKey: Integer;
Model: IMsModel;
ModelTrans: IMsFormulaTransform;
Formula: IMsFormula;
Linear: IMsLinearRegressionTransform;
CompositeTerm: IMsCompositeFormulaTerm;
Begin
Mb := MetabaseClass.Active;
MsDescrKey := Mb.ItemById("OBJ_MS").Key;
// Get model
Model := MB.ItemByIdNamespace("MODEL", MsDescrKey).Edit As IMsModel;
ModelTrans := Model.Transform;
// Set up model calculation parameters
Formula := ModelTrans.FormulaItem(0);
Linear := Formula.Method As IMsLinearRegressionTransform;
CompositeTerm := Linear.Explanatories.Item(0);
CompositeTerm.ApplyMissingData := True;
CompositeTerm.MissingData.Method := MissingDataMethod.AnyValue;
// Save model calculation parameters
(Model As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, missing data treatment method is set for the first composite term that is used in linear regression calculation.
See also: