ILanerBox.ApplyInversion

Syntax

ApplyInversion(Inversion: Integer; InversionLag: Integer);

Parameters

Inversion. Series transformation method.

InversionLag. Lag for the series transformation.

Description

The ApplyInversion method applies a specified transformation to the selected calculated series.

Comments

A calculated series should be fixed to apply ApplyInversion.

The Inversion parameter depends on the elements of the TsInversion enumeration.

Value of the InversionLag parameter cannot be negative.

The ILanerBox.CanApplyInversion method returns whether the specified transformation can be applied to the series.

The ILanerBox.IsInversionTurnedOn method returns whether the specified transformation has already been applied to the series.

Example

Executing the example requires a form with a button named Button1 on the form, the LanerBox component named LanerBox1, and the UiErAnalyzer component used as a data source for LanerBox. The workbook of the time series database should be loaded to UiErAnalyzer.

This procedure should be assigned as a handler of the OnClick event for the button. The example is executed on clicking the button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    CanInv: Boolean;
    IsOn: Boolean;
Begin
    CanInv := LanerBox1.CanApplyInversion(TsInversion.DLog, 1);
    IsOn := LanerBox1.IsInversionTurnedOn(TsInversion.DLog, 1);
    If CanInv And Not IsOn Then
        LanerBox1.ApplyInversion(TsInversion.DLog, 1);
    End If;
End Sub Button1OnClick;

After executing the example the following transformation is applied to the selected series if possible: logistic difference to the corresponding period of previous year.

See also:

ILanerBox

TsInversion