Show contents 

Ms > Ms Assembly Interfaces > IMsNonLinearRegressionTransform > IMsNonLinearRegressionTransform.SetAttributeExpression

IMsNonLinearRegressionTransform.SetAttributeExpression

Syntax

SetAttributeExpression: String;

Description

The SetAttributeExpression method sets the expression specified using the factor attributes as the model equation.

Comments

The set of attributes must unambiguously determine the time series. Attributes order and separator must match with the order and separator used in the time series database.

Example

Executing the example requires a time series database with the OBJ_RUBRICATOR identifier. Modeling container of this database must contain the REGR_MODEL model based on factors and calculated using non-linear regression.

Sub UserProc;
Var
    mb: IMetabase;
    ModelCont: IMetabaseObjectDescriptor;
    Ruby: IRubricator;
    obj: IMetabaseObject;
    Transform: IMsFormulaTransform;
    Model: IMsModel;
    ModelMethod: IMsNonLinearRegressionTransform;
    Formula: IMsFormula;
Begin
    mb := MetabaseClass.Active;
    Ruby := mb.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;
    ModelCont := ruby.ModelSpace;
    Obj := mb.ItemByIdNamespace("REGR_MODEL", ModelCont.Key).Edit;
    Model := Obj As IMsModel;
    Transform := Model.Transform;
    Formula := Transform.FormulaItem(0);
    ModelMethod := Formula.Method As IMsNonLinearRegressionTransform;
    ModelMethod.SetAttributeExpression("Years|Afganistan|GGB / A2");
    obj.Save;
End Sub UserProc;

After executing the example a new form, as model equation, is set.

See also:

IMsNonLinearRegressionTransform | IMetaDictionary.AttributeNamings