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 is to be within the range [0; ILanerResultsBoxCoefficients.ColumnCount-1].

Example

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

This 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 this 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