ISlConstCoefficients.Estimate

Syntax

Estimate: Double;

Description

The Estimate property returns estimate of a coefficient or a constant.

Example

Sub Main;

Var

ADF: SmAugmentDickeyFullerTest;

d0: Double;

res: Integer;

can: Array Of Double;

CC: ISlConstCoefficients;

Sub Print(Data: Array Of Double);

Var

i: Integer;

CI: ICultureInfo;

Begin

CI := CultureInfo.Current;

Debug.WriteLine("---Begin---");

For i := 0 To Data.Length - 1 Do

If Double.IsNan(Data[i]) Then

Debug.WriteLine("---empty---");

Else

Debug.WriteLine(i.ToString + ", " + CI.FormatDoublePrec(Data[i], 4));

End If;

End For;

Debug.WriteLine("---End---");

End Sub Print;

Begin

ADF := New SmAugmentDickeyFullerTest.Create;

can := New Double[16];

//values can

can[00] := 6209;

can[01] := 6385;

can[02] := 6752;

can[03] := 6837;

can[04] := 6495;

can[05] := 6907;

can[06] := 7349;

can[07] := 7213;

can[08] := 7061;

can[09] := 7180;

can[10] := 7132;

can[11] := 7137;

can[12] := 7473;

can[13] := 7722;

can[14] := 8088;

can[15] := 8516;

ADF.Serie.Value := can;

ADF.ModelPeriod.FirstPoint := 1;

ADF.ModelPeriod.LastPoint := 16;

ADF.EquationType := ADFEquationType.ConstantTrend;

ADF.TestedSeries := ADFTestedSeriesType.Level;

ADF.AutoRegressionOrder := 2;

res := ADF.Execute;

If res <> 0 Then

Debug.WriteLine(ADF.Errors);

Else

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

Print(ADF.CriticalValues);

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

CC := ADF.Intercept;

d0 := CC.Estimate;

Debug.WriteLine("estimate: " + d0.ToString);

d0 := CC.Probability;

Debug.WriteLine("probability: " + d0.ToString);

d0 := CC.StandardError;

Debug.WriteLine("standard error: " + d0.ToString);

d0 := CC.TStatistic;

Debug.WriteLine("t-statistic: " + d0.ToString);

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

CC := ADF.Trend;

d0 := CC.Estimate;

Debug.WriteLine("values: " + d0.ToString);

d0 := CC.Probability;

Debug.WriteLine("probability: " + d0.ToString);

d0 := CC.StandardError;

Debug.WriteLine("standard error: " + d0.ToString);

d0 := CC.TStatistic;

Debug.WriteLine("t-statistic: " + d0.ToString);

End If;

End Sub Main;

After executing the example the console window displays results of test calculation:

Module execution started

== Critical values ==

---Begin---

0, -4.5348

1, -3.6746

2, -3.2762

---End---

== Constant ==

estimate: 1191.598892266572

probability: 0.77786692401086532

standard error: 4083.6863637104693

t-statistic: 0.29179490933869756

== Trend ==

values: 43.355116764399035

propbability: 0.48780357187548529

standard error: 59.614733021498303

t-statistic: 0.72725506878919155

Module execution finished

See also:

ISlConstCoefficients