LazStats: Inherit KendallTauUnit from TBasicStatsReportForm. Fix tab order in recently modified forms.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7811 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-10-26 16:06:42 +00:00
parent ded71d0f59
commit 02db991125
7 changed files with 835 additions and 904 deletions

View File

@ -793,7 +793,7 @@
<Unit86> <Unit86>
<Filename Value="forms\analysis\nonparametric\kendalltauunit.pas"/> <Filename Value="forms\analysis\nonparametric\kendalltauunit.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="KendallTauFrm"/> <ComponentName Value="KendallTauForm"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="KendallTauUnit"/> <UnitName Value="KendallTauUnit"/>

View File

@ -1,108 +1,122 @@
object KendallTauFrm: TKendallTauFrm inherited KendallTauForm: TKendallTauForm
Left = 719 Left = 719
Height = 379 Height = 361
Top = 350 Top = 350
Width = 396 Width = 415
HelpType = htKeyword HelpType = htKeyword
HelpKeyword = 'html/KendallsTauandPartialTau.htm' HelpKeyword = 'html/KendallsTauandPartialTau.htm'
AutoSize = True
Caption = 'Kendall Rank Correlation Tau and Partial Tau' Caption = 'Kendall Rank Correlation Tau and Partial Tau'
ClientHeight = 379 ClientHeight = 361
ClientWidth = 396 ClientWidth = 415
OnActivate = FormActivate inherited ParamsPanel: TPanel
OnCreate = FormCreate Height = 345
OnShow = FormShow ClientHeight = 345
Position = poMainFormCenter inherited CloseBtn: TButton
LCLVersion = '2.1.0.0' Top = 320
object Label1: TLabel TabOrder = 14
AnchorSideLeft.Control = Owner end
AnchorSideTop.Control = Owner inherited ComputeBtn: TButton
Left = 8 Top = 320
TabOrder = 13
end
inherited ResetBtn: TButton
Top = 320
TabOrder = 12
end
inherited HelpBtn: TButton
Top = 320
TabOrder = 11
end
inherited ButtonBevel: TBevel
Top = 304
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 Caption = 'Available Variables'
BorderSpacing.Top = 8
Caption = 'Variables Available'
ParentColor = False ParentColor = False
end end
object Label2: TLabel object Label2: TLabel[6]
AnchorSideLeft.Control = XEdit AnchorSideLeft.Control = XEdit
AnchorSideBottom.Control = XEdit AnchorSideBottom.Control = XEdit
Left = 220 Left = 164
Height = 15 Height = 15
Top = 33 Top = 21
Width = 51 Width = 51
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'X Variable' Caption = 'X Variable'
ParentColor = False ParentColor = False
end end
object Label3: TLabel object Label3: TLabel[7]
AnchorSideLeft.Control = YEdit AnchorSideLeft.Control = YEdit
AnchorSideBottom.Control = YEdit AnchorSideBottom.Control = YEdit
Left = 220 Left = 164
Height = 15 Height = 15
Top = 117 Top = 101
Width = 51 Width = 51
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Y Variable' Caption = 'Y Variable'
ParentColor = False ParentColor = False
end end
object Label4: TLabel object Label4: TLabel[8]
AnchorSideLeft.Control = ZEdit AnchorSideLeft.Control = ZEdit
AnchorSideBottom.Control = ZEdit AnchorSideBottom.Control = ZEdit
Left = 220 Left = 164
Height = 15 Height = 15
Top = 201 Top = 181
Width = 51 Width = 51
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Z Variable' Caption = 'Z Variable'
ParentColor = False ParentColor = False
end end
object VarList: TListBox object VarList: TListBox[9]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = Label1 AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = XIn AnchorSideRight.Control = XIn
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = ButtonBevel
Left = 8 Left = 0
Height = 303 Height = 287
Top = 25 Top = 17
Width = 168 Width = 126
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 8 BorderSpacing.Right = 6
ItemHeight = 0 ItemHeight = 0
OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 0 TabOrder = 0
end end
object XIn: TBitBtn object XIn: TBitBtn[10]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VarList AnchorSideTop.Control = VarList
Left = 184 Left = 132
Height = 28 Height = 26
Top = 25 Top = 17
Width = 28 Width = 26
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 1 ImageIndex = 1
OnClick = XInClick OnClick = XInClick
Spacing = 0 Spacing = 0
TabOrder = 1 TabOrder = 1
end end
object XOut: TBitBtn object XOut: TBitBtn[11]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = XIn AnchorSideTop.Control = XIn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 184 Left = 132
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
@ -110,15 +124,15 @@ object KendallTauFrm: TKendallTauFrm
Spacing = 0 Spacing = 0
TabOrder = 2 TabOrder = 2
end end
object YIn: TBitBtn object YIn: TBitBtn[12]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = XOut AnchorSideTop.Control = XOut
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 184 Left = 132
Height = 28 Height = 26
Top = 109 Top = 97
Width = 28 Width = 26
BorderSpacing.Top = 24 BorderSpacing.Top = 24
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 1 ImageIndex = 1
@ -126,15 +140,15 @@ object KendallTauFrm: TKendallTauFrm
Spacing = 0 Spacing = 0
TabOrder = 4 TabOrder = 4
end end
object YOut: TBitBtn object YOut: TBitBtn[13]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = YIn AnchorSideTop.Control = YIn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 184 Left = 132
Height = 28 Height = 26
Top = 141 Top = 127
Width = 28 Width = 26
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 0 ImageIndex = 0
@ -142,15 +156,15 @@ object KendallTauFrm: TKendallTauFrm
Spacing = 0 Spacing = 0
TabOrder = 5 TabOrder = 5
end end
object ZIn: TBitBtn object ZIn: TBitBtn[14]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = YOut AnchorSideTop.Control = YOut
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 184 Left = 132
Height = 28 Height = 26
Top = 193 Top = 177
Width = 28 Width = 26
BorderSpacing.Top = 24 BorderSpacing.Top = 24
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 1 ImageIndex = 1
@ -158,15 +172,15 @@ object KendallTauFrm: TKendallTauFrm
Spacing = 0 Spacing = 0
TabOrder = 7 TabOrder = 7
end end
object ZOut: TBitBtn object ZOut: TBitBtn[15]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = ZIn AnchorSideTop.Control = ZIn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 184 Left = 132
Height = 28 Height = 26
Top = 225 Top = 207
Width = 28 Width = 26
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 0 ImageIndex = 0
@ -174,71 +188,67 @@ object KendallTauFrm: TKendallTauFrm
Spacing = 0 Spacing = 0
TabOrder = 8 TabOrder = 8
end end
object XEdit: TEdit object XEdit: TEdit[16]
AnchorSideLeft.Control = XIn AnchorSideLeft.Control = XIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = XOut AnchorSideBottom.Control = XOut
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 220 Left = 164
Height = 23 Height = 23
Top = 50 Top = 38
Width = 168 Width = 127
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 6
BorderSpacing.Right = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 3 TabOrder = 3
Text = 'XEdit' Text = 'XEdit'
end end
object YEdit: TEdit object YEdit: TEdit[17]
AnchorSideLeft.Control = YIn AnchorSideLeft.Control = YIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = YOut AnchorSideBottom.Control = YOut
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 220 Left = 164
Height = 23 Height = 23
Top = 134 Top = 118
Width = 168 Width = 127
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 6
BorderSpacing.Right = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 6 TabOrder = 6
Text = 'Edit1' Text = 'YEdit'
end end
object ZEdit: TEdit object ZEdit: TEdit[18]
AnchorSideLeft.Control = ZIn AnchorSideLeft.Control = ZIn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ZOut AnchorSideBottom.Control = ZOut
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 220 Left = 164
Height = 23 Height = 23
Top = 218 Top = 198
Width = 168 Width = 127
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 6
BorderSpacing.Right = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 9 TabOrder = 9
Text = 'Edit1' Text = 'ZEdit'
end end
object OptionsGroup: TGroupBox object OptionsGroup: TGroupBox[19]
AnchorSideLeft.Control = XEdit AnchorSideLeft.Control = ZOut
AnchorSideTop.Control = ZOut AnchorSideTop.Control = ZOut
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = Bevel1 Left = 134
Left = 222
Height = 45 Height = 45
Top = 277 Top = 257
Width = 150 Width = 150
AutoSize = True AutoSize = True
BorderSpacing.Left = 2 BorderSpacing.Left = 2
@ -260,72 +270,8 @@ object KendallTauFrm: TKendallTauFrm
TabOrder = 0 TabOrder = 0
end end
end end
object ResetBtn: TButton
AnchorSideRight.Control = ComputeBtn
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 187
Height = 25
Top = 346
Width = 54
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 32
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 11
end end
object ComputeBtn: TButton inherited ParamsSplitter: TSplitter
AnchorSideRight.Control = CloseBtn Height = 361
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 249
Height = 25
Top = 346
Width = 76
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 12
end
object CloseBtn: TButton
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 333
Height = 25
Top = 346
Width = 55
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Close'
ModalResult = 11
TabOrder = 13
end
object Bevel1: TBevel
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = CloseBtn
Left = 0
Height = 8
Top = 330
Width = 396
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Top = 2
Shape = bsBottomLine
end end
end end

