RCadj: Double;
The RCadj property returns adjusted determinant for the matrix of residuals covariance.
A model with a smaller criterion value is preferable.
To get residual covariance matrix determinant, use the IVARStatistics.RC property.
To execute the example, add a link to the Stat system assembly.
Sub UserProc;
Var
y1, y2: Array[15] Of Double;
status: Integer;
VarModel: ISmVectorAutoRegress;
Eqs: ISlEquations;
Eq: ISlEquation;
ARO: Array[2] Of Integer;
VARStat: IVARStatistics;
Begin
VarModel := New SmVectorAutoRegress.Create;
//values of y1 array
y1[00] := 6209; y1[01] := 6385; y1[02] := 6752; y1[03] := 6837; y1[04] := 6495;
y1[05] := 6907; y1[06] := 7349; y1[07] := 7213; y1[08] := 7061; y1[09] := 7180;
y1[10] := 7132; y1[11] := 7137; y1[12] := 7473; y1[13] := 7722; y1[14] := 8088;
//values of y2 array
y2[00] := 4110; y2[01] := 4280; y2[02] := 4459; y2[03] := 4545; y2[04] := 4664;
y2[05] := 4861; y2[06] := 5195; y2[07] := 5389; y2[08] := 5463; y2[09] := 5610;
y2[10] := 5948; y2[11] := 6218; y2[12] := 6521; y2[13] := 6788; y2[14] := 7222;
//values of ARO array
ARO[0]:=1; ARO[1]:=2;
Eqs := VarModel.Equations;
Eq := Eqs.Add;
Eq.Serie.Value := y1;
Eq.AutoRegressionOrder := ARO;
Eq.Intercept.Mode := InterceptMode.AutoEstimate;
Eq := Eqs.Add;
Eq.Serie.Value := y2;
Eq.AutoRegressionOrder := ARO;
Eq.Intercept.Mode := InterceptMode.AutoEstimate;
VarModel.ModelPeriod.FirstPoint := 1;
VarModel.ModelPeriod.LastPoint := 43;
status := VarModel.Execute;
If status <> 0 Then
Debug.WriteLine(VarModel.Errors);
Else
VARStat := VarModel.VARStatistics;
Debug.WriteLine("Akaike information criterion: " + VARStat.AIC.ToString);
Debug.WriteLine("Value of likelihood function: " + VARStat.LLV.ToString);
Debug.WriteLine("Residual covarianc matrix determinant: " + VARStat.RC.ToString);
Debug.WriteLine("Adjusted determinant of residual covariance matrix: " + VARStat.RCadj.ToString);
Debug.WriteLine("Schwarz criterion: " + VARStat.SC.ToString);
End If;
End Sub UserProc;
After executing the example the console window displays values of vector autoregression statistics.
See also: