ISmVectorAutoRegress.ImpulsePeriod

Syntax

ImpulsePeriod: Integer;

Description

The ImpulsePeriod property determines the period for an impulse function.

Comments

If both ImpulseAROrder and ImpulsePeriod properties are defined, values of the ISlEquation.AutoRegressionOrder parameter is ignored, and the model is calculated with the autoregression order 1, 2, 3, … ImpulseAROrder, and a matrix of values for the impulse response function ISlEquation.ImpulseMatrix is also calculated.

Example

Sub Main;

Var

ar1, ar2, ar3: Array[0..15] Of Double;

i,j,status: Integer;

d: Double;

var1: ISmVectorAutoRegress;

Eqs: ISlEquations;

Eq: ISlEquation;

ARO: Array[0..0] Of Integer;

Begin

//Endogenous1, Endogenous2, Endogenous3

ar1[0] := 3; ar2[0] := 5; ar3[0] := 7;

ar1[1] := 8; ar2[1] := 3; ar3[1] := 2;

ar1[2] := 12; ar2[2] := 9; ar3[2] := 11;

ar1[3] := 10; ar2[3] := 13; ar3[3] := 14;

ar1[4] := 26; ar2[4] := 25; ar3[4] := 18;

ar1[5] := 21; ar2[5] := 21; ar3[5] := 22;

ar1[6] := 35; ar2[6] := 30; ar3[6] := 32;

ar1[7] := 29; ar2[7] := 33; ar3[7] := 28;

ar1[8] := 40; ar2[8] := 43; ar3[8] := 39;

ar1[9] := 39; ar2[9] := 37; ar3[9] := 44;

ar1[10] := 51; ar2[10] := 49; ar3[10] := 50;

ar1[11] := 50; ar2[11] := 47; ar3[11] := 54;

ar1[12] := 59; ar2[12] := 60; ar3[12] := 58;

ar1[13] := 58; ar2[13] := 59; ar3[13] := 57;

ar1[14] := 65; ar2[14] := 69; ar3[14] := 71;

ar1[15] := 72; ar2[15] := 68; ar3[15] := 72;

var1 := New SmVectorAutoRegress.Create;

Eqs := var1.Equations;

Eq := Eqs.Add;

Eq.Serie.Value := ar1;

Eq.AutoRegressionOrder := ARO;

Eq := Eqs.Add;

Eq.Serie.Value := ar2;

Eq := Eqs.Add;

Eq.Serie.Value := ar3;

var1.ModelPeriod.FirstPoint := 1;

var1.ModelPeriod.LastPoint := 16;

var1.ImpulseAROrder := 1;

var1.ImpulsePeriod := 10;

status := var1.Execute;

Debug.Writeline("Status = " + status.tostring);

Debug.Writeline("Errors = " + var1.Errors);

Debug.WriteLine(" == IMPULSE MATRIX 1 == ");

For i := 0 To var1.ImpulsePeriod-1 Do //by observations (rows)

Debug.Write(i.ToString+ ": ");

For j := 0 To var1.Equations.Count-1 Do //by variables (columns)

d := var1.Equations.Item(0).ImpulseMatrix[i,j];

Debug.Write(d.ToString + ", ");

End For;

Debug.WriteLine(" ");

End For;

Debug.WriteLine("======");

End Sub Main;

Executing this example shows the impulse matrix for the first equation in the console window:

Module execution started

Status = 0

Errors = No errors

== IMPULSE MATRIX 1 ==

0: 5.8210734347857747, 0, 0,

1: 4.7254838309991269, 1.2383321318793281, 2.6820853585513604,

2: 5.9075270312058059, 1.0779088108003716, 1.6549290337899745,

3: 6.1589812302649936, 1.2798916217967296, 2.3518675511390472,

4: 6.8688532037234804, 1.3605275651990483, 2.350215937995614,

5: 7.4659376074868238, 1.5058786773330226, 2.6652313651194883,

6: 8.1939119743921545, 1.6414366188806042, 2.8790029169578659,

7: 8.9599782425868462, 1.7995470093648307, 3.1671793576593283,

8: 9.8112285544027475, 1.9685903751252565, 3.4602110321587385,

9: 10.737739182962329, 2.1552869084727471, 3.7902238564618638,

======

Module execution finished

See also:

ISmVectorAutoRegress