ISummaryStatistics.JBStat

Fore Syntax

JBStat: Double;

Fore.NET Syntax

JBStat: double;

Description

The JBStat property returns value of the Jarque-Bera statistics.

Comments

The Jarque-Bera criterion is used to verify the hypothesis of normality of model residuals.

To get the value of the Jarque-Bera statistics, use the ISummaryStatistics.ProbJBStat property.

Fore Example

To execute the example, add a link to the Stat system assembly.

Sub UserProc;
Var
    LinearR: SmLinearRegress;
    can, fr: Array[9Of Double;
    res, i: Integer;
    Con: IIntercept;
    ss: ISummaryStatistics;
Begin
    LinearR := New SmLinearRegress.Create;
    For i := 0 To 8 Do
        can[i] := 1230 + i * 302;
        fr[i] := 579.5 + i * 9.4;
    End For;
    // Set model parameters
    LinearR.Explained.Value := can;
    LinearR.Explanatories.Add.Value := fr;
    Con := LinearR.ModelCoefficients.Intercept;
    Con.Mode := InterceptMode.ManualEstimate;
    // Calculate
    res := LinearR.Execute;
    ss := LinearR.SummaryStatistics;
    Debug.Write("Jarque-Bera statistics: ");
    Debug.WriteLine(ss.JBStat);
    Debug.WriteLine("Jarque-Bera statistics probability");
    Debug.WriteLine(ss.ProbJBStat); 
End Sub UserProc;

After executing the example the console window displays values of Jarque-Bera statistics and Jarque-Bera statistics probability.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Stat;

Public Shared Sub Main(Params: StartParams);
Var
    LinearR: SmLinearRegress;
    can, fr: Array[9Of Double;
    res, i: Integer;
    Con: IIntercept;
    ss: ISummaryStatistics;
Begin
    LinearR := New SmLinearRegress.Create();
    For i := 0 To 8 Do
        can[i] := 1230 + i * 302;
        fr[i] := 579.5 + i * 9.4;
    End For;
    // Set model parameters
    LinearR.Explained.Value := can;
    LinearR.Explanatories.Add().Value := fr;
    Con := LinearR.ModelCoefficients.Intercept;
    Con.Mode := InterceptMode.imManualEstimate;
    // Calculate
    res := LinearR.Execute();
    ss := LinearR.SummaryStatistics;
    System.Diagnostics.Debug.Write("Jarque-Bera statistics: ");
    System.Diagnostics.Debug.WriteLine(ss.JBStat);
    System.Diagnostics.Debug.Write("Jarque-Bera statistics probability: ");
    System.Diagnostics.Debug.WriteLine(ss.ProbJBStat);
End Sub;

See also:

ISummaryStatistics | Jaque-Bera Statistic