ILanerResultsBoxCoefficients.ColumnType

Syntax

ColumnType(Index: Integer): LanerBoxCoefficentColumns;

Parameters

Index. Column index.

Description

The ColumnType property returns type of a coefficient column by its index.

Comments

Value of the Index parameter should be within the range [0; ILanerResultsBoxCoefficients.ColumnCount-1].

Example

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

The example is executed on clicking the button.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        Results: ILanerResultsBoxResults;
        Coefficients: ILanerResultsBoxCoefficients;
        ColumnIndex, i: Integer;
    Begin
        Results := LanerResultsBox1.Results;
        Coefficients := Results.Coefficients;
        If Coefficients.TermCount > 0 Then
            Debug.WriteLine("Equation:   " + Coefficients.Equation);
            For i := 0 To Coefficients.ColumnCount - 1 Do
                If Coefficients.ColumnType(i) = LanerBoxCoefficentColumns.Coefficient Then
                    ColumnIndex := i;
                End If;
            End For;
            For i := 0 To Coefficients.TermCount - 1 Do
                Debug.WriteLine(Coefficients.Value(i, ColumnIndex));
            End For;
        Else
            Debug.WriteLine("Coefficients have not been calculated");
        End If;
    End Sub Button1OnClick;

After executing the example the console window shows identified equation and names of the coefficients displayed on the Coefficients tab of the Calculation Results panel.

See also:

ILanerResultsBoxCoefficients