SteYX(KnownYs: Array; KnownXs: Array): Double;
SteYX(KnownYs: System.Array; KnownXs: System.Array): double;
KnownYs. Independent series.
KnownXs. Dependent series.
The SteYX method returns standard error of predicted Y values for every X value in the regression.
Standard error is a measure of error of predicted value Y for a specific value X.
For correct calculation the KnownYs and KnownXs series:
Should have equal number of points.
Should be non-constant.
To execute the example, add a link to the Stat system assembly.
Sub UserProc;
Var
st: Statistics;
d0: Double;
y, x: Array Of Double;
Begin
y := New Double[8];
y[00] := 6; y[04] := 21;
y[01] := 7; y[05] := 24;
y[02] := 9; y[06] := 25;
y[03] := 15; y[07] := 18;
x := New Double[8];
x[00] := 20; x[04] := 40;
x[01] := 28; x[05] := 43;
x[02] := 31; x[06] := 51;
x[03] := 38; x[07] := 47;
st := New Statistics.Create;
d0 := st.SteYX(y, x);
If st.Status <> 0 Then
Debug.WriteLine(st.Errors);
Else
Debug.WriteLine("Standard error: " + d0.ToString);
End If;
End Sub UserProc;
After executing the example the console window displays the standard error value:
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
st: Statistics;
d0: Double;
y, x: Array Of Double;
Begin
y := New Double[8];
y[00] := 6; y[04] := 21;
y[01] := 7; y[05] := 24;
y[02] := 9; y[06] := 25;
y[03] := 15; y[07] := 18;
x := New Double[8];
x[00] := 20; x[04] := 40;
x[01] := 28; x[05] := 43;
x[02] := 31; x[06] := 51;
x[03] := 38; x[07] := 47;
st := New Statistics.Create();
d0 := st.SteYX(y, x);
If st.Status <> 0 Then
System.Diagnostics.Debug.WriteLine(st.Errors);
Else
System.Diagnostics.Debug.WriteLine("Standard error: " + d0.ToString());
End If;
End Sub;
See also: