LazStats: Inherit ABCNestedUnit from BasicStatsReportAndChartForm. Move integrated directions to Lazstats.hlp

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7863 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-11-12 15:23:22 +00:00
parent 95cc2da283
commit 92ac9ce5a8
5 changed files with 468 additions and 506 deletions

View File

@@ -71,3 +71,4 @@ correlation, means, standard deviations and confidence interval for each correla
167=Notes: This is a non-parametric analysis of ordinal data.\nIt is similar to a two-way Analysis of Variance but utilizes a chi-square statistic (H) for determining the significance of the row, column and interaction effects. The dependent value, if not initially rank data, may be obtained first by creating a new variable with the "transformation" procedure available under the "Variables" menu. The output of this procedure contains the results both of a "traditional" 2-way ANOVA as well as the SRH results.\nIt should be noted that the power of the SRH analysis is less than that of the traditional ANOVA. It is suggested that there be at least 5 or more cases in each cell and that the design is a balanced design of fixed levels.\nThe H statistic is obtained as the division of the sum of squares for an effect by the mean square of the total and the test is performed by a chi-squared probability with the degrees of freedom equal to the SS of the effect being tested. 167=Notes: This is a non-parametric analysis of ordinal data.\nIt is similar to a two-way Analysis of Variance but utilizes a chi-square statistic (H) for determining the significance of the row, column and interaction effects. The dependent value, if not initially rank data, may be obtained first by creating a new variable with the "transformation" procedure available under the "Variables" menu. The output of this procedure contains the results both of a "traditional" 2-way ANOVA as well as the SRH results.\nIt should be noted that the power of the SRH analysis is less than that of the traditional ANOVA. It is suggested that there be at least 5 or more cases in each cell and that the design is a balanced design of fixed levels.\nThe H statistic is obtained as the division of the sum of squares for an effect by the mean square of the total and the test is performed by a chi-squared probability with the degrees of freedom equal to the SS of the effect being tested.
168=This procedure lets you enter the number of observed values and the number of expected values for one or more categories.\nEnter the values as indicated and when finished, press the compute button. 168=This procedure lets you enter the number of observed values and the number of expected values for one or more categories.\nEnter the values as indicated and when finished, press the compute button.
169=Directions:\nFor independent groups data, first click the variable to be analyzed then click the variable containing group codes.\nFor dependent variables it is assumed the data for each pair of values are in a case.\nEnter the names of those two variables. 169=Directions:\nFor independent groups data, first click the variable to be analyzed then click the variable containing group codes.\nFor dependent variables it is assumed the data for each pair of values are in a case.\nEnter the names of those two variables.
170=Directions:\nThis analysis assumes that levels of Factor B are Nested within levels of Factor A. It is assumed that all factors are fixed level factors.\n\nThe variables for the group coding should be defined as integers. The dependent variable should be defined as a floating point variable. The number of cases for each ABC group should be equal and the number of B treatments in in each A level should be equal. The number of C treatment levels should be the same for each AB combination.\n\nClick the variable for each factor variable and the corresponding arrow to enter it in the edit box for that variable. Select the type of plot desired for the means (if any.) Click the Compute button to continue.

View File

