LazStats: Fine-tuning and chm help file update of the NormalityUnit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8027 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
8ee1e1ab5a
commit
3965b4a1ec
Binary file not shown.
Binary file not shown.
@ -257,7 +257,7 @@
|
||||
<Unit18>
|
||||
<Filename Value="forms\analysis\descriptive\normalityunit.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="NormalityFrm"/>
|
||||
<ComponentName Value="NormalityForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="NormalityUnit"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
inherited NormalityFrm: TNormalityFrm
|
||||
inherited NormalityForm: TNormalityForm
|
||||
Left = 628
|
||||
Height = 516
|
||||
Top = 275
|
||||
@ -25,6 +25,8 @@ inherited NormalityFrm: TNormalityFrm
|
||||
end
|
||||
inherited HelpBtn: TButton
|
||||
Top = 475
|
||||
HelpType = htKeyword
|
||||
HelpKeyword = 'html/NormalityTests.htm'
|
||||
TabOrder = 4
|
||||
end
|
||||
inherited ButtonBevel: TBevel
|
||||
|
@ -15,9 +15,9 @@ uses
|
||||
|
||||
type
|
||||
|
||||
{ TNormalityFrm }
|
||||
{ TNormalityForm }
|
||||
|
||||
TNormalityFrm = class(TBasicStatsReportAndChartForm)
|
||||
TNormalityForm = class(TBasicStatsReportAndChartForm)
|
||||
TestVarEdit: TEdit;
|
||||
Label2: TLabel;
|
||||
VarInBtn: TBitBtn;
|
||||
@ -47,7 +47,7 @@ type
|
||||
end;
|
||||
|
||||
var
|
||||
NormalityFrm: TNormalityFrm;
|
||||
NormalityForm: TNormalityForm;
|
||||
|
||||
implementation
|
||||
|
||||
@ -94,9 +94,9 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{ TNormalityFrm }
|
||||
{ TNormalityForm }
|
||||
|
||||
constructor TNormalityFrm.Create(AOwner: TComponent);
|
||||
constructor TNormalityForm.Create(AOwner: TComponent);
|
||||
var
|
||||
T : TChartAxisTransformations;
|
||||
InvNormDistTransform: TAxisTransform;
|
||||
@ -131,23 +131,21 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.AdjustConstraints;
|
||||
procedure TNormalityForm.AdjustConstraints;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
ParamsPanel.Constraints.MinWidth := Max(
|
||||
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
|
||||
Max(Label1.Width, Label2.Width) + VarInBtn.Width + 2*VarList.BorderSpacing.Right);
|
||||
|
||||
ParamsPanel.Constraints.MinHeight := VarOutBtn.Top + VarOutBtn.Height +
|
||||
VarOutBtn.BorderSpacing.Bottom + ButtonBevel.Height + CloseBtn.Height +
|
||||
CloseBtn.BorderSpacing.Top;
|
||||
|
||||
Constraints.MinWidth := ParamsPanel.Constraints.MinWidth + 300;
|
||||
Constraints.MinHeight := ParamsPanel.Constraints.MinHeight + 2*ParamsPanel.BorderSpacing.Top;
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.Calc_Lilliefors(const AData: DblDyneVec;
|
||||
procedure TNormalityForm.Calc_Lilliefors(const AData: DblDyneVec;
|
||||
out ASkew, AKurtosis, AStat: Double; out AConclusion: String);
|
||||
var
|
||||
i, j, n, n1: Integer;
|
||||
@ -261,7 +259,7 @@ end;
|
||||
|
||||
|
||||
{ Call Shapiro-Wilks function }
|
||||
function TNormalityFrm.Calc_ShapiroWilks(const AData: DblDyneVec;
|
||||
function TNormalityForm.Calc_ShapiroWilks(const AData: DblDyneVec;
|
||||
var W, Prob: Double): boolean;
|
||||
var
|
||||
init: Boolean = false;
|
||||
@ -290,7 +288,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.Compute;
|
||||
procedure TNormalityForm.Compute;
|
||||
var
|
||||
w: Double = 0.0;
|
||||
pw: Double = 0.0;
|
||||
@ -347,7 +345,7 @@ end;
|
||||
|
||||
{ Plots the cumulative probability of the data onto the probability grid
|
||||
prepared in FormCreate }
|
||||
procedure TNormalityFrm.PlotData(AData: DblDyneVec);
|
||||
procedure TNormalityForm.PlotData(AData: DblDyneVec);
|
||||
var
|
||||
i, n: Integer;
|
||||
ser: TChartSeries;
|
||||
@ -374,7 +372,7 @@ end;
|
||||
Note that, because the Shapiro-Wilks function has been implemented for 1-based
|
||||
arrays the data array is considered to be 1-based although the 0-index element
|
||||
is present as well. }
|
||||
function TNormalityFrm.PrepareData(const VarName: String): DblDyneVec;
|
||||
function TNormalityForm.PrepareData(const VarName: String): DblDyneVec;
|
||||
var
|
||||
selCol: Integer;
|
||||
i, n: Integer;
|
||||
@ -410,23 +408,18 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.Reset;
|
||||
var
|
||||
i: integer;
|
||||
procedure TNormalityForm.Reset;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
TestVarEdit.Clear;
|
||||
|
||||
VarList.Items.Clear;
|
||||
for i := 1 to NoVariables do
|
||||
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
|
||||
CollectVariableNames(OS3MainFrm.DataGrid, VarList.Items);
|
||||
|
||||
UpdateBtnStates;
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.UpdateBtnStates;
|
||||
procedure TNormalityForm.UpdateBtnStates;
|
||||
begin
|
||||
inherited;
|
||||
|
||||
@ -435,7 +428,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.VarInBtnClick(Sender: TObject);
|
||||
procedure TNormalityForm.VarInBtnClick(Sender: TObject);
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
@ -449,19 +442,19 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.VarListDblClick(Sender: TObject);
|
||||
procedure TNormalityForm.VarListDblClick(Sender: TObject);
|
||||
begin
|
||||
VarInBtnClick(nil);
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.VarListSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure TNormalityForm.VarListSelectionChange(Sender: TObject; User: boolean);
|
||||
begin
|
||||
UpdateBtnStates;
|
||||
end;
|
||||
|
||||
|
||||
procedure TNormalityFrm.VarOutBtnClick(Sender: TObject);
|
||||
procedure TNormalityForm.VarOutBtnClick(Sender: TObject);
|
||||
begin
|
||||
if TestVarEdit.Text <> '' then
|
||||
begin
|
||||
|
@ -2006,9 +2006,9 @@ end;
|
||||
// Menu "Analysis" > "Descriptive" > "Normality Tests"
|
||||
procedure TOS3MainFrm.mnuAnalysisDescr_NormalityClick(Sender: TObject);
|
||||
begin
|
||||
if NormalityFrm = nil then
|
||||
Application.CreateForm(TNormalityFrm, NormalityFrm);
|
||||
NormalityFrm.Show;
|
||||
if NormalityForm = nil then
|
||||
Application.CreateForm(TNormalityForm, NormalityForm);
|
||||
NormalityForm.Show;
|
||||
end;
|
||||
|
||||
// Menu "Analysis" > "Descriptive" > "Plot X vs Y"
|
||||
|
Loading…
Reference in New Issue
Block a user