View File

@ -7,19 +7,15 @@ unit KendallTauUnit;
interface interface
uses uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, ExtCtrls, StdCtrls, Buttons, ExtCtrls,
MainUnit, OutputUnit, FunctionsLib, Globals, DataProcs, MatrixLib; MainUnit, FunctionsLib, Globals, MatrixLib, BasicStatsReportFormUnit;
type type
{ TKendallTauFrm } { TKendallTauForm }
TKendallTauFrm = class(TForm) TKendallTauForm = class(TBasicStatsReportForm)
Bevel1: TBevel;
ResetBtn: TButton;
ComputeBtn: TButton;
CloseBtn: TButton;
RanksChk: TCheckBox; RanksChk: TCheckBox;
OptionsGroup: TGroupBox; OptionsGroup: TGroupBox;
XEdit: TEdit; XEdit: TEdit;
@ -36,12 +32,8 @@ type
ZOut: TBitBtn; ZOut: TBitBtn;
Label1: TLabel; Label1: TLabel;
VarList: TListBox; VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject); procedure VarListDblClick(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure VarListSelectionChange(Sender: TObject; User: boolean);
procedure XInClick(Sender: TObject); procedure XInClick(Sender: TObject);
procedure XOutClick(Sender: TObject); procedure XOutClick(Sender: TObject);
procedure YInClick(Sender: TObject); procedure YInClick(Sender: TObject);
@ -49,152 +41,54 @@ type
procedure ZInClick(Sender: TObject); procedure ZInClick(Sender: TObject);
procedure ZOutClick(Sender: TObject); procedure ZOutClick(Sender: TObject);
private private
{ private declarations }
FAutoSized: Boolean; protected
procedure UpdateBtnStates; procedure AdjustConstraints; override;
procedure Compute; override;
procedure UpdateBtnStates; override;
function Validate(out AMsg: String; out AControl: TWinControl): Boolean; override;
public public
{ public declarations } procedure Reset; override;
end; end;
var var
KendallTauFrm: TKendallTauFrm; KendallTauForm: TKendallTauForm;
implementation implementation
{$R *.lfm}
uses uses
Math; Math,
GridProcs, MatrixUnit;
{ TKendallTauFrm } { TKendallTauForm }
procedure TKendallTauFrm.ResetBtnClick(Sender: TObject); procedure TKendallTauForm.AdjustConstraints;
begin
inherited;
ParamsPanel.Constraints.MinWidth := Max(
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
OptionsGroup.Width * 2 - XIn.Width);
ParamsPanel.Constraints.MinHeight := OptionsGroup.Top + OptionsGroup.Height +
ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
end;
procedure TKendallTauForm.Compute;
var var
i: integer; Ranks: DblDyneMat = nil;
begin X: DblDyneMat = nil;
XEdit.Text := ''; Index: IntDyneMat = nil;
YEdit.Text := ''; ColLabels: StrDyneVec = nil;
ZEdit.Text := ''; RowLabels: StrDyneVec = nil;
RanksChk.Checked := false; ColNoSelected: IntdyneVec = nil;
VarList.Items.Clear; i, j, k, NoTies, NoSelected : integer;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
UpdateBtnStates;
end;
procedure TKendallTauFrm.VarListSelectionChange(Sender: TObject; User: boolean);
begin
UpdateBtnStates;
end;
procedure TKendallTauFrm.XInClick(Sender: TObject);
var
index: integer;
begin
index := VarList.ItemIndex;
if (index > -1) and (XEdit.Text = '') then
begin
XEdit.Text := VarList.Items[index];
VarList.Items.Delete(index);
end;
UpdateBtnStates;
end;
procedure TKendallTauFrm.XOutClick(Sender: TObject);
begin
if XEdit.Text <> '' then
begin
VarList.Items.Add(XEdit.Text);
XEdit.Text := '';
end;
UpdateBtnStates;
end;
procedure TKendallTauFrm.YInClick(Sender: TObject);
var
index: integer;
begin
index := VarList.ItemIndex;
if (index > -1) and (YEdit.Text = '') then
begin
YEdit.Text := VarList.Items[index];
VarList.Items.Delete(index);
end;
UpdateBtnStates;
end;
procedure TKendallTauFrm.YOutClick(Sender: TObject);
begin
if YEdit.Text <> '' then
begin
VarList.Items.Add(YEdit.Text);
YEdit.Text := '';
end;
UpdateBtnStates;
end;
procedure TKendallTauFrm.ZInClick(Sender: TObject);
var
index: integer;
begin
index := VarList.ItemIndex;
if (index > -1) and (ZEdit.Text = '') then
begin
ZEdit.Text := VarList.Items[index];
VarList.Items.Delete(index);
end;
UpdateBtnStates;
end;
procedure TKendallTauFrm.ZOutClick(Sender: TObject);
begin
if ZEdit.Text <> '' then
begin
VarList.Items.Add(YEdit.Text);
ZEdit.Text := '';
end;
UpdateBtnStates;
end;
procedure TKendallTauFrm.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.MinHeight := OptionsGroup.Top + OptionsGroup.Height - VarList.Top;
Constraints.MinWidth := OptionsGroup.Width * 2 + XIn.Width + 4 * VarList.BorderSpacing.Left;
Constraints.MinHeight := Height;
FAutoSized := True;
end;
procedure TKendallTauFrm.FormCreate(Sender: TObject);
begin
Assert(OS3MainFrm <> nil);
end;
procedure TKendallTauFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TKendallTauFrm.ComputeBtnClick(Sender: TObject);
var
i, j, k, itemp, NoTies, NoSelected : integer;
col1, col2, col3, NCases : integer; col1, col2, col3, NCases : integer;
index : IntDyneMat; Probability, TieSum, Avg, SumT: double;
Probability, Temp, TieSum, Avg, SumT: double;
z, denominator, stddev : double; z, denominator, stddev : double;
Ranks, X : DblDyneMat;
cellstring: string;
ColNoSelected : IntdyneVec;
ColLabels : StrDyneVec;
RowLabels : StrDyneVec;
TauXY, TauXZ, TauYZ : double; TauXY, TauXZ, TauYZ : double;
Tx, Ty, Tz : double; Tx, Ty, Tz : double;
Term1, Term2 : double; Term1, Term2 : double;
@ -202,96 +96,71 @@ var
title : string; title : string;
lReport: TStrings; lReport: TStrings;
begin begin
if XEdit.Text = '' then
begin
MessageDlg('X variable not selected.', mtError, [mbOK], 0);
exit;
end;
if YEdit.Text = '' then
begin
MessageDlg('Y variable not selected.', mtError, [mbOK], 0);
exit;
end;
// Allocate memory // Allocate memory
SetLength(index,NoCases,3); SetLength(index, NoCases, 3);
SetLength(Ranks,NoCases,3); SetLength(Ranks, NoCases, 3);
SetLength(X,NoCases,3); SetLength(X, NoCases, 3);
SetLength(ColLabels,3); SetLength(ColLabels, 3);
SetLength(RowLabels,NoCases); SetLength(RowLabels, NoCases);
SetLength(ColNoSelected,NoVariables); SetLength(ColNoSelected, NoVariables);
Tx := 0.0; Tx := 0.0;
Ty := 0.0; Ty := 0.0;
Tz := 0.0; Tz := 0.0;
// Get column numbers and labels of variables selected // Get column numbers and labels of variables selected
NoSelected := 0; NoSelected := 0;
for j := 1 to NoVariables do ColNoSelected[0] := GetVariableIndex(OS3MainFrm.DataGrid, XEdit.Text);
begin if ColNoSelected[0] > -1 then inc(NoSelected);
cellstring := OS3MainFrm.DataGrid.Cells[j,0]; ColNoSelected[1] := GetVariableIndex(OS3MainFrm.DataGrid, YEdit.Text);
if cellstring = Xedit.Text then if ColNoSelected[1] > -1 then inc(NoSelected);
begin ColNoSelected[2] := GetVariableIndex(OS3MainFrm.DataGrid, ZEdit.Text);
ColNoSelected[0] := j; if ColNoSelected[2] > -1 then inc(NoSelected);
ColLabels[0] := cellstring; SetLength(ColNoSelected, NoSelected);
NoSelected := NoSelected + 1;
end; col1 := ColNoSelected[0];
if cellstring = Yedit.Text then col2 := ColNoSelected[1];
begin if NoSelected = 3 then col3 := ColNoSelected[2] else col3 := -1;
ColNoSelected[1] := j;
ColLabels[1] := cellstring;
NoSelected := NoSelected + 1;
end;
if cellstring = Zedit.Text then
begin
ColNoSelected[2] := j;
ColLabels[2] := cellstring;
NoSelected := NoSelected + 1;
end;
end;
// Get scores // Get scores
NCases := 0; NCases := 0;
for i := 1 to NoCases do for i := 1 to NoCases do
begin begin
if ( not GoodRecord(i,NoSelected,ColNoSelected)) then continue; if not GoodRecord(OS3MainFrm.DataGrid, i, ColNoSelected) then continue;
NCases := NCases + 1; NCases := NCases + 1;
col1 := ColNoSelected[0]; X[NCases-1, 0] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col1, i]));
col2 := ColNoSelected[1]; Ranks[NCases-1, 0] := X[NCases-1, 0];
if NoSelected = 3 then col3 := ColNoSelected[2]; X[NCases-1, 1] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col2, i]));
X[NCases-1,0] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col1,i])); Ranks[NCases-1, 1] := X[NCases-1, 1];
Ranks[NCases-1,0] := X[NCases-1,0];
X[NCases-1,1] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col2,i]));
Ranks[NCases-1,1] := X[NCases-1,1];
if NoSelected = 3 then if NoSelected = 3 then
begin begin
X[NCases-1,2] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col3,i])); X[NCases-1, 2] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col3, i]));
Ranks[NCases-1,2] := X[NCases-1,2]; Ranks[NCases-1, 2] := X[NCases-1, 2];
end; end;
index[NCases-1,0] := NCases; index[NCases-1, 0] := NCases;
index[NCases-1,1] := NCases; index[NCases-1, 1] := NCases;
if NoSelected = 3 then index[NCases-1,2] := NCases; if NoSelected = 3 then index[NCases-1, 2] := NCases;
end; end;
for i := 0 to NCases - 1 do RowLabels[i] := IntToStr(i+1); for i := 0 to NCases - 1 do
RowLabels[i] := IntToStr(i+1);
// Rank the first variable (X) // Rank the first variable (X)
for i := 0 to NCases - 2 do for i := 0 to NCases - 2 do
begin begin
for j := i + 1 to NCases-1 do for j := i + 1 to NCases-1 do
begin begin
if (Ranks[i,0] > Ranks[j,0]) then // swap if (Ranks[i,0] > Ranks[j, 0]) then // swap
begin begin
Temp := Ranks[i,0]; Exchange(Ranks[i, 0], Ranks[j, 0]);
Ranks[i,0] := Ranks[j,0]; Exchange(Index[i, 0], Index[j, 0]);
Ranks[j,0] := Temp;
itemp := index[i,0];
index[i,0] := index[j,0];
index[j,0] := itemp;
end; end;
end; end;
end; end;
// Assign ranks // Assign ranks
for i := 0 to NCases-1 do Ranks[i,0] := i+1; for i := 0 to NCases-1 do
Ranks[i,0] := i+1;
// Check for ties in each // Check for ties in each
i := 1; i := 1;
@ -332,12 +201,8 @@ begin
begin begin
if (Ranks[i,1] > Ranks[j,1]) then // swap if (Ranks[i,1] > Ranks[j,1]) then // swap
begin begin
Temp := Ranks[i,1]; Exchange(Ranks[i, 1], Ranks[j, 1]);
Ranks[i,1] := Ranks[j,1]; Exchange(index[i, 1], Index[j, 1]);
Ranks[j,1] := Temp;
itemp := index[i,1];
index[i,1] := index[j,1];
index[j,1] := itemp;
end; end;
end; end;
end; end;
@ -354,7 +219,7 @@ begin
NoTies := 0; NoTies := 0;
while (j <= NoCases) do while (j <= NoCases) do
begin begin
if (X[j-1,1] > X[i-1,1]) then if (X[j-1, 1] > X[i-1, 1]) then
Break; Break;
if (X[j-1,1] = X[i-1,1]) then if (X[j-1,1] = X[i-1,1]) then
begin begin
@ -386,12 +251,8 @@ begin
begin begin
if (Ranks[i,2] > Ranks[j,2]) then // swap if (Ranks[i,2] > Ranks[j,2]) then // swap
begin begin
Temp := Ranks[i,2]; Exchange(Ranks[i, 2], Ranks[j, 2]);
Ranks[i,2] := Ranks[j,2]; Exchange(Index[i, 2], Index[j, 2]);
Ranks[j,2] := Temp;
itemp := index[i,2];
index[i,2] := index[j,2];
index[j,2] := itemp;
end; end;
end; end;
end; end;
@ -441,12 +302,8 @@ begin
begin begin
if (index[i-1,k-1] > index[j-1,k-1]) then // swap if (index[i-1,k-1] > index[j-1,k-1]) then // swap
begin begin
itemp := index[i-1,k-1]; Exchange(Index[i-1, k-1], Index[j-1, k-1]);
index[i-1,k-1] := index[j-1,k-1]; Exchange(Ranks[i-1, k-1], Ranks[j-1, k-1]);
index[j-1,k-1] := itemp;
Temp := Ranks[i-1,k-1];
Ranks[i-1,k-1] := Ranks[j-1,k-1];
Ranks[j-1,k-1] := Temp;
end; end;
end; end;
end; end;
@ -461,28 +318,21 @@ begin
begin begin
if (Ranks[i,0] > Ranks[j,0]) then // swap if (Ranks[i,0] > Ranks[j,0]) then // swap
begin begin
Temp := Ranks[i,0]; Exchange(Ranks[i, 0], Ranks[j, 0]);
Ranks[i,0] := Ranks[j,0]; Exchange(Ranks[i, 1], Ranks[j, 1]);
Ranks[j,0] := Temp;
Temp := Ranks[i,1];
Ranks[i,1] := Ranks[j,1];
Ranks[j,1] := Temp;
if NoSelected = 3 then if NoSelected = 3 then
begin Exchange(Ranks[i, 2], Ranks[j, 2]);
Temp := Ranks[i,2]; Exchange(Index[i, 0], Index[j, 0]);
Ranks[i,2] := Ranks[j,2];
Ranks[j,2] := Temp;
end;
itemp := index[i,0];
index[i,0] := index[j,0];
index[j,0] := itemp;
end; end;
end; end;
end; end;
for i := 0 to NCases - 2 do for i := 0 to NCases - 2 do
for j := i + 1 to NCases - 1 do for j := i + 1 to NCases - 1 do
if Ranks[i,1] < Ranks[j,1] then SumT := SumT + 1.0 if Ranks[i,1] < Ranks[j,1] then
else if Ranks[i,1] > Ranks[j,1] then SumT := SumT - 1.0; SumT := SumT + 1.0
else if Ranks[i,1] > Ranks[j,1] then
SumT := SumT - 1.0;
Term1 := sqrt((NCases * (NCases-1)) / 2.0 - Tx); Term1 := sqrt((NCases * (NCases-1)) / 2.0 - Tx);
Term2 := sqrt((NCases * (Ncases-1)) / 2.0 - Ty); Term2 := sqrt((NCases * (Ncases-1)) / 2.0 - Ty);
denominator := Term1 * Term2; denominator := Term1 * Term2;
@ -494,8 +344,10 @@ begin
SumT := 0.0; SumT := 0.0;
for i := 0 to NCases - 2 do for i := 0 to NCases - 2 do
for j := i + 1 to NCases - 1 do for j := i + 1 to NCases - 1 do
if Ranks[i,2] < Ranks[j,2] then SumT := SumT + 1.0 if Ranks[i,2] < Ranks[j,2] then
else if Ranks[i,2] > Ranks[j,2] then SumT := SumT - 1.0; SumT := SumT + 1.0
else if Ranks[i,2] > Ranks[j,2] then
SumT := SumT - 1.0;
Term1 := sqrt((NCases * (NCases-1)) / 2.0 - Tx); Term1 := sqrt((NCases * (NCases-1)) / 2.0 - Tx);
Term2 := sqrt((NCases * (Ncases-1)) / 2.0 - Tz); Term2 := sqrt((NCases * (Ncases-1)) / 2.0 - Tz);
denominator := Term1 * Term2; denominator := Term1 * Term2;
@ -508,18 +360,10 @@ begin
begin begin
if index[i,0] > index[j,0] then // swap if index[i,0] > index[j,0] then // swap
begin begin
Temp := Ranks[i,0]; Exchange(Ranks[i, 0], Ranks[j, 0]);
Ranks[i,0] := Ranks[j,0]; Exchange(Ranks[i, 1], Ranks[j, 1]);
Ranks[j,0] := temp; Exchange(Ranks[i, 2], Ranks[j, 2]);
Temp := Ranks[i,1]; Exchange(Index[i, 0], Index[j, 0]);
Ranks[i,1] := Ranks[j,1];
Ranks[j,1] := Temp;
Temp := Ranks[i,2];
Ranks[i,2] := Ranks[j,2];
Ranks[j,2] := Temp;
itemp := index[i,0];
index[i,0] := index[j,0];
index[j,0] := itemp;
end; end;
end; end;
end; end;
@ -531,15 +375,9 @@ begin
begin begin
if (Ranks[i,1] > Ranks[j,1]) then // swap if (Ranks[i,1] > Ranks[j,1]) then // swap
begin begin
Temp := Ranks[i,1]; Exchange(Ranks[i, 1], Ranks[j, 1]);
Ranks[i,1] := Ranks[j,1]; Exchange(Ranks[i, 2], Ranks[j, 2]);
Ranks[j,1] := Temp; Exchange(Index[i, 1], Index[j, 1]);
Temp := Ranks[i,2];
Ranks[i,2] := Ranks[j,2];
Ranks[j,2] := Temp;
itemp := index[i,1];
index[i,1] := index[j,1];
index[j,1] := itemp;
end; end;
end; end;
end; end;
@ -547,14 +385,15 @@ begin
SumT := 0.0; SumT := 0.0;
for i := 0 to NCases - 2 do for i := 0 to NCases - 2 do
for j := i + 1 to NCases - 1 do for j := i + 1 to NCases - 1 do
if Ranks[i,2] < Ranks[j,2] then SumT := SumT + 1.0 if Ranks[i,2] < Ranks[j,2] then
else if Ranks[i,2] > Ranks[j,2] then SumT := SumT - 1.0; SumT := SumT + 1.0
else if Ranks[i,2] > Ranks[j,2] then
SumT := SumT - 1.0;
Term1 := sqrt((NCases * (NCases-1)) / 2.0 - Ty); Term1 := sqrt((NCases * (NCases-1)) / 2.0 - Ty);
Term2 := sqrt((NCases * (Ncases-1)) / 2.0 - Tz); Term2 := sqrt((NCases * (Ncases-1)) / 2.0 - Tz);
denominator := Term1 * Term2; denominator := Term1 * Term2;
TauYZ := SumT / denominator; TauYZ := SumT / denominator;
PartialTau := (TauXY - TauXZ * TauYZ) / PartialTau := (TauXY - TauXZ * TauYZ) / (sqrt(1.0 - sqr(TauXZ)) * sqrt(1.0 - sqr(TauYZ)));
(sqrt(1.0 - sqr(TauXZ)) * sqrt(1.0 - sqr(TauYZ)));
end; end;
lReport := TStringList.Create; lReport := TStringList.Create;
@ -599,23 +438,36 @@ begin
MatPrint(Ranks, NCases, 3, title, RowLabels, ColLabels, NCases, lReport); MatPrint(Ranks, NCases, 3, title, RowLabels, ColLabels, NCases, lReport);
end; end;
DisplayReport(lReport); FReportFrame.DisplayReport(lReport);
finally finally
lReport.Free; lReport.Free;
ColNoSelected := nil;
RowLabels := nil;
ColLabels := nil;
X := nil;
Ranks := nil;
index := nil;
end; end;
end; end;
procedure TKendallTauFrm.UpdateBtnStates;
procedure TKendallTauForm.Reset;
var
i: integer;
begin
inherited;
XEdit.Clear;
YEdit.Clear;
ZEdit.Clear;
VarList.Items.Clear;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
RanksChk.Checked := false;
UpdateBtnStates;
end;
procedure TKendallTauForm.UpdateBtnStates;
var var
i: Integer; i: Integer;
lSelected: Boolean; lSelected: Boolean;
begin begin
inherited;
lSelected := false; lSelected := false;
for i:=0 to VarList.Items.Count-1 do for i:=0 to VarList.Items.Count-1 do
if VarList.Selected[i] then if VarList.Selected[i] then
@ -631,8 +483,129 @@ begin
ZOut.Enabled := (ZEdit.Text <> ''); ZOut.Enabled := (ZEdit.Text <> '');
end; end;
initialization
{$I kendalltauunit.lrs} function TKendallTauForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
begin
Result := false;
if XEdit.Text = '' then
begin
AMsg := 'X variable not selected.';
AControl := XEdit;
exit;
end;
if YEdit.Text = '' then
begin
AMsg := 'Y variable not selected.';
AControl := YEdit;
exit;
end;
Result := true;
end;
procedure TKendallTauForm.VarListSelectionChange(Sender: TObject; User: boolean);
begin
UpdateBtnStates;
end;
procedure TKendallTauForm.VarListDblClick(Sender: TObject);
var
index: Integer;
s: String;
begin
index := VarList.ItemIndex;
if index > -1 then
begin
s := VarList.Items[index];
if XEdit.Text = '' then
XEdit.Text := s
else
if YEdit.Text = '' then
YEdit.Text := s
else
if ZEdit.Text = '' then
ZEdit.Text := s;
Varlist.Items.Delete(index);
UpdateBtnStates;
end;
end;
procedure TKendallTauForm.XInClick(Sender: TObject);
var
index: integer;
begin
index := VarList.ItemIndex;
if (index > -1) and (XEdit.Text = '') then
begin
XEdit.Text := VarList.Items[index];
VarList.Items.Delete(index);
end;
UpdateBtnStates;
end;
procedure TKendallTauForm.XOutClick(Sender: TObject);
begin
if XEdit.Text <> '' then
begin
VarList.Items.Add(XEdit.Text);
XEdit.Text := '';
end;
UpdateBtnStates;
end;
procedure TKendallTauForm.YInClick(Sender: TObject);
var
index: integer;
begin
index := VarList.ItemIndex;
if (index > -1) and (YEdit.Text = '') then
begin
YEdit.Text := VarList.Items[index];
VarList.Items.Delete(index);
end;
UpdateBtnStates;
end;
procedure TKendallTauForm.YOutClick(Sender: TObject);
begin
if YEdit.Text <> '' then
begin
VarList.Items.Add(YEdit.Text);
YEdit.Text := '';
end;
UpdateBtnStates;
end;
procedure TKendallTauForm.ZInClick(Sender: TObject);
var
index: integer;
begin
index := VarList.ItemIndex;
if (index > -1) and (ZEdit.Text = '') then
begin
ZEdit.Text := VarList.Items[index];
VarList.Items.Delete(index);
end;
UpdateBtnStates;
end;
procedure TKendallTauForm.ZOutClick(Sender: TObject);
begin
if ZEdit.Text <> '' then
begin
VarList.Items.Add(YEdit.Text);
ZEdit.Text := '';
end;
UpdateBtnStates;
end;
end. end.

View File

@ -11,15 +11,19 @@ inherited SignTestFrm: TSignTestFrm
ClientHeight = 329 ClientHeight = 329
inherited CloseBtn: TButton inherited CloseBtn: TButton
Top = 304 Top = 304
TabOrder = 10
end end
inherited ComputeBtn: TButton inherited ComputeBtn: TButton
Top = 304 Top = 304
TabOrder = 9
end end
inherited ResetBtn: TButton inherited ResetBtn: TButton
Top = 304 Top = 304
TabOrder = 8
end end
inherited HelpBtn: TButton inherited HelpBtn: TButton
Top = 304 Top = 304
TabOrder = 7
end end
inherited ButtonBevel: TBevel inherited ButtonBevel: TBevel
Top = 288 Top = 288
@ -74,7 +78,7 @@ inherited SignTestFrm: TSignTestFrm
ItemHeight = 0 ItemHeight = 0
OnDblClick = VarListDblClick OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 4 TabOrder = 0
end end
object Var1In: TBitBtn[9] object Var1In: TBitBtn[9]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -88,7 +92,7 @@ inherited SignTestFrm: TSignTestFrm
ImageIndex = 1 ImageIndex = 1
OnClick = Var1InClick OnClick = Var1InClick
Spacing = 0 Spacing = 0
TabOrder = 5 TabOrder = 1
end end
object Var1Out: TBitBtn[10] object Var1Out: TBitBtn[10]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -104,7 +108,7 @@ inherited SignTestFrm: TSignTestFrm
ImageIndex = 0 ImageIndex = 0
OnClick = Var1OutClick OnClick = Var1OutClick
Spacing = 0 Spacing = 0
TabOrder = 6 TabOrder = 2
end end
object Var2In: TBitBtn[11] object Var2In: TBitBtn[11]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -120,7 +124,7 @@ inherited SignTestFrm: TSignTestFrm
ImageIndex = 1 ImageIndex = 1
OnClick = Var2InClick OnClick = Var2InClick
Spacing = 0 Spacing = 0
TabOrder = 7 TabOrder = 4
end end
object Var2Out: TBitBtn[12] object Var2Out: TBitBtn[12]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -136,7 +140,7 @@ inherited SignTestFrm: TSignTestFrm
ImageIndex = 0 ImageIndex = 0
OnClick = Var2OutClick OnClick = Var2OutClick
Spacing = 0 Spacing = 0
TabOrder = 8 TabOrder = 5
end end
object Var1Edit: TEdit[13] object Var1Edit: TEdit[13]
AnchorSideLeft.Control = Var1In AnchorSideLeft.Control = Var1In
@ -153,7 +157,7 @@ inherited SignTestFrm: TSignTestFrm
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 9 TabOrder = 3
Text = 'Var1Edit' Text = 'Var1Edit'
end end
object Var2Edit: TEdit[14] object Var2Edit: TEdit[14]
@ -171,7 +175,7 @@ inherited SignTestFrm: TSignTestFrm
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 10 TabOrder = 6
Text = 'Var2Edit' Text = 'Var2Edit'
end end
end end

View File

@ -13,15 +13,19 @@ inherited SpearmanForm: TSpearmanForm
ClientHeight = 331 ClientHeight = 331
inherited CloseBtn: TButton inherited CloseBtn: TButton
Top = 306 Top = 306
TabOrder = 10
end end
inherited ComputeBtn: TButton inherited ComputeBtn: TButton
Top = 306 Top = 306
TabOrder = 9
end end
inherited ResetBtn: TButton inherited ResetBtn: TButton
Top = 306 Top = 306
TabOrder = 8
end end
inherited HelpBtn: TButton inherited HelpBtn: TButton
Top = 306 Top = 306
TabOrder = 7
end end
inherited ButtonBevel: TBevel inherited ButtonBevel: TBevel
Top = 290 Top = 290
@ -78,7 +82,7 @@ inherited SpearmanForm: TSpearmanForm
ItemHeight = 0 ItemHeight = 0
OnDblClick = VarListDblClick OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 4 TabOrder = 0
end end
object XIn: TBitBtn[9] object XIn: TBitBtn[9]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -92,7 +96,7 @@ inherited SpearmanForm: TSpearmanForm
ImageIndex = 1 ImageIndex = 1
OnClick = XInClick OnClick = XInClick
Spacing = 0 Spacing = 0
TabOrder = 5 TabOrder = 1
end end
object XOut: TBitBtn[10] object XOut: TBitBtn[10]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -108,7 +112,7 @@ inherited SpearmanForm: TSpearmanForm
ImageIndex = 0 ImageIndex = 0
OnClick = XOutClick OnClick = XOutClick
Spacing = 0 Spacing = 0
TabOrder = 6 TabOrder = 2
end end
object YIn: TBitBtn[11] object YIn: TBitBtn[11]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -124,7 +128,7 @@ inherited SpearmanForm: TSpearmanForm
ImageIndex = 1 ImageIndex = 1
OnClick = YInClick OnClick = YInClick
Spacing = 0 Spacing = 0
TabOrder = 7 TabOrder = 4
end end
object YOut: TBitBtn[12] object YOut: TBitBtn[12]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -140,7 +144,7 @@ inherited SpearmanForm: TSpearmanForm
ImageIndex = 0 ImageIndex = 0
OnClick = YOutClick OnClick = YOutClick
Spacing = 0 Spacing = 0
TabOrder = 8 TabOrder = 5
end end
object XEdit: TEdit[13] object XEdit: TEdit[13]
AnchorSideLeft.Control = XIn AnchorSideLeft.Control = XIn
@ -157,7 +161,7 @@ inherited SpearmanForm: TSpearmanForm
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 9 TabOrder = 3
Text = 'XEdit' Text = 'XEdit'
end end
object YEdit: TEdit[14] object YEdit: TEdit[14]
@ -175,7 +179,7 @@ inherited SpearmanForm: TSpearmanForm
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 10 TabOrder = 6
Text = 'YEdit' Text = 'YEdit'
end end
end end

