LazStats: Massive refactoring of SRHTestUnit. Add sample data file for this form.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7838 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-11-02 22:58:55 +00:00
parent a2291fa2e7
commit 54a5340153
4 changed files with 1180 additions and 627 deletions

View File

@ -0,0 +1,403 @@
60
5
Crop
VARIABLE 1
4
F
2
99999
L
Fertilizer
VARIABLE 2
7
F
2
99999
L
CropCode
VARIABLE 3
1
I
0
99999
L
FertilizerCode
VARIABLE 4
1
I
0
99999
L
Yield
VARIABLE 5
3
I
0
99999
L
Case 0
Crop
Fertilizer
CropCode
FertilizerCode
Yield
Case 1
Wheat
Blend X
1
1
123
Case 2
Wheat
Blend X
1
1
156
Case 3
Wheat
Blend X
1
1
112
Case 4
Wheat
Blend X
1
1
100
Case 5
Wheat
Blend X
1
1
168
Case 6
Wheat
Blend Y
1
2
135
Case 7
Wheat
Blend Y
1
2
130
Case 8
Wheat
Blend Y
1
2
176
Case 9
Wheat
Blend Y
1
2
120
Case 10
Wheat
Blend Y
1
2
155
Case 11
Wheat
Blend Z
1
3
156
Case 12
Wheat
Blend Z
1
3
180
Case 13
Wheat
Blend Z
1
3
147
Case 14
Wheat
Blend Z
1
3
146
Case 15
Wheat
Blend Z
1
3
193
Case 16
Corn
Blend X
2
1
128
Case 17
Corn
Blend X
2
1
150
Case 18
Corn
Blend X
2
1
174
Case 19
Corn
Blend X
2
1
116
Case 20
Corn
Blend X
2
1
109
Case 21
Corn
Blend Y
2
2
175
Case 22
Corn
Blend Y
2
2
132
Case 23
Corn
Blend Y
2
2
120
Case 24
Corn
Blend Y
2
2
187
Case 25
Corn
Blend Y
2
2
184
Case 26
Corn
Blend Z
2
3
186
Case 27
Corn
Blend Z
2
3
138
Case 28
Corn
Blend Z
2
3
178
Case 29
Corn
Blend Z
2
3
176
Case 30
Corn
Blend Z
2
3
190
Case 31
Soy
Blend X
3
1
166
Case 32
Soy
Blend X
3
1
178
Case 33
Soy
Blend X
3
1
187
Case 34
Soy
Blend X
3
1
153
Case 35
Soy
Blend X
3
1
195
Case 36
Soy
Blend Y
3
2
140
Case 37
Soy
Blend Y
3
2
145
Case 38
Soy
Blend Y
3
2
159
Case 39
Soy
Blend Y
3
2
131
Case 40
Soy
Blend Y
3
2
126
Case 41
Soy
Blend Z
3
3
185
Case 42
Soy
Blend Z
3
3
206
Case 43
Soy
Blend Z
3
3
188
Case 44
Soy
Blend Z
3
3
165
Case 45
Soy
Blend Z
3
3
188
Case 46
Rice
Blend X
4
1
151
Case 47
Rice
Blend X
4
1
125
Case 48
Rice
Blend X
4
1
117
Case 49
Rice
Blend X
4
1
155
Case 50
Rice
Blend X
4
1
158
Case 51
Rice
Blend Y
4
2
167
Case 52
Rice
Blend Y
4
2
183
Case 53
Rice
Blend Y
4
2
142
Case 54
Rice
Blend Y
4
2
167
Case 55
Rice
Blend Y
4
2
168
Case 56
Rice
Blend Z
4
3
175
Case 57
Rice
Blend Z
4
3
173
Case 58
Rice
Blend Z
4
3
154
Case 59
Rice
Blend Z
4
3
191
Case 60
Rice
Blend Z
4
3
169

View File

