LazStats: Refactor SensUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7834 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-11-01 22:27:12 +00:00
parent 67a0005f1a
commit b0c06dc9c5
6 changed files with 612 additions and 379 deletions

View File

@ -173,7 +173,7 @@ inherited SensForm: TSensForm
ClientHeight = 52 ClientHeight = 52
ClientWidth = 120 ClientWidth = 120
TabOrder = 9 TabOrder = 9
object PlotChk: TCheckBox object PlotSlopesChk: TCheckBox
Left = 12 Left = 12
Height = 19 Height = 19
Top = 6 Top = 6
@ -181,7 +181,7 @@ inherited SensForm: TSensForm
Caption = 'Each Variable' Caption = 'Each Variable'
TabOrder = 0 TabOrder = 0
end end
object SlopesChk: TCheckBox object PlotRankedSlopesChk: TCheckBox
Left = 12 Left = 12
Height = 19 Height = 19
Top = 27 Top = 27
@ -212,7 +212,7 @@ inherited SensForm: TSensForm
ClientHeight = 31 ClientHeight = 31
ClientWidth = 337 ClientWidth = 337
TabOrder = 10 TabOrder = 10
object StandardizeChk: TRadioButton object StandardizeChk: TCheckBox
Left = 12 Left = 12
Height = 19 Height = 19
Top = 6 Top = 6
@ -220,7 +220,7 @@ inherited SensForm: TSensForm
Caption = 'Standardize the measures' Caption = 'Standardize the measures'
TabOrder = 0 TabOrder = 0
end end
object AvgSlopeChk: TRadioButton object AvgSlopeChk: TCheckBox
Left = 178 Left = 178
Height = 19 Height = 19
Top = 6 Top = 6
@ -292,9 +292,36 @@ inherited SensForm: TSensForm
Left = 356 Left = 356
Height = 416 Height = 416
end end
inherited PageControl: TPageControl object PageControl: TPageControl[2]
Left = 365 Left = 365
Height = 400 Height = 400
Top = 8
Width = 563 Width = 563
ActivePage = RankedSlopesPage
Align = alClient
BorderSpacing.Left = 4
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
TabIndex = 3
TabOrder = 2
object ResultsPage: TTabSheet
Caption = 'Results'
end
object DataPage: TTabSheet
Caption = 'Data'
end
object SlopesMatrixPage: TTabSheet
Caption = 'Slopes Matrix'
end
object RankedSlopesPage: TTabSheet
Caption = 'Ranked Slopes'
end
object SlopesPlotPage: TTabSheet
Caption = 'Slopes Plots'
end
object RankedSlopesPlotPage: TTabSheet
Caption = 'Ranked Slopes Plot'
end
end end
end end

View File

@ -31,6 +31,7 @@ type
procedure XOutClick(Sender: TObject); procedure XOutClick(Sender: TObject);
procedure YInClick(Sender: TObject); procedure YInClick(Sender: TObject);
procedure YOutClick(Sender: TObject); procedure YOutClick(Sender: TObject);
private private
protected protected

View File

@ -881,7 +881,7 @@ object OS3MainFrm: TOS3MainFrm
OnClick = mnuAnalysisNonPar_KSTestClick OnClick = mnuAnalysisNonPar_KSTestClick
end end
object mnuAnalysisNonPar_SRH: TMenuItem object mnuAnalysisNonPar_SRH: TMenuItem
Caption = 'Scheirer-Ray-Hart 2-way ANOVA' Caption = 'Scheirer-Ray-Hare 2-way ANOVA'
OnClick = mnuAnalysisNonPar_SRHClick OnClick = mnuAnalysisNonPar_SRHClick
end end
object mnuAnalysisNonPar_LifeTable: TMenuItem object mnuAnalysisNonPar_LifeTable: TMenuItem

View File

@ -1911,7 +1911,7 @@ begin
SimpleChiSqrForm.ShowModal; SimpleChiSqrForm.ShowModal;
end; end;
// Menu "Analysis" > "Nonparametric" > "Schreier-Ray-Heart Two-Way mnuAnalysisComp_Anova" // Menu "Analysis" > "Nonparametric" > "Schreier-Ray-Hare Two-Way ANOVA"
procedure TOS3MainFrm.mnuAnalysisNonPar_SRHClick(Sender: TObject); procedure TOS3MainFrm.mnuAnalysisNonPar_SRHClick(Sender: TObject);
begin begin
if SRHTest = nil then if SRHTest = nil then

View File

@ -223,10 +223,8 @@ end;
procedure SaveOS2File; procedure SaveOS2File;
var var
F: TextFile; F: TextFile;
filename: string; filename, s: string;
s: string; i, j, res, NRows, NCols: integer;
NRows, NCols: integer;
i, j: integer;
begin begin
// check for valid cases - at least one value entered // check for valid cases - at least one value entered
NRows := StrToInt(OS3MainFrm.NoCasesEdit.Text); NRows := StrToInt(OS3MainFrm.NoCasesEdit.Text);
@ -248,6 +246,12 @@ begin
if OS3MainFrm.SaveDialog.Execute then if OS3MainFrm.SaveDialog.Execute then
begin begin
filename := ExpandFileName(OS3MainFrm.SaveDialog.FileName); filename := ExpandFileName(OS3MainFrm.SaveDialog.FileName);
if FileExists(filename) then
begin
res := MessageDlg(Format('File "%s" already exists. Overwrite?', [filename]), mtConfirmation, [mbYes, mbNo], 0);
if res <> mrYes then
exit;
end;
OS3MainFrm.FileNameEdit.Text := filename; OS3MainFrm.FileNameEdit.Text := filename;
AssignFile(F, filename); AssignFile(F, filename);
Rewrite(F); Rewrite(F);