ISmCointegrationEq.CommonExogenious

Syntax

CommonExogenious: Array;

Description

The CommonExogenious property determines an array of indexes of exogenous variables included into a group of variables with short-term cointegration links.

Comments

Exogenous variable must be included into the group of long-term (ISmCointegrationEq.LongTermExogenious) or short-term (ISmCointegrationEq.CommonExogenious) cointegration links to calculate a model.

Example

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

Sub UserProc;
Var
    y: Array[
11Of Double;
    x1, x2: Array[
21Of Double;
    AR_X: Array[
1Of Integer;
    CommonEx, LongTerm: Array[
1Of Integer;
    i, Res: Integer;
    ArrRes, f: Array 
Of Double;
    d: Double;
    CointegrEq: ISmCointegrationEq;
    Eq: ISlEquation;
Begin
    
// Set source values for endogenous variable
    y[00] := 95;
    y[
01] := 45;
    y[
02] := 22;
    y[
03] := -36;
    y[
04] := 10;
    y[
05] := -15;
    y[
06] := 36;
    y[
07] := -10;
    y[
08] := -36;
    y[
09] := -44;
    y[
10] := -7;
    
// Set source values for 1 and 2 exogenous variables
    x1[00] := 6; x2[00] := 7.6;
    x1[
01] := 8; x2[01] := 7.8;
    x1[
02] := 10; x2[02] := 8.1;
    x1[
03] := 5; x2[03] := 6.5;
    x1[
04] := 3;  x2[04] := 5.3;
    x1[
05] := 6; x2[05] := 4.6;
    x1[
06] := 3; x2[06] := 6.3;
    x1[
07] := 7; x2[07] := 7.7;
    x1[
08] := 8; x2[08] := 9.8;
    x1[
09] := 10; x2[09] := 1.0;
    x1[
10] := 5;  x2[10] := 7.5;
    x1[
11] := 2;  x2[11] := 8.2;
    x1[
12] := 1;  x2[12] := 4.1;
    x1[
13] := 1;  x2[13] := 6.1;
    x1[
14] := 3; x2[14] := 7.3;
    x1[
15] := 4;  x2[15] := 3.4;
    x1[
16] := 7;  x2[16] := 2.7;
    x1[
17] := 4; x2[17] := 8.4;
    x1[
18] := 7; x2[18] := 6.7;
    x1[
19] := 4; x2[19] := 7.4;
    x1[
20] := 3; x2[20] := 6.3;

    CointegrEq := New SmCointegrationEq.Create;
    Eq := CointegrEq.Equation;
    
// Set endogenous variable
    Eq.Serie.Value := y;
    
// Set exogenous variables
    Eq.ExogenousVariables.Add.Value := x1;
    Eq.ExogenousVariables.Add.Value := x2;
    
// Set autoregression order of exogenous variables
    AR_X[0] := 0;
    Eq.AutoRegressionOrder := AR_X;
    
// Include the first exogenous variable to short-term links group
    CommonEx[0] := 0;
    CointegrEq.CommonExogenious := CommonEx;
    
// Include the second exogenous variable to the long-term links group
    LongTerm[0] := 1;
    CointegrEq.LongTermExogenious := LongTerm;
    
// Set identification period
    CointegrEq.Period.FirstPoint := 1;
    CointegrEq.Period.LastPoint := 
11;
    
// Set the last forecast point
    Eq.Forecast.LastPoint := 21;
    
// Determine type of error correction model
    CointegrEq.ModelType := ECMType.NoTrendIntercept;
    
// Set autoregression order of endogenous variables
    CointegrEq.ParseSerieAROrder("1"True);
    
// Calculate method and display results
    Res := CointegrEq.Execute;
    
If Res = 0 Then
        Debug.WriteLine(
"Forecasting series:");
        ArrRes := Eq.Forecast.Value;
        
For i := CointegrEq.Period.LastPoint To ArrRes.Length - 1 Do
            d := ArrRes[i] 
As double;
            Debug.WriteLine(i.ToString + 
": " + d.ToString);
        
End For;
        f := CointegrEq.CointegralEquation.Estimate;
        Debug.WriteLine(
"Model coefficients;");
        
For i := 0 To f.Length - 1 Do
            Debug.WriteLine(f[i]);
        
End For;

        f := CointegrEq.CointegralEquation.Probability;
        Debug.WriteLine(
"Coefficient probabilities:");
        
For i := 0 To f.Length - 1 Do
            Debug.WriteLine(f[i]);
        
End For;
        f := CointegrEq.CointegralEquation.StandardError;
        Debug.WriteLine(
"Standard errors of coefficients");
        
For i := 0 To f.Length - 1 Do
            Debug.WriteLine(f[i]);
        
End For;
        f := CointegrEq.CointegralEquation.TStatistic;
        Debug.WriteLine(
"t-statistics of coefficients");
        
For i := 0 To f.Length - 1 Do
            Debug.WriteLine(f[i]);
        
End For;
    
Else
        Debug.WriteLine(
"Execution status: " + Res.ToString);
        Debug.WriteLine(
"Error: " + CointegrEq.Errors);
    
End If;
End Sub UserProc;

After executing the example, the console window will display calculation results: forecasting series; model coefficients; probabilities, standard errors and t-statistics of coefficients.

See also:

ISmCointegrationEq