View File

@ -13,15 +13,19 @@ inherited WilcoxonForm: TWilcoxonForm
ClientHeight = 278 ClientHeight = 278
inherited CloseBtn: TButton inherited CloseBtn: TButton
Top = 253 Top = 253
TabOrder = 10
end end
inherited ComputeBtn: TButton inherited ComputeBtn: TButton
Top = 253 Top = 253
TabOrder = 9
end end
inherited ResetBtn: TButton inherited ResetBtn: TButton
Top = 253 Top = 253
TabOrder = 8
end end
inherited HelpBtn: TButton inherited HelpBtn: TButton
Top = 253 Top = 253
TabOrder = 7
end end
inherited ButtonBevel: TBevel inherited ButtonBevel: TBevel
Top = 237 Top = 237
@ -76,7 +80,7 @@ inherited WilcoxonForm: TWilcoxonForm
ItemHeight = 0 ItemHeight = 0
OnDblClick = VarListDblClick OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 4 TabOrder = 0
end end
object Var1In: TBitBtn[9] object Var1In: TBitBtn[9]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -90,7 +94,7 @@ inherited WilcoxonForm: TWilcoxonForm
ImageIndex = 1 ImageIndex = 1
OnClick = Var1InClick OnClick = Var1InClick
Spacing = 0 Spacing = 0
TabOrder = 5 TabOrder = 1
end end
object Var1Out: TBitBtn[10] object Var1Out: TBitBtn[10]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -106,7 +110,7 @@ inherited WilcoxonForm: TWilcoxonForm
ImageIndex = 0 ImageIndex = 0
OnClick = Var1OutClick OnClick = Var1OutClick
Spacing = 0 Spacing = 0
TabOrder = 6 TabOrder = 2
end end
object Var2In: TBitBtn[11] object Var2In: TBitBtn[11]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -122,7 +126,7 @@ inherited WilcoxonForm: TWilcoxonForm
ImageIndex = 1 ImageIndex = 1
OnClick = Var2InClick OnClick = Var2InClick
Spacing = 0 Spacing = 0
TabOrder = 7 TabOrder = 4
end end
object Var2Out: TBitBtn[12] object Var2Out: TBitBtn[12]
AnchorSideLeft.Control = ParamsPanel AnchorSideLeft.Control = ParamsPanel
@ -138,7 +142,7 @@ inherited WilcoxonForm: TWilcoxonForm
ImageIndex = 0 ImageIndex = 0
OnClick = Var2OutClick OnClick = Var2OutClick
Spacing = 0 Spacing = 0
TabOrder = 8 TabOrder = 5
end end
object Var1Edit: TEdit[13] object Var1Edit: TEdit[13]
AnchorSideLeft.Control = Var1In AnchorSideLeft.Control = Var1In
@ -156,7 +160,7 @@ inherited WilcoxonForm: TWilcoxonForm
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 9 TabOrder = 3
Text = 'Var1Edit' Text = 'Var1Edit'
end end
object Var2Edit: TEdit[14] object Var2Edit: TEdit[14]
@ -174,7 +178,7 @@ inherited WilcoxonForm: TWilcoxonForm
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
ReadOnly = True ReadOnly = True
TabOrder = 10 TabOrder = 6
Text = 'Var2Edit' Text = 'Var2Edit'
end end
end end

View File

@ -1904,9 +1904,9 @@ end;
// Menu "Analysis" > "Nonparametric" > Kendall's Tau and Partial Tau" // Menu "Analysis" > "Nonparametric" > Kendall's Tau and Partial Tau"
procedure TOS3MainFrm.mnuAnalysisNonPar_TauClick(Sender: TObject); procedure TOS3MainFrm.mnuAnalysisNonPar_TauClick(Sender: TObject);
begin begin
if KendallTauFrm = nil then if KendallTauForm = nil then
Application.CreateForm(TKendallTauFrm, KendallTauFrm); Application.CreateForm(TKendallTauForm, KendallTauForm);
KendallTauFrm.ShowModal; KendallTauForm.Show;
end; end;
// Menu "Analysis" > "Nonparametric" > "Kaplan-Meier Survival Analysis" // Menu "Analysis" > "Nonparametric" > "Kaplan-Meier Survival Analysis"