LazStats: Inherit OneCaseAnovaUnit from TBasicStatsReportAndChartForm

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7847 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-11-06 23:33:13 +00:00
parent 06a2f4ff97
commit 64e8d40df9
3 changed files with 601 additions and 668 deletions

View File

@ -1,300 +1,224 @@
object OneCaseAnovaForm: TOneCaseAnovaForm inherited OneCaseAnovaForm: TOneCaseAnovaForm
Left = 694 Left = 616
Height = 458 Height = 545
Top = 246 Top = 235
Width = 567 Width = 940
HelpType = htKeyword HelpType = htKeyword
HelpKeyword = 'html/TwoorThreeWayFixedANOVAwith1Case.htm' HelpKeyword = 'html/TwoorThreeWayFixedANOVAwith1Case.htm'
AutoSize = True Caption = 'One Case ANOVA'
Caption = 'OneCaseAnovaForm' ClientHeight = 545
ClientHeight = 458 ClientWidth = 940
ClientWidth = 567 inherited ParamsPanel: TPanel
OnActivate = FormActivate Height = 529
OnCreate = FormCreate Width = 401
OnShow = FormShow ClientHeight = 529
Position = poMainFormCenter ClientWidth = 401
LCLVersion = '2.1.0.0' inherited CloseBtn: TButton
object GroupBox1: TGroupBox Left = 346
AnchorSideLeft.Control = PlotOptionsBox Top = 504
AnchorSideTop.Control = PlotOptionsBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = PlotOptionsBox
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = OverAllAlpha
Left = 364
Height = 135
Top = 146
Width = 195
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 16
BorderSpacing.Bottom = 8
Caption = 'Post-Hoc Comparisons:'
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ChildSizing.VerticalSpacing = 2
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsHomogenousChildResize
ChildSizing.ShrinkVertical = crsHomogenousChildResize
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 115
ClientWidth = 191
TabOrder = 2
object ScheffeChk: TCheckBox
Left = 12
Height = 19
Top = 6
Width = 167
Caption = 'ScheffeChk'
TabOrder = 0
end end
object TukeyHSDChk: TCheckBox inherited ComputeBtn: TButton
Left = 12 Left = 262
Height = 19 Top = 504
Top = 27
Width = 167
Caption = 'Tukey HSD (= n''s)'
TabOrder = 1
end end
object TukeyBChk: TCheckBox inherited ResetBtn: TButton
Left = 12 Left = 200
Height = 19 Top = 504
Top = 48
Width = 167
Caption = 'Tukey B (= n''s)'
TabOrder = 2
end end
object TukeyKramerChk: TCheckBox inherited HelpBtn: TButton
Left = 12 Tag = 107
Height = 19 Left = 141
Top = 69 Top = 504
Width = 167
Caption = 'Tukey-Kramer'
TabOrder = 3
end end
object NewmanKeulsChk: TCheckBox inherited ButtonBevel: TBevel
Left = 12 Top = 488
Height = 19 Width = 401
Top = 90 end
Width = 167 object Label3: TLabel[5]
Caption = 'Newman-Keuls (= n''s)' AnchorSideTop.Control = OverAllAlphaEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = OverAllAlphaEdit
Left = 263
Height = 30
Top = 297
Width = 79
Alignment = taRightJustify
Anchors = [akTop, akRight]
BorderSpacing.Left = 8
BorderSpacing.Right = 8
Caption = 'Alpha Level for'#13#10'Overall Tests'
ParentColor = False
end
object OverAllAlphaEdit: TEdit[6]
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Factor3Edit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Factor3Edit
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonBevel
Left = 350
Height = 23
Top = 301
Width = 51
Alignment = taRightJustify
Anchors = [akTop, akRight]
BorderSpacing.Top = 24
TabOrder = 4 TabOrder = 4
Text = 'OverAllAlphaEdit'
end end
end object Label4: TLabel[7]
object Label3: TLabel AnchorSideLeft.Side = asrBottom
AnchorSideLeft.Control = Owner AnchorSideTop.Control = PostAlphaEdit
AnchorSideTop.Control = OverAllAlpha AnchorSideTop.Side = asrCenter
AnchorSideTop.Side = asrCenter AnchorSideRight.Control = PostAlphaEdit
AnchorSideRight.Control = OverAllAlpha Left = 58
Left = 8 Height = 15
Height = 15 Top = 469
Top = 390 Width = 163
Width = 147 Anchors = [akTop, akRight]
BorderSpacing.Left = 8 BorderSpacing.Left = 24
BorderSpacing.Right = 8 BorderSpacing.Right = 8
Caption = 'Alpha Level for Overall Tests' Caption = 'Alpha Level for Post-Hoc Tests:'
ParentColor = False ParentColor = False
end end
object OverAllAlpha: TEdit object PostAlphaEdit: TEdit[8]
AnchorSideLeft.Control = Label3 AnchorSideLeft.Side = asrBottom
AnchorSideLeft.Side = asrBottom AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = PostAlpha AnchorSideRight.Control = PostHocGroup
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = ButtonBevel
Left = 163 Left = 229
Height = 23 Height = 23
Top = 386 Top = 465
Width = 51 Width = 51
Alignment = taRightJustify Alignment = taRightJustify
Anchors = [akLeft, akBottom] Anchors = [akRight, akBottom]
TabOrder = 4 BorderSpacing.Left = 8
Text = 'OverAllAlpha' TabOrder = 5
end Text = 'PostAlphaEdit'
object Label4: TLabel end
AnchorSideLeft.Control = OverAllAlpha object PostHocGroup: TGroupBox[9]
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = PostAlpha AnchorSideTop.Side = asrBottom
AnchorSideTop.Side = asrCenter AnchorSideRight.Control = PlotOptionsGroup
AnchorSideRight.Control = PostAlpha AnchorSideRight.Side = asrBottom
Left = 238 AnchorSideBottom.Control = PostAlphaEdit
Height = 15 Left = 0
Top = 390 Height = 93
Width = 163 Top = 364
BorderSpacing.Left = 24 Width = 280
BorderSpacing.Right = 8 Anchors = [akLeft, akBottom]
Caption = 'Alpha Level for Post-Hoc Tests:' AutoSize = True
ParentColor = False BorderSpacing.Top = 16
end BorderSpacing.Bottom = 8
object PostAlpha: TEdit Caption = 'Post-Hoc Comparisons:'
AnchorSideLeft.Control = Label4 ChildSizing.LeftRightSpacing = 12
AnchorSideLeft.Side = asrBottom ChildSizing.TopBottomSpacing = 6
AnchorSideTop.Side = asrCenter ChildSizing.VerticalSpacing = 2
AnchorSideBottom.Control = Bevel1 ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
Left = 409 ChildSizing.EnlargeVertical = crsHomogenousChildResize
Height = 23 ChildSizing.ShrinkHorizontal = crsHomogenousChildResize
Top = 386 ChildSizing.ShrinkVertical = crsHomogenousChildResize
Width = 51 ChildSizing.Layout = cclLeftToRightThenTopToBottom
Alignment = taRightJustify ChildSizing.ControlsPerLine = 2
Anchors = [akLeft, akBottom] ClientHeight = 73
BorderSpacing.Left = 8 ClientWidth = 276
TabOrder = 5 TabOrder = 6
Text = 'PostAlpha' object ScheffeChk: TCheckBox
end Left = 12
object HelpBtn: TButton Height = 19
Tag = 107 Top = 6
AnchorSideRight.Control = ResetBtn Width = 138
AnchorSideBottom.Control = Owner Caption = 'ScheffeChk'
AnchorSideBottom.Side = asrBottom TabOrder = 0
Left = 295 end
Height = 25 object TukeyHSDChk: TCheckBox
Top = 425 Left = 150
Width = 51 Height = 19
Anchors = [akRight, akBottom] Top = 6
AutoSize = True Width = 114
BorderSpacing.Left = 12 Caption = 'Tukey HSD (= n''s)'
BorderSpacing.Right = 8 TabOrder = 1
BorderSpacing.Bottom = 8 end
Caption = 'Help' object TukeyBChk: TCheckBox
OnClick = HelpBtnClick Left = 12
TabOrder = 6 Height = 19
end Top = 27
object ResetBtn: TButton Width = 138
AnchorSideRight.Control = ComputeBtn Caption = 'Tukey B (= n''s)'
AnchorSideBottom.Control = Owner TabOrder = 2
AnchorSideBottom.Side = asrBottom end
Left = 354 object TukeyKramerChk: TCheckBox
Height = 25 Left = 150
Top = 425 Height = 19
Width = 54 Top = 27
Anchors = [akRight, akBottom] Width = 114
AutoSize = True Caption = 'Tukey-Kramer'
BorderSpacing.Left = 8 TabOrder = 3
BorderSpacing.Right = 8 end
BorderSpacing.Bottom = 8 object NewmanKeulsChk: TCheckBox
Caption = 'Reset' Left = 12
OnClick = ResetBtnClick Height = 19
TabOrder = 7 Top = 48
end Width = 138
object ComputeBtn: TButton Caption = 'Newman-Keuls (= n''s)'
AnchorSideRight.Control = CloseBtn TabOrder = 4
AnchorSideBottom.Control = Owner end
AnchorSideBottom.Side = asrBottom end
Left = 416 object InteractChk: TCheckBox[10]
Height = 25 AnchorSideTop.Control = OverAllAlphaEdit
Top = 425 AnchorSideTop.Side = asrBottom
Width = 76 AnchorSideRight.Control = OverAllAlphaEdit
Anchors = [akRight, akBottom] AnchorSideRight.Side = asrBottom
AutoSize = True Left = 298
BorderSpacing.Left = 8 Height = 19
BorderSpacing.Right = 8 Top = 332
BorderSpacing.Bottom = 8 Width = 103
Caption = 'Compute' Alignment = taLeftJustify
OnClick = ComputeBtnClick Anchors = [akTop, akRight]
TabOrder = 8 BorderSpacing.Left = 16
end BorderSpacing.Top = 8
object CloseBtn: TButton BorderSpacing.Bottom = 8
AnchorSideRight.Control = Owner Caption = 'Get Interactions'
AnchorSideRight.Side = asrBottom TabOrder = 7
AnchorSideBottom.Control = Owner end
AnchorSideBottom.Side = asrBottom object PlotOptionsGroup: TRadioGroup[11]
Left = 500 AnchorSideLeft.Control = PostHocGroup
Height = 25 AnchorSideLeft.Side = asrBottom
Top = 425 AnchorSideTop.Control = PostHocGroup
Width = 55 AnchorSideRight.Side = asrBottom
Anchors = [akRight, akBottom] Left = 296
AutoSize = True Height = 114
BorderSpacing.Left = 8 Top = 364
BorderSpacing.Top = 8 Width = 145
BorderSpacing.Right = 12 AutoFill = True
BorderSpacing.Bottom = 8 AutoSize = True
Caption = 'Close' BorderSpacing.Left = 16
ModalResult = 11 BorderSpacing.Right = 8
TabOrder = 9 Caption = 'Plot Options'
end ChildSizing.LeftRightSpacing = 12
object Bevel1: TBevel ChildSizing.TopBottomSpacing = 6
AnchorSideLeft.Control = Owner ChildSizing.VerticalSpacing = 2
AnchorSideRight.Control = Owner ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
AnchorSideRight.Side = asrBottom ChildSizing.EnlargeVertical = crsHomogenousChildResize
AnchorSideBottom.Control = CloseBtn ChildSizing.ShrinkHorizontal = crsScaleChilds
Left = 0 ChildSizing.ShrinkVertical = crsScaleChilds
Height = 8 ChildSizing.Layout = cclLeftToRightThenTopToBottom
Top = 409 ChildSizing.ControlsPerLine = 1
Width = 567 ClientHeight = 94
Anchors = [akLeft, akRight, akBottom] ClientWidth = 141
Shape = bsBottomLine ItemIndex = 0
end Items.Strings = (
object InteractBtn: TCheckBox 'no plot'
AnchorSideLeft.Control = GroupBox1 'Vertical 3D Bars'
AnchorSideTop.Control = GroupBox1 'Vertical 2D Bars'
AnchorSideTop.Side = asrBottom 'Horizontal 2D Bars'
Left = 380 )
Height = 19 TabOrder = 8
Top = 297 end
Width = 103 object Label1: TLabel[12]
BorderSpacing.Left = 16 AnchorSideLeft.Control = ParamsPanel
BorderSpacing.Top = 16 AnchorSideTop.Control = ParamsPanel
BorderSpacing.Bottom = 8
Caption = 'Get Interactions'
TabOrder = 3
end
object PlotOptionsBox: TRadioGroup
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 364
Height = 114
Top = 16
Width = 195
Anchors = [akTop, akRight]
AutoFill = True
AutoSize = True
BorderSpacing.Left = 16
BorderSpacing.Top = 16
BorderSpacing.Right = 8
Caption = 'Plot Options'
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ChildSizing.VerticalSpacing = 2
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 94
ClientWidth = 191
ItemIndex = 0
Items.Strings = (
'no plot'
'Plot with Vertical 3D Bars'
'Plot with Vertical 2D Bars'
'Plot with Horizontal 2D Bars'
)
TabOrder = 1
end
object Panel1: TPanel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = PlotOptionsBox
AnchorSideBottom.Control = OverAllAlpha
Left = 8
Height = 370
Top = 8
Width = 340
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Bottom = 8
BevelOuter = bvNone
ClientHeight = 370
ClientWidth = 340
TabOrder = 0
object Label1: TLabel
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
Left = 0 Left = 0
Height = 15 Height = 15
Top = 0 Top = 0
@ -302,284 +226,283 @@ object OneCaseAnovaForm: TOneCaseAnovaForm
Caption = 'Variables:' Caption = 'Variables:'
ParentColor = False ParentColor = False
end end
object VarList: TListBox object VarList: TListBox[13]
AnchorSideLeft.Control = Panel1 AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = Label1 AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DepIn AnchorSideRight.Control = DepIn
AnchorSideBottom.Control = Panel1 AnchorSideBottom.Control = PostHocGroup
AnchorSideBottom.Side = asrBottom
Left = 0 Left = 0
Height = 353 Height = 331
Top = 17 Top = 17
Width = 187 Width = 181
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 8 BorderSpacing.Right = 6
ItemHeight = 0 ItemHeight = 0
OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 0 TabOrder = 9
end end
object DepIn: TBitBtn object DepIn: TBitBtn[14]
AnchorSideLeft.Control = Bevel2 AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VarList AnchorSideTop.Control = VarList
Left = 195 Left = 187
Height = 28 Height = 26
Top = 17 Top = 17
Width = 28 Width = 26
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 1 ImageIndex = 1
OnClick = DepInClick OnClick = DepInClick
Spacing = 0 Spacing = 0
TabOrder = 1 TabOrder = 10
end end
object StaticText1: TStaticText object DepOut: TBitBtn[15]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = DepIn
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 47
Width = 26
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = DepOutClick
Spacing = 0
TabOrder = 11
end
object Fact1In: TBitBtn[16]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = DepOut
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 89
Width = 26
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = Fact1InClick
Spacing = 0
TabOrder = 12
end
object Fact1Out: TBitBtn[17]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact1In
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 119
Width = 26
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = Fact1OutClick
Spacing = 0
TabOrder = 13
end
object Fact2In: TBitBtn[18]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact1Out
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 161
Width = 26
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = Fact2InClick
Spacing = 0
TabOrder = 14
end
object Fact2Out: TBitBtn[19]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact2In
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 191
Width = 26
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = Fact2OutClick
Spacing = 0
TabOrder = 15
end
object Fact3In: TBitBtn[20]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact2Out
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 233
Width = 26
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = Fact3InClick
Spacing = 0
TabOrder = 16
end
object Fact3Out: TBitBtn[21]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact3In
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 263
Width = 26
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = Fact3OutClick
Spacing = 0
TabOrder = 17
end
object StaticText1: TStaticText[22]
AnchorSideLeft.Control = DepIn AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = DepVar AnchorSideBottom.Control = DepVarEdit
Left = 231 Left = 221
Height = 16 Height = 16
Top = 24 Top = 20
Width = 103 Width = 103
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Dependent Variable' Caption = 'Dependent Variable'
TabOrder = 3 TabOrder = 18
end end
object DepOut: TBitBtn object DepVarEdit: TEdit[23]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = DepIn
AnchorSideTop.Side = asrBottom
Left = 195
Height = 28
Top = 49
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = DepOutClick
Spacing = 0
TabOrder = 2
end
object Fact1In: TBitBtn
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = DepOut
AnchorSideTop.Side = asrBottom
Left = 195
Height = 28
Top = 101
Width = 28
BorderSpacing.Top = 24
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = Fact1InClick
Spacing = 0
TabOrder = 5
end
object Fact1Out: TBitBtn
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact1In
AnchorSideTop.Side = asrBottom
Left = 195
Height = 28
Top = 133
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = Fact1OutClick
Spacing = 0
TabOrder = 6
end
object Fact2In: TBitBtn
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact1Out
AnchorSideTop.Side = asrBottom
Left = 195
Height = 28
Top = 185
Width = 28
BorderSpacing.Top = 24
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = Fact2InClick
Spacing = 0
TabOrder = 9
end
object Fact2Out: TBitBtn
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact2In
AnchorSideTop.Side = asrBottom
Left = 195
Height = 28
Top = 217
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = Fact2OutClick
Spacing = 0
TabOrder = 10
end
object StaticText2: TStaticText
AnchorSideLeft.Control = DepIn AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = Factor1 AnchorSideRight.Control = ParamsPanel
Left = 231 AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DepOut
AnchorSideBottom.Side = asrBottom
Left = 221
Height = 23
Top = 38
Width = 180
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 19
Text = 'DepVarEdit'
end
object StaticText2: TStaticText[24]
AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = Factor1Edit
Left = 221
Height = 16 Height = 16
Top = 108 Top = 92
Width = 87 Width = 87
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Factor 1 Variable' Caption = 'Factor 1 Variable'
TabOrder = 7 TabOrder = 20
end end
object Factor1: TEdit object Factor1Edit: TEdit[25]
AnchorSideLeft.Control = DepIn AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Panel1 AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Fact1Out AnchorSideBottom.Control = Fact1Out
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 231 Left = 221
Height = 23 Height = 23
Top = 126 Top = 110
Width = 109 Width = 180
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 8 TabOrder = 21
Text = 'Edit1' Text = 'Factor1Edit'
end end
object StaticText3: TStaticText object StaticText3: TStaticText[26]
AnchorSideLeft.Control = DepIn AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = Factor2 AnchorSideBottom.Control = Factor2Edit
Left = 231 Left = 221
Height = 16 Height = 16
Top = 192 Top = 164
Width = 87 Width = 87
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Factor 2 Variable' Caption = 'Factor 2 Variable'
TabOrder = 11 TabOrder = 22
end end
object Factor2: TEdit object Factor2Edit: TEdit[27]
AnchorSideLeft.Control = DepIn AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Panel1 AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Fact2Out AnchorSideBottom.Control = Fact2Out
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 231 Left = 221
Height = 23 Height = 23
Top = 210 Top = 182
Width = 109 Width = 180
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 12 TabOrder = 23
Text = 'Edit1' Text = 'Factor2Edit'
end end
object Fact3In: TBitBtn object StaticText4: TStaticText[28]
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact2Out
AnchorSideTop.Side = asrBottom
Left = 195
Height = 28
Top = 269
Width = 28
BorderSpacing.Top = 24
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = Fact3InClick
Spacing = 0
TabOrder = 13
end
object Fact3Out: TBitBtn
AnchorSideLeft.Control = DepIn
AnchorSideTop.Control = Fact3In
AnchorSideTop.Side = asrBottom
Left = 195
Height = 28
Top = 301
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = Fact3OutClick
Spacing = 0
TabOrder = 14
end
object StaticText4: TStaticText
AnchorSideLeft.Control = DepIn AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = Factor3 AnchorSideBottom.Control = Factor3Edit
Left = 231 Left = 221
Height = 16 Height = 16
Top = 276 Top = 236
Width = 72 Width = 72
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Factor 3 Clark' Caption = 'Factor 3 Clark'
TabOrder = 15 TabOrder = 24
end end
object Factor3: TEdit object Factor3Edit: TEdit[29]
AnchorSideLeft.Control = DepIn AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Panel1 AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Fact3Out AnchorSideBottom.Control = Fact3Out
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 231 Left = 221
Height = 23 Height = 23
Top = 294 Top = 254
Width = 109 Width = 180
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 16 TabOrder = 25
Text = 'Edit1' Text = 'Factor3Edit'
end
object DepVar: TEdit
AnchorSideLeft.Control = DepIn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DepOut
AnchorSideBottom.Side = asrBottom
Left = 231
Height = 23
Top = 42
Width = 109
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 4
Text = 'DepVar'
end
object Bevel2: TBevel
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Panel1
Left = 145
Height = 17
Top = 0
Width = 50
Shape = bsSpacer
end end
end end
inherited ParamsSplitter: TSplitter
Left = 413
Height = 545
end
inherited PageControl: TPageControl
Left = 422
Height = 529
Width = 510
end
end end

