Dependence: DependenceType;
The Dependence property selects type of trend used for trend subtract.
The property is taken into account if ITsInversionInfo.Inversion = TsInversion.TS.
The following trend types are allowed for trend subtract:
DependenceType.Linear. Linear. It is used by default.
DependenceType.Polynomial. Polynomial.
DependenceType.Logarithmic. Logarithmic.
DependenceType.Inverse. Inverse.
Executing the example requires that the repository contains a modeling container with the CONT_MODEL identifier. The container must include a model of determinate equation with the MODEL identifier containing several factors. Add links to the Metabase, Ms, Transform, Stat system assemblies.
Sub UserProc;
Var
mb: IMetabase;
MsDescr: IMetabaseObjectDescriptor;
Model: IMsModel;
Transform: IMsFormulaTransform;
Method: IMsMethod;
InvInfo: ITsInversionInfo;
Determ: IMsDeterministicTransform;
Operands: IMsFormulaTermList;
TermInfo: IMsFormulaTermInfo;
Begin
mb := MetabaseClass.Active;
MsDescr := mb.ItemById("CONT_MODEL");
Model := mb.ItemByIdNamespace("MODEL", MsDescr.Key).Edit As IMsModel;
Transform := Model.Transform;
Method := Transform.FormulaItem(0).Method;
// Set initial transformation to modelling variable
InvInfo := Method.InversionInfo;
InvInfo.Inversion := TsInversion.DLog;
InvInfo.InversionLag := TsInversionLag.PrecidingValue;
InvInfo.PreviousInversionLag := -2;
// Set initial transformation of factor
Determ := Method As IMsDeterministicTransform;
Operands := Determ.Operands;
If Operands.Count > 0 Then
TermInfo := Operands.Item(0).TermInfo;
InvInfo := TermInfo.InversionInfo;
InvInfo.Inversion := TsInversion.TS;
InvInfo.Dependence := DependenceType.Logarithmic;
Determ.Expression.AsString := TermInfo.TermInnerText + "+9";
End If;
(Model As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the initial transformation of the modeling variable and the factor used in the formula for the model is changed.
See also: