IMsNonLinearRegressionTransform.SetAttributeExpression

Syntax

SetAttributeExpression: String;

Description

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

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

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 time series and calculated using non-linear regression.

Sub Main;

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 Main;

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

See also:

IMsNonLinearRegressionTransform