MLESettings: IMLESettings;
The MLESettings property determines parameters of the maximum likelihood method.
The maximum likelihood method is used to estimate unknown parameters.
To execute the example, add a link to the Stat system assembly.
Sub UserProc;
Var
distr: ISmGeneralizedParetoDistribution;
i: Integer;
Values: Array Of Double;
cnt: Integer = 10;
Begin
distr := New SmGeneralizedParetoDistribution.Create;
// set distribution parameters:
distr.Location := 0.1;
distr.Scale := 0.1;
distr.Shape := 0.1;
// generating random series:
Values := distr.RandomVector(cnt);
// set maximum number of iterations:
distr.MLESettings.MaxIterations := 10;
// set accuracy of solution:
distr.MLESettings.Tolerance := 0.000000001;
// displaying error messages
Debug.WriteLine(distr.Errors);
// displaying parameters of shift, scale, form:
Debug.WriteLine(distr.Name + "(" + distr.Location.ToString + "," + distr.Scale.ToString + "," + distr.Shape.ToString + ")");
Debug.WriteLine("Generated series:");
Debug.Indent;
For i := 0 To Cnt - 1 Do
Debug.Write(i.ToString + " ");
Debug.WriteLine(Values[i].ToString);
End For;
Debug.Unindent;
End Sub UserProc;
Executing the example generates the sample of pseudo-random values, that have the GPD distribution (0,1; 0,1; 0,1).
See also:
ISmGeneralizedParetoDistribution | Estimation by the method of maximum likelihood