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,365 +1,333 @@
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
Height = 15 end
Top = 8 inherited ComputeBtn: TButton
Width = 97 Left = 262
BorderSpacing.Left = 8 Top = 389
BorderSpacing.Top = 8 TabOrder = 12
Caption = 'Available Variables' end
ParentColor = False inherited ResetBtn: TButton
end Left = 200
object VarList: TListBox Top = 389
AnchorSideLeft.Control = Owner TabOrder = 11
AnchorSideTop.Control = Label1 end
AnchorSideTop.Side = asrBottom inherited HelpBtn: TButton
AnchorSideRight.Control = AllBtn Left = 141
AnchorSideBottom.Control = Bevel1 Top = 389
Left = 8 TabOrder = 10
Height = 339 end
Top = 25 inherited ButtonBevel: TBevel
Width = 222 Top = 373
Anchors = [akTop, akLeft, akRight, akBottom] Width = 401
BorderSpacing.Left = 8 end
BorderSpacing.Top = 2 object Label1: TLabel[5]
BorderSpacing.Right = 8 AnchorSideLeft.Control = ParamsPanel
ItemHeight = 0 AnchorSideTop.Control = ParamsPanel
MultiSelect = True Left = 0
OnSelectionChange = VarListSelectionChange Height = 15
TabOrder = 0 Top = 0
end Width = 97
object DepInBtn: TBitBtn Caption = 'Available Variables'
AnchorSideLeft.Control = AllBtn ParentColor = False
AnchorSideLeft.Side = asrCenter end
AnchorSideTop.Control = VarList object VarList: TListBox[6]
AnchorSideRight.Control = DepVar AnchorSideLeft.Control = ParamsPanel
Left = 247 AnchorSideTop.Control = Label1
Height = 28 AnchorSideTop.Side = asrBottom
Top = 25 AnchorSideRight.Control = AllBtn
Width = 28 AnchorSideBottom.Control = InProb
Images = MainDataModule.ImageList Left = 0
ImageIndex = 1 Height = 203
OnClick = DepInBtnClick Top = 17
Spacing = 0 Width = 173
TabOrder = 1 Anchors = [akTop, akLeft, akRight, akBottom]
end BorderSpacing.Top = 2
object Label2: TLabel BorderSpacing.Right = 4
AnchorSideLeft.Control = DepVar BorderSpacing.Bottom = 8
AnchorSideTop.Control = DepInBtn ItemHeight = 0
Left = 292 MultiSelect = True
Height = 15 OnDblClick = VarListDblClick
Top = 25 OnSelectionChange = VarListSelectionChange
Width = 102
BorderSpacing.Bottom = 2
Caption = 'Dependent Variable'
ParentColor = False
end
object DepVar: TEdit
AnchorSideLeft.Control = IndepVars
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1
AnchorSideBottom.Side = asrBottom
Left = 292
Height = 23
Top = 42
Width = 198
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Right = 16
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 3
Text = 'DepVar'
end
object Label3: TLabel
AnchorSideLeft.Control = IndepVars
AnchorSideTop.Control = DepVar
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = IndepVars
Left = 292
Height = 15
Top = 97
Width = 166
BorderSpacing.Top = 32
BorderSpacing.Bottom = 2
Caption = 'Independent Var.s for this block'
ParentColor = False
end
object Label5: TLabel
AnchorSideTop.Control = InProb
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = InProb
Left = 511
Height = 15
Top = 12
Width = 163
Anchors = [akTop, akRight]
BorderSpacing.Right = 8
Caption = 'Minimum Prob. to enter block:'
ParentColor = False
end
object GroupBox1: TGroupBox
AnchorSideTop.Control = InProb
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 506
Height = 212
Top = 39
Width = 226
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Top = 8
BorderSpacing.Right = 8
Caption = 'Options'
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ChildSizing.VerticalSpacing = 4
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 192
ClientWidth = 222
TabOrder = 9
object CPChkBox: TCheckBox
Left = 12
Height = 19
Top = 6
Width = 198
Caption = 'Show Cross-Products Matrix'
TabOrder = 0 TabOrder = 0
end end
object CovChkBox: TCheckBox object DepInBtn: TBitBtn[7]
Left = 12 AnchorSideLeft.Control = AllBtn
Height = 19 AnchorSideLeft.Side = asrCenter
Top = 29 AnchorSideTop.Control = VarList
Width = 198 AnchorSideRight.Control = DepVar
Caption = 'Show Variance-Covariance Matrix' Left = 187
Height = 26
Top = 17
Width = 26
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = DepInBtnClick
Spacing = 0
TabOrder = 1 TabOrder = 1
end end
object CorrsChkBox: TCheckBox object Label2: TLabel[8]
Left = 12 AnchorSideLeft.Control = DepVar
Height = 19 AnchorSideTop.Control = DepInBtn
Top = 52 Left = 227
Width = 198 Height = 15
Caption = 'Show Intercorrelation Matrix' Top = 17
TabOrder = 2 Width = 102
BorderSpacing.Bottom = 2
Caption = 'Dependent Variable'
ParentColor = False
end end
object MeansChkBox: TCheckBox object DepVar: TEdit[9]
Left = 12 AnchorSideLeft.Control = IndepVars
Height = 19 AnchorSideTop.Control = Label2
Top = 75 AnchorSideTop.Side = asrBottom
Width = 198 AnchorSideRight.Control = ParamsPanel
Caption = 'Show Means' AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 227
Height = 23
Top = 34
Width = 174
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Bottom = 12
ReadOnly = True
TabOrder = 3 TabOrder = 3
Text = 'DepVar'
end end
object VarChkBox: TCheckBox object Label3: TLabel[10]
Left = 12 AnchorSideLeft.Control = IndepVars
Height = 19 AnchorSideTop.Control = InBtn
Top = 98 AnchorSideBottom.Control = IndepVars
Width = 198 Left = 227
Caption = 'Show Variances' Height = 15
TabOrder = 4 Top = 105
Width = 166
BorderSpacing.Bottom = 2
Caption = 'Independent Var.s for this block'
ParentColor = False
end end
object SDChkBox: TCheckBox object Label5: TLabel[11]
Left = 12 AnchorSideLeft.Control = ParamsPanel
Height = 19 AnchorSideTop.Control = InProb
Top = 121 AnchorSideTop.Side = asrCenter
Width = 198 Left = 0
Caption = 'Show Standard Deviations' Height = 15
TabOrder = 5 Top = 232
Width = 163
BorderSpacing.Right = 8
Caption = 'Minimum Prob. to enter block:'
ParentColor = False
end end
object MatSaveChkBox: TCheckBox object OptionsGroup: TGroupBox[12]
Left = 12 AnchorSideLeft.Control = ParamsPanel
Height = 19 AnchorSideTop.Side = asrBottom
Top = 144 AnchorSideRight.Side = asrBottom
Width = 198 AnchorSideBottom.Control = ButtonBevel
Caption = 'Save Correlation Matrix' Left = 0
TabOrder = 6 Height = 114
Top = 259
Width = 404
Anchors = [akLeft, akBottom]
AutoSize = True
BorderSpacing.Top = 8
Caption = 'Options'
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ChildSizing.HorizontalSpacing = 8
ChildSizing.VerticalSpacing = 2
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 94
ClientWidth = 400
TabOrder = 9
object CPChkBox: TCheckBox
Left = 12
Height = 19
Top = 6
Width = 170
Caption = 'Show Cross-Products Matrix'
TabOrder = 0
end
object CovChkBox: TCheckBox
Left = 190
Height = 19
Top = 6
Width = 198
Caption = 'Show Variance-Covariance Matrix'
TabOrder = 1
end
object CorrsChkBox: TCheckBox
Left = 12
Height = 19
Top = 27
Width = 170
Caption = 'Show Intercorrelation Matrix'
TabOrder = 2
end
object MeansChkBox: TCheckBox
Left = 190
Height = 19
Top = 27
Width = 198
Caption = 'Show Means'
TabOrder = 3
end
object VarChkBox: TCheckBox
Left = 12
Height = 19
Top = 48
Width = 170
Caption = 'Show Variances'
TabOrder = 4
end
object SDChkBox: TCheckBox
Left = 190
Height = 19
Top = 48
Width = 198
Caption = 'Show Standard Deviations'
TabOrder = 5
end
object MatSaveChkBox: TCheckBox
Left = 12
Height = 19
Top = 69
Width = 170
Caption = 'Save Correlation Matrix'
TabOrder = 6
end
object PredictChkBox: TCheckBox
Left = 190
Height = 19
Top = 69
Width = 198
Caption = 'Predictions,residuals,C.I.''s to Grid'
TabOrder = 7
end
end end
object PredictChkBox: TCheckBox object IndepVars: TListBox[13]
Left = 12 AnchorSideLeft.Control = AllBtn
Height = 19 AnchorSideLeft.Side = asrBottom
Top = 167 AnchorSideTop.Control = Label3
Width = 198 AnchorSideTop.Side = asrBottom
Caption = 'Predictions,residuals,C.I.''s to Grid' AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = VarList
AnchorSideBottom.Side = asrBottom
Left = 227
Height = 98
Top = 122
Width = 174
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 4
BorderSpacing.Top = 2
ItemHeight = 0
OnDblClick = IndepVarsDblClick
OnSelectionChange = VarListSelectionChange
TabOrder = 7 TabOrder = 7
end end
object DepOutBtn: TBitBtn[14]
AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepInBtn
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 47
Width = 26
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = DepOutBtnClick
Spacing = 0
TabOrder = 2
end
object InBtn: TBitBtn[15]
AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepOutBtn
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = OutBtn
Left = 187
Height = 26
Top = 105
Width = 26
BorderSpacing.Top = 32
BorderSpacing.Bottom = 4
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = InBtnClick
Spacing = 0
TabOrder = 4
end
object OutBtn: TBitBtn[16]
AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = InBtn
AnchorSideTop.Side = asrBottom
Left = 187
Height = 26
Top = 135
Width = 26
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = OutBtnClick
Spacing = 0
TabOrder = 5
end
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.Side = asrBottom
Left = 177
Height = 25
Top = 165
Width = 46
AutoSize = True
BorderSpacing.Top = 4
Caption = 'ALL'
OnClick = AllBtnClick
TabOrder = 6
end
end end
object ResetBtn: TButton inherited ParamsSplitter: TSplitter
AnchorSideRight.Control = ComputeBtn Left = 413
AnchorSideBottom.Control = Owner Height = 430
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 end
object CloseBtn: TButton object SaveDialog: TSaveDialog[2]
AnchorSideRight.Control = Owner Left = 45
AnchorSideRight.Side = asrBottom Top = 357
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.Side = asrBottom
AnchorSideTop.Control = Label3
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1
AnchorSideBottom.Control = Bevel1
Left = 292
Height = 250
Top = 114
Width = 198
Anchors = [akTop, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 2
BorderSpacing.Right = 16
ItemHeight = 0
OnSelectionChange = VarListSelectionChange
TabOrder = 7
end
object DepOutBtn: TBitBtn
AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = DepInBtn
AnchorSideTop.Side = asrBottom
Left = 247
Height = 28
Top = 57
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = DepOutBtnClick
Spacing = 0
TabOrder = 2
end
object InBtn: TBitBtn
AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter
AnchorSideBottom.Control = OutBtn
Left = 247
Height = 28
Top = 193
Width = 28
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 4
Images = MainDataModule.ImageList
ImageIndex = 1
OnClick = InBtnClick
Spacing = 0
TabOrder = 4
end
object OutBtn: TBitBtn
AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = IndepVars
AnchorSideTop.Side = asrCenter
Left = 247
Height = 28
Top = 225
Width = 28
BorderSpacing.Top = 4
Images = MainDataModule.ImageList
ImageIndex = 0
OnClick = OutBtnClick
Spacing = 0
TabOrder = 5
end
object AllBtn: TBitBtn
AnchorSideTop.Control = OutBtn
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = IndepVars
Left = 238
Height = 25
Top = 257
Width = 46
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Top = 4
Caption = 'ALL'
OnClick = AllBtnClick
TabOrder = 6
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
object Bevel1: TBevel
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = CloseBtn
Left = 0
Height = 8
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,34 +96,35 @@ 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;
begin begin
NCases := NoCases; NCases := NoCases;
SetLength(corrs,NoVariables+1,NoVariables+1); SetLength(corrs,NoVariables+1,NoVariables+1);
@ -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