@@ -1,87 +1,338 @@
object ABCNestedForm: TABCNestedForm inherited ABCNestedForm: TABCNestedForm
Left = 529 Left = 383
Height = 640 Height = 481
Top = 153 Top = 191
Width = 479 Width = 843
AutoSize = True
Caption = 'ABCNestedForm' Caption = 'ABCNestedForm'
ClientHeight = 640 ClientHeight = 481
ClientWidth = 479 ClientWidth = 843
OnActivate = FormActivate inherited ParamsPanel: TPanel
OnCreate = FormCreate Height = 465
OnShow = ResetBtnClick Width = 329
Position = poMainFormCenter ClientHeight = 465
LCLVersion = '2.1.0.0' ClientWidth = 329
object ResetBtn: TButton inherited CloseBtn: TButton
AnchorSideRight.Control = ComputeBtn Left = 274
AnchorSideBottom.Control = Owner Top = 440
AnchorSideBottom.Side = asrBottom TabOrder = 17
Left = 266
Height = 25
Top = 607
Width = 54
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 12
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 2
end end
object ComputeBtn: TButton inherited ComputeBtn: TButton
AnchorSideRight.Control = CloseBtn Left = 190
AnchorSideBottom.Control = Owner Top = 440
AnchorSideBottom.Side = asrBottom TabOrder = 16
Left = 328
Height = 25
Top = 607
Width = 76
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 3
end end
object CloseBtn: TButton inherited ResetBtn: TButton
AnchorSideRight.Control = Owner Left = 128
AnchorSideRight.Side = asrBottom Top = 440
AnchorSideBottom.Control = Owner TabOrder = 15
AnchorSideBottom.Side = asrBottom end
Left = 412 inherited HelpBtn: TButton
Height = 25 Tag = 170
Top = 607 Left = 69
Width = 55 Top = 440
Anchors = [akRight, akBottom] TabOrder = 14
AutoSize = True end
BorderSpacing.Left = 8 inherited ButtonBevel: TBevel
BorderSpacing.Top = 8 Top = 424
BorderSpacing.Right = 12 Width = 329
end
object VarList: TListBox[5]
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = AInBtn
AnchorSideBottom.Control = OptionsGroup
Left = 0
Height = 285
Top = 17
Width = 144
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 2
BorderSpacing.Right = 6
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
Caption = 'Close' ItemHeight = 0
ModalResult = 11 MultiSelect = True
OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange
TabOrder = 0
end
object Label1: TLabel[6]
AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = ParamsPanel
Left = 0
Height = 15
Top = 0
Width = 100
Caption = 'Available Variables:'
ParentColor = False
end
object AInBtn: TBitBtn[7]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepOutBtn
AnchorSideTop.Side = asrBottom
Left = 150
Height = 28
Top = 93
Width = 28
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = AInBtnClick
Spacing = 0
TabOrder = 4 TabOrder = 4
end end
object OptionsBox: TRadioGroup object AOutBtn: TBitBtn[8]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideRight.Control = Owner AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = AInBtn
AnchorSideTop.Side = asrBottom
Left = 150
Height = 28
Top = 125
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = AOutBtnClick
Spacing = 0
TabOrder = 5
end
object BInBtn: TBitBtn[9]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = AOutBtn
AnchorSideTop.Side = asrBottom
Left = 150
Height = 28
Top = 169
Width = 28
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = BInBtnClick
Spacing = 0
TabOrder = 7
end
object BOutBtn: TBitBtn[10]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = BInBtn
AnchorSideTop.Side = asrBottom
Left = 150
Height = 28
Top = 201
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = BOutBtnClick
Spacing = 0
TabOrder = 8
end
object DepInBtn: TBitBtn[11]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VarList
Left = 150
Height = 28
Top = 17
Width = 28
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = DepInBtnClick
Spacing = 0
TabOrder = 1
end
object DepOutBtn: TBitBtn[12]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepInBtn
AnchorSideTop.Side = asrBottom
Left = 150
Height = 28
Top = 49
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = DepOutBtnClick
Spacing = 0
TabOrder = 2
end
object CInBtn: TBitBtn[13]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = BOutBtn
AnchorSideTop.Side = asrBottom
Left = 150
Height = 28
Top = 245
Width = 28
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = CInBtnClick
Spacing = 0
TabOrder = 10
end
object COutBtn: TBitBtn[14]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = CInBtn
AnchorSideTop.Side = asrBottom
Left = 150
Height = 28
Top = 277
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = COutBtnClick
Spacing = 0
TabOrder = 11
end
object Label2: TLabel[15]
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = FactorAEdit
Left = 186
Height = 15
Top = 101
Width = 88
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2
Caption = 'Factor A Variable'
ParentColor = False
end
object Label3: TLabel[16]
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = FactorBEdit
Left = 186
Height = 15
Top = 177
Width = 115
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2
Caption = 'Factor B (Nested in A)'
ParentColor = False
end
object Label4: TLabel[17]
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = DepEdit
Left = 186
Height = 15
Top = 25
Width = 102
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2
Caption = 'Dependent Variable'
ParentColor = False
end
object FactorAEdit: TEdit[18]
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = AOutBtn
Left = 8 AnchorSideBottom.Side = asrBottom
Height = 72 Left = 186
Top = 519 Height = 23
Width = 463 Top = 118
Width = 143
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 6
Text = 'FactorAEdit'
end
object FactorBEdit: TEdit[19]
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = BOutBtn
AnchorSideBottom.Side = asrBottom
Left = 186
Height = 23
Top = 194
Width = 143
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 9
Text = 'FactorBEdit'
end
object DepEdit: TEdit[20]
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DepOutBtn
AnchorSideBottom.Side = asrBottom
Left = 186
Height = 23
Top = 42
Width = 143
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 3
Text = 'DepEdit'
end
object FactorCEdit: TEdit[21]
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = COutBtn
AnchorSideBottom.Side = asrBottom
Left = 186
Height = 23
Top = 270
Width = 143
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 12
Text = 'FactorCEdit'
end
object Label5: TLabel[22]
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = FactorCEdit
Left = 186
Height = 15
Top = 253
Width = 88
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2
Caption = 'Factor C Variable'
ParentColor = False
end
object OptionsGroup: TRadioGroup[23]
AnchorSideLeft.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonBevel
Left = 8
Height = 114
Top = 310
Width = 239
Anchors = [akLeft, akBottom]
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Right = 8 BorderSpacing.Right = 8
Caption = 'OptionsBox' Caption = 'Plot options'
ChildSizing.LeftRightSpacing = 12 ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6 ChildSizing.TopBottomSpacing = 6
ChildSizing.HorizontalSpacing = 16 ChildSizing.HorizontalSpacing = 16
@@ -91,349 +342,27 @@ object ABCNestedForm: TABCNestedForm
ChildSizing.ShrinkHorizontal = crsScaleChilds ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2 ChildSizing.ControlsPerLine = 1
ClientHeight = 52 ClientHeight = 94
ClientWidth = 459 ClientWidth = 235
Columns = 2
Items.Strings = ( Items.Strings = (
'Plot means using 2D Horizontal Bars' 'Plot means using 2D Horizontal Bars'
'Plot means using 3D Horizontal Bars' 'Plot means using 3D Horizontal Bars'
'Plot means using 2D Vertical Bars' 'Plot means using 2D Vertical Bars'
'Plot means using 3D Vertical Bars' 'Plot means using 3D Vertical Bars'
) )
TabOrder = 1 TabOrder = 13
end
object Bevel1: TBevel
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = CloseBtn
Left = 0
Height = 8
Top = 591
Width = 479
Anchors = [akLeft, akRight, akBottom]
Shape = bsBottomLine
end
object Memo1: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 8
Height = 180
Top = 8
Width = 463
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
Caption = 'Directions: This analysis assumes that levels of Factor B are Nested within levels of Factor A. It is assumed that all factors are fixed level factors.'#13#10#13#10'The variables for the group coding should be defined as integers. The dependent variable should be defined as a floating point variable. The number of cases for each ABC group should be equal and the number of B treatments in in each A level should be equal. The number of C treatment levels should be the same for each AB combination.'#13#10#13#10'Click the variable for each factor variable and the corresponding arrow to enter it in the edit box for that variable. Select the type of plot desired for the means (if any.) Click the Compute button to continue.'
ParentColor = False
WordWrap = True
end
object Panel1: TPanel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Memo1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = OptionsBox
Left = 8
Height = 307
Top = 204
Width = 463
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 16
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
BevelOuter = bvNone
ClientHeight = 307
ClientWidth = 463
TabOrder = 0
object Label2: TLabel
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = FactorAEdit
Left = 253
Height = 15
Top = 25
Width = 88
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2
Caption = 'Factor A Variable'
ParentColor = False
end
object Label3: TLabel
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = FactorBEdit
Left = 253
Height = 15
Top = 101
Width = 115
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2
Caption = 'Factor B (Nested in A)'
ParentColor = False
end
object Label4: TLabel
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = DepEdit
Left = 253
Height = 15
Top = 253
Width = 102
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2
Caption = 'Dependent Variable'
ParentColor = False
end
object VarList: TListBox
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = AInBtn
AnchorSideBottom.Control = Panel1
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 290
Top = 17
Width = 209
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 2
BorderSpacing.Right = 8
ItemHeight = 0
MultiSelect = True
OnSelectionChange = VarListSelectionChange
TabOrder = 0
end
object AInBtn: TBitBtn
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VarList
Left = 217
Height = 28
Top = 17
Width = 28
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = AInBtnClick
Spacing = 0
TabOrder = 1
end
object AOutBtn: TBitBtn
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = AInBtn
AnchorSideTop.Side = asrBottom
Left = 217
Height = 28
Top = 49
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = AOutBtnClick
Spacing = 0
TabOrder = 2
end
object BInBtn: TBitBtn
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = AOutBtn
AnchorSideTop.Side = asrBottom
Left = 217
Height = 28
Top = 93
Width = 28
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = BInBtnClick
Spacing = 0
TabOrder = 4
end
object BOutBtn: TBitBtn
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = BInBtn
AnchorSideTop.Side = asrBottom
Left = 217
Height = 28
Top = 125
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = BOutBtnClick
Spacing = 0
TabOrder = 5
end
object DepInBtn: TBitBtn
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = COutBtn
AnchorSideTop.Side = asrBottom
Left = 217
Height = 28
Top = 245
Width = 28
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = DepInBtnClick
Spacing = 0
TabOrder = 10
end
object DepOutBtn: TBitBtn
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepInBtn
AnchorSideTop.Side = asrBottom
Left = 217
Height = 28
Top = 277
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = DepOutBtnClick
Spacing = 0
TabOrder = 11
end
object FactorAEdit: TEdit
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = AOutBtn
AnchorSideBottom.Side = asrBottom
Left = 253
Height = 23
Top = 42
Width = 210
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 3
Text = 'FactorAEdit'
end
object FactorBEdit: TEdit
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = BOutBtn
AnchorSideBottom.Side = asrBottom
Left = 253
Height = 23
Top = 118
Width = 210
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 6
Text = 'FactorBEdit'
end
object DepEdit: TEdit
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DepOutBtn
AnchorSideBottom.Side = asrBottom
Left = 253
Height = 23
Top = 270
Width = 210
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 12
Text = 'DepEdit'
end
object CInBtn: TBitBtn
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = BOutBtn
AnchorSideTop.Side = asrBottom
Left = 217
Height = 28
Top = 169
Width = 28
BorderSpacing.Top = 16
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = CInBtnClick
Spacing = 0
TabOrder = 7
end
object COutBtn: TBitBtn
AnchorSideLeft.Control = Panel1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = CInBtn
AnchorSideTop.Side = asrBottom
Left = 217
Height = 28
Top = 201
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = COutBtnClick
Spacing = 0
TabOrder = 8
end
object FactorCEdit: TEdit
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = COutBtn
AnchorSideBottom.Side = asrBottom
Left = 253
Height = 23
Top = 194
Width = 210
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 9
Text = 'FactorCEdit'
end
object Label5: TLabel
AnchorSideLeft.Control = AInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = FactorCEdit
Left = 253
Height = 15
Top = 177
Width = 88
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2
Caption = 'Factor C Variable'
ParentColor = False
end
object Label1: TLabel
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
Left = 0
Height = 15
Top = 0
Width = 100
Caption = 'Available Variables:'
ParentColor = False
end end
end end
inherited ParamsSplitter: TSplitter
Left = 341
Height = 481
end
inherited PageControl: TPageControl
Left = 350
Height = 465
Width = 485
ActivePage = ReportPage
TabIndex = 0
end
end end

