LazStats: Inherit KappaUnit from BasicStatsReportFormUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8016 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2021-05-09 16:52:18 +00:00
parent c9983bc26e
commit 7daa8215e6
4 changed files with 893 additions and 1035 deletions

View File

@ -926,7 +926,7 @@
<Unit102>
<Filename Value="forms\analysis\nonparametric\kappaunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="WeightedKappaFrm"/>
<ComponentName Value="WeightedKappaForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="KappaUnit"/>

View File

@ -1,442 +1,384 @@
object WeightedKappaFrm: TWeightedKappaFrm
inherited WeightedKappaForm: TWeightedKappaForm
Left = 448
Height = 560
Height = 559
Top = 184
Width = 539
Width = 1086
HelpType = htKeyword
HelpKeyword = 'html/KappaandWeightedKappa.htm'
AutoSize = True
Caption = 'Kappa and Weighted Kappa'
ClientHeight = 560
ClientWidth = 539
OnActivate = FormActivate
ClientHeight = 559
ClientWidth = 1086
OnCreate = FormCreate
OnShow = FormShow
Position = poMainFormCenter
LCLVersion = '2.1.0.0'
object InputGroup: TRadioGroup
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 8
Height = 89
Top = 8
inherited ParamsPanel: TPanel
Height = 543
Width = 488
Align = alCustom
AutoFill = True
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
Caption = 'Input Options:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 69
ClientWidth = 484
Items.Strings = (
'Count cases classified by row and column variables in the data grid'
'Use frequencies in a variable for a given row variable value and column variable value.'
'Use proportions in a variable for a given row variable value and column variable value.'
)
OnClick = InputGroupClick
TabOrder = 0
end
object Label1: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = InputGroup
AnchorSideTop.Side = asrBottom
Left = 8
Height = 15
Top = 105
Width = 46
BorderSpacing.Left = 8
BorderSpacing.Top = 8
Caption = 'Variables'
ParentColor = False
end
object VarList: TListBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = RowIn
AnchorSideBottom.Control = NCasesEdit
Left = 8
Height = 358
Top = 122
Width = 265
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 2
BorderSpacing.Right = 8
ItemHeight = 0
OnSelectionChange = VarListSelectionChange
TabOrder = 1
end
object NCasesLbl: TLabel
AnchorSideLeft.Control = VarList
AnchorSideTop.Control = NCasesEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = NCasesEdit
Left = 8
Height = 15
Top = 492
Width = 122
BorderSpacing.Right = 8
Caption = 'Total Number of Cases:'
ParentColor = False
end
object NCasesEdit: TEdit
AnchorSideLeft.Control = NCasesLbl
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Bevel1
Left = 138
Height = 23
Top = 488
Width = 54
Alignment = taRightJustify
Anchors = [akLeft, akBottom]
BorderSpacing.Top = 8
BorderSpacing.Bottom = 8
TabOrder = 2
Text = 'NCasesEdit'
end
object RowIn: TBitBtn
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = VarList
Left = 281
Height = 28
Top = 122
Width = 28
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = RowInClick
Spacing = 0
TabOrder = 3
end
object RowOut: TBitBtn
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = RowIn
AnchorSideTop.Side = asrBottom
Left = 281
Height = 28
Top = 154
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = RowOutClick
Spacing = 0
TabOrder = 4
end
object ColIn: TBitBtn
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = RowOut
AnchorSideTop.Side = asrBottom
Left = 281
Height = 28
Top = 202
Width = 28
BorderSpacing.Top = 20
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = ColInClick
Spacing = 0
TabOrder = 6
end
object ColOut: TBitBtn
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = ColIn
AnchorSideTop.Side = asrBottom
Left = 281
Height = 28
Top = 234
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = ColOutClick
Spacing = 0
TabOrder = 7
end
object DepIn: TBitBtn
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = ColOut
AnchorSideTop.Side = asrBottom
Left = 281
Height = 28
Top = 282
Width = 28
BorderSpacing.Top = 20
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = DepInClick
Spacing = 0
TabOrder = 9
end
object DepOut: TBitBtn
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = DepIn
AnchorSideTop.Side = asrBottom
Left = 281
Height = 28
Top = 314
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = DepOutClick
Spacing = 0
TabOrder = 10
end
object Label2: TLabel
AnchorSideLeft.Control = RaterAEdit
AnchorSideBottom.Control = RaterAEdit
Left = 317
Height = 15
Top = 130
Width = 38
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2
Caption = 'Rater A'
ParentColor = False
end
object Label3: TLabel
AnchorSideLeft.Control = RaterBEdit
AnchorSideBottom.Control = RaterBEdit
Left = 317
Height = 15
Top = 210
Width = 37
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2
Caption = 'Rater B'
ParentColor = False
end
object DepLbl: TLabel
AnchorSideLeft.Control = DepEdit
AnchorSideBottom.Control = DepEdit
Left = 317
Height = 15
Top = 290
Width = 99
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2
Caption = 'Variable to Analyze'
ParentColor = False
end
object RaterAEdit: TEdit
AnchorSideLeft.Control = RowIn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = OptionsGroup
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = RowOut
AnchorSideBottom.Side = asrBottom
Left = 317
Height = 23
Top = 147
Width = 214
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 5
Text = 'RaterAEdit'
end
object RaterBEdit: TEdit
AnchorSideLeft.Control = ColIn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = OptionsGroup
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ColOut
AnchorSideBottom.Side = asrBottom
Left = 317
Height = 23
Top = 227
Width = 214
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 8
Text = 'RaterBEdit'
end
object DepEdit: TEdit
AnchorSideLeft.Control = DepOut
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = OptionsGroup
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DepOut
AnchorSideBottom.Side = asrBottom
Left = 317
Height = 23
Top = 307
Width = 214
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 11
Text = 'DepEdit'
end
object OptionsGroup: TGroupBox
AnchorSideLeft.Control = RowIn
AnchorSideTop.Control = DepOut
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 281
Height = 156
Top = 354
Width = 250
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Top = 12
BorderSpacing.Right = 8
Caption = 'Options:'
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ChildSizing.VerticalSpacing = 2
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 136
ClientWidth = 246
TabOrder = 12
object ObsChk: TCheckBox
Left = 12
Height = 19
Top = 6
Width = 222
Caption = 'Show Observed Frequencies'
TabOrder = 0
ClientHeight = 543
ClientWidth = 488
inherited CloseBtn: TButton
Left = 433
Top = 518
end
object ExpChk: TCheckBox
Left = 12
Height = 19
Top = 27
Width = 222
Caption = 'Show Expected Frequencies'
TabOrder = 1
inherited ComputeBtn: TButton
Left = 349
Top = 518
end
object PropChk: TCheckBox
Left = 12
Height = 19
Top = 48
Width = 222
Caption = 'Show Row and Column Proportions'
TabOrder = 2
inherited ResetBtn: TButton
Left = 287
Top = 518
end
object ChiChk: TCheckBox
Left = 12
Height = 19
Top = 69
Width = 222
Caption = 'Show Cell Chi Square Values'
TabOrder = 3
inherited HelpBtn: TButton
Tag = 128
Left = 228
Top = 518
end
object YatesChk: TCheckBox
Left = 12
Height = 19
Top = 90
Width = 222
Caption = 'Use Yates'' Correction for a 2 by 2 table'
inherited ButtonBevel: TBevel
Top = 502
Width = 488
end
object InputGroup: TRadioGroup[5]
AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = ParamsPanel
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
Left = 0
Height = 89
Top = 0
Width = 488
Align = alCustom
Anchors = [akTop, akLeft, akRight]
AutoFill = True
AutoSize = True
Caption = 'Input Options:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 69
ClientWidth = 484
Items.Strings = (
'Count cases classified by row and column variables in the data grid'
'Use frequencies in a variable for a given row variable value and column variable value.'
'Use proportions in a variable for a given row variable value and column variable value.'
)
OnClick = InputGroupClick
TabOrder = 4
end
object SaveChk: TCheckBox
Left = 12
Height = 19
Top = 111
Width = 222
Caption = 'Save as a File of Frequency Data'
object Label1: TLabel[6]
AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = InputGroup
AnchorSideTop.Side = asrBottom
Left = 0
Height = 15
Top = 97
Width = 46
BorderSpacing.Top = 8
Caption = 'Variables'
ParentColor = False
end
object VarList: TListBox[7]
AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = RowIn
AnchorSideBottom.Control = NCasesEdit
Left = 0
Height = 357
Top = 114
Width = 230
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 2
BorderSpacing.Right = 8
ItemHeight = 0
OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange
TabOrder = 5
end
object RowIn: TBitBtn[8]
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = VarList
Left = 238
Height = 28
Top = 114
Width = 28
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = RowInClick
Spacing = 0
TabOrder = 6
end
object RowOut: TBitBtn[9]
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = RowIn
AnchorSideTop.Side = asrBottom
Left = 238
Height = 28
Top = 146
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = RowOutClick
Spacing = 0
TabOrder = 7
end
object ColIn: TBitBtn[10]
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = RowOut
AnchorSideTop.Side = asrBottom
Left = 238
Height = 28
Top = 194
Width = 28
BorderSpacing.Top = 20
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = ColInClick
Spacing = 0
TabOrder = 8
end
object ColOut: TBitBtn[11]
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = ColIn
AnchorSideTop.Side = asrBottom
Left = 238
Height = 28
Top = 226
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = ColOutClick
Spacing = 0
TabOrder = 9
end
object DepIn: TBitBtn[12]
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = ColOut
AnchorSideTop.Side = asrBottom
Left = 238
Height = 28
Top = 274
Width = 28
BorderSpacing.Top = 20
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = DepInClick
Spacing = 0
TabOrder = 10
end
object DepOut: TBitBtn[13]
AnchorSideLeft.Control = OptionsGroup
AnchorSideTop.Control = DepIn
AnchorSideTop.Side = asrBottom
Left = 238
Height = 28
Top = 306
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = DepOutClick
Spacing = 0
TabOrder = 11
end
object Label2: TLabel[14]
AnchorSideLeft.Control = RaterAEdit
AnchorSideBottom.Control = RaterAEdit
Left = 274
Height = 15
Top = 122
Width = 38
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2
Caption = 'Rater A'
ParentColor = False
end
object Label3: TLabel[15]
AnchorSideLeft.Control = RaterBEdit
AnchorSideBottom.Control = RaterBEdit
Left = 274
Height = 15
Top = 202
Width = 37
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2
Caption = 'Rater B'
ParentColor = False
end
object DepLbl: TLabel[16]
AnchorSideLeft.Control = DepEdit
AnchorSideBottom.Control = DepEdit
Left = 274
Height = 15
Top = 282
Width = 99
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2
Caption = 'Variable to Analyze'
ParentColor = False
end
object RaterAEdit: TEdit[17]
AnchorSideLeft.Control = RowIn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = RowOut
AnchorSideBottom.Side = asrBottom
Left = 274
Height = 23
Top = 139
Width = 214
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 12
Text = 'RaterAEdit'
end
object RaterBEdit: TEdit[18]
AnchorSideLeft.Control = ColIn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ColOut
AnchorSideBottom.Side = asrBottom
Left = 274
Height = 23
Top = 219
Width = 214
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 13
Text = 'RaterBEdit'
end
object DepEdit: TEdit[19]
AnchorSideLeft.Control = DepOut
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DepOut
AnchorSideBottom.Side = asrBottom
Left = 274
Height = 23
Top = 299
Width = 214
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 14
Text = 'DepEdit'
end
object OptionsGroup: TGroupBox[20]
AnchorSideLeft.Control = RowIn
AnchorSideTop.Control = DepOut
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
Left = 238
Height = 156
Top = 346
Width = 250
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Top = 12
Caption = 'Options:'
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ChildSizing.VerticalSpacing = 2
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 136
ClientWidth = 246
TabOrder = 15
object ObsChk: TCheckBox
Left = 12
Height = 19
Top = 6
Width = 222
Caption = 'Show Observed Frequencies'
TabOrder = 0
end
object ExpChk: TCheckBox
Left = 12
Height = 19
Top = 27
Width = 222
Caption = 'Show Expected Frequencies'
TabOrder = 1
end
object PropChk: TCheckBox
Left = 12
Height = 19
Top = 48
Width = 222
Caption = 'Show Row and Column Proportions'
TabOrder = 2
end
object ChiChk: TCheckBox
Left = 12
Height = 19
Top = 69
Width = 222
Caption = 'Show Cell Chi Square Values'
TabOrder = 3
end
object YatesChk: TCheckBox
Left = 12
Height = 19
Top = 90
Width = 222
Caption = 'Use Yates'' Correction for a 2 by 2 table'
TabOrder = 4
end
object SaveChk: TCheckBox
Left = 12
Height = 19
Top = 111
Width = 222
Caption = 'Save as a File of Frequency Data'
TabOrder = 5
end
end
object NCasesLbl: TLabel[21]
AnchorSideLeft.Control = VarList
AnchorSideTop.Control = NCasesEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = NCasesEdit
Left = 0
Height = 15
Top = 483
Width = 122
BorderSpacing.Right = 8
Caption = 'Total Number of Cases:'
ParentColor = False
end
object NCasesEdit: TEdit[22]
AnchorSideLeft.Control = NCasesLbl
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ButtonBevel
Left = 130
Height = 23
Top = 479
Width = 54
Alignment = taRightJustify
Anchors = [akLeft, akBottom]
BorderSpacing.Top = 8
TabOrder = 16
Text = 'NCasesEdit'
end
end
object ResetBtn: TButton
AnchorSideTop.Control = CloseBtn
AnchorSideRight.Control = ComputeBtn
AnchorSideBottom.Side = asrBottom
Left = 330
Height = 25
Top = 527
Width = 54
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 13
end
object ComputeBtn: TButton
AnchorSideTop.Control = CloseBtn
AnchorSideRight.Control = CloseBtn
AnchorSideBottom.Side = asrBottom
Left = 392
Height = 25
Top = 527
Width = 76
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 14
end
object CloseBtn: TButton
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 476
Height = 25
Top = 527
Width = 55
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Close'
ModalResult = 11
TabOrder = 15
end
object HelpBtn: TButton
Tag = 128
AnchorSideTop.Control = CloseBtn
AnchorSideRight.Control = ResetBtn
AnchorSideBottom.Side = asrBottom
Left = 271
Height = 25
Top = 527
Width = 51
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 16
end
object Bevel1: TBevel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = CloseBtn
Left = 0
Height = 8
Top = 519
Width = 541
Anchors = [akLeft, akRight, akBottom]
Shape = bsTopLine
inherited ParamsSplitter: TSplitter
Left = 500
Height = 559
end
end

View File

@ -1777,9 +1777,9 @@ end;
// Menu "Analysis" > "Nonparametric" > "Kappa and Weighted Kappa"
procedure TOS3MainFrm.mnuAnalysisNonPar_WeightedKappaClick(Sender: TObject);
begin
if WeightedKappaFrm = nil then
Application.CreateForm(TWeightedKappaFrm, WeightedKappaFrm);
WeightedKappaFrm.ShowModal;
if WeightedKappaForm = nil then
Application.CreateForm(TWeightedKappaForm, WeightedKappaForm);
WeightedKappaForm.ShowModal;
end;
// Menu "Analysis" > "Nonparametric" > "Life table"