IMs2SLSTransform.ConstantMode

Syntax

ConstantMode: InterceptMode;

Description

The ConstantMode property determines a mode of setting model constant.

Comments

If ConstantMode is set to InterceptMode.ManualEstimate, the constant is set by using the IMs2SLSTransform.ConstantValue property.

Example

Executing the example requires that the repository contains a modeling container with the MODEL_SPACE identifier. A model with the NEW_2SLS identifier created in this container uses the linear regression method (instrumental variables estimation) for calculation.

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

Sub UserProc;
Var
    Mb: IMetabase;
    MsDescrKey: Integer;
    Model: IMsModel;
    ModelTrans: IMsFormulaTransform;
    Formula: IMsFormula;
    SLS: IMs2SLSTransform;
Begin
    Mb := MetabaseClass.Active;
    MsDescrKey := Mb.ItemById("MODEL_SPACE").Key;
    // Get model
    Model := MB.ItemByIdNamespace("New_2SLS", MsDescrKey).Edit As IMsModel;
    ModelTrans := Model.Transform;
    // Set up model calculation parameters
    Formula := ModelTrans.FormulaItem(0);
    SLS := Formula.Method As IMs2SLSTransform;
    SLS.ConstantMode := InterceptMode.ManualEstimate;
    SLS.ConstantValue := 2.9;
    // Save model calculation parameters
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example constant value for the model is set.

See also:

IMs2SLSTransform