ITsInversionInfo.Dependence

Fore syntax

Dependence: DependenceType;

Fore.NET syntax

Dependence: Prognoz.Platform.Interop.Stat.DependenceType;

Description

The Dependence property selects type of trend used for detrending.

Comments

This property is taken into account if ITsInversionInfo.Inversion = TsInversion.TS.

Using of following trend types is allowed for detrending:

Fore example

Executing the example requires a modeling container with the CONT_MODEL identifier in the repository. The container must include a model of determinated equation listing several factors and identified as MODEL. 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;
// Assigning initial transformation to the modelling variable
    InvInfo := Method.InversionInfo;
    InvInfo.Inversion := TsInversion.DLog;
    InvInfo.InversionLag := TsInversionLag.PrecidingValue;
    InvInfo.PreviousInversionLag := -2;
//  Assigning initial transformation of the 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 this example the initial transformation of the modelling variable and the factor used in the formula for the model will be changed.

Fore.NET example

Executing the example requires a modeling container with the CONT_MODEL identifier in the repository. The container must include a model of determinated equation listing several factors and identified as MODEL.

Imports Prognoz.Platform.Interop.Ms;
Imports Prognoz.Platform.Interop.Stat;
Imports Prognoz.Platform.Interop.Transform;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    MsDescr: IMetabaseObjectDescriptor;
    Model: IMsModel;
    Transform: IMsFormulaTransform;
    Method: IMsMethod;
    InvInfo: ITsInversionInfo;
    Determ: IMsDeterministicTransform;
    Operands: IMsFormulaTermList;
    TermInfo: IMsFormulaTermInfo;
Begin
    mb := Params.Metabase;
    MsDescr := mb.ItemById["CONT_MODEL"];
    Model := mb.ItemByIdNamespace["MODEL", MsDescr.Key].Edit() As IMsModel;
    Transform := Model.Transform;
    Method := Transform.FormulaItem[0].Method;
// Assigning initial transformation to the modelling variable  
    InvInfo := Method.InversionInfo;
    InvInfo.Inversion := TsInversion.tsiDLog;
    InvInfo.InversionLag := TsInversionLag.tsilPrecidingValue;
    InvInfo.PreviousInversionLag := -2;
//  Assigning initial transformation of the factor
    Determ := Method As IMsDeterministicTransform;
    Operands := Determ.Operands;
    If Operands.Count > 0 Then
        TermInfo := Operands.Item[0].TermInfo;
        InvInfo := TermInfo.InversionInfo;
        InvInfo.Inversion := TsInversion.tsiTS;
        InvInfo.Dependence := DependenceType.dtLogarithmic;
        Determ.Expression.AsString := TermInfo.TermInnerText + "+9";
    End If;
    (Model As IMetabaseObject).Save();
End Sub;

After executing this example the initial transformation of the modeling variable and the factor used in the formula for the model is changed.

See also:

ITsInversionInfo