LazStats: Reorder menu items in main form. Inherit form in LSMRUnit from TBasicStatsReportForm.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7767 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-10-11 11:47:22 +00:00
parent b33f2006fc
commit faf2847f1a
5 changed files with 625 additions and 630 deletions

View File

@ -1,152 +1,171 @@
object LSMregForm: TLSMregForm inherited LSMregForm: TLSMregForm
Left = 439 Left = 449
Height = 413 Height = 430
Top = 192 Top = 172
Width = 740 Width = 1010
AutoSize = True
Caption = 'Standard Least-Squares Multiple Regression' Caption = 'Standard Least-Squares Multiple Regression'
ClientHeight = 413 ClientHeight = 430
ClientWidth = 740 ClientWidth = 1010
OnActivate = FormActivate inherited ParamsPanel: TPanel
OnCreate = FormCreate Height = 414
OnShow = ResetBtnClick Width = 401
Position = poMainFormCenter ClientHeight = 414
LCLVersion = '2.1.0.0' ClientWidth = 401
object Label1: TLabel inherited CloseBtn: TButton
AnchorSideLeft.Control = Owner Left = 346
AnchorSideTop.Control = Owner Top = 389
Left = 8 TabOrder = 13
end
inherited ComputeBtn: TButton
Left = 262
Top = 389
TabOrder = 12
end
inherited ResetBtn: TButton
Left = 200
Top = 389
TabOrder = 11
end
inherited HelpBtn: TButton
Left = 141
Top = 389
TabOrder = 10
end
inherited ButtonBevel: TBevel
Top = 373
Width = 401
end
object Label1: TLabel[5]
AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = ParamsPanel
Left = 0
Height = 15 Height = 15
Top = 8 Top = 0
Width = 97 Width = 97
BorderSpacing.Left = 8
BorderSpacing.Top = 8
Caption = 'Available Variables' Caption = 'Available Variables'
ParentColor = False ParentColor = False
end end
object VarList: TListBox object VarList: TListBox[6]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = Label1 AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = AllBtn AnchorSideRight.Control = AllBtn
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = InProb
Left = 8 Left = 0
Height = 339 Height = 203
Top = 25 Top = 17
Width = 222 Width = 173
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 8 BorderSpacing.Right = 4
BorderSpacing.Bottom = 8
ItemHeight = 0 ItemHeight = 0
MultiSelect = True MultiSelect = True
OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 0 TabOrder = 0
end end
object DepInBtn: TBitBtn object DepInBtn: TBitBtn[7]
AnchorSideLeft.Control = AllBtn AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VarList AnchorSideTop.Control = VarList
AnchorSideRight.Control = DepVar AnchorSideRight.Control = DepVar
Left = 247 Left = 187
Height = 28 Height = 26
Top = 25 Top = 17
Width = 28 Width = 26
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 1 ImageIndex = 1
OnClick = DepInBtnClick OnClick = DepInBtnClick
Spacing = 0 Spacing = 0
TabOrder = 1 TabOrder = 1
end end
object Label2: TLabel object Label2: TLabel[8]
AnchorSideLeft.Control = DepVar AnchorSideLeft.Control = DepVar
AnchorSideTop.Control = DepInBtn AnchorSideTop.Control = DepInBtn
Left = 292 Left = 227
Height = 15 Height = 15
Top = 25 Top = 17
Width = 102 Width = 102
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Dependent Variable' Caption = 'Dependent Variable'
ParentColor = False ParentColor = False
end end
object DepVar: TEdit object DepVar: TEdit[9]
AnchorSideLeft.Control = IndepVars AnchorSideLeft.Control = IndepVars
AnchorSideTop.Control = Label2 AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1 AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 292 Left = 227
Height = 23 Height = 23
Top = 42 Top = 34
Width = 198 Width = 174
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Right = 16
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 3 TabOrder = 3
Text = 'DepVar' Text = 'DepVar'
end end
object Label3: TLabel object Label3: TLabel[10]
AnchorSideLeft.Control = IndepVars AnchorSideLeft.Control = IndepVars
AnchorSideTop.Control = DepVar AnchorSideTop.Control = InBtn
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = IndepVars AnchorSideBottom.Control = IndepVars
Left = 292 Left = 227
Height = 15 Height = 15
Top = 97 Top = 105
Width = 166 Width = 166
BorderSpacing.Top = 32
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Independent Var.s for this block' Caption = 'Independent Var.s for this block'
ParentColor = False ParentColor = False
end end
object Label5: TLabel object Label5: TLabel[11]
AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = InProb AnchorSideTop.Control = InProb
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = InProb Left = 0
Left = 511
Height = 15 Height = 15
Top = 12 Top = 232
Width = 163 Width = 163
Anchors = [akTop, akRight]
BorderSpacing.Right = 8 BorderSpacing.Right = 8
Caption = 'Minimum Prob. to enter block:' Caption = 'Minimum Prob. to enter block:'
ParentColor = False ParentColor = False
end end
object GroupBox1: TGroupBox object OptionsGroup: TGroupBox[12]
AnchorSideTop.Control = InProb AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 506 AnchorSideBottom.Control = ButtonBevel
Height = 212 Left = 0
Top = 39 Height = 114
Width = 226 Top = 259
Anchors = [akTop, akRight] Width = 404
Anchors = [akLeft, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Right = 8
Caption = 'Options' Caption = 'Options'
ChildSizing.LeftRightSpacing = 12 ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6 ChildSizing.TopBottomSpacing = 6
ChildSizing.VerticalSpacing = 4 ChildSizing.HorizontalSpacing = 8
ChildSizing.VerticalSpacing = 2
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 2
ClientHeight = 192 ClientHeight = 94
ClientWidth = 222 ClientWidth = 400
TabOrder = 9 TabOrder = 9
object CPChkBox: TCheckBox object CPChkBox: TCheckBox
Left = 12 Left = 12
Height = 19 Height = 19
Top = 6 Top = 6
Width = 198 Width = 170
Caption = 'Show Cross-Products Matrix' Caption = 'Show Cross-Products Matrix'
TabOrder = 0 TabOrder = 0
end end
object CovChkBox: TCheckBox object CovChkBox: TCheckBox
Left = 12 Left = 190
Height = 19 Height = 19
Top = 29 Top = 6
Width = 198 Width = 198
Caption = 'Show Variance-Covariance Matrix' Caption = 'Show Variance-Covariance Matrix'
TabOrder = 1 TabOrder = 1
@ -154,15 +173,15 @@ object LSMregForm: TLSMregForm
object CorrsChkBox: TCheckBox object CorrsChkBox: TCheckBox
Left = 12 Left = 12
Height = 19 Height = 19
Top = 52 Top = 27
Width = 198 Width = 170
Caption = 'Show Intercorrelation Matrix' Caption = 'Show Intercorrelation Matrix'
TabOrder = 2 TabOrder = 2
end end
object MeansChkBox: TCheckBox object MeansChkBox: TCheckBox
Left = 12 Left = 190
Height = 19 Height = 19
Top = 75 Top = 27
Width = 198 Width = 198
Caption = 'Show Means' Caption = 'Show Means'
TabOrder = 3 TabOrder = 3
@ -170,15 +189,15 @@ object LSMregForm: TLSMregForm
object VarChkBox: TCheckBox object VarChkBox: TCheckBox
Left = 12 Left = 12
Height = 19 Height = 19
Top = 98 Top = 48
Width = 198 Width = 170
Caption = 'Show Variances' Caption = 'Show Variances'
TabOrder = 4 TabOrder = 4
end end
object SDChkBox: TCheckBox object SDChkBox: TCheckBox
Left = 12 Left = 190
Height = 19 Height = 19
Top = 121 Top = 48
Width = 198 Width = 198
Caption = 'Show Standard Deviations' Caption = 'Show Standard Deviations'
TabOrder = 5 TabOrder = 5
@ -186,100 +205,50 @@ object LSMregForm: TLSMregForm
object MatSaveChkBox: TCheckBox object MatSaveChkBox: TCheckBox
Left = 12 Left = 12
Height = 19 Height = 19
Top = 144 Top = 69
Width = 198 Width = 170
Caption = 'Save Correlation Matrix' Caption = 'Save Correlation Matrix'
TabOrder = 6 TabOrder = 6
end end
object PredictChkBox: TCheckBox object PredictChkBox: TCheckBox
Left = 12 Left = 190
Height = 19 Height = 19
Top = 167 Top = 69
Width = 198 Width = 198
Caption = 'Predictions,residuals,C.I.''s to Grid' Caption = 'Predictions,residuals,C.I.''s to Grid'
TabOrder = 7 TabOrder = 7
end end
end end
object ResetBtn: TButton object IndepVars: TListBox[13]
AnchorSideRight.Control = ComputeBtn
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 531
Height = 25
Top = 380
Width = 54
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 10
end
object CloseBtn: TButton
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 677
Height = 25
Top = 380
Width = 55
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Close'
ModalResult = 11
TabOrder = 12
end
object ComputeBtn: TButton
AnchorSideRight.Control = CloseBtn
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 593
Height = 25
Top = 380
Width = 76
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 11
end
object IndepVars: TListBox
AnchorSideLeft.Control = AllBtn AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label3 AnchorSideTop.Control = Label3
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1 AnchorSideRight.Control = ParamsPanel
AnchorSideBottom.Control = Bevel1 AnchorSideRight.Side = asrBottom
Left = 292 AnchorSideBottom.Control = VarList
Height = 250 AnchorSideBottom.Side = asrBottom
Top = 114 Left = 227
Width = 198 Height = 98
Anchors = [akTop, akRight, akBottom] Top = 122
BorderSpacing.Left = 8 Width = 174
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 4
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 16
ItemHeight = 0 ItemHeight = 0
OnDblClick = IndepVarsDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 7 TabOrder = 7
end end
object DepOutBtn: TBitBtn object DepOutBtn: TBitBtn[14]
AnchorSideLeft.Control = AllBtn AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepInBtn AnchorSideTop.Control = DepInBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 247 Left = 187
Height = 28 Height = 26
Top = 57 Top = 47
Width = 28 Width = 26
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 0 ImageIndex = 0
@ -287,15 +256,17 @@ object LSMregForm: TLSMregForm
Spacing = 0 Spacing = 0
TabOrder = 2 TabOrder = 2
end end
object InBtn: TBitBtn object InBtn: TBitBtn[15]
AnchorSideLeft.Control = AllBtn AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepOutBtn
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = OutBtn AnchorSideBottom.Control = OutBtn
Left = 247 Left = 187
Height = 28 Height = 26
Top = 193 Top = 105
Width = 28 Width = 26
Anchors = [akLeft, akBottom] BorderSpacing.Top = 32
BorderSpacing.Bottom = 4 BorderSpacing.Bottom = 4
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 1 ImageIndex = 1
@ -303,15 +274,15 @@ object LSMregForm: TLSMregForm
Spacing = 0 Spacing = 0
TabOrder = 4 TabOrder = 4
end end
object OutBtn: TBitBtn object OutBtn: TBitBtn[16]
AnchorSideLeft.Control = AllBtn AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = IndepVars AnchorSideTop.Control = InBtn
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrBottom
Left = 247 Left = 187
Height = 28 Height = 26
Top = 225 Top = 135
Width = 28 Width = 26
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 0 ImageIndex = 0
@ -319,47 +290,44 @@ object LSMregForm: TLSMregForm
Spacing = 0 Spacing = 0
TabOrder = 5 TabOrder = 5
end end
object AllBtn: TBitBtn object InProb: TEdit[17]
AnchorSideLeft.Control = Label5
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = OptionsGroup
Left = 171
Height = 23
Top = 228
Width = 50
Alignment = taRightJustify
Anchors = [akLeft, akBottom]
BorderSpacing.Top = 8
BorderSpacing.Right = 8
TabOrder = 8
Text = 'InProb'
end
object AllBtn: TBitBtn[18]
AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = OutBtn AnchorSideTop.Control = OutBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = IndepVars Left = 177
Left = 238
Height = 25 Height = 25
Top = 257 Top = 165
Width = 46 Width = 46
Anchors = [akTop, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Caption = 'ALL' Caption = 'ALL'
OnClick = AllBtnClick OnClick = AllBtnClick
TabOrder = 6 TabOrder = 6
end end
object InProb: TEdit
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 682
Height = 23
Top = 8
Width = 50
Alignment = taRightJustify
Anchors = [akTop, akRight]
BorderSpacing.Top = 8
BorderSpacing.Right = 8
TabOrder = 8
Text = 'InProb'
end end
object Bevel1: TBevel inherited ParamsSplitter: TSplitter
AnchorSideLeft.Control = Owner Left = 413
AnchorSideRight.Control = Owner Height = 430
AnchorSideRight.Side = asrBottom end
AnchorSideBottom.Control = CloseBtn object SaveDialog: TSaveDialog[2]
Left = 0 Left = 45
Height = 8 Top = 357
Top = 364
Width = 740
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Bottom = 8
Shape = bsBottomLine
end end
end end

View File

@ -5,26 +5,24 @@ unit LSMRUnit;
interface interface
uses uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, ExtCtrls, Globals, MainUnit, MatrixLib, OutPutUnit, StdCtrls, Buttons, ExtCtrls, Globals, MainUnit, MatrixLib,
FunctionsLib, DataProcs, DictionaryUnit; DataProcs, DictionaryUnit, BasicStatsReportFormUnit;
type type
{ TLSMregForm } { TLSMregForm }
TLSMregForm = class(TForm) TLSMregForm = class(TBasicStatsReportForm)
AllBtn: TBitBtn; AllBtn: TBitBtn;
Bevel1: TBevel;
IndepVars: TListBox; IndepVars: TListBox;
ComputeBtn: TButton;
CorrsChkBox: TCheckBox; CorrsChkBox: TCheckBox;
CovChkBox: TCheckBox; CovChkBox: TCheckBox;
CPChkBox: TCheckBox; CPChkBox: TCheckBox;
DepInBtn: TBitBtn; DepInBtn: TBitBtn;
DepOutBtn: TBitBtn; DepOutBtn: TBitBtn;
DepVar: TEdit; DepVar: TEdit;
GroupBox1: TGroupBox; OptionsGroup: TGroupBox;
InBtn: TBitBtn; InBtn: TBitBtn;
InProb: TEdit; InProb: TEdit;
Label1: TLabel; Label1: TLabel;
@ -33,103 +31,60 @@ type
Label5: TLabel; Label5: TLabel;
MatSaveChkBox: TCheckBox; MatSaveChkBox: TCheckBox;
MeansChkBox: TCheckBox; MeansChkBox: TCheckBox;
SaveDialog1: TSaveDialog; SaveDialog: TSaveDialog;
OutBtn: TBitBtn; OutBtn: TBitBtn;
PredictChkBox: TCheckBox; PredictChkBox: TCheckBox;
ResetBtn: TButton;
CloseBtn: TButton;
SDChkBox: TCheckBox; SDChkBox: TCheckBox;
VarChkBox: TCheckBox; VarChkBox: TCheckBox;
VarList: TListBox; VarList: TListBox;
procedure AllBtnClick(Sender: TObject); procedure AllBtnClick(Sender: TObject);
procedure ComputeBtnClick(Sender: TObject);
procedure DepInBtnClick(Sender: TObject); procedure DepInBtnClick(Sender: TObject);
procedure DepOutBtnClick(Sender: TObject); procedure DepOutBtnClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure InBtnClick(Sender: TObject); procedure InBtnClick(Sender: TObject);
procedure IndepVarsDblClick(Sender: TObject);
procedure OutBtnClick(Sender: TObject); procedure OutBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject); procedure VarListDblClick(Sender: TObject);
procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean); procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
private private
{ private declarations } { private declarations }
FAutoSized: boolean; IndepVarsCols: IntDyneVec;
IndepVarsCols : IntDyneVec; NoVars: integer;
NoVars : integer; NoBlocks: integer;
NoBlocks : integer; protected
procedure UpdateBtnStates; procedure AdjustConstraints; override;
procedure Compute; override;
procedure UpdateBtnStates; override;
public public
{ public declarations } procedure Reset; override;
end; end;
var var
LSMregForm: TLSMregForm; LSMregForm: TLSMregForm;
implementation implementation
{$R *.lfm}
uses uses
Math, Math,
Utils, MathUnit; Utils, MathUnit;
procedure TLSMregForm.ResetBtnClick(Sender: TObject);
var { TLSMregForm }
i: integer;
procedure TLSMregForm.AdjustConstraints;
begin begin
IndepVars.Items.Clear; ParamsPanel.Constraints.MinWidth := Max(
VarList.Items.Clear; OptionsGroup.Width,
NoBlocks := 1; 4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left
for i := 1 to NoVariables do );
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); ParamsPanel.Constraints.MinHeight := AllBtn.Top + AllBtn.Height +
VarList.BorderSpacing.Bottom + InProb.Height +
CPChkBox.Checked := false; OptionsGroup.BorderSpacing.Top + OptionsGroup.Height +
CovChkBox.Checked := false; ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
CorrsChkBox.Checked := true;
MeansChkBox.Checked := true;
VarChkBox.Checked := false;
SDChkBox.Checked := true;
MatSaveChkBox.Checked := false;
PredictChkBox.Checked := false;
NoVars := 0;
DepVar.Text := '';
InProb.Text := FormatFloat('0.00', DEFAULT_ALPHA_LEVEL);
SetLength(IndepVarsCols, NoVariables+1);
UpdateBtnStates;
end; end;
procedure TLSMregForm.FormActivate(Sender: TObject);
var
w: Integer;
begin
if FAutoSized then
exit;
w := MaxValue([ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
ResetBtn.Constraints.MinWidth := w;
ComputeBtn.Constraints.MinWidth := w;
CloseBtn.Constraints.MinWidth := w;
VarList.Constraints.MinWidth := IndepVars.Width;
IndepVars.Constraints.MinHeight := Max(200, GroupBox1.Top + GroupBox1.Height - IndepVars.Top);
Constraints.MinHeight := Height;
Constraints.MinWidth := Width;
FAutoSized := true;
end;
procedure TLSMregForm.FormCreate(Sender: TObject);
begin
Assert(OS3MainFrm <> nil);
if DictionaryFrm = nil then Application.CreateForm(TDictionaryFrm, DictionaryFrm);
end;
procedure TLSMregForm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TLSMregForm.AllBtnClick(Sender: TObject); procedure TLSMregForm.AllBtnClick(Sender: TObject);
var var
@ -141,31 +96,32 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TLSMregForm.ComputeBtnClick(Sender: TObject);
procedure TLSMregForm.Compute;
var var
i, j, NCases: integer; i, j, NCases: integer;
NoIndepVars, DepVarCol, NEntered: integer; NoIndepVars, DepVarCol, NEntered: integer;
R2, df1, df2: double; R2, df1, df2: double;
StdErrEst, F, FProbF, OldR2 : double; StdErrEst, F, FProbF, OldR2: double;
pdf1, probin, prout : double; pdf1, probin, prout: double;
errorcode : boolean; errorcode: boolean;
BetaWeights : DblDyneVec; BetaWeights: DblDyneVec = nil;
BWeights : DblDyneVec; BWeights: DblDyneVec = nil;
BStdErrs : DblDyneVec; BStdErrs: DblDyneVec = nil;
Bttests : DblDyneVec; Bttests: DblDyneVec = nil;
tProbs : DblDyneVec; tProbs: DblDyneVec = nil;
cellstring: string; cellstring: string;
corrs : DblDyneMat; corrs: DblDyneMat = nil;
Means : DblDyneVec; Means: DblDyneVec = nil;
Variances : DblDyneVec; Variances: DblDyneVec = nil;
StdDevs : DblDyneVec; StdDevs: DblDyneVec = nil;
title : string; title: string;
IndRowLabels : StrDyneVec; IndRowLabels: StrDyneVec = nil;
IndColLabels : StrDyneVec; IndColLabels: StrDyneVec = nil;
IndepInverse : DblDyneMat; IndepInverse: DblDyneMat = nil;
ColEntered : IntDyneVec; ColEntered: IntDyneVec = nil;
filename : string; filename: string;
constant : double; constant: double;
errcode: boolean = false; errcode: boolean = false;
anerror: Integer = 0; anerror: Integer = 0;
lReport: TStrings; lReport: TStrings;
@ -186,17 +142,18 @@ begin
SetLength(IndRowLabels,NoVariables+1); SetLength(IndRowLabels,NoVariables+1);
SetLength(BetaWeights,NoVariables+1); SetLength(BetaWeights,NoVariables+1);
SetLength(ColEntered,NoVariables+2); SetLength(ColEntered,NoVariables+2);
probin := StrToFloat(InProb.Text); // probability to include a block probin := StrToFloat(InProb.Text); // probability to include a block
prout := 1.0; prout := 1.0;
if DepVar.Text = '' then if DepVar.Text = '' then
begin begin
MessageDlg('No dependent variable selected.', mtError, [mbOK], 0); ErrorMsg('No dependent variable selected.');
exit; exit;
end; end;
if IndepVars.Items.Count = 0 then if IndepVars.Items.Count = 0 then
begin begin
MessageDlg('No independent variable selected.', mtError, [mbOK], 0); ErrorMsg('No independent variable selected.');
exit; exit;
end; end;
@ -244,7 +201,7 @@ begin
title := 'Cross-Products Matrix'; title := 'Cross-Products Matrix';
GridXProd(NEntered, ColEntered, Corrs, errcode, NCases); GridXProd(NEntered, ColEntered, Corrs, errcode, NCases);
MatPrint(Corrs, NEntered, NEntered, title, IndRowLabels, IndColLabels, NCases, lReport); MatPrint(Corrs, NEntered, NEntered, title, IndRowLabels, IndColLabels, NCases, lReport);
lReport.Add('--------------------------------------------------------------------'); lReport.Add(DIVIDER_SMALL);
end; end;
if CovChkBox.Checked then if CovChkBox.Checked then
@ -252,7 +209,7 @@ begin
title := 'Variance-Covariance Matrix'; title := 'Variance-Covariance Matrix';
GridCovar(NEntered,ColEntered, Corrs, Means, Variances, StdDevs, errcode, NCases); GridCovar(NEntered,ColEntered, Corrs, Means, Variances, StdDevs, errcode, NCases);
MatPrint(Corrs, NEntered, NEntered, title, IndRowLabels, IndColLabels, NCases, lReport); MatPrint(Corrs, NEntered, NEntered, title, IndRowLabels, IndColLabels, NCases, lReport);
lReport.Add('--------------------------------------------------------------------'); lReport.Add(DIVIDER_SMALL);
end; end;
Correlations(NEntered,ColEntered,Corrs,Means,Variances, StdDevs,errcode,NCases); Correlations(NEntered,ColEntered,Corrs,Means,Variances, StdDevs,errcode,NCases);
@ -260,28 +217,28 @@ begin
begin begin
title := 'Product-Moment Correlations Matrix'; title := 'Product-Moment Correlations Matrix';
MatPrint(Corrs, NEntered, NEntered, title, IndRowLabels, IndColLabels, NCases, lReport); MatPrint(Corrs, NEntered, NEntered, title, IndRowLabels, IndColLabels, NCases, lReport);
lReport.Add('--------------------------------------------------------------------'); lReport.Add(DIVIDER_SMALL);
end; end;
if MeansChkBox.Checked then if MeansChkBox.Checked then
begin begin
title := 'Means'; title := 'Means';
DynVectorPrint(Means, NEntered, title, IndColLabels, NCases, lReport); DynVectorPrint(Means, NEntered, title, IndColLabels, NCases, lReport);
lReport.Add('--------------------------------------------------------------------'); lReport.Add(DIVIDER_SMALL);
end; end;
if VarChkBox.Checked = true then if VarChkBox.Checked = true then
begin begin
title := 'Variances'; title := 'Variances';
DynVectorPrint(Variances, NEntered, title, IndColLabels, NCases, lReport); DynVectorPrint(Variances, NEntered, title, IndColLabels, NCases, lReport);
lReport.Add('--------------------------------------------------------------------'); lReport.Add(DIVIDER_SMALL);
end; end;
if SDChkBox.Checked = true then if SDChkBox.Checked = true then
begin begin
title := 'Standard Deviations'; title := 'Standard Deviations';
DynVectorPrint(StdDevs, NEntered, title, IndColLabels, NCases, lReport); DynVectorPrint(StdDevs, NEntered, title, IndColLabels, NCases, lReport);
lReport.Add('--------------------------------------------------------------------'); lReport.Add(DIVIDER_SMALL);
end; end;
if errorcode then if errorcode then
@ -305,7 +262,7 @@ begin
lReport.Add('Entry requirements not met'); lReport.Add('Entry requirements not met');
lReport.Add(''); lReport.Add('');
lReport.Add('===================================================================='); lReport.Add(DIVIDER);
lReport.Add(''); lReport.Add('');
{ add [predicted scores, residual scores, etc. to grid if options elected } { add [predicted scores, residual scores, etc. to grid if options elected }
@ -327,32 +284,23 @@ begin
if MatSaveChkBox.Checked then if MatSaveChkBox.Checked then
begin begin
SaveDialog1.Filter := 'LazStats matrix files (*.mat)|*.mat;*.MAT|All files (*.*)|*.*'; SaveDialog.Filter := 'LazStats matrix files (*.mat)|*.mat;*.MAT|All files (*.*)|*.*';
SaveDialog1.FilterIndex := 1; SaveDialog.FilterIndex := 1;
if SaveDialog1.Execute then if SaveDialog.Execute then
begin begin
filename := SaveDialog1.FileName; filename := SaveDialog.FileName;
MatSave(Corrs, NoVars, NoVars, Means, StdDevs, NCases, IndRowLabels, IndColLabels, filename); MatSave(Corrs, NoVars, NoVars, Means, StdDevs, NCases, IndRowLabels, IndColLabels, filename);
end; end;
end; end;
DisplayReport(lReport); FReportFrame.DisplayReport(lReport);
finally finally
lReport.Free; lReport.Free;
ColEntered := nil;
BetaWeights := nil;
IndColLabels := nil;
IndRowLabels := nil;
StdDevs := nil;
Variances := nil;
Means := nil;
IndepInverse := nil;
corrs := nil;
IndepVarsCols := nil;
end; end;
end; end;
procedure TLSMregForm.DepInBtnClick(Sender: TObject); procedure TLSMregForm.DepInBtnClick(Sender: TObject);
var var
index: integer; index: integer;
@ -366,6 +314,7 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TLSMregForm.DepOutBtnClick(Sender: TObject); procedure TLSMregForm.DepOutBtnClick(Sender: TObject);
begin begin
if DepVar.Text <> '' then if DepVar.Text <> '' then
@ -376,6 +325,7 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TLSMregForm.InBtnClick(Sender: TObject); procedure TLSMregForm.InBtnClick(Sender: TObject);
var var
i: integer; i: integer;
@ -394,6 +344,20 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TLSMregForm.IndepVarsDblClick(Sender: TObject);
var
index: Integer;
begin
index := IndepVars.ItemIndex;
if index > -1 then begin
VarList.Items.Add(IndepVars.Items[index]);
IndepVars.Items.Delete(index);
UpdateBtnStates;
end;
end;
procedure TLSMregForm.OutBtnClick(Sender: TObject); procedure TLSMregForm.OutBtnClick(Sender: TObject);
var var
i: integer; i: integer;
@ -412,10 +376,43 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TLSMregForm.Reset;
var
i: integer;
begin
inherited;
IndepVars.Items.Clear;
NoBlocks := 1;
VarList.Items.Clear;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
CPChkBox.Checked := false;
CovChkBox.Checked := false;
CorrsChkBox.Checked := true;
MeansChkBox.Checked := true;
VarChkBox.Checked := false;
SDChkBox.Checked := true;
MatSaveChkBox.Checked := false;
PredictChkBox.Checked := false;
NoVars := 0;
DepVar.Text := '';
InProb.Text := FormatFloat('0.00', DEFAULT_ALPHA_LEVEL);
SetLength(IndepVarsCols, NoVariables+1);
UpdateBtnStates;
end;
procedure TLSMregForm.UpdateBtnStates; procedure TLSMregForm.UpdateBtnStates;
var var
lSelected: Boolean; lSelected: Boolean;
begin begin
inherited;
lSelected := AnySelected(VarList); lSelected := AnySelected(VarList);
DepInBtn.Enabled := lSelected; DepInBtn.Enabled := lSelected;
InBtn.Enabled := lSelected; InBtn.Enabled := lSelected;
@ -425,13 +422,29 @@ begin
AllBtn.Enabled := VarList.Items.Count > 0; AllBtn.Enabled := VarList.Items.Count > 0;
end; end;
procedure TLSMregForm.VarListDblClick(Sender: TObject);
var
index: Integer;
begin
index := VarList.ItemIndex;
if index > -1 then
begin
if DepVar.Text = '' then
DepVar.Text := VarList.Items[index]
else
IndepVars.Items.Add(VarList.Items[index]);
VarList.Items.Delete(index);
UpdateBtnStates;
end;
end;
procedure TLSMregForm.VarListSelectionChange(Sender: TObject; User: boolean); procedure TLSMregForm.VarListSelectionChange(Sender: TObject; User: boolean);
begin begin
UpdateBtnStates; UpdateBtnStates;
end; end;
initialization
{$I lsmrunit.lrs}
end. end.

View File

@ -616,51 +616,54 @@ object OS3MainFrm: TOS3MainFrm
OnClick = MenuItem74Click OnClick = MenuItem74Click
end end
end end
object MenuItem36: TMenuItem object mnuAnalysisMultReg: TMenuItem
Caption = 'Multiple Regression' Caption = 'Multiple Regression'
object LSMRitem: TMenuItem object mnuAnalysisMultReg_LSMR: TMenuItem
Caption = 'Least Squares Multiple Regression' Caption = 'Least Squares Multiple Regression'
OnClick = LSMRitemClick OnClick = mnuAnalysisMultReg_LSMRClick
end end
object MenuItem75: TMenuItem object mnuAnalysisMultReg_Forward: TMenuItem
Caption = 'Forward Stepwise' Caption = 'Forward Stepwise'
OnClick = MenuItem75Click OnClick = mnuAnalysisMultReg_ForwardClick
end end
object MenuItem76: TMenuItem object mnuAnalysisMultReg_Backward: TMenuItem
Caption = 'Backward Stepwise' Caption = 'Backward Stepwise'
OnClick = MenuItem76Click OnClick = mnuAnalysisMultReg_BackwardClick
end end
object MenuItem77: TMenuItem object mnuAnalysisMultReg_Simult: TMenuItem
Caption = 'Simultaneous' Caption = 'Simultaneous'
OnClick = MenuItem77Click OnClick = mnuAnalysisMultReg_SimultClick
end end
object MenuItem78: TMenuItem object mnuAnalysisMultReg_BlockEntry: TMenuItem
Caption = 'Block Entry' Caption = 'Block Entry'
OnClick = MenuItem78Click OnClick = mnuAnalysisMultReg_BlockEntryClick
end end
object MenuItem79: TMenuItem object mnuAnalysisMultReg_BestComb: TMenuItem
Caption = 'Best Combination' Caption = 'Best Combination'
OnClick = MenuItem79Click OnClick = mnuAnalysisMultReg_BestCombClick
end end
object MenuItem80: TMenuItem object mnuAnalysisMultReg_BinLogistic: TMenuItem
Caption = 'Binary Logistic' Caption = 'Binary Logistic'
OnClick = MenuItem80Click OnClick = mnuAnalysisMultReg_BinLogisticClick
end end
object MenuItem81: TMenuItem object mnuAnalysisMultReg_CoxSurvival: TMenuItem
Caption = 'Cox Proportional Hazzards Survival Regression' Caption = 'Cox Proportional Hazzards Survival Regression'
OnClick = MenuItem81Click OnClick = mnuAnalysisMultReg_CoxSurvivalClick
end end
object MenuItem82: TMenuItem object mnuAnalysisMultReg_TwoStage: TMenuItem
Caption = 'Linear Programming'
OnClick = MenuItem82Click
end
object TwoSLSReg: TMenuItem
Caption = 'Two Stage Least Squares Regression' Caption = 'Two Stage Least Squares Regression'
OnClick = TwoSLSRegClick OnClick = mnuAnalysisMultReg_TwoStageClick
end end
object WLSReg: TMenuItem object mnuAnalysisMultReg_Weighted: TMenuItem
Caption = 'Weighted Least Squares Regression' Caption = 'Weighted Least Squares Regression'
OnClick = WLSRegClick OnClick = mnuAnalysisMultReg_WeightedClick
end
object MenuItem2: TMenuItem
Caption = '-'
end
object mnuAnalysisMultReg_LinProg: TMenuItem
Caption = 'Linear Programming'
OnClick = mnuAnalysisMultReg_LinProgClick
end end
end end
object MenuItem37: TMenuItem object MenuItem37: TMenuItem

View File

@ -61,6 +61,7 @@ type
MenuItem115: TMenuItem; MenuItem115: TMenuItem;
MenuItem13: TMenuItem; MenuItem13: TMenuItem;
MenuItem16: TMenuItem; MenuItem16: TMenuItem;
MenuItem2: TMenuItem;
MenuItem20: TMenuItem; MenuItem20: TMenuItem;
MenuItem3: TMenuItem; MenuItem3: TMenuItem;
MenuItem4: TMenuItem; MenuItem4: TMenuItem;
@ -69,6 +70,39 @@ type
MenuItem7: TMenuItem; MenuItem7: TMenuItem;
mnuAnalysis: TMenuItem; mnuAnalysis: TMenuItem;
mnuAnalysisDescr: TMenuItem;
mnuAnalysisDescr_Breakdown: TMenuItem;
mnuAnalysisDescr_BoxPlot: TMenuItem;
mnuAnalysisDescr_BubblePlot: TMenuItem;
mnuAnalysisDescr_CompareDists: TMenuItem;
mnuAnalysisDescr_CrossTabs: TMenuItem;
mnuAnalysisDescr_DataSmooth: TMenuItem;
mnuAnalysisDescr_DistribStats: TMenuItem;
mnuAnalysisDescr_Freq: TMenuItem;
mnuAnalysisDescr_GrpFreq: TMenuItem;
mnuAnalysisDescr_HomogeneityTest: TMenuItem;
mnuAnalysisDescr_MultXvsY: TMenuItem;
mnuAnalysisDescr_Normality: TMenuItem;
mnuAnalysisDescr_PlotXvsY: TMenuItem;
mnuAnalysisDescr_ResistanceLine: TMenuItem;
mnuAnalysisDescr_StemLeaf: TMenuItem;
mnuAnalysisDescr_ThreeDRotate: TMenuItem;
mnuAnalysisDescr_XvsMultY: TMenuItem;
mnuAnalysisMultReg: TMenuItem;
mnuAnalysisMultReg_Backward: TMenuItem;
mnuAnalysisMultReg_BestComb: TMenuItem;
mnuAnalysisMultReg_BinLogistic: TMenuItem;
mnuAnalysisMultReg_BlockEntry: TMenuItem;
mnuAnalysisMultReg_CoxSurvival: TMenuItem;
mnuAnalysisMultReg_Forward: TMenuItem;
mnuAnalysisMultReg_LinProg: TMenuItem;
mnuAnalysisMultReg_LSMR: TMenuItem;
mnuAnalysisMultReg_Simult: TMenuItem;
mnuAnalysisMultReg_TwoStage: TMenuItem;
mnuAnalysisMultReg_Weighted: TMenuItem;
mnuAnalysisSPC: TMenuItem; mnuAnalysisSPC: TMenuItem;
mnuAnalysisSPC_CChart: TMenuItem; mnuAnalysisSPC_CChart: TMenuItem;
mnuAnalysisSPC_CUSUM: TMenuItem; mnuAnalysisSPC_CUSUM: TMenuItem;
@ -180,7 +214,6 @@ type
MedianPolish: TMenuItem; MedianPolish: TMenuItem;
ItemBankMenuItem: TMenuItem; ItemBankMenuItem: TMenuItem;
lifetable: TMenuItem; lifetable: TMenuItem;
LSMRitem: TMenuItem;
MenuItem42: TMenuItem; MenuItem42: TMenuItem;
MenuItem43: TMenuItem; MenuItem43: TMenuItem;
MenuItem45: TMenuItem; MenuItem45: TMenuItem;
@ -198,8 +231,6 @@ type
PicView: TMenuItem; PicView: TMenuItem;
mnuShowOptions: TMenuItem; mnuShowOptions: TMenuItem;
WghtedKappa: TMenuItem; WghtedKappa: TMenuItem;
WLSReg: TMenuItem;
TwoSLSReg: TMenuItem;
RiditAnalysis: TMenuItem; RiditAnalysis: TMenuItem;
MenuItem9: TMenuItem; MenuItem9: TMenuItem;
OpenDialog: TOpenDialog; OpenDialog: TOpenDialog;
@ -208,14 +239,6 @@ type
MenuItem72: TMenuItem; MenuItem72: TMenuItem;
MenuItem73: TMenuItem; MenuItem73: TMenuItem;
MenuItem74: TMenuItem; MenuItem74: TMenuItem;
MenuItem75: TMenuItem;
MenuItem76: TMenuItem;
MenuItem77: TMenuItem;
MenuItem78: TMenuItem;
MenuItem79: TMenuItem;
MenuItem80: TMenuItem;
MenuItem81: TMenuItem;
MenuItem82: TMenuItem;
MenuItem83: TMenuItem; MenuItem83: TMenuItem;
MenuItem84: TMenuItem; MenuItem84: TMenuItem;
MenuItem85: TMenuItem; MenuItem85: TMenuItem;
@ -246,31 +269,11 @@ type
OneSampTests: TMenuItem; OneSampTests: TMenuItem;
MenuItem34: TMenuItem; MenuItem34: TMenuItem;
MenuItem35: TMenuItem; MenuItem35: TMenuItem;
MenuItem36: TMenuItem;
MenuItem37: TMenuItem; MenuItem37: TMenuItem;
MenuItem38: TMenuItem; MenuItem38: TMenuItem;
MenuItem39: TMenuItem; MenuItem39: TMenuItem;
MenuItem40: TMenuItem; MenuItem40: TMenuItem;
mnuAnalysisDescr: TMenuItem;
mnuAnalysisDescr_Breakdown: TMenuItem;
mnuAnalysisDescr_BoxPlot: TMenuItem;
mnuAnalysisDescr_BubblePlot: TMenuItem;
mnuAnalysisDescr_CompareDists: TMenuItem;
mnuAnalysisDescr_CrossTabs: TMenuItem;
mnuAnalysisDescr_DataSmooth: TMenuItem;
mnuAnalysisDescr_DistribStats: TMenuItem;
mnuAnalysisDescr_Freq: TMenuItem;
mnuAnalysisDescr_GrpFreq: TMenuItem;
mnuAnalysisDescr_HomogeneityTest: TMenuItem;
mnuAnalysisDescr_MultXvsY: TMenuItem;
mnuAnalysisDescr_Normality: TMenuItem;
mnuAnalysisDescr_PlotXvsY: TMenuItem;
mnuAnalysisDescr_ResistanceLine: TMenuItem;
mnuAnalysisDescr_StemLeaf: TMenuItem;
mnuAnalysisDescr_ThreeDRotate: TMenuItem;
mnuAnalysisDescr_XvsMultY: TMenuItem;
PropDiff: TMenuItem; PropDiff: TMenuItem;
CorrDiff: TMenuItem; CorrDiff: TMenuItem;
ttests: TMenuItem; ttests: TMenuItem;
@ -294,6 +297,7 @@ type
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
// Menu "Analysis" / "Descriptive" // Menu "Analysis" / "Descriptive"
procedure mnuAnalysisDescr_BoxPlotClick(Sender: TObject); procedure mnuAnalysisDescr_BoxPlotClick(Sender: TObject);
procedure mnuAnalysisDescr_BreakdownClick(Sender: TObject); procedure mnuAnalysisDescr_BreakdownClick(Sender: TObject);
@ -313,6 +317,19 @@ type
procedure mnuAnalysisDescr_ThreeDRotateClick(Sender: TObject); procedure mnuAnalysisDescr_ThreeDRotateClick(Sender: TObject);
procedure mnuAnalysisDescr_XvsMultYClick(Sender: TObject); procedure mnuAnalysisDescr_XvsMultYClick(Sender: TObject);
// Menu "Multiple Regression"
procedure mnuAnalysisMultReg_BackwardClick(Sender: TObject);
procedure mnuAnalysisMultReg_BestCombClick(Sender: TObject);
procedure mnuAnalysisMultReg_BinLogisticClick(Sender: TObject);
procedure mnuAnalysisMultReg_BlockEntryClick(Sender: TObject);
procedure mnuAnalysisMultReg_CoxSurvivalClick(Sender: TObject);
procedure mnuAnalysisMultReg_ForwardClick(Sender: TObject);
procedure mnuAnalysisMultReg_LinProgClick(Sender: TObject);
procedure mnuAnalysisMultReg_LSMRClick(Sender: TObject);
procedure mnuAnalysisMultReg_SimultClick(Sender: TObject);
procedure mnuAnalysisMultReg_TwoStageClick(Sender: TObject);
procedure mnuAnalysisMultReg_WeightedClick(Sender: TObject);
// Menu 'Analysis" / "Statistical Process Control" // Menu 'Analysis" / "Statistical Process Control"
procedure mnuAnalysisSPC_CChartClick(Sender: TObject); procedure mnuAnalysisSPC_CChartClick(Sender: TObject);
procedure mnuAnalysisSPC_CUSUMClick(Sender: TObject); procedure mnuAnalysisSPC_CUSUMClick(Sender: TObject);
@ -416,7 +433,6 @@ type
procedure KSTestClick(Sender: TObject); procedure KSTestClick(Sender: TObject);
procedure LatinSquaresClick(Sender: TObject); procedure LatinSquaresClick(Sender: TObject);
procedure lifetableClick(Sender: TObject); procedure lifetableClick(Sender: TObject);
procedure LSMRitemClick(Sender: TObject);
procedure MatManMnuClick(Sender: TObject); procedure MatManMnuClick(Sender: TObject);
procedure MedianPolishClick(Sender: TObject); procedure MedianPolishClick(Sender: TObject);
procedure MenuItem100Click(Sender: TObject); procedure MenuItem100Click(Sender: TObject);
@ -446,14 +462,6 @@ type
procedure MenuItem72Click(Sender: TObject); procedure MenuItem72Click(Sender: TObject);
procedure MenuItem73Click(Sender: TObject); procedure MenuItem73Click(Sender: TObject);
procedure MenuItem74Click(Sender: TObject); procedure MenuItem74Click(Sender: TObject);
procedure MenuItem75Click(Sender: TObject);
procedure MenuItem76Click(Sender: TObject);
procedure MenuItem77Click(Sender: TObject);
procedure MenuItem78Click(Sender: TObject);
procedure MenuItem79Click(Sender: TObject);
procedure MenuItem80Click(Sender: TObject);
procedure MenuItem81Click(Sender: TObject);
procedure MenuItem82Click(Sender: TObject);
procedure MenuItem83Click(Sender: TObject); procedure MenuItem83Click(Sender: TObject);
procedure MenuItem84Click(Sender: TObject); procedure MenuItem84Click(Sender: TObject);
procedure MenuItem85Click(Sender: TObject); procedure MenuItem85Click(Sender: TObject);
@ -482,10 +490,8 @@ type
procedure SimpChiSqrClick(Sender: TObject); procedure SimpChiSqrClick(Sender: TObject);
procedure SRHItemClick(Sender: TObject); procedure SRHItemClick(Sender: TObject);
procedure TTestsClick(Sender: TObject); procedure TTestsClick(Sender: TObject);
procedure TwoSLSRegClick(Sender: TObject);
procedure WghtedKappaClick(Sender: TObject); procedure WghtedKappaClick(Sender: TObject);
procedure WithinAnovaClick(Sender: TObject); procedure WithinAnovaClick(Sender: TObject);
procedure WLSRegClick(Sender: TObject);
private private
{ private declarations } { private declarations }
{$IFDEF USE_EXTERNAL_HELP_VIEWER} {$IFDEF USE_EXTERNAL_HELP_VIEWER}
@ -695,69 +701,6 @@ begin
CannonFrm.ShowModal; CannonFrm.ShowModal;
end; end;
// Menu "Analysis" > "Multiple Regression" > "Forward Stepwise"
procedure TOS3MainFrm.MenuItem75Click(Sender: TObject);
begin
if StepFwdFrm = nil then
Application.CreateForm(TStepFwdFrm, StepFwdFrm);
StepFwdFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Backward Stepwise"
procedure TOS3MainFrm.MenuItem76Click(Sender: TObject);
begin
if BackRegFrm = nil then
Application.CreateForm(TBackRegFrm, BackRegFrm);
BackRegFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Simultaneous"
procedure TOS3MainFrm.MenuItem77Click(Sender: TObject);
begin
if SimultFrm = nil then
Application.CreateForm(TSimultFrm, SimultFrm);
SimultFrm.ShowModal;
end;
procedure TOS3MainFrm.MenuItem78Click(Sender: TObject);
begin
if BlkMregFrm = nil then
Application.CreateForm(TBlkMregFrm, BlkMregFrm);
BlkMregFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Best Combination"
procedure TOS3MainFrm.MenuItem79Click(Sender: TObject);
begin
if BestRegFrm = nil then
Application.CreateForm(TBestRegFrm, BestRegFrm);
BestRegFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Binary Logistic"
procedure TOS3MainFrm.MenuItem80Click(Sender: TObject);
begin
if LogRegFrm = nil then
Application.CreateForm(TLogRegFrm, LogRegFrm);
LogRegFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Cox Proportional Hazzards Survival Regression"
procedure TOS3MainFrm.MenuItem81Click(Sender: TObject);
begin
if CoxRegFrm = nil then
Application.CreateForm(TCoxRegFrm, CoxRegFrm);
CoxRegFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Linear Programming"
procedure TOS3MainFrm.MenuItem82Click(Sender: TObject);
begin
if LinProFrm = nil then
Application.CreateForm(TLinProFrm, LinProFrm);
LinProFrm.ShowModal;
end;
// Menu "Analysis" > "Multivariate" > "MANOVA / Discriminant Function" // Menu "Analysis" > "Multivariate" > "MANOVA / Discriminant Function"
procedure TOS3MainFrm.MenuItem83Click(Sender: TObject); procedure TOS3MainFrm.MenuItem83Click(Sender: TObject);
begin begin
@ -975,14 +918,6 @@ begin
TTestFrm.ShowModal; TTestFrm.ShowModal;
end; end;
// Menu "Analysis" > "Multiple Regression" > "Two Stage Least Squares Regression"
procedure TOS3MainFrm.TwoSLSRegClick(Sender: TObject);
begin
if TwoSLSFrm = nil then
Application.CreateForm(TTwoSLSFrm, TwoSLSFrm);
TwoSLSFrm.ShowModal;
end;
// Menu "Analysis" > "Nonparametric" > "Kappa and Weighted Kappa" // Menu "Analysis" > "Nonparametric" > "Kappa and Weighted Kappa"
procedure TOS3MainFrm.WghtedKappaClick(Sender: TObject); procedure TOS3MainFrm.WghtedKappaClick(Sender: TObject);
begin begin
@ -999,13 +934,6 @@ begin
WithinAnovaFrm.ShowModal; WithinAnovaFrm.ShowModal;
end; end;
// Menu "Analysis" > "Multiple Regression" > "Weighted Least Squares Regression"
procedure TOS3MainFrm.WLSRegClick(Sender: TObject);
begin
if WLSFrm = nil then
Application.CreateForm(TWLSFrm, WLSFrm);
WLSFrm.ShowModal;
end;
{ {
@ -1788,14 +1716,6 @@ begin
LifeTableForm.ShowModal; LifeTableForm.ShowModal;
end; end;
// Menu "Analysis" > "Nonparametric" > "Least Squares Multiple Regression"
procedure TOS3MainFrm.LSMRitemClick(Sender: TObject);
begin
if LSMRegForm = nil then
Application.CreateForm(TLSMregForm, LSMregForm);
LSMregForm.ShowModal;
end;
procedure TOS3MainFrm.MatManMnuClick(Sender: TObject); procedure TOS3MainFrm.MatManMnuClick(Sender: TObject);
begin begin
if MatManFrm = nil then if MatManFrm = nil then
@ -2108,6 +2028,96 @@ begin
end; end;
{ Multiple regression commands }
// Menu "Analysis" > "Multiple Regression" > "Backward Stepwise"
procedure TOS3MainFrm.mnuAnalysisMultReg_BackwardClick(Sender: TObject);
begin
if BackRegFrm = nil then
Application.CreateForm(TBackRegFrm, BackRegFrm);
BackRegFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Best Combination"
procedure TOS3MainFrm.mnuAnalysisMultReg_BestCombClick(Sender: TObject);
begin
if BestRegFrm = nil then
Application.CreateForm(TBestRegFrm, BestRegFrm);
BestRegFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Binary Logistic"
procedure TOS3MainFrm.mnuAnalysisMultReg_BinLogisticClick(Sender: TObject);
begin
if LogRegFrm = nil then
Application.CreateForm(TLogRegFrm, LogRegFrm);
LogRegFrm.ShowModal;
end;
procedure TOS3MainFrm.mnuAnalysisMultReg_BlockEntryClick(Sender: TObject);
begin
if BlkMregFrm = nil then
Application.CreateForm(TBlkMregFrm, BlkMregFrm);
BlkMregFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Cox Proportional Hazzards Survival Regression"
procedure TOS3MainFrm.mnuAnalysisMultReg_CoxSurvivalClick(Sender: TObject);
begin
if CoxRegFrm = nil then
Application.CreateForm(TCoxRegFrm, CoxRegFrm);
CoxRegFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Forward Stepwise"
procedure TOS3MainFrm.mnuAnalysisMultReg_ForwardClick(Sender: TObject);
begin
if StepFwdFrm = nil then
Application.CreateForm(TStepFwdFrm, StepFwdFrm);
StepFwdFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Linear Programming"
procedure TOS3MainFrm.mnuAnalysisMultReg_LinProgClick(Sender: TObject);
begin
if LinProFrm = nil then
Application.CreateForm(TLinProFrm, LinProFrm);
LinProFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Least Squares Multiple Regression"
procedure TOS3MainFrm.mnuAnalysisMultReg_LSMRClick(Sender: TObject);
begin
if LSMRegForm = nil then
Application.CreateForm(TLSMregForm, LSMregForm);
LSMregForm.Show;
end;
// Menu "Analysis" > "Multiple Regression" > "Simultaneous"
procedure TOS3MainFrm.mnuAnalysisMultReg_SimultClick(Sender: TObject);
begin
if SimultFrm = nil then
Application.CreateForm(TSimultFrm, SimultFrm);
SimultFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Two Stage Least Squares Regression"
procedure TOS3MainFrm.mnuAnalysisMultReg_TwoStageClick(Sender: TObject);
begin
if TwoSLSFrm = nil then
Application.CreateForm(TTwoSLSFrm, TwoSLSFrm);
TwoSLSFrm.ShowModal;
end;
// Menu "Analysis" > "Multiple Regression" > "Weighted Least Squares Regression"
procedure TOS3MainFrm.mnuAnalysisMultReg_WeightedClick(Sender: TObject);
begin
if WLSFrm = nil then
Application.CreateForm(TWLSFrm, WLSFrm);
WLSFrm.ShowModal;
end;
{ SPC commands } { SPC commands }
// Menu "Analysis" > "Statistical Process Control" > "Defect (nonconformity) c Chart" // Menu "Analysis" > "Statistical Process Control" > "Defect (nonconformity) c Chart"

View File

@ -78,6 +78,7 @@ object ReportFrame: TReportFrame
ParentFont = False ParentFont = False
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
WordWrap = False
end end
end end
object SaveDialog: TSaveDialog object SaveDialog: TSaveDialog