View File

@@ -5,16 +5,15 @@ unit ABCNestedUnit;
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, OutputUnit, GraphLib, Globals; MainUnit, GraphLib, Globals, BasicStatsReportAndChartFormUnit;
type type
{ TABCNestedForm } { TABCNestedForm }
TABCNestedForm = class(TForm) TABCNestedForm = class(TBasicStatsReportAndChartForm)
Bevel1: TBevel;
FactorCEdit: TEdit; FactorCEdit: TEdit;
FactorAEdit: TEdit; FactorAEdit: TEdit;
AInBtn: TBitBtn; AInBtn: TBitBtn;
@@ -22,7 +21,6 @@ type
FactorBEdit: TEdit; FactorBEdit: TEdit;
BInBtn: TBitBtn; BInBtn: TBitBtn;
BOutBtn: TBitBtn; BOutBtn: TBitBtn;
ComputeBtn: TButton;
DepEdit: TEdit; DepEdit: TEdit;
DepInBtn: TBitBtn; DepInBtn: TBitBtn;
CInBtn: TBitBtn; CInBtn: TBitBtn;
@@ -34,28 +32,21 @@ type
Label4: TLabel; Label4: TLabel;
Label5: TLabel; Label5: TLabel;
Memo1: TLabel; Memo1: TLabel;
OptionsBox: TRadioGroup; OptionsGroup: TRadioGroup;
Panel1: TPanel; Panel1: TPanel;
ResetBtn: TButton;
CloseBtn: TButton;
VarList: TListBox; VarList: TListBox;
procedure AInBtnClick(Sender: TObject); procedure AInBtnClick(Sender: TObject);
procedure AOutBtnClick(Sender: TObject); procedure AOutBtnClick(Sender: TObject);
procedure BInBtnClick(Sender: TObject); procedure BInBtnClick(Sender: TObject);
procedure BOutBtnClick(Sender: TObject); procedure BOutBtnClick(Sender: TObject);
procedure CInBtnClick(Sender: TObject); procedure CInBtnClick(Sender: TObject);
procedure ComputeBtnClick(Sender: TObject);
procedure COutBtnClick(Sender: TObject); procedure COutBtnClick(Sender: TObject);
procedure DepInBtnClick(Sender: TObject); procedure DepInBtnClick(Sender: TObject);
procedure DepOutBtnClick(Sender: TObject); procedure DepOutBtnClick(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure VarListDblClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean); procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
private private
{ private declarations }
FAutoSized: Boolean;
CellCount: IntDyneCube; CellCount: IntDyneCube;
ASS, BSS, CSS, ASumSqr, BSumSqr, CSumSqr, AMeans, BMeans, ASDs : DblDyneVec; ASS, BSS, CSS, ASumSqr, BSumSqr, CSumSqr, AMeans, BMeans, ASDs : DblDyneVec;
CMeans, BSDs, CSDs : DblDyneVec; CMeans, BSDs, CSDs : DblDyneVec;
@@ -80,44 +71,52 @@ type
procedure ReleaseMemory; procedure ReleaseMemory;
procedure TwoWayPlot; procedure TwoWayPlot;
procedure UpdateBtnStates; protected
procedure AdjustConstraints; override;
procedure Compute; override;
procedure UpdateBtnStates; override;
public public
{ public declarations } constructor Create(AOwner: TComponent); override;
procedure Reset; override;
end; end;
var var
ABCNestedForm: TABCNestedForm; ABCNestedForm: TABCNestedForm;
implementation implementation
{$R *.lfm}
uses uses
Math, MathUnit; Math, MathUnit;
{ TABCNestedForm } { TABCNestedForm }
procedure TABCNestedForm.ResetBtnClick(Sender: TObject); constructor TABCNestedForm.Create(AOwner: TComponent);
VAR
i : integer;
begin begin
VarList.Items.Clear; inherited;
FactorAEdit.Text := ''; if GraphFrm = nil then
FactorBEdit.Text := ''; Application.CreateForm(TGraphFrm, GraphFrm);
FactorCEdit.Text := '';
DepEdit.Text := '';
AInBtn.Enabled := true;
AOutBtn.Enabled := false;
BInBtn.Enabled := true;
BOutBtn.Enabled := false;
CInBtn.Enabled := true;
COutBtn.Enabled := false;
DepInBtn.Enabled := true;
DepoutBtn.Enabled := false;
OptionsBox.ItemIndex := 3;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
OptionsBox.ItemIndex := 3;
end; end;
procedure TABCNestedForm.AdjustConstraints;
begin
inherited;
ParamsPanel.Constraints.MinWidth := Max(
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
MaxValue([Label2.Width, Label3.Width, Label4.Width, Label5.Width])*2 + AInBtn.Width + VarList.BorderSpacing.Right*2
);
ParamsPanel.Constraints.MinHeight := COutBtn.Top + COutBtn.Height +
VarList.BorderSpacing.Bottom + OptionsGroup.Height +
ButtonBevel.Height + CloseBtn.Height + CloseBtn.BorderSpacing.Top;
end;
procedure TABCNestedForm.AInBtnClick(Sender: TObject); procedure TABCNestedForm.AInBtnClick(Sender: TObject);
var var
index: integer; index: integer;
@@ -164,6 +163,7 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TABCNestedForm.CInBtnClick(Sender: TObject); procedure TABCNestedForm.CInBtnClick(Sender: TObject);
var var
index: integer; index: integer;
@@ -177,7 +177,19 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TABCNestedForm.ComputeBtnClick(Sender: TObject);
procedure TABCNestedForm.COutBtnClick(Sender: TObject);
begin
if FactorCEdit.Text <> '' then
begin
VarList.Items.Add(FactorCEdit.Text);
FactorCEdit.Text := '';
end;
UpdateBtnStates;
end;
procedure TABCNestedForm.Compute;
var var
lReport: TStrings; lReport: TStrings;
begin begin
@@ -198,15 +210,6 @@ begin
end; end;
end; end;
procedure TABCNestedForm.COutBtnClick(Sender: TObject);
begin
if FactorCEdit.Text <> '' then
begin
VarList.Items.Add(FactorCEdit.Text);
FactorCEdit.Text := '';
end;
UpdateBtnStates;
end;
procedure TABCNestedForm.DepInBtnClick(Sender: TObject); procedure TABCNestedForm.DepInBtnClick(Sender: TObject);
var var
@@ -221,6 +224,7 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TABCNestedForm.DepOutBtnClick(Sender: TObject); procedure TABCNestedForm.DepOutBtnClick(Sender: TObject);
begin begin
if DepEdit.Text <> '' then if DepEdit.Text <> '' then
@@ -231,30 +235,6 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TABCNestedForm.FormActivate(Sender: TObject);
var
w: Integer;
begin
if FAutoSized then
exit;
w := {%H-}MaxValue([ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
ResetBtn.Constraints.MinWidth := w;
ComputeBtn.Constraints.MinWidth := w;
CloseBtn.Constraints.MinWidth := w;
Constraints.MinWidth := Width;
Constraints.MinHeight := Height;
FAutoSized := true;
end;
procedure TABCNestedForm.FormCreate(Sender: TObject);
begin
Assert(OS3MainFrm <> nil);
if GraphFrm = nil then
Application.CreateForm(TGraphFrm, GraphFrm);
end;
function TABCNestedForm.GetVars: Boolean; function TABCNestedForm.GetVars: Boolean;
var var
@@ -272,12 +252,12 @@ begin
BCol := 0; BCol := 0;
CCol := 0; CCol := 0;
YCol := 0; YCol := 0;
MinA := 1000; MinA := MaxInt;
MaxA := -1000; MaxA := -MaxInt;
MinB := 1000; MinB := MaxInt;
MaxB := -1000; MaxB := -MaxInt;
MinC := 1000; MinC := MaxInt;
MaxC := -1000; MaxC := -MaxInt;
for i := 1 to NoVariables do for i := 1 to NoVariables do
begin begin
strvalue := Trim(OS3MainFrm.DataGrid.Cells[i,0]); strvalue := Trim(OS3MainFrm.DataGrid.Cells[i,0]);
@@ -334,6 +314,7 @@ begin
Result := true; Result := true;
end; end;
procedure TABCNestedForm.GetMemory; procedure TABCNestedForm.GetMemory;
begin begin
SetLength(SS,NoBLevels,NoALevels,NoCLevels); SetLength(SS,NoBLevels,NoALevels,NoCLevels);
@@ -368,6 +349,7 @@ begin
SetLength(ABSDs,NoALevels,NoBLevels); SetLength(ABSDs,NoALevels,NoBLevels);
end; end;
procedure TABCNestedForm.GetSums; procedure TABCNestedForm.GetSums;
VAR VAR
Aindex, Bindex, Cindex, i, j, k: integer; Aindex, Bindex, Cindex, i, j, k: integer;
@@ -545,12 +527,13 @@ begin
SumSqrTot := SumSqrTot * SumSqrTot; SumSqrTot := SumSqrTot * SumSqrTot;
end; end;
procedure TABCNestedForm.ShowMeans(AReport: TStrings); procedure TABCNestedForm.ShowMeans(AReport: TStrings);
var var
i, j, k : integer; i, j, k : integer;
begin begin
AReport.Add('Nested ANOVA by Bill Miller'); AReport.Add('Nested ANOVA by Bill Miller');
AReport.Add('File Analyzed = %s', [OS3MainFrm.FileNameEdit.Text]); AReport.Add('File Analyzed: %s', [OS3MainFrm.FileNameEdit.Text]);
AReport.Add(''); AReport.Add('');
AReport.Add('CELL MEANS'); AReport.Add('CELL MEANS');
@@ -603,6 +586,7 @@ begin
// OutputFrm.ShowModal; // OutputFrm.ShowModal;
end; end;
procedure TABCNestedForm.GetResults; procedure TABCNestedForm.GetResults;
VAR VAR
temp, temp2, temp3, temp4, constant : double; temp, temp2, temp3, temp4, constant : double;
@@ -700,6 +684,7 @@ begin
MSW := SSW / dfwcell; MSW := SSW / dfwcell;
end; end;
procedure TABCNestedForm.ShowResults(AReport: TStrings); procedure TABCNestedForm.ShowResults(AReport: TStrings);
VAR VAR
F, PF : double; F, PF : double;
@@ -731,9 +716,10 @@ begin
AReport.Add('w.cells %4D %10.3f%10.3f', [dfwcell, SSW, MSW]); AReport.Add('w.cells %4D %10.3f%10.3f', [dfwcell, SSW, MSW]);
AReport.Add('Total %4D %10.3f', [dftotal, SSTot]); AReport.Add('Total %4D %10.3f', [dftotal, SSTot]);
DisplayReport(AReport); FReportFrame.DisplayReport(AReport);
end; end;
procedure TABCNestedForm.ReleaseMemory; procedure TABCNestedForm.ReleaseMemory;
begin begin
ColNoSelected := nil; ColNoSelected := nil;
@@ -769,14 +755,37 @@ begin
SS := nil; SS := nil;
end; end;
procedure TABCNestedForm.Reset;
var
i: integer;
begin
inherited;
VarList.Items.Clear;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
FactorAEdit.Clear;
FactorBEdit.Clear;
FactorCEdit.Clear;
DepEdit.Clear;
OptionsGroup.ItemIndex := 3;
OptionsGroup.ItemIndex := 3;
UpdateBtnStates;
end;
procedure TABCNestedForm.TwoWayPlot; procedure TABCNestedForm.TwoWayPlot;
VAR var
plottype, i, j, k : integer; plottype, i, j, k : integer;
maxmean, XBar : double; maxmean, XBar : double;
title, setstring : string; title, setstring : string;
XValue : DblDyneVec = nil; XValue : DblDyneVec = nil;
begin begin
case OptionsBox.ItemIndex of case OptionsGroup.ItemIndex of
0: plottype := 9; 0: plottype := 9;
1: plottype := 10; 1: plottype := 10;
2: plottype := 1; 2: plottype := 1;
@@ -976,13 +985,11 @@ begin
XValue := nil; XValue := nil;
end; end;
procedure TABCNestedForm.VarListSelectionChange(Sender: TObject; User: boolean);
begin
UpdateBtnStates;
end;
procedure TABCNestedForm.UpdateBtnStates; procedure TABCNestedForm.UpdateBtnStates;
begin begin
inherited;
AInBtn.Enabled := (VarList.ItemIndex > -1) and (FactorAEdit.Text = ''); AInBtn.Enabled := (VarList.ItemIndex > -1) and (FactorAEdit.Text = '');
BInBtn.Enabled := (VarList.ItemIndex > -1) and (FactorBEdit.Text = ''); BInBtn.Enabled := (VarList.ItemIndex > -1) and (FactorBEdit.Text = '');
CInBtn.Enabled := (VarList.ItemIndex > -1) and (FactorCEdit.Text = ''); CInBtn.Enabled := (VarList.ItemIndex > -1) and (FactorCEdit.Text = '');
@@ -993,8 +1000,33 @@ begin
DepOutBtn.Enabled := (DepEdit.Text <> ''); DepOutBtn.Enabled := (DepEdit.Text <> '');
end; end;
initialization
{$I abcnestedunit.lrs} procedure TABCNestedForm.VarListDblClick(Sender: TObject);
var
index: Integer;
s: String;
begin
index := VarList.ItemIndex;
if index > -1 then begin
s := VarList.Items[index];
if FactorAEdit.Text = '' then
FactorAEdit.Text := s
else if FactorBEdit.Text = '' then
FactorBEdit.Text := s
else if FactorCEdit.Text = '' then
FactorCEdit.Text := s
else if DepEdit.Text = '' then
DepEdit.Text := s;
UpdateBtnStates;
end;
end;
procedure TABCNestedForm.VarListSelectionChange(Sender: TObject; User: boolean);
begin
UpdateBtnStates;
end;
end. end.

View File

@@ -11,7 +11,7 @@ object BNestedAForm: TBNestedAForm
OnCreate = FormCreate OnCreate = FormCreate
OnShow = ResetBtnClick OnShow = ResetBtnClick
Position = poMainFormCenter Position = poMainFormCenter
LCLVersion = '2.1.0.0' LCLVersion = '2.0.10.0'
object Label1: TLabel object Label1: TLabel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Memo1 AnchorSideTop.Control = Memo1
@@ -295,7 +295,7 @@ object BNestedAForm: TBNestedAForm
end end
object OptionsBox: TRadioGroup object OptionsBox: TRadioGroup
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = ButtonBevel
Left = 8 Left = 8
Height = 72 Height = 72
Top = 377 Top = 377
@@ -355,7 +355,7 @@ object BNestedAForm: TBNestedAForm
ParentColor = False ParentColor = False
WordWrap = True WordWrap = True
end end
object Bevel1: TBevel object ButtonBevel: TBevel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom

View File

@@ -18,7 +18,7 @@ type
AInBtn: TBitBtn; AInBtn: TBitBtn;
AOutBtn: TBitBtn; AOutBtn: TBitBtn;
BCodes: TEdit; BCodes: TEdit;
Bevel1: TBevel; ButtonBevel: TBevel;
BInBtn: TBitBtn; BInBtn: TBitBtn;
BOutBtn: TBitBtn; BOutBtn: TBitBtn;
Memo1: TLabel; Memo1: TLabel;