@ -56,6 +56,8 @@ inherited SRHTestForm: TSRHTestForm
BorderSpacing.Top = 2
BorderSpacing.Right = 8
ItemHeight = 0
OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange
TabOrder = 4
end
object DepIn: TBitBtn[7]
@ -101,6 +103,7 @@ inherited SRHTestForm: TSRHTestForm
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 7
Text = 'DepVar'
end
@ -133,51 +136,7 @@ inherited SRHTestForm: TSRHTestForm
Caption = 'Factor 1 Variable'
TabOrder = 9
end
object GroupBox2: TGroupBox[12]
AnchorSideLeft.Control = Fact1In
AnchorSideTop.Control = OverallAlpha
AnchorSideTop.Side = asrBottom
Left = 176
Height = 93
Top = 288
Width = 187
AutoSize = True
BorderSpacing.Top = 20
Caption = 'Options'
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ChildSizing.VerticalSpacing = 2
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 73
ClientWidth = 183
TabOrder = 10
object PlotMeans: TCheckBox
Left = 12
Height = 19
Top = 6
Width = 159
Caption = 'Plot Means Using 3D bars'
TabOrder = 0
end
object Plot2DLines: TCheckBox
Left = 12
Height = 19
Top = 27
Width = 159
Caption = 'Plot Means Using 2D Lines'
TabOrder = 1
end
object Plot3DLines: TCheckBox
Left = 12
Height = 19
Top = 48
Width = 159
Caption = 'Plot Means Using 3D Lines'
TabOrder = 2
end
end
object Label3: TLabel[13]
object Label3: TLabel[12]
AnchorSideLeft.Control = Fact2Out
AnchorSideTop.Control = OverallAlpha
AnchorSideTop.Side = asrCenter
@ -188,7 +147,7 @@ inherited SRHTestForm: TSRHTestForm
Caption = 'Alpha Level for Overall Tests'
ParentColor = False
end
object Factor1: TEdit[14]
object Factor1: TEdit[13]
AnchorSideLeft.Control = Fact1In
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Fact1Out
@ -203,10 +162,11 @@ inherited SRHTestForm: TSRHTestForm
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
TabOrder = 11
ReadOnly = True
TabOrder = 10
Text = 'Edit1'
end
object DepOut: TBitBtn[15]
object DepOut: TBitBtn[14]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepIn
@ -220,9 +180,9 @@ inherited SRHTestForm: TSRHTestForm
ImageIndex = 0
OnClick = DepOutClick
Spacing = 0
TabOrder = 12
TabOrder = 11
end
object Fact1Out: TBitBtn[16]
object Fact1Out: TBitBtn[15]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Fact1In
@ -236,9 +196,9 @@ inherited SRHTestForm: TSRHTestForm
ImageIndex = 0
OnClick = Fact1OutClick
Spacing = 0
TabOrder = 13
TabOrder = 12
end
object Fact2In: TBitBtn[17]
object Fact2In: TBitBtn[16]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Fact1Out
@ -252,9 +212,9 @@ inherited SRHTestForm: TSRHTestForm
ImageIndex = 1
OnClick = Fact2InClick
Spacing = 0
TabOrder = 14
TabOrder = 13
end
object Fact2Out: TBitBtn[18]
object Fact2Out: TBitBtn[17]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Fact2In
@ -268,9 +228,9 @@ inherited SRHTestForm: TSRHTestForm
ImageIndex = 0
OnClick = Fact2OutClick
Spacing = 0
TabOrder = 15
TabOrder = 14
end
object StaticText3: TStaticText[19]
object StaticText3: TStaticText[18]
AnchorSideLeft.Control = Factor2
AnchorSideBottom.Control = Factor2
Left = 210
@ -281,9 +241,9 @@ inherited SRHTestForm: TSRHTestForm
AutoSize = True
BorderSpacing.Bottom = 2
Caption = 'Factor 2 Variable'
TabOrder = 16
TabOrder = 15
end
object Factor2: TEdit[20]
object Factor2: TEdit[19]
AnchorSideLeft.Control = Fact2In
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
@ -297,10 +257,11 @@ inherited SRHTestForm: TSRHTestForm
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
TabOrder = 17
ReadOnly = True
TabOrder = 16
Text = 'Edit1'
end
object OverallAlpha: TEdit[21]
object OverallAlpha: TEdit[20]
AnchorSideLeft.Control = Label3
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Fact2Out
@ -312,7 +273,7 @@ inherited SRHTestForm: TSRHTestForm
Alignment = taRightJustify
BorderSpacing.Left = 8
BorderSpacing.Top = 20
TabOrder = 18
TabOrder = 17
Text = 'OverallAlpha'
end
end
@ -325,4 +286,9 @@ inherited SRHTestForm: TSRHTestForm
Height = 426
Width = 407
end
object ChartStyles: TChartStyles[3]
Styles = <>
Left = 484
Top = 183
end
end

View File

@ -1908,7 +1908,7 @@ procedure TOS3MainFrm.mnuAnalysisNonPar_SimpleChiSqClick(Sender: TObject);
begin
if SimpleChiSqrForm = nil then
Application.CreateForm(TSimpleChiSqrForm, SimpleChiSqrForm);
SimpleChiSqrForm.ShowModal;
SimpleChiSqrForm.Show;
end;
// Menu "Analysis" > "Nonparametric" > "Schreier-Ray-Hare Two-Way ANOVA"
@ -1916,7 +1916,7 @@ procedure TOS3MainFrm.mnuAnalysisNonPar_SRHClick(Sender: TObject);
begin
if SRHTestForm = nil then
Application.CreateForm(TSRHTestForm, SRHTestForm);
SRHTestForm.ShowModal;
SRHTestForm.Show;
end;