LazStats: Change inheritance of the form in WLSUnit for better flexibility in presenting the results.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7771 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-10-11 22:31:17 +00:00
parent 25fa757e7d
commit b4cef759cb
2 changed files with 1037 additions and 974 deletions

View File

@ -1,451 +1,411 @@
object WLSFrm: TWLSFrm inherited WLSFrm: TWLSFrm
Left = 288 Left = 288
Height = 508 Height = 428
Top = 171 Top = 171
Width = 517 Width = 1024
HelpType = htKeyword HelpType = htKeyword
HelpKeyword = 'html/WeightedLeast-SquaresRegression.htm' HelpKeyword = 'html/WeightedLeast-SquaresRegression.htm'
AutoSize = True
Caption = 'Weighted Least Squares Regression' Caption = 'Weighted Least Squares Regression'
ClientHeight = 508 ClientHeight = 428
ClientWidth = 517 ClientWidth = 1024
OnActivate = FormActivate inherited ParamsPanel: TPanel
OnCreate = FormCreate Height = 412
OnShow = FormShow Width = 495
Position = poMainFormCenter ClientHeight = 412
LCLVersion = '2.1.0.0' ClientWidth = 495
object Label1: TLabel inherited CloseBtn: TButton
AnchorSideLeft.Control = Owner Left = 440
AnchorSideTop.Control = Owner Top = 387
Left = 9 TabOrder = 14
Height = 15 end
Top = 8 inherited ComputeBtn: TButton
Width = 46 Left = 356
BorderSpacing.Left = 9 Top = 387
BorderSpacing.Top = 8 TabOrder = 13
Caption = 'Variables' end
ParentColor = False inherited ResetBtn: TButton
end Left = 294
object Label2: TLabel Top = 387
AnchorSideLeft.Control = DepInBtn TabOrder = 12
AnchorSideLeft.Side = asrBottom end
AnchorSideBottom.Control = DepVarEdit inherited HelpBtn: TButton
Left = 280 Tag = 158
Height = 15 Left = 235
Top = 33 Top = 387
Width = 102 TabOrder = 11
Anchors = [akLeft, akBottom] end
BorderSpacing.Left = 8 inherited ButtonBevel: TBevel
BorderSpacing.Top = 8 Top = 371
BorderSpacing.Bottom = 2 Width = 495
Caption = 'Dependent Variable' end
ParentColor = False object OptionsGroup: TGroupBox[5]
end AnchorSideLeft.Control = ParamsPanel
object Label3: TLabel AnchorSideBottom.Control = ButtonBevel
AnchorSideLeft.Control = IndInBtn Left = 0
AnchorSideLeft.Side = asrBottom Height = 112
AnchorSideTop.Control = IndInBtn Top = 259
Left = 280 Width = 483
Height = 15 Anchors = [akLeft, akBottom]
Top = 117 AutoSize = True
Width = 116 Caption = 'Options'
BorderSpacing.Left = 8 ClientHeight = 92
Caption = 'Independent Variables' ClientWidth = 479
ParentColor = False TabOrder = 10
end object OLSChk: TCheckBox
object Label4: TLabel AnchorSideLeft.Control = OptionsGroup
AnchorSideLeft.Control = WghtInBtn AnchorSideTop.Control = OptionsGroup
AnchorSideLeft.Side = asrBottom Left = 12
AnchorSideBottom.Control = WghtVarEdit Height = 19
Left = 280 Top = 2
Height = 15 Width = 206
Top = 287 BorderSpacing.Left = 12
Width = 137 BorderSpacing.Top = 2
Anchors = [akLeft, akBottom] Caption = 'Obtain OLS , save squared residuals'
BorderSpacing.Left = 8 TabOrder = 0
BorderSpacing.Bottom = 2 end
Caption = 'User''s Weigjhts (Optional)' object PlotChk: TCheckBox
ParentColor = False AnchorSideLeft.Control = OptionsGroup
end AnchorSideTop.Control = OLSChk
object VarList: TListBox AnchorSideTop.Side = asrBottom
AnchorSideLeft.Control = Owner Left = 12
AnchorSideTop.Control = Label1 Height = 19
AnchorSideTop.Side = asrBottom Top = 23
AnchorSideRight.Control = DepInBtn Width = 216
AnchorSideBottom.Control = GroupBox1 BorderSpacing.Left = 12
Left = 9 BorderSpacing.Top = 2
Height = 314 Caption = 'Plot squared residuals vs. Indep. Vars.'
Top = 25 TabOrder = 1
Width = 227 end
Anchors = [akTop, akLeft, akRight, akBottom] object RegResChk: TCheckBox
BorderSpacing.Left = 9 AnchorSideLeft.Control = OptionsGroup
BorderSpacing.Top = 2 AnchorSideTop.Control = PlotChk
BorderSpacing.Right = 8 AnchorSideTop.Side = asrBottom
BorderSpacing.Bottom = 8 Left = 12
Constraints.MinHeight = 220 Height = 19
ItemHeight = 0 Top = 44
MultiSelect = True Width = 235
OnSelectionChange = VarListSelectionChange BorderSpacing.Left = 12
TabOrder = 0 BorderSpacing.Top = 2
end Caption = 'Regress squared residuals on Indep. Vars.'
object DepInBtn: TBitBtn TabOrder = 2
AnchorSideLeft.Control = Owner end
AnchorSideLeft.Side = asrCenter object SaveChk: TCheckBox
AnchorSideTop.Control = VarList AnchorSideLeft.Control = OptionsGroup
Left = 244 AnchorSideTop.Control = RegResChk
Height = 28 AnchorSideTop.Side = asrBottom
Top = 25 Left = 12
Width = 28 Height = 19
Images = MainDataModule.ImageList Top = 65
ImageIndex = 1 Width = 180
OnClick = DepInBtnClick BorderSpacing.Left = 12
Spacing = 0 BorderSpacing.Top = 2
TabOrder = 1 BorderSpacing.Bottom = 8
end Caption = 'Save Estimated weights in grid'
object DepOutBtn: TBitBtn TabOrder = 3
AnchorSideLeft.Control = Owner end
AnchorSideLeft.Side = asrCenter object WeightChk: TCheckBox
AnchorSideTop.Control = DepInBtn AnchorSideLeft.Control = RegResChk
AnchorSideTop.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 244 AnchorSideTop.Control = OptionsGroup
Height = 28 Left = 263
Top = 57 Height = 19
Width = 28 Top = 2
BorderSpacing.Top = 4 Width = 208
Images = MainDataModule.ImageList BorderSpacing.Left = 16
ImageIndex = 0 BorderSpacing.Top = 2
OnClick = DepOutBtnClick BorderSpacing.Right = 8
Spacing = 0 Caption = 'Apply weights to obtain a WLS regr.'
TabOrder = 2 TabOrder = 4
end end
object IndInBtn: TBitBtn object OriginChk: TCheckBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = WeightChk
AnchorSideLeft.Side = asrCenter AnchorSideTop.Control = WeightChk
AnchorSideTop.Control = DepOutBtn AnchorSideTop.Side = asrBottom
AnchorSideTop.Side = asrBottom Left = 287
Left = 244 Height = 19
Height = 28 Top = 23
Top = 117 Width = 119
Width = 28 BorderSpacing.Left = 24
BorderSpacing.Top = 32 BorderSpacing.Top = 2
Images = MainDataModule.ImageList Caption = 'Through the origin'
ImageIndex = 1 TabOrder = 5
OnClick = IndInBtnClick end
Spacing = 0 object UserWghtsChk: TCheckBox
TabOrder = 4 AnchorSideLeft.Control = WeightChk
end AnchorSideTop.Control = OriginChk
object IndOutBtn: TBitBtn AnchorSideTop.Side = asrBottom
AnchorSideLeft.Control = Owner Left = 263
AnchorSideLeft.Side = asrCenter Height = 19
AnchorSideTop.Control = IndInBtn Top = 44
AnchorSideTop.Side = asrBottom Width = 187
Left = 244 BorderSpacing.Top = 2
Height = 28 Caption = 'Use weights entered by the user'
Top = 149 TabOrder = 6
Width = 28 end
BorderSpacing.Top = 4 object Origin2Chk: TCheckBox
Images = MainDataModule.ImageList AnchorSideLeft.Control = OriginChk
ImageIndex = 0 AnchorSideTop.Control = UserWghtsChk
OnClick = IndOutBtnClick AnchorSideTop.Side = asrBottom
Spacing = 0 Left = 287
TabOrder = 5 Height = 19
end Top = 65
object WghtInBtn: TBitBtn Width = 119
AnchorSideLeft.Control = Owner BorderSpacing.Top = 2
AnchorSideLeft.Side = asrCenter Caption = 'Through the origin'
AnchorSideBottom.Control = WghtOutBtn TabOrder = 7
Left = 244 end
Height = 28 end
Top = 279 object Label1: TLabel[6]
Width = 28 AnchorSideLeft.Control = ParamsPanel
Anchors = [akLeft, akBottom] AnchorSideTop.Control = ParamsPanel
BorderSpacing.Bottom = 4 Left = 0
Images = MainDataModule.ImageList Height = 15
ImageIndex = 1 Top = 0
OnClick = WghtInBtnClick Width = 46
Spacing = 0 Caption = 'Variables'
TabOrder = 7 ParentColor = False
end end
object WghtOutBtn: TBitBtn object Label2: TLabel[7]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = DepInBtn
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = VarList AnchorSideBottom.Control = DepVarEdit
AnchorSideBottom.Side = asrBottom Left = 264
Left = 244 Height = 15
Height = 28 Top = 21
Top = 311 Width = 102
Width = 28 Anchors = [akLeft, akBottom]
Anchors = [akLeft, akBottom] BorderSpacing.Left = 4
Images = MainDataModule.ImageList BorderSpacing.Top = 8
ImageIndex = 0 BorderSpacing.Bottom = 2
OnClick = WghtOutBtnClick Caption = 'Dependent Variable'
Spacing = 0 ParentColor = False
TabOrder = 8 end
end object Label3: TLabel[8]
object DepVarEdit: TEdit AnchorSideLeft.Control = IndInBtn
AnchorSideLeft.Control = DepInBtn AnchorSideLeft.Side = asrBottom
AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = IndInBtn
AnchorSideTop.Side = asrBottom Left = 264
AnchorSideRight.Control = Owner Height = 15
AnchorSideRight.Side = asrBottom Top = 105
AnchorSideBottom.Control = DepOutBtn Width = 116
AnchorSideBottom.Side = asrBottom BorderSpacing.Left = 4
Left = 280 Caption = 'Independent Variables'
Height = 23 ParentColor = False
Top = 50 end
Width = 229 object Label4: TLabel[9]
Anchors = [akLeft, akRight, akBottom] AnchorSideLeft.Control = WghtInBtn
BorderSpacing.Left = 8 AnchorSideLeft.Side = asrBottom
BorderSpacing.Right = 8 AnchorSideBottom.Control = WghtVarEdit
BorderSpacing.Bottom = 12 Left = 264
ReadOnly = True Height = 15
TabOrder = 3 Top = 199
Text = 'DepVarEdit' Width = 137
end Anchors = [akLeft, akBottom]
object IndVarList: TListBox BorderSpacing.Left = 4
AnchorSideLeft.Control = IndInBtn BorderSpacing.Bottom = 2
AnchorSideLeft.Side = asrBottom Caption = 'User''s Weigjhts (Optional)'
AnchorSideTop.Control = Label3 ParentColor = False
AnchorSideTop.Side = asrBottom end
AnchorSideRight.Control = Owner object VarList: TListBox[10]
AnchorSideRight.Side = asrBottom AnchorSideLeft.Control = ParamsPanel
AnchorSideBottom.Control = WghtInBtn AnchorSideTop.Control = Label1
Left = 280 AnchorSideTop.Side = asrBottom
Height = 129 AnchorSideRight.Control = DepInBtn
Top = 134 AnchorSideBottom.Control = OptionsGroup
Width = 229 Left = 0
Anchors = [akTop, akLeft, akRight, akBottom] Height = 234
BorderSpacing.Left = 8 Top = 17
BorderSpacing.Top = 2 Width = 230
BorderSpacing.Right = 8 Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Bottom = 16
ItemHeight = 0
MultiSelect = True
OnSelectionChange = VarListSelectionChange
TabOrder = 6
end
object WghtVarEdit: TEdit
AnchorSideLeft.Control = WghtInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = WghtOutBtn
AnchorSideBottom.Side = asrBottom
Left = 280
Height = 23
Top = 304
Width = 229
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 9
Text = 'WghtVarEdit'
end
object GroupBox1: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideBottom.Control = Bevel1
Left = 8
Height = 112
Top = 347
Width = 491
Anchors = [akLeft, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Right = 8
Caption = 'Options'
ClientHeight = 92
ClientWidth = 487
TabOrder = 10
object OLSChk: TCheckBox
AnchorSideLeft.Control = GroupBox1
AnchorSideTop.Control = GroupBox1
Left = 12
Height = 19
Top = 2
Width = 206
BorderSpacing.Left = 12
BorderSpacing.Top = 2 BorderSpacing.Top = 2
Caption = 'Obtain OLS , save squared residuals' BorderSpacing.Right = 4
BorderSpacing.Bottom = 8
Constraints.MinHeight = 220
ItemHeight = 0
MultiSelect = True
OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange
TabOrder = 0 TabOrder = 0
end end
object PlotChk: TCheckBox object DepInBtn: TBitBtn[11]
AnchorSideLeft.Control = GroupBox1 AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = OLSChk AnchorSideLeft.Side = asrCenter
AnchorSideTop.Side = asrBottom AnchorSideTop.Control = VarList
Left = 12 Left = 234
Height = 19 Height = 26
Top = 23 Top = 17
Width = 216 Width = 26
BorderSpacing.Left = 12 Images = MainDataModule.ImageList
BorderSpacing.Top = 2 ImageIndex = 1
Caption = 'Plot squared residuals vs. Indep. Vars.' OnClick = DepInBtnClick
Spacing = 0
TabOrder = 1 TabOrder = 1
end end
object RegResChk: TCheckBox object DepOutBtn: TBitBtn[12]
AnchorSideLeft.Control = GroupBox1 AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = PlotChk AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepInBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 12 Left = 234
Height = 19 Height = 26
Top = 44 Top = 47
Width = 235 Width = 26
BorderSpacing.Left = 12 BorderSpacing.Top = 4
BorderSpacing.Top = 2 Images = MainDataModule.ImageList
Caption = 'Regress squared residuals on Indep. Vars.' ImageIndex = 0
OnClick = DepOutBtnClick
Spacing = 0
TabOrder = 2 TabOrder = 2
end end
object SaveChk: TCheckBox object IndInBtn: TBitBtn[13]
AnchorSideLeft.Control = GroupBox1 AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = RegResChk AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepOutBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 12 Left = 234
Height = 19 Height = 26
Top = 65 Top = 105
Width = 180 Width = 26
BorderSpacing.Left = 12 BorderSpacing.Top = 32
BorderSpacing.Top = 2 Images = MainDataModule.ImageList
BorderSpacing.Bottom = 8 ImageIndex = 1
Caption = 'Save Estimated weights in grid' OnClick = IndInBtnClick
TabOrder = 3 Spacing = 0
end
object WeightChk: TCheckBox
AnchorSideLeft.Control = RegResChk
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = GroupBox1
Left = 263
Height = 19
Top = 2
Width = 216
BorderSpacing.Left = 16
BorderSpacing.Top = 2
BorderSpacing.Right = 8
Caption = 'Apply weights and obtain a WLS Reg.'
TabOrder = 4 TabOrder = 4
end end
object OriginChk: TCheckBox object IndOutBtn: TBitBtn[14]
AnchorSideLeft.Control = WeightChk AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = WeightChk AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = IndInBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 287 Left = 234
Height = 19 Height = 26
Top = 23 Top = 135
Width = 121 Width = 26
BorderSpacing.Left = 24 BorderSpacing.Top = 4
BorderSpacing.Top = 2 Images = MainDataModule.ImageList
Caption = 'Through the Origin' ImageIndex = 0
OnClick = IndOutBtnClick
Spacing = 0
TabOrder = 5 TabOrder = 5
end end
object UserWghtsChk: TCheckBox object WghtInBtn: TBitBtn[15]
AnchorSideLeft.Control = WeightChk AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = OriginChk AnchorSideLeft.Side = asrCenter
AnchorSideTop.Side = asrBottom AnchorSideBottom.Control = WghtOutBtn
Left = 263 Left = 234
Height = 19 Height = 26
Top = 44 Top = 195
Width = 189 Width = 26
BorderSpacing.Top = 2 Anchors = [akLeft, akBottom]
Caption = 'Use Weights entered by the user' BorderSpacing.Bottom = 4
TabOrder = 6 Images = MainDataModule.ImageList
end ImageIndex = 1
object Origin2Chk: TCheckBox OnClick = WghtInBtnClick
AnchorSideLeft.Control = OriginChk Spacing = 0
AnchorSideTop.Control = UserWghtsChk
AnchorSideTop.Side = asrBottom
Left = 287
Height = 19
Top = 65
Width = 121
BorderSpacing.Top = 2
Caption = 'Through the Origin'
TabOrder = 7 TabOrder = 7
end end
object WghtOutBtn: TBitBtn[16]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideBottom.Control = VarList
AnchorSideBottom.Side = asrBottom
Left = 234
Height = 26
Top = 225
Width = 26
Anchors = [akLeft, akBottom]
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = WghtOutBtnClick
Spacing = 0
TabOrder = 8
end
object DepVarEdit: TEdit[17]
AnchorSideLeft.Control = DepInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DepOutBtn
AnchorSideBottom.Side = asrBottom
Left = 264
Height = 23
Top = 38
Width = 231
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 4
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 3
Text = 'DepVarEdit'
end
object IndVarList: TListBox[18]
AnchorSideLeft.Control = IndInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label3
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = WghtInBtn
Left = 264
Height = 57
Top = 122
Width = 231
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 4
BorderSpacing.Top = 2
BorderSpacing.Bottom = 16
ItemHeight = 0
MultiSelect = True
OnDblClick = IndVarListDblClick
OnSelectionChange = VarListSelectionChange
TabOrder = 6
end
object WghtVarEdit: TEdit[19]
AnchorSideLeft.Control = WghtInBtn
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = WghtOutBtn
AnchorSideBottom.Side = asrBottom
Left = 264
Height = 23
Top = 216
Width = 231
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 4
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 9
Text = 'WghtVarEdit'
end
end end
object ResetBtn: TButton inherited ParamsSplitter: TSplitter
AnchorSideRight.Control = ComputeBtn Left = 507
AnchorSideBottom.Control = Owner Height = 428
AnchorSideBottom.Side = asrBottom end
Left = 296 object PageControl: TPageControl[2]
Height = 25 Left = 516
Top = 475 Height = 412
Width = 54 Top = 8
Anchors = [akRight, akBottom] Width = 500
AutoSize = True ActivePage = OLSPage
BorderSpacing.Left = 12 Align = alClient
BorderSpacing.Left = 4
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Right = 12 BorderSpacing.Right = 8
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
Caption = 'Reset' TabIndex = 0
OnClick = ResetBtnClick TabOrder = 2
TabOrder = 12 object OLSPage: TTabSheet
end Caption = 'OLS Regression'
object ComputeBtn: TButton end
AnchorSideRight.Control = CloseBtn object ResidualsRegPage: TTabSheet
AnchorSideBottom.Control = Owner Caption = 'Squared Residuals Regression'
AnchorSideBottom.Side = asrBottom end
Left = 362 object WLSPage: TTabSheet
Height = 25 Caption = 'WLS Regression'
Top = 475 end
Width = 76
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 12
BorderSpacing.Top = 8
BorderSpacing.Right = 12
BorderSpacing.Bottom = 8
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 13
end
object CloseBtn: TButton
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 450
Height = 25
Top = 475
Width = 55
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 12
BorderSpacing.Top = 8
BorderSpacing.Right = 12
BorderSpacing.Bottom = 8
Caption = 'Close'
ModalResult = 11
TabOrder = 14
end
object HelpBtn: TButton
Tag = 158
AnchorSideRight.Control = ResetBtn
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 233
Height = 25
Top = 475
Width = 51
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 12
BorderSpacing.Top = 8
BorderSpacing.Right = 12
BorderSpacing.Bottom = 8
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 11
end
object Bevel1: TBevel
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ResetBtn
Left = 0
Height = 8
Top = 459
Width = 517
Anchors = [akLeft, akRight, akBottom]
Shape = bsBottomLine
end end
end end