View File

@ -5,44 +5,37 @@ unit OneCaseANOVAUnit;
interface interface
uses uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, ExtCtrls, StdCtrls, Buttons, ExtCtrls,
MainUnit, Globals, OutputUnit, DataProcs, GraphLib, MainUnit, Globals, DataProcs, GraphLib,
ANOVATestsUnit, contexthelpunit; ANOVATestsUnit, BasicStatsReportAndChartFormUnit;
type type
{ TOneCaseAnovaForm } { TOneCaseAnovaForm }
TOneCaseAnovaForm = class(TForm) TOneCaseAnovaForm = class(TBasicStatsReportAndChartForm)
Bevel1: TBevel;
Bevel2: TBevel;
ComputeBtn: TButton;
DepIn: TBitBtn; DepIn: TBitBtn;
DepOut: TBitBtn; DepOut: TBitBtn;
DepVar: TEdit; DepVarEdit: TEdit;
Fact1In: TBitBtn; Fact1In: TBitBtn;
Fact1Out: TBitBtn; Fact1Out: TBitBtn;
Fact2In: TBitBtn; Fact2In: TBitBtn;
Fact2Out: TBitBtn; Fact2Out: TBitBtn;
Fact3In: TBitBtn; Fact3In: TBitBtn;
Fact3Out: TBitBtn; Fact3Out: TBitBtn;
Factor1: TEdit; Factor1Edit: TEdit;
Factor2: TEdit; Factor2Edit: TEdit;
Factor3: TEdit; Factor3Edit: TEdit;
GroupBox1: TGroupBox; PostHocGroup: TGroupBox;
InteractBtn: TCheckBox; InteractChk: TCheckBox;
HelpBtn: TButton;
Label1: TLabel; Label1: TLabel;
Label3: TLabel; Label3: TLabel;
Label4: TLabel; Label4: TLabel;
NewmanKeulsChk: TCheckBox; NewmanKeulsChk: TCheckBox;
OverAllAlpha: TEdit; OverAllAlphaEdit: TEdit;
Panel1: TPanel; PostAlphaEdit: TEdit;
PostAlpha: TEdit; PlotOptionsGroup: TRadioGroup;
PlotOptionsBox: TRadioGroup;
ResetBtn: TButton;
CloseBtn: TButton;
ScheffeChk: TCheckBox; ScheffeChk: TCheckBox;
StaticText1: TStaticText; StaticText1: TStaticText;
StaticText2: TStaticText; StaticText2: TStaticText;
@ -52,7 +45,6 @@ type
TukeyHSDChk: TCheckBox; TukeyHSDChk: TCheckBox;
TukeyKramerChk: TCheckBox; TukeyKramerChk: TCheckBox;
VarList: TListBox; VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject);
procedure DepInClick(Sender: TObject); procedure DepInClick(Sender: TObject);
procedure DepOutClick(Sender: TObject); procedure DepOutClick(Sender: TObject);
procedure Fact1InClick(Sender: TObject); procedure Fact1InClick(Sender: TObject);
@ -61,16 +53,11 @@ type
procedure Fact2OutClick(Sender: TObject); procedure Fact2OutClick(Sender: TObject);
procedure Fact3InClick(Sender: TObject); procedure Fact3InClick(Sender: TObject);
procedure Fact3OutClick(Sender: TObject); procedure Fact3OutClick(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure VarListDblClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean); procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
private private
{ private declarations } { private declarations }
FAutoSized: Boolean;
NoSelected, N: integer; NoSelected, N: integer;
ColNoSelected: IntDyneVec; ColNoSelected: IntDyneVec;
DepVarCol, F1Col, F2Col, F3Col, Nf1cells, Nf2cells, Nf3cells: integer; DepVarCol, F1Col, F2Col, F3Col, Nf1cells, Nf2cells, Nf3cells: integer;
@ -118,32 +105,65 @@ type
procedure ThreeWayContrasts(AReport: TStrings); procedure ThreeWayContrasts(AReport: TStrings);
procedure ThreeWayPlot; procedure ThreeWayPlot;
procedure UpdateBtnStates; protected
function Validate(out AMsg: String; out AControl: TWinControl): Boolean; procedure AdjustConstraints; override;
procedure Compute; override;
procedure UpdateBtnStates; override;
function Validate(out AMsg: String; out AControl: TWinControl): Boolean; override;
public public
{ public declarations } constructor Create(AOwner: TComponent); override;
end; procedure Reset; override;
end;
var var
OneCaseAnovaForm: TOneCaseAnovaForm; OneCaseAnovaForm: TOneCaseAnovaForm;
implementation implementation
{$R *.lfm}
uses uses
Math, MathUnit; Math, MathUnit;
{ TOneCaseAnovaForm } { TOneCaseAnovaForm }
procedure TOneCaseAnovaForm.ResetBtnClick(Sender: TObject); constructor TOneCaseAnovaForm.Create(AOwner: TComponent);
begin
inherited;
if GraphFrm = nil then
Application.CreateForm(TGraphFrm, GraphFrm);
OverAllAlphaEdit.Text := FormatFloat('0.00', DEFAULT_ALPHA_LEVEL);
PostAlphaEdit.Text := FormatFloat('0.00', DEFAULT_ALPHA_LEVEL);
end;
procedure TOneCaseAnovaForm.AdjustConstraints;
begin
inherited;
ParamsPanel.Constraints.MinHeight := InteractChk.Top + InteractChk.Height +
PostHocGroup.BorderSpacing.Top + PostHocGroup.Height + PostHocGroup.BorderSpacing.Bottom +
PostAlphaEdit.Height + ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
ParamsPanel.Constraints.MinWidth :=
PostHocGroup.Width + PlotOptionsGroup.BorderSpacing.Left + PlotOptionsGroup.Width;
end;
procedure TOneCaseAnovaForm.Reset;
var var
i: integer; i: integer;
begin begin
inherited;
VarList.Clear; VarList.Clear;
DepVar.Text := ''; DepVarEdit.Text := '';
Factor1.Text := ''; Factor1Edit.Text := '';
Factor2.Text := ''; Factor2Edit.Text := '';
Factor3.Text := ''; Factor3Edit.Text := '';
//PlotMeans.Checked := false; //PlotMeans.Checked := false;
ScheffeChk.Checked := false; ScheffeChk.Checked := false;
TukeyHSDChk.Checked := false; TukeyHSDChk.Checked := false;
@ -156,49 +176,15 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TOneCaseAnovaForm.FormActivate(Sender: TObject);
var
w: Integer;
begin
if FAutoSized then
exit;
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
HelpBtn.Constraints.MinWidth := w;
ResetBtn.Constraints.MinWidth := w;
ComputeBtn.Constraints.MinWidth := w;
CloseBtn.Constraints.MinWidth := w;
Panel1.Constraints.MinWidth := 2*PlotoptionsBox.Width;
Constraints.MinHeight := Height;
Constraints.MinWidth := Width;
FAutoSized := true;
end;
procedure TOneCaseAnovaForm.FormCreate(Sender: TObject);
begin
Assert(OS3MainFrm <> nil);
if GraphFrm = nil then
Application.CreateForm(TGraphFrm, GraphFrm);
OverallAlpha.Text := FormatFloat('0.00', DEFAULT_ALPHA_LEVEL);
PostAlpha.Text := FormatFloat('0.00', DEFAULT_ALPHA_LEVEL);
end;
procedure TOneCaseAnovaForm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TOneCaseAnovaForm.DepInClick(Sender: TObject); procedure TOneCaseAnovaForm.DepInClick(Sender: TObject);
var var
index: integer; index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
if (index > -1) and (DepVar.Text = '') then if (index > -1) and (DepVarEdit.Text = '') then
begin begin
DepVar.Text := VarList.Items[index]; DepVarEdit.Text := VarList.Items[index];
VarList.Items.Delete(index); VarList.Items.Delete(index);
end; end;
UpdateBtnStates; UpdateBtnStates;
@ -206,10 +192,10 @@ end;
procedure TOneCaseAnovaForm.DepOutClick(Sender: TObject); procedure TOneCaseAnovaForm.DepOutClick(Sender: TObject);
begin begin
if DepVar.Text <> '' then if DepVarEdit.Text <> '' then
begin begin
VarList.Items.Add(DepVar.Text); VarList.Items.Add(DepVarEdit.Text);
DepVar.Text := ''; DepVarEdit.Text := '';
end; end;
UpdateBtnStates; UpdateBtnStates;
end; end;
@ -219,9 +205,9 @@ var
index: integer; index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
if (index > -1) and (Factor1.Text = '') then if (index > -1) and (Factor1Edit.Text = '') then
begin begin
Factor1.Text := VarList.Items[index]; Factor1Edit.Text := VarList.Items[index];
VarList.Items.Delete(index); VarList.Items.Delete(index);
end; end;
UpdateBtnStates; UpdateBtnStates;
@ -229,10 +215,10 @@ end;
procedure TOneCaseAnovaForm.Fact1OutClick(Sender: TObject); procedure TOneCaseAnovaForm.Fact1OutClick(Sender: TObject);
begin begin
if Factor1.Text <> '' then if Factor1Edit.Text <> '' then
begin begin
VarList.Items.Add(Factor1.Text); VarList.Items.Add(Factor1Edit.Text);
Factor1.Text := ''; Factor1Edit.Text := '';
end; end;
UpdateBtnStates; UpdateBtnStates;
end; end;
@ -242,9 +228,9 @@ var
index: integer; index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
if (index > -1) and (Factor2.Text = '') then if (index > -1) and (Factor2Edit.Text = '') then
begin begin
Factor2.Text := VarList.Items[index]; Factor2Edit.Text := VarList.Items[index];
VarList.Items.Delete(index); VarList.Items.Delete(index);
end; end;
UpdateBtnStates; UpdateBtnStates;
@ -252,10 +238,10 @@ end;
procedure TOneCaseAnovaForm.Fact2OutClick(Sender: TObject); procedure TOneCaseAnovaForm.Fact2OutClick(Sender: TObject);
begin begin
if Factor2.Text <> '' then if Factor2Edit.Text <> '' then
begin begin
VarList.Items.Add(Factor2.Text); VarList.Items.Add(Factor2Edit.Text);
Factor2.Text := ''; Factor2Edit.Text := '';
end; end;
UpdateBtnStates; UpdateBtnStates;
end; end;
@ -265,9 +251,9 @@ var
index: integer; index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
if (index > -1) and (Factor3.Text = '') then if (index > -1) and (Factor3Edit.Text = '') then
begin begin
Factor3.Text := VarList.Items[index]; Factor3Edit.Text := VarList.Items[index];
VarList.Items.Delete(index); VarList.Items.Delete(index);
end; end;
UpdateBtnStates; UpdateBtnStates;
@ -275,25 +261,26 @@ end;
procedure TOneCaseAnovaForm.Fact3OutClick(Sender: TObject); procedure TOneCaseAnovaForm.Fact3OutClick(Sender: TObject);
begin begin
if Factor3.Text <> '' then if Factor3Edit.Text <> '' then
begin begin
VarList.Items.Add(Factor3.Text); VarList.Items.Add(Factor3Edit.Text);
Factor3.Text := ''; Factor3Edit.Text := '';
end; end;
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TOneCaseAnovaForm.ComputeBtnClick(Sender: TObject);
procedure TOneCaseAnovaForm.Compute;
var var
lReport: TStrings; lReport: TStrings;
msg: String; msg: String;
C: TWinControl; C: TWinControl;
begin begin
NoFactors := 0; NoFactors := 0;
if (Factor1.Text <> '') and (Factor2.Text <> '') then if (Factor1Edit.Text <> '') and (Factor2Edit.Text <> '') then
begin begin
NoFactors := 2; NoFactors := 2;
if (Factor3.Text <> '') then if (Factor3Edit.Text <> '') then
NoFactors := 3; NoFactors := 3;
end; end;
if (NoFactors < 2) then if (NoFactors < 2) then
@ -333,8 +320,8 @@ begin
try try
TwoWayTable(lReport); TwoWayTable(lReport);
TwoWayContrasts(lReport); TwoWayContrasts(lReport);
DisplayReport(lReport); FReportFrame.DisplayReport(lReport);
if PlotOptionsBox.ItemIndex > 0 then if PlotOptionsGroup.ItemIndex > 0 then
TwoWayPlot; TwoWayPlot;
finally finally
lReport.Free; lReport.Free;
@ -365,8 +352,8 @@ begin
try try
ThreeWayTable(lReport); ThreeWayTable(lReport);
ThreeWayContrasts(lReport); ThreeWayContrasts(lReport);
DisplayReport(lReport); FReportFrame.DisplayReport(lReport);
if PlotOptionsBox.ItemIndex > 0 then if PlotOptionsGroup.ItemIndex > 0 then
ThreeWayPlot; ThreeWayPlot;
finally finally
lReport.Free; lReport.Free;
@ -380,25 +367,8 @@ begin
end; end;
end; end;
end; // end switch end; // end switch
cellcnts := nil;
cellvars := nil;
cellsums := nil;
ColNoSelected := nil;
OrdMeansB := nil;
OrdMeansA := nil;
ColCount := nil;
RowCount := nil;
ColSums := nil;
RowSums := nil;
end; end;
procedure TOneCaseAnovaForm.HelpBtnClick(Sender: TObject);
begin
if ContextHelpForm = nil then
Application.CreateForm(TContextHelpForm, ContextHelpForm);
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TOneCaseAnovaForm.Init; procedure TOneCaseAnovaForm.Init;
var var
@ -441,35 +411,36 @@ begin
for i := 1 to NoVariables do for i := 1 to NoVariables do
begin begin
cellstring := OS3MainFrm.DataGrid.Cells[i,0]; cellstring := OS3MainFrm.DataGrid.Cells[i,0];
if (cellstring = DepVar.Text) then if (cellstring = DepVarEdit.Text) then
begin begin
DepVarCol := i; DepVarCol := i;
NoSelected := NoSelected + 1; NoSelected := NoSelected + 1;
ColNoSelected[NoSelected-1] := DepVarCol; ColNoSelected[NoSelected-1] := DepVarCol;
end else end else
if (cellstring = Factor1.Text) then if (cellstring = Factor1Edit.Text) then
begin begin
F1Col := i; F1Col := i;
NoSelected := NoSelected + 1; NoSelected := NoSelected + 1;
ColNoSelected[NoSelected-1] := F1Col; ColNoSelected[NoSelected-1] := F1Col;
end else end else
if (cellstring = Factor2.Text) then if (cellstring = Factor2Edit.Text) then
begin begin
F2Col := i; F2Col := i;
NoSelected := NoSelected + 1; NoSelected := NoSelected + 1;
ColNoSelected[NoSelected-1] := F2Col; ColNoSelected[NoSelected-1] := F2Col;
end else end else
if (cellstring = Factor3.Text) then if (cellstring = Factor3Edit.Text) then
begin begin
F3Col := i; F3Col := i;
NoSelected := NoSelected + 1; NoSelected := NoSelected + 1;
ColNoSelected[NoSelected-1] := F3Col; ColNoSelected[NoSelected-1] := F3Col;
end; end;
end; end;
OverAll := StrToFloat(OverAllAlpha.Text); OverAll := StrToFloat(OverAllAlphaEdit.Text);
PostHocAlpha := StrToFloat(PostAlpha.Text); PostHocAlpha := StrToFloat(PostAlphaEdit.Text);
end; end;
procedure TOneCaseAnovaForm.GetLevels; procedure TOneCaseAnovaForm.GetLevels;
var var
i: integer; i: integer;
@ -530,6 +501,7 @@ begin
end; end;
end; end;
procedure TOneCaseAnovaForm.Calc2Way; procedure TOneCaseAnovaForm.Calc2Way;
var var
i, j, grpA, grpB: integer; i, j, grpA, grpB: integer;
@ -667,6 +639,7 @@ begin
if (Omega < 0.0) then Omega := 0.0; if (Omega < 0.0) then Omega := 0.0;
end; end;
procedure TOneCaseAnovaForm.TwoWayTable(AReport: TStrings); procedure TOneCaseAnovaForm.TwoWayTable(AReport: TStrings);
var var
i, j, groupsize: integer; i, j, groupsize: integer;
@ -678,25 +651,26 @@ begin
AReport.Add('TWO-WAY ANALYSIS OF VARIANCE'); AReport.Add('TWO-WAY ANALYSIS OF VARIANCE');
AReport.Add(''); AReport.Add('');
AReport.Add('Variable analyzed: %s', [DepVar.Text]); AReport.Add('Variable analyzed: %s', [DepVarEdit.Text]);
AReport.Add(''); AReport.Add('');
AReport.Add('Factor A (rows) variable: %s', [Factor1.Text]); AReport.Add('Factor A (rows) variable: %s', [Factor1Edit.Text]);
AReport.Add('Factor B (columns) variable: %s', [Factor2.Text]); AReport.Add('Factor B (columns) variable: %s', [Factor2Edit.Text]);
AReport.Add(''); AReport.Add('');
AReport.Add('SOURCE D.F. SS MS F PROB.> F Omega Squared'); AReport.Add('SOURCE D.F. SS MS F PROB.> F Omega Squared');
AReport.Add('-------------- ---- ------------ ------------ ---------- -------- -------------');
AReport.Add('Among Rows %4.0f %12.3f %12.3f %10.3f %8.3f %10.3f', [DFF1, SSF1, MSF1, FF1, ProbF1, OmegaF1]);
AReport.Add('Among Columns %4.0f %12.3f %12.3f %10.3f %8.3f %10.3f', [DFF2, SSF2, MSF2, FF2, ProbF2, OmegaF2]);
AReport.Add('Residual %4.0f %12.3f %12.3f', [DFErr, SSErr, MSErr]);
AReport.Add(' NonAdditivity %4.0f %12.3f %12.3f %10.3f %8.3f', [1.0, SSNonAdd, MSNonAdd, FNonAdd, ProbNonAdd]);
AReport.Add(' Balance %4.0f %12.3f %12.3f', [DFBalance, SSBalance, MSBalance]);
AReport.Add('Total %4.0f %12.3f %12.3f', [DFTot, SSDep, MSDep]);
AReport.Add(''); AReport.Add('');
AReport.Add('Among Rows %4.0f %8.3f %8.3f %8.3f %6.3f %6.3f', [DFF1, SSF1, MSF1, FF1, ProbF1, OmegaF1]); AReport.Add('Omega squared for combined effects: %10.3f', [Omega]);
AReport.Add('Among Columns %4.0f %8.3f %8.3f %8.3f %6.3f %6.3f', [DFF2, SSF2, MSF2, FF2, ProbF2, OmegaF2]);
AReport.Add('Residual %4.0f %8.3f %8.3f', [DFErr, SSErr, MSErr]);
AReport.Add(' NonAdditivity %4.0f %8.3f %8.3f %8.3f %6.3f', [1.0, SSNonAdd, MSNonAdd, FNonAdd, ProbNonAdd]);
AReport.Add(' Balance %4.0f %8.3f %8.3f', [DFBalance, SSBalance, MSBalance]);
AReport.Add('Total %4.0f %8.3f %8.3f', [DFTot, SSDep, MSDep]);
AReport.Add(''); AReport.Add('');
AReport.Add('Omega squared for combined effects = %8.3f', [Omega]); AReport.Add('DESCRIPTIVE STATISTICS');
AReport.Add('');
AReport.Add('Descriptive Statistics');
AReport.Add(''); AReport.Add('');
AReport.Add('GROUP Row Col. N MEAN VARIANCE STD.DEV.'); AReport.Add('GROUP Row Col. N MEAN VARIANCE STD.DEV.');
AReport.Add('----- --- ---- ---- -------- -------- ---------');
groupsize := ceil(counts[0,0]); groupsize := ceil(counts[0,0]);
equal_grp := true; equal_grp := true;
@ -729,7 +703,7 @@ begin
end end
else else
XBar := sums[i][j]; XBar := sums[i][j];
AReport.Add('Cell %3d %3d %3.0f %8.3f %8.3f %8.3f', [minf1+i, minf2+j, counts[i,j], XBar, V, S]); AReport.Add('Cell %3d %3d %3d %8.3f %8.3f %8.3f', [minf1+i, minf2+j, counts[i,j], XBar, V, S]);
end; end;
end; end;
@ -763,6 +737,7 @@ begin
AReport.Add(''); AReport.Add('');
end; end;
procedure TOneCaseAnovaForm.TwoWayPlot; procedure TOneCaseAnovaForm.TwoWayPlot;
var var
i, j: integer; i, j: integer;
@ -773,7 +748,7 @@ begin
if CompError then if CompError then
exit; exit;
case PlotOptionsBox.ItemIndex of case PlotOptionsGroup.ItemIndex of
0: exit; 0: exit;
1: plotType := 2; // 3D bars 1: plotType := 2; // 3D bars
2: plotType := 1; // 2D bars 2: plotType := 1; // 2D bars
@ -798,8 +773,8 @@ begin
end; end;
GraphFrm.nosets := 1; GraphFrm.nosets := 1;
GraphFrm.nbars := Nf1cells; GraphFrm.nbars := Nf1cells;
GraphFrm.Heading := Factor1.Text; GraphFrm.Heading := Factor1Edit.Text;
GraphFrm.XTitle := Factor1.Text + ' Codes'; GraphFrm.XTitle := Factor1Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.5; GraphFrm.barwideprop := 0.5;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -829,8 +804,8 @@ begin
end; end;
GraphFrm.nosets := 1; GraphFrm.nosets := 1;
GraphFrm.nbars := Nf2cells; GraphFrm.nbars := Nf2cells;
GraphFrm.Heading := Factor2.Text; GraphFrm.Heading := Factor2Edit.Text;
GraphFrm.XTitle := FActor2.Text + ' Codes'; GraphFrm.XTitle := Factor2Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.5; GraphFrm.barwideprop := 0.5;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -851,7 +826,7 @@ begin
SetLength(GraphFrm.Xpoints, 1, Nf2cells); SetLength(GraphFrm.Xpoints, 1, Nf2cells);
for i := 1 to Nf1cells do for i := 1 to Nf1cells do
begin begin
GraphFrm.SetLabels[i] := Factor1.Text + ' ' + IntToStr(i); GraphFrm.SetLabels[i] := Factor1Edit.Text + ' ' + IntToStr(i);
for j := 1 to Nf2cells do for j := 1 to Nf2cells do
begin begin
XBar := sums[i-1,j-1] / counts[i-1,j-1]; XBar := sums[i-1,j-1] / counts[i-1,j-1];
@ -867,7 +842,7 @@ begin
GraphFrm.nosets := Nf1cells; GraphFrm.nosets := Nf1cells;
GraphFrm.nbars := Nf2cells; GraphFrm.nbars := Nf2cells;
GraphFrm.Heading := 'Factor A x Factor B'; GraphFrm.Heading := 'Factor A x Factor B';
GraphFrm.XTitle := Factor2.Text + ' Codes'; GraphFrm.XTitle := Factor2Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.5; GraphFrm.barwideprop := 0.5;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -884,6 +859,7 @@ begin
GraphFrm.Ypoints := nil; GraphFrm.Ypoints := nil;
end; end;
procedure TOneCaseAnovaForm.Calc3Way; procedure TOneCaseAnovaForm.Calc3Way;
var var
i, j, k, grpA, grpB, grpC: integer; i, j, k, grpA, grpB, grpC: integer;
@ -1070,7 +1046,7 @@ begin
end; end;
SSDep := SSDep - Constant; SSDep := SSDep - Constant;
if not InteractBtn.Checked then if not InteractChk.Checked then
SSErr := SSDep - (SSF1 + SSF2 + SSF3) SSErr := SSDep - (SSF1 + SSF2 + SSF3)
else else
SSErr := SSDep - (SSF1 + SSF2 + SSF3 + SSF1F2 + SSF1F3 + SSF2F3); SSErr := SSDep - (SSF1 + SSF2 + SSF3 + SSF1F2 + SSF1F3 + SSF2F3);
@ -1093,7 +1069,7 @@ begin
DFF1F2 := DFF1 * DFF2; DFF1F2 := DFF1 * DFF2;
DFF1F3 := DFF1 * DFF3; DFF1F3 := DFF1 * DFF3;
DFF2F3 := DFF2 * DFF3; DFF2F3 := DFF2 * DFF3;
if not InteractBtn.Checked then if not InteractChk.Checked then
DFErr := DFTot - DFF1 - DFF2 - DFF3 DFErr := DFTot - DFF1 - DFF2 - DFF3
else else
DFErr := DFTot - DFF1 - DFF2 - DFF3 - DFF1F2 - DFF1F3 - DFF2F3; DFErr := DFTot - DFF1 - DFF2 - DFF3 - DFF1F2 - DFF1F3 - DFF2F3;
@ -1113,7 +1089,7 @@ begin
OmegaF1F2 := (SSF1F2 - DFF1F2 * MSErr) / (SSDep + MSErr); OmegaF1F2 := (SSF1F2 - DFF1F2 * MSErr) / (SSDep + MSErr);
OmegaF1F3 := (SSF1F3 - DFF1F3 * MSErr) / (SSDep + MSErr); OmegaF1F3 := (SSF1F3 - DFF1F3 * MSErr) / (SSDep + MSErr);
OmegaF2F3 := (SSF2F3 - DFF2F3 * MSErr) / (SSDep + MSErr); OmegaF2F3 := (SSF2F3 - DFF2F3 * MSErr) / (SSDep + MSErr);
if not InteractBtn.Checked then if not InteractChk.Checked then
Omega := OmegaF1 + OmegaF2 + OmegaF3 Omega := OmegaF1 + OmegaF2 + OmegaF3
else else
Omega := OmegaF1 + OmegaF2 + OmegaF3 + OmegaF1F2 + OmegaF1F3 + OmegaF2F3; Omega := OmegaF1 + OmegaF2 + OmegaF3 + OmegaF1F2 + OmegaF1F3 + OmegaF2F3;
@ -1155,6 +1131,7 @@ begin
if (Omega < 0.0) then Omega := 0.0; if (Omega < 0.0) then Omega := 0.0;
end; end;
procedure TOneCaseAnovaForm.ThreeWayTable(AReport: TStrings); procedure TOneCaseAnovaForm.ThreeWayTable(AReport: TStrings);
var var
i, j, k: integer; i, j, k: integer;
@ -1165,11 +1142,11 @@ begin
AReport.Add('THREE-WAY ANALYSIS OF VARIANCE'); AReport.Add('THREE-WAY ANALYSIS OF VARIANCE');
AReport.Add(''); AReport.Add('');
AReport.Add('Variable analyzed: %s', [DepVar.Text]); AReport.Add('Variable analyzed: %s', [DepVarEdit.Text]);
AReport.Add(''); AReport.Add('');
AReport.Add('Factor A (rows) variable: %s', [Factor1.Text]); AReport.Add('Factor A (rows) variable: %s', [Factor1Edit.Text]);
AReport.Add('Factor B (columns) variable: %s', [Factor2.Text]); AReport.Add('Factor B (columns) variable: %s', [Factor2Edit.Text]);
AReport.Add('Factor C (slices) variable: %s', [Factor3.Text]); AReport.Add('Factor C (slices) variable: %s', [Factor3Edit.Text]);
AReport.Add(''); AReport.Add('');
AReport.Add('SOURCE D.F. SS MS F PROB.> F Omega Squared'); AReport.Add('SOURCE D.F. SS MS F PROB.> F Omega Squared');
AReport.Add(''); AReport.Add('');
@ -1177,7 +1154,7 @@ begin
AReport.Add('Among Columns %4.0f %12.4f %12.4f %12.4f %6.3f %6.3f', [DFF2, SSF2, MSF2, FF2, ProbF2, OmegaF2]); AReport.Add('Among Columns %4.0f %12.4f %12.4f %12.4f %6.3f %6.3f', [DFF2, SSF2, MSF2, FF2, ProbF2, OmegaF2]);
AReport.Add('Among Slices %4.0f %12.4f %12.4f %12.4f %6.3f %6.3f', [DFF3, SSF3, MSF3, FF3, ProbF3, OmegaF3]); AReport.Add('Among Slices %4.0f %12.4f %12.4f %12.4f %6.3f %6.3f', [DFF3, SSF3, MSF3, FF3, ProbF3, OmegaF3]);
if InteractBtn.Checked then if InteractChk.Checked then
begin begin
AReport.Add('A x B Inter. %4.0f %12.4f %12.4f %12.4f %6.3f %6.3f', [DFF1F2, SSF1F2, MSF1F2, FF1F2, ProbF1F2, OmegaF1F2]); AReport.Add('A x B Inter. %4.0f %12.4f %12.4f %12.4f %6.3f %6.3f', [DFF1F2, SSF1F2, MSF1F2, FF1F2, ProbF1F2, OmegaF1F2]);
AReport.Add('A x C Inter. %4.0f %12.4f %12.4f %12.4f %6.3f %6.3f', [DFF1F3, SSF1F3, MSF1F3, FF1F3, ProbF1F3, OmegaF1F3]); AReport.Add('A x C Inter. %4.0f %12.4f %12.4f %12.4f %6.3f %6.3f', [DFF1F3, SSF1F3, MSF1F3, FF1F3, ProbF1F3, OmegaF1F3]);
@ -1260,6 +1237,7 @@ begin
AReport.Add(''); AReport.Add('');
end; end;
procedure TOneCaseAnovaForm.ThreeWayPlot; procedure TOneCaseAnovaForm.ThreeWayPlot;
var var
i, j, k: integer; i, j, k: integer;
@ -1270,7 +1248,7 @@ begin
if CompError then if CompError then
exit; exit;
case PlotOptionsBox.ItemIndex of case PlotOptionsGroup.ItemIndex of
0: exit; 0: exit;
1: plotType := 2; // 3D bars 1: plotType := 2; // 3D bars
2: plotType := 1; // 2D bars 2: plotType := 1; // 2D bars
@ -1295,8 +1273,8 @@ begin
end; end;
GraphFrm.nosets := 1; GraphFrm.nosets := 1;
GraphFrm.nbars := Nf1cells; GraphFrm.nbars := Nf1cells;
GraphFrm.Heading := Factor1.Text; GraphFrm.Heading := Factor1Edit.Text;
GraphFrm.XTitle := Factor1.Text + ' Codes'; GraphFrm.XTitle := Factor1Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.5; GraphFrm.barwideprop := 0.5;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -1326,8 +1304,8 @@ begin
end; end;
GraphFrm.nosets := 1; GraphFrm.nosets := 1;
GraphFrm.nbars := Nf2cells; GraphFrm.nbars := Nf2cells;
GraphFrm.Heading := Factor2.Text; GraphFrm.Heading := Factor2Edit.Text;
GraphFrm.XTitle := Factor2.Text + ' Codes'; GraphFrm.XTitle := Factor2Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.5; GraphFrm.barwideprop := 0.5;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -1357,8 +1335,8 @@ begin
end; end;
GraphFrm.nosets := 1; GraphFrm.nosets := 1;
GraphFrm.nbars := Nf3cells; GraphFrm.nbars := Nf3cells;
GraphFrm.Heading := Factor3.Text; GraphFrm.Heading := Factor3Edit.Text;
GraphFrm.XTitle := Factor2.Text + ' Codes'; GraphFrm.XTitle := Factor2Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.5; GraphFrm.barwideprop := 0.5;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -1381,7 +1359,7 @@ begin
maxmean := 0.0; maxmean := 0.0;
for i := 0 to Nf1cells - 1 do for i := 0 to Nf1cells - 1 do
begin begin
GraphFrm.SetLabels[i+1] := Factor1.Text + ' ' + IntToStr(i+1); GraphFrm.SetLabels[i+1] := Factor1Edit.Text + ' ' + IntToStr(i+1);
for j := 0 to Nf2cells - 1 do for j := 0 to Nf2cells - 1 do
begin begin
XBar := wsum[i,j,k] / ncnt[i,j,k]; XBar := wsum[i,j,k] / ncnt[i,j,k];
@ -1398,7 +1376,7 @@ begin
GraphFrm.nosets := Nf1cells; GraphFrm.nosets := Nf1cells;
GraphFrm.nbars := Nf2cells; GraphFrm.nbars := Nf2cells;
GraphFrm.Heading := 'Factor A x Factor B Within C ' + IntToStr(k+1); GraphFrm.Heading := 'Factor A x Factor B Within C ' + IntToStr(k+1);
GraphFrm.XTitle := Factor2.Text + ' Codes'; GraphFrm.XTitle := Factor2Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.2; GraphFrm.barwideprop := 0.2;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -1422,7 +1400,7 @@ begin
maxmean := 0.0; maxmean := 0.0;
for i := 0 to Nf1cells - 1 do for i := 0 to Nf1cells - 1 do
begin begin
GraphFrm.SetLabels[i+1] := Factor1.Text + ' ' + IntToStr(i+1); GraphFrm.SetLabels[i+1] := Factor1Edit.Text + ' ' + IntToStr(i+1);
for k := 0 to Nf3cells - 1 do for k := 0 to Nf3cells - 1 do
begin begin
XBar := wsum[i,j,k] / ncnt[i,j,k]; XBar := wsum[i,j,k] / ncnt[i,j,k];
@ -1439,7 +1417,7 @@ begin
GraphFrm.nosets := Nf1cells; GraphFrm.nosets := Nf1cells;
GraphFrm.nbars := Nf3cells; GraphFrm.nbars := Nf3cells;
GraphFrm.Heading := 'Factor A x Factor C Within B ' + IntToStr(j+1); GraphFrm.Heading := 'Factor A x Factor C Within B ' + IntToStr(j+1);
GraphFrm.XTitle := Factor3.Text + ' Codes'; GraphFrm.XTitle := Factor3Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.2; GraphFrm.barwideprop := 0.2;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -1463,7 +1441,7 @@ begin
maxmean := 0.0; maxmean := 0.0;
for j := 0 to Nf2cells - 1 do for j := 0 to Nf2cells - 1 do
begin begin
GraphFrm.SetLabels[j+1] := Factor2.Text + ' ' + IntToStr(j+1); GraphFrm.SetLabels[j+1] := Factor2Edit.Text + ' ' + IntToStr(j+1);
for k := 0 to Nf3cells - 1 do for k := 0 to Nf3cells - 1 do
begin begin
XBar := wsum[i,j,k] / ncnt[i,j,k]; XBar := wsum[i,j,k] / ncnt[i,j,k];
@ -1480,7 +1458,7 @@ begin
GraphFrm.nosets := Nf2cells; GraphFrm.nosets := Nf2cells;
GraphFrm.nbars := Nf3cells; GraphFrm.nbars := Nf3cells;
GraphFrm.Heading := 'Factor B x Factor C Within A ' + IntToStr(i+1); GraphFrm.Heading := 'Factor B x Factor C Within A ' + IntToStr(i+1);
GraphFrm.XTitle := Factor3.Text + ' Codes'; GraphFrm.XTitle := Factor3Edit.Text + ' Codes';
GraphFrm.YTitle := 'Mean'; GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.2; GraphFrm.barwideprop := 0.2;
GraphFrm.AutoScaled := false; GraphFrm.AutoScaled := false;
@ -1498,6 +1476,7 @@ begin
XValue := nil; XValue := nil;
end; end;
procedure TOneCaseAnovaForm.TwoWayContrasts(AReport: TStrings); procedure TOneCaseAnovaForm.TwoWayContrasts(AReport: TStrings);
var var
i, j: integer; i, j: integer;
@ -1511,7 +1490,7 @@ begin
exit; exit;
SetLength(variances, totcells); SetLength(variances, totcells);
alpha := StrToFloat(PostAlpha.Text); alpha := StrToFloat(PostAlphaEdit.Text);
// row comparisons // row comparisons
if (Nf1cells > 2) and (ProbF1 < Overall) then if (Nf1cells > 2) and (ProbF1 < Overall) then
@ -1656,6 +1635,7 @@ begin
variances := nil; variances := nil;
end; end;
procedure TOneCaseAnovaForm.ThreeWayContrasts(AReport: TStrings); procedure TOneCaseAnovaForm.ThreeWayContrasts(AReport: TStrings);
var var
i, j, k: integer; i, j, k: integer;
@ -1668,7 +1648,7 @@ begin
if CompError then if CompError then
exit; exit;
alpha := StrToFloat(PostAlpha.Text); alpha := StrToFloat(PostAlphaEdit.Text);
if not (ScheffeChk.Checked or TukeyHSDChk.Checked or TukeyBChk.Checked or if not (ScheffeChk.Checked or TukeyHSDChk.Checked or TukeyBChk.Checked or
TukeyKramerChk.Checked or NewmanKeulsChk.Checked) then exit; TukeyKramerChk.Checked or NewmanKeulsChk.Checked) then exit;
@ -1940,11 +1920,14 @@ begin
variances := nil; variances := nil;
end; end;
procedure TOneCaseAnovaForm.UpdateBtnStates; procedure TOneCaseAnovaForm.UpdateBtnStates;
var var
i: Integer; i: Integer;
lSelected: Boolean; lSelected: Boolean;
begin begin
inherited;
lSelected := false; lSelected := false;
for i:=0 to VarList.Items.Count-1 do for i:=0 to VarList.Items.Count-1 do
if VarList.Selected[i] then if VarList.Selected[i] then
@ -1952,49 +1935,44 @@ begin
lSelected := true; lSelected := true;
break; break;
end; end;
DepIn.Enabled := lSelected and (DepVar.Text = ''); DepIn.Enabled := lSelected and (DepVarEdit.Text = '');
Fact1In.Enabled := lSelected and (Factor1.Text = ''); Fact1In.Enabled := lSelected and (Factor1Edit.Text = '');
Fact2In.Enabled := lSelected and (Factor2.Text = ''); Fact2In.Enabled := lSelected and (Factor2Edit.Text = '');
Fact3In.Enabled := lSelected and (Factor3.Text = ''); Fact3In.Enabled := lSelected and (Factor3Edit.Text = '');
DepOut.Enabled := DepVar.Text <> ''; DepOut.Enabled := DepVarEdit.Text <> '';
Fact1Out.Enabled := Factor1.Text <> ''; Fact1Out.Enabled := Factor1Edit.Text <> '';
Fact2Out.Enabled := Factor2.Text <> ''; Fact2Out.Enabled := Factor2Edit.Text <> '';
Fact3Out.Enabled := Factor3.Text <> ''; Fact3Out.Enabled := Factor3Edit.Text <> '';
end; end;
procedure TOneCaseAnovaForm.VarListSelectionChange(Sender: TObject;
User: boolean);
begin
UpdateBtnStates;
end;
function TOneCaseAnovaForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean; function TOneCaseAnovaForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
var var
X: Double; X: Double;
begin begin
Result := false; Result := false;
if (OverallAlpha.Text = '') then if (OverAllAlphaEdit.Text = '') then
begin begin
AControl := OverallAlpha; AControl := OverAllAlphaEdit;
AMsg := 'No value specified for overall alpha.'; AMsg := 'No value specified for overall alpha.';
exit; exit;
end; end;
if not TryStrToFloat(OverallAlpha.Text, X) then if not TryStrToFloat(OverAllAlphaEdit.Text, X) then
begin begin
AControl := OverallAlpha; AControl := OverAllAlphaEdit;
AMsg := 'Overall alpha is not a valid number.'; AMsg := 'Overall alpha is not a valid number.';
exit; exit;
end; end;
if (PostAlpha.Text = '') then if (PostAlphaEdit.Text = '') then
begin begin
AControl := PostAlpha; AControl := PostAlphaEdit;
AMsg := 'No value specified for post-hoc alpha.'; AMsg := 'No value specified for post-hoc alpha.';
exit; exit;
end; end;
if not TryStrToFloat(PostAlpha.Text, x) then if not TryStrToFloat(PostAlphaEdit.Text, x) then
begin begin
AControl := PostAlpha; AControl := PostAlphaEdit;
AMsg := 'Post-hoc alpha is not a valid number.'; AMsg := 'Post-hoc alpha is not a valid number.';
exit; exit;
end; end;
@ -2002,8 +1980,40 @@ begin
Result := true; Result := true;
end; end;
initialization
{$I onecaseanovaunit.lrs} procedure TOneCaseAnovaForm.VarListDblClick(Sender: TObject);
var
index: Integer;
s: String;
begin
index := VarList.ItemIndex;
if index > -1 then
begin
s := VarList.Items[index];
if DepVarEdit.Text = '' then
DepVarEdit.Text := s
else
if Factor1Edit.Text = '' then
Factor1Edit.Text := s
else
if Factor2Edit.Text = '' then
Factor2Edit.Text := s
else
if Factor3Edit.Text = '' then
Factor3Edit.Text := s;
VarList.Items.Delete(index);
UpdateBtnStates;
end;
end;
procedure TOneCaseAnovaForm.VarListSelectionChange(Sender: TObject;
User: boolean);
begin
UpdateBtnStates;
end;
end. end.

View File

@ -1896,7 +1896,7 @@ procedure TOS3MainFrm.mnuAnalysisComp_OneCaseAnovaClick(Sender: TObject);
begin begin
if OneCaseAnovaForm = nil then if OneCaseAnovaForm = nil then
Application.CreateForm(TOneCaseAnovaForm, OneCaseAnovaForm); Application.CreateForm(TOneCaseAnovaForm, OneCaseAnovaForm);
OneCaseAnovaForm.ShowModal; OneCaseAnovaForm.Show;
end; end;
// Menu "Analysis" > "Comparisons" > "Difference beween Proportions" // Menu "Analysis" > "Comparisons" > "Difference beween Proportions"
@ -1915,7 +1915,7 @@ begin
TTestForm.Show; TTestForm.Show;
end; end;
// Menu "Analysis" > "Comparisons" > "Within Subjects mnuAnalysisComp_Anova" // Menu "Analysis" > "Comparisons" > "Within Subjects Anova"
procedure TOS3MainFrm.mnuAnalysisComp_WithinAnovaClick(Sender: TObject); procedure TOS3MainFrm.mnuAnalysisComp_WithinAnovaClick(Sender: TObject);
begin begin
if WithinANOVAFrm = nil then if WithinANOVAFrm = nil then