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