LazStats: Adding original source, part 8.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7887 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-11-16 11:23:17 +00:00
parent 819af1d403
commit eb017ea8b7
56 changed files with 16274 additions and 0 deletions

View File

@ -0,0 +1,42 @@
unit TypeUnit;
{$MODE Delphi}
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TTypeFrm = class(TForm)
TypeRG: TRadioGroup;
CancelBtn: TButton;
OKBtn: TButton;
procedure CancelBtnClick(Sender: TObject);
procedure OKBtnClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
ItemType : integer;
end;
var
TypeFrm: TTypeFrm;
implementation
{$R *.lfm}
procedure TTypeFrm.CancelBtnClick(Sender: TObject);
begin
TypeFrm.Hide;
end;
procedure TTypeFrm.OKBtnClick(Sender: TObject);
begin
TypeFrm.Hide;
end;
end.

View File

@ -0,0 +1,52 @@
object TypeFrm: TTypeFrm
Left = 126
Top = 120
HelpContext = 1830
BorderStyle = bsDialog
Caption = 'Item Type'
ClientHeight = 171
ClientWidth = 185
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
HelpFile = 'ITEMBANKHELP.HLP'
PixelsPerInch = 96
object TypeRG: TRadioGroup
Left = 8
Top = 8
Width = 169
Height = 113
Caption = 'Select the item type:'
ItemIndex = 0
Items.Strings = (
'Multiple Choice'
'True-False'
'Set of Matching Items'
'Essay'
'Fill in the Blank/Completion')
TabOrder = 0
end
object CancelBtn: TButton
Left = 8
Top = 136
Width = 73
Height = 25
Caption = 'Cancel'
ModalResult = 2
TabOrder = 1
OnClick = CancelBtnClick
end
object OKBtn: TButton
Left = 104
Top = 136
Width = 73
Height = 25
Caption = 'OK'
ModalResult = 1
TabOrder = 2
OnClick = OKBtnClick
end
end

View File

@ -0,0 +1,155 @@
object TestGenFrm: TTestGenFrm
Left = 173
Height = 283
Top = 97
Width = 310
Caption = 'Test Data Generation'
ClientHeight = 283
ClientWidth = 310
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 6
Height = 14
Top = 16
Width = 189
Caption = 'Number of item (Variables) to Generate'
ParentColor = False
end
object Label2: TLabel
Left = 7
Height = 14
Top = 47
Width = 200
Caption = 'Number of Subjects (Cases) to Generate:'
ParentColor = False
end
object Label3: TLabel
Left = 6
Height = 14
Top = 79
Width = 185
Caption = 'What is the desired Total Score Mean?'
ParentColor = False
end
object Label4: TLabel
Left = 6
Height = 14
Top = 113
Width = 214
Caption = 'What is the desired test standard deviation?'
ParentColor = False
end
object Label5: TLabel
Left = 7
Height = 14
Top = 144
Width = 166
Caption = 'What is the desired test reliability?'
ParentColor = False
end
object Options: TRadioGroup
Left = 7
Height = 57
Top = 174
Width = 210
AutoFill = True
Caption = 'Generate responses that are:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 39
ClientWidth = 206
Items.Strings = (
'True / False (dichotomous 0 or 1)'
'Contnuous'
)
TabOrder = 0
end
object NoItemsEdit: TEdit
Left = 231
Height = 21
Top = 10
Width = 41
OnKeyPress = NoItemsEditKeyPress
TabOrder = 1
Text = 'NoItemsEdit'
end
object NoCasesEdit: TEdit
Left = 231
Height = 21
Top = 41
Width = 41
OnKeyPress = NoCasesEditKeyPress
TabOrder = 2
Text = 'Edit1'
end
object MeanEdit: TEdit
Left = 231
Height = 21
Top = 73
Width = 41
OnKeyPress = MeanEditKeyPress
TabOrder = 3
Text = 'Edit1'
end
object SDEdit: TEdit
Left = 231
Height = 21
Top = 107
Width = 41
OnKeyPress = SDEditKeyPress
TabOrder = 4
Text = 'Edit1'
end
object RelEdit: TEdit
Left = 231
Height = 21
Top = 138
Width = 41
OnKeyPress = RelEditKeyPress
TabOrder = 5
Text = 'Edit1'
end
object ResetBtn: TButton
Left = 9
Height = 31
Top = 241
Width = 67
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 6
end
object CancelBtn: TButton
Left = 80
Height = 31
Top = 240
Width = 67
Caption = 'Cancel'
ModalResult = 2
TabOrder = 7
end
object ComputeBtn: TButton
Left = 153
Height = 31
Top = 241
Width = 67
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 8
end
object ReturnBtn: TButton
Left = 231
Height = 31
Top = 241
Width = 67
Caption = 'Return'
ModalResult = 1
TabOrder = 9
end
end

View File

@ -0,0 +1,45 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TTestGenFrm','FORMDATA',[
'TPF0'#11'TTestGenFrm'#10'TestGenFrm'#4'Left'#3#173#0#6'Height'#3#27#1#3'Top'
+#2'a'#5'Width'#3'6'#1#7'Caption'#6#20'Test Data Generation'#12'ClientHeight'
+#3#27#1#11'ClientWidth'#3'6'#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.'
+'9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#6#6'Height'#2#14#3'Top'#2#16#5'Widt'
+'h'#3#189#0#7'Caption'#6'&Number of item (Variables) to Generate'#11'ParentC'
+'olor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#7#6'Height'#2#14#3'Top'#2'/'#5'Wi'
+'dth'#3#200#0#7'Caption'#6'''Number of Subjects (Cases) to Generate:'#11'Par'
+'entColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'O'#5
+'Width'#3#185#0#7'Caption'#6'%What is the desired Total Score Mean?'#11'Pare'
+'ntColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'q'#5
+'Width'#3#214#0#7'Caption'#6',What is the desired test standard deviation?'
+#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#2#7#6'Height'#2#14#3'Top'
+#3#144#0#5'Width'#3#166#0#7'Caption'#6'%What is the desired test reliability'
+'?'#11'ParentColor'#8#0#0#11'TRadioGroup'#7'Options'#4'Left'#2#7#6'Height'#2
+'9'#3'Top'#3#174#0#5'Width'#3#210#0#8'AutoFill'#9#7'Caption'#6#28'Generate r'
+'esponses that are:'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.Top'
+'BottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChil'
+'dResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28
+'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer'
+'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT'
+'opToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2''''#11'C'
+'lientWidth'#3#206#0#13'Items.Strings'#1#6'!True / False (dichotomous 0 or 1'
+')'#6#9'Contnuous'#0#8'TabOrder'#2#0#0#0#5'TEdit'#11'NoItemsEdit'#4'Left'#3
+#231#0#6'Height'#2#21#3'Top'#2#10#5'Width'#2')'#10'OnKeyPress'#7#19'NoItemsE'
+'ditKeyPress'#8'TabOrder'#2#1#4'Text'#6#11'NoItemsEdit'#0#0#5'TEdit'#11'NoCa'
+'sesEdit'#4'Left'#3#231#0#6'Height'#2#21#3'Top'#2')'#5'Width'#2')'#10'OnKeyP'
+'ress'#7#19'NoCasesEditKeyPress'#8'TabOrder'#2#2#4'Text'#6#5'Edit1'#0#0#5'TE'
+'dit'#8'MeanEdit'#4'Left'#3#231#0#6'Height'#2#21#3'Top'#2'I'#5'Width'#2')'#10
+'OnKeyPress'#7#16'MeanEditKeyPress'#8'TabOrder'#2#3#4'Text'#6#5'Edit1'#0#0#5
+'TEdit'#6'SDEdit'#4'Left'#3#231#0#6'Height'#2#21#3'Top'#2'k'#5'Width'#2')'#10
+'OnKeyPress'#7#14'SDEditKeyPress'#8'TabOrder'#2#4#4'Text'#6#5'Edit1'#0#0#5'T'
+'Edit'#7'RelEdit'#4'Left'#3#231#0#6'Height'#2#21#3'Top'#3#138#0#5'Width'#2')'
+#10'OnKeyPress'#7#15'RelEditKeyPress'#8'TabOrder'#2#5#4'Text'#6#5'Edit1'#0#0
+#7'TButton'#8'ResetBtn'#4'Left'#2#9#6'Height'#2#31#3'Top'#3#241#0#5'Width'#2
+'C'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#6#0#0
+#7'TButton'#9'CancelBtn'#4'Left'#2'P'#6'Height'#2#31#3'Top'#3#240#0#5'Width'
+#2'C'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#7#0#0#7'TButt'
+'on'#10'ComputeBtn'#4'Left'#3#153#0#6'Height'#2#31#3'Top'#3#241#0#5'Width'#2
+'C'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#8
+#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#231#0#6'Height'#2#31#3'Top'#3#241#0#5
+'Width'#2'C'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#9#0#0#0
]);

View File

@ -0,0 +1,185 @@
unit TestGenUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, MainUnit, Globals, DataProcs, Math, DictionaryUnit;
type
{ TTestGenFrm }
TTestGenFrm = class(TForm)
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
NoItemsEdit: TEdit;
NoCasesEdit: TEdit;
MeanEdit: TEdit;
SDEdit: TEdit;
RelEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Options: TRadioGroup;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure MeanEditKeyPress(Sender: TObject; var Key: char);
procedure NoCasesEditKeyPress(Sender: TObject; var Key: char);
procedure NoItemsEditKeyPress(Sender: TObject; var Key: char);
procedure RelEditKeyPress(Sender: TObject; var Key: char);
procedure ResetBtnClick(Sender: TObject);
procedure SDEditKeyPress(Sender: TObject; var Key: char);
private
{ private declarations }
public
{ public declarations }
end;
var
TestGenFrm: TTestGenFrm;
implementation
{ TTestGenFrm }
procedure TTestGenFrm.ResetBtnClick(Sender: TObject);
begin
Options.ItemIndex := 0;
NoItemsEdit.Text := '';
NoCasesEdit.Text := '';
MeanEdit.Text := '';
SDEdit.Text := '';
RelEdit.Text := '';
NoItemsEdit.SetFocus;
end;
procedure TTestGenFrm.SDEditKeyPress(Sender: TObject; var Key: char);
begin
if Ord(Key) = 13 then RelEdit.SetFocus;
end;
procedure TTestGenFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TTestGenFrm.ComputeBtnClick(Sender: TObject);
Var
test_var, true_var, total_item_var, true_item_var : double;
error_item_var, true_score, reliability, tempmean : double;
test_stddev, test_mean, X, error_score : double;
random_mean : DblDyneVec;
i, k, no_cases, no_items, itemtype, col : integer;
outline : string;
begin
if ((NoCases > 0) or (NoVariables > 0)) then
begin
ShowMessage('You must first close the current file.');
exit;
end;
itemtype := Options.ItemIndex; // 0 = T-F, 1 = continuous
test_stddev := StrToFloat(SDEdit.Text);
test_var := test_stddev * test_stddev;
reliability := StrToFloat(RelEdit.Text);
true_var := test_var * reliability;
no_items := StrToInt(NoItemsEdit.Text);
no_cases := StrToInt(NoCasesEdit.Text);
test_mean := StrToFloat(MeanEdit.Text);
total_item_var := (test_var / no_items) * (1.0 -
((no_items - 1) / no_items) * reliability);
true_item_var := total_item_var * reliability;
error_item_var := total_item_var - true_item_var;
tempmean := test_mean / no_items;
SetLength(random_mean,no_items);
OS3MainFrm.DataGrid.RowCount := no_cases + 1;
// OS3MainFrm.DataGrid.ColCount := no_items + 1;
NoVariables := 0;
NoCases := 0;
DictionaryFrm.DictGrid.ColCount := 8;
OS3MainFrm.DataGrid.ColCount := 2;
for i := 1 to no_items do
begin
col := i;
outline := format('Item%d',[i]);
DictionaryFrm.DictGrid.RowCount := i;
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := outline;
OS3MainFrm.DataGrid.Cells[col,0] := outline;
end;
for i := 1 to no_cases do
begin
outline := format('CASE %d',[i]);
OS3MainFrm.DataGrid.Cells[0,i] := outline;
end;
for i := 0 to no_items-1 do
begin
random_mean[i] := RandG(tempmean,sqrt(total_item_var));
end;
for k := 1 to no_cases do
begin
true_score := RandG(0.0,sqrt(true_var));
true_score := true_score / no_items;
for i := 1 to no_items do
begin
error_score := RandG(0.0,sqrt(error_item_var));
X := true_score + error_score + random_mean[i-1];
if (itemtype = 0) then // dichotomous item
begin
if (X >= random_mean[i-1]) then X := 1.0
else X := 0.0;
end;
if (itemtype = 0) then outline := format('%2.0f',[X])
else outline := format('%6.4f',[X]);
OS3MainFrm.DataGrid.Cells[i,k] := outline;
end; // end item loop
end; // end case loop
NoVariables := no_items;
NoCases := no_cases;
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
OS3MainFrm.NoCasesEdit.Text := IntToStr(NoCases);
OS3MainFrm.DataGrid.Row := 1;
OS3MainFrm.DataGrid.Col := 1;
OS3MainFrm.RowEdit.Text := IntToStr(no_cases);
OS3MainFrm.ColEdit.Text := IntToStr(no_items);
OS3MainFrm.FileNameEdit.Text := 'GenTest.LAZ';
// clean up the heap
random_mean := nil;
end;
procedure TTestGenFrm.MeanEditKeyPress(Sender: TObject; var Key: char);
begin
if Ord(Key) = 13 then SDEdit.SetFocus;
end;
procedure TTestGenFrm.NoCasesEditKeyPress(Sender: TObject; var Key: char);
begin
if Ord(Key) = 13 then MeanEdit.SetFocus;
end;
procedure TTestGenFrm.NoItemsEditKeyPress(Sender: TObject; var Key: char);
begin
if Ord(Key) = 13 then NoCasesEdit.SetFocus;
end;
procedure TTestGenFrm.RelEditKeyPress(Sender: TObject; var Key: char);
begin
if Ord(Key) = 13 then ComputeBtn.SetFocus;
end;
initialization
{$I testgenunit.lrs}
end.

View File

@ -0,0 +1,645 @@
object TestScoreFrm: TTestScoreFrm
Left = 140
Height = 492
Top = 102
Width = 588
Caption = 'Test Scoring and Analysis'
ClientHeight = 492
ClientWidth = 588
OnShow = FormShow
LCLVersion = '0.9.30'
object Label1: TLabel
Left = 5
Height = 16
Top = 5
Width = 99
Caption = 'Available Variables'
ParentColor = False
end
object Label2: TLabel
Left = 208
Height = 16
Top = 8
Width = 77
Caption = 'Selected Items'
ParentColor = False
end
object Label3: TLabel
Left = 208
Height = 16
Top = 201
Width = 60
Caption = 'Last Name:'
ParentColor = False
end
object Label4: TLabel
Left = 206
Height = 16
Top = 247
Width = 61
Caption = 'First Name:'
ParentColor = False
end
object Label5: TLabel
Left = 206
Height = 16
Top = 296
Width = 59
Caption = 'ID Number'
ParentColor = False
end
object VarList: TListBox
Left = 6
Height = 322
Top = 22
Width = 155
ItemHeight = 0
MultiSelect = True
TabOrder = 0
end
object InBtn: TBitBtn
Left = 168
Height = 30
Top = 24
Width = 31
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = InBtnClick
TabOrder = 1
end
object OutBtn: TBitBtn
Left = 168
Height = 30
Top = 56
Width = 31
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = OutBtnClick
TabOrder = 2
end
object LastInBtn: TBitBtn
Left = 168
Height = 30
Top = 200
Width = 31
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = LastInBtnClick
TabOrder = 3
end
object FirstInBtn: TBitBtn
Left = 168
Height = 30
Top = 248
Width = 31
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = FirstInBtnClick
TabOrder = 4
end
object IDInBtn: TBitBtn
Left = 168
Height = 30
Top = 296
Width = 31
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = IDInBtnClick
TabOrder = 5
end
object ItemList: TListBox
Left = 208
Height = 167
Top = 25
Width = 126
ItemHeight = 0
TabOrder = 6
end
object LastNameEdit: TEdit
Left = 207
Height = 23
Top = 216
Width = 128
TabOrder = 7
end
object FirstNameEdit: TEdit
Left = 207
Height = 23
Top = 261
Width = 128
TabOrder = 8
end
object IDNoEdit: TEdit
Left = 206
Height = 23
Top = 309
Width = 128
TabOrder = 9
end
object GroupBox1: TGroupBox
Left = 8
Height = 119
Top = 360
Width = 438
Caption = 'Options'
ClientHeight = 101
ClientWidth = 434
TabOrder = 10
object FirstChk: TCheckBox
Left = 6
Height = 19
Top = -1
Width = 199
Caption = 'First data record is the scoring key'
OnClick = FirstChkClick
TabOrder = 0
end
object SimultChk: TCheckBox
Left = 215
Height = 19
Top = -1
Width = 199
Caption = 'Simultaneous Multiple Regression'
TabOrder = 1
end
object CorrsChk: TCheckBox
Left = 216
Height = 19
Top = 15
Width = 142
Caption = 'Intercorrelations Matrix'
TabOrder = 2
end
object PlotChk: TCheckBox
Left = 216
Height = 19
Top = 31
Width = 168
Caption = 'Plot Total Score Distribution'
TabOrder = 3
end
object DescChk: TCheckBox
Left = 216
Height = 19
Top = 47
Width = 222
Caption = 'Means, Variances, Standard Deviations'
TabOrder = 4
end
object HoytChk: TCheckBox
Left = 215
Height = 19
Top = 63
Width = 213
Caption = 'Hoyt''s Intraclass Reliability Estimates'
TabOrder = 5
end
object MeansPlotChk: TCheckBox
Left = 216
Height = 19
Top = 79
Width = 106
Caption = 'Plot Item Means'
TabOrder = 6
end
end
object GroupBox2: TGroupBox
Left = 345
Height = 235
Top = 10
Width = 231
Caption = 'Item Scoring'
ClientHeight = 217
ClientWidth = 227
TabOrder = 11
object Label7: TLabel
Left = 8
Height = 16
Top = 4
Width = 75
Caption = 'Item Number:'
ParentColor = False
end
object Label8: TLabel
Left = 6
Height = 16
Top = 29
Width = 32
Caption = 'Down'
ParentColor = False
end
object Label9: TLabel
Left = 196
Height = 16
Top = 25
Width = 16
Caption = 'Up'
ParentColor = False
end
object Label10: TLabel
Left = 7
Height = 16
Top = 59
Width = 196
Caption = 'NOTE: 1 to 5 responses are permitted'
ParentColor = False
end
object Label11: TLabel
Left = 7
Height = 16
Top = 86
Width = 128
Caption = 'Item Response Number:'
ParentColor = False
end
object Label12: TLabel
Left = 7
Height = 16
Top = 112
Width = 54
Caption = 'Response:'
ParentColor = False
end
object Label13: TLabel
Left = 8
Height = 16
Top = 148
Width = 79
Caption = 'Score (Weight)'
ParentColor = False
end
object Label14: TLabel
Left = 8
Height = 16
Top = 183
Width = 32
Caption = 'Down'
ParentColor = False
end
object Label15: TLabel
Left = 193
Height = 16
Top = 180
Width = 16
Caption = 'Up'
ParentColor = False
end
object ItemNoEdit: TEdit
Left = 77
Height = 23
Top = -2
Width = 43
TabOrder = 0
Text = '1'
end
object ItemScroll: TScrollBar
Left = 45
Height = 18
Top = 25
Width = 144
Min = 1
PageSize = 0
Position = 1
TabOrder = 1
OnChange = ItemScrollChange
end
object RespNoEdit: TEdit
Left = 136
Height = 23
Top = 78
Width = 46
TabOrder = 2
Text = '1'
end
object ResponseEdit: TEdit
Left = 72
Height = 23
Top = 108
Width = 136
TabOrder = 3
end
object ScoreEdit: TEdit
Left = 87
Height = 23
Top = 142
Width = 39
TabOrder = 4
Text = '1'
end
object ResponseScroll: TScrollBar
Left = 40
Height = 18
Top = 177
Width = 144
Max = 5
Min = 1
PageSize = 0
Position = 1
TabOrder = 5
OnChange = ResponseScrollChange
end
end
object GroupBox3: TGroupBox
Left = 345
Height = 98
Top = 255
Width = 229
Caption = 'Obtain Total Score By:'
ClientHeight = 80
ClientWidth = 225
TabOrder = 12
object Label6: TLabel
Left = 165
Height = 16
Top = 32
Width = 35
Caption = 'wrong'
ParentColor = False
end
object NoCorBtn: TRadioButton
Left = 9
Height = 19
Top = 6
Width = 106
Caption = 'Number Correct'
TabOrder = 0
end
object FractWrongBtn: TRadioButton
Left = 9
Height = 19
Top = 32
Width = 109
Caption = 'No. Correct - 1 / '
TabOrder = 1
end
object FractEdit: TEdit
Left = 117
Height = 23
Top = 30
Width = 37
TabOrder = 2
Text = '1'
end
object SumRespBtn: TRadioButton
Left = 9
Height = 19
Top = 56
Width = 170
Caption = 'Sum of Weighted Responses'
TabOrder = 3
end
end
object ResetBtn: TButton
Left = 472
Height = 27
Top = 360
Width = 81
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 13
end
object CancelBtn: TButton
Left = 472
Height = 27
Top = 392
Width = 81
Caption = 'Cancel'
ModalResult = 2
OnClick = CancelBtnClick
TabOrder = 14
end
object ComputeBtn: TButton
Left = 472
Height = 27
Top = 424
Width = 81
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 15
end
object ReturnBtn: TButton
Left = 472
Height = 27
Top = 456
Width = 81
Caption = 'Return'
ModalResult = 1
OnClick = ReturnBtnClick
TabOrder = 16
end
object ReplaceChk: TCheckBox
Left = 16
Height = 19
Top = 392
Width = 206
Caption = 'Replace grid items with item scores'
TabOrder = 17
end
object AddChk: TCheckBox
Left = 16
Height = 19
Top = 408
Width = 161
Caption = 'Add Test scores to the grid'
TabOrder = 18
end
object ListChk: TCheckBox
Left = 16
Height = 19
Top = 424
Width = 96
Caption = 'List test scores'
TabOrder = 19
end
object AlphaChk: TCheckBox
Left = 16
Height = 19
Top = 440
Width = 160
Caption = 'Cronbach Alpha Reliability'
TabOrder = 20
end
object StepChk: TCheckBox
Left = 16
Height = 19
Top = 456
Width = 156
Caption = 'Stepwise KR#20 Reliability'
TabOrder = 21
end
end

View File

@ -0,0 +1,357 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TTestScoreFrm','FORMDATA',[
'TPF0'#13'TTestScoreFrm'#12'TestScoreFrm'#4'Left'#3#140#0#6'Height'#3#236#1#3
+'Top'#2'f'#5'Width'#3'L'#2#7'Caption'#6#25'Test Scoring and Analysis'#12'Cli'
+'entHeight'#3#236#1#11'ClientWidth'#3'L'#2#6'OnShow'#7#8'FormShow'#10'LCLVer'
+'sion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#5#6'Height'#2#16#3'Top'#2
+#5#5'Width'#2'c'#7'Caption'#6#19'Available Variables'#11'ParentColor'#8#0#0#6
+'TLabel'#6'Label2'#4'Left'#3#208#0#6'Height'#2#16#3'Top'#2#8#5'Width'#2'M'#7
+'Caption'#6#14'Selected Items'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'L'
+'eft'#3#208#0#6'Height'#2#16#3'Top'#3#201#0#5'Width'#2'<'#7'Caption'#6#10'La'
+'st Name:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#3#206#0#6'Heigh'
+'t'#2#16#3'Top'#3#247#0#5'Width'#2'='#7'Caption'#6#11'First Name:'#11'Parent'
+'Color'#8#0#0#6'TLabel'#6'Label5'#4'Left'#3#206#0#6'Height'#2#16#3'Top'#3'('
+#1#5'Width'#2';'#7'Caption'#6#9'ID Number'#11'ParentColor'#8#0#0#8'TListBox'
+#7'VarList'#4'Left'#2#6#6'Height'#3'B'#1#3'Top'#2#22#5'Width'#3#155#0#10'Ite'
+'mHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#5'InBtn'#4'Le'
+'ft'#3#168#0#6'Height'#2#30#3'Top'#2#24#5'Width'#2#31#10'Glyph.Data'#10':'#4
+#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0
+#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'
+#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'
+#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255
+#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211
+#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130
+#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'
+#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171
+#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204
+#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'
+#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255
+'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161
+'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
,#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#10'InBtnClick'#8'TabOrder'
+#2#1#0#0#7'TBitBtn'#6'OutBtn'#4'Left'#3#168#0#6'Height'#2#30#3'Top'#2'8'#5'W'
+'idth'#2#31#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0
+'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0
+#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'
+#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'
+#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255
+'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'
+#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195
+'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144
+#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255
+'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255
+#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212
+#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133
+#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255
+#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135
+#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'
+#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyp'
+'hs'#2#0#7'OnClick'#7#11'OutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#9'LastI'
+'nBtn'#4'Left'#3#168#0#6'Height'#2#30#3'Top'#3#200#0#5'Width'#2#31#10'Glyph.'
+'Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16
+#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184
+#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177
+'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255
+'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255
+#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255
+#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142
+#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'
+#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162
+#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255
+#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130
+#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199
+'t'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255
+'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'
+#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#14'LastInBtnClick'
+#8'TabOrder'#2#3#0#0#7'TBitBtn'#10'FirstInBtn'#4'Left'#3#168#0#6'Height'#2#30
+#3'Top'#3#248#0#5'Width'#2#31#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0
+#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0
+#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'
+#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'
+#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255#255#0#255#255#255#0
,'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211#161#255#148#208#157
+#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195
+#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0
+#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171#255#158#214#167#255
+#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144
+#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'#145'P'#255'%i)'#201
+#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'#255'a'#190
+'m'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255
+'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#9'NumGlyphs'#2#0#7'OnClick'#7#15'FirstInBtnClick'#8'TabOrder'#2#4#0#0#7'TBi'
+'tBtn'#7'IDInBtn'#4'Left'#3#168#0#6'Height'#2#30#3'Top'#3'('#1#5'Width'#2#31
+#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16
+#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'
+#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'
+#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'
+#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!'
+'c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169
+#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203
+#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190
+'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165
+#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255
+#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135
+#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199
+'t'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255
+'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157
+'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#12
+'IDInBtnClick'#8'TabOrder'#2#5#0#0#8'TListBox'#8'ItemList'#4'Left'#3#208#0#6
+'Height'#3#167#0#3'Top'#2#25#5'Width'#2'~'#10'ItemHeight'#2#0#8'TabOrder'#2#6
+#0#0#5'TEdit'#12'LastNameEdit'#4'Left'#3#207#0#6'Height'#2#23#3'Top'#3#216#0
+#5'Width'#3#128#0#8'TabOrder'#2#7#0#0#5'TEdit'#13'FirstNameEdit'#4'Left'#3
+#207#0#6'Height'#2#23#3'Top'#3#5#1#5'Width'#3#128#0#8'TabOrder'#2#8#0#0#5'TE'
+'dit'#8'IDNoEdit'#4'Left'#3#206#0#6'Height'#2#23#3'Top'#3'5'#1#5'Width'#3#128
+#0#8'TabOrder'#2#9#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#8#6'Height'#2'w'#3
+'Top'#3'h'#1#5'Width'#3#182#1#7'Caption'#6#7'Options'#12'ClientHeight'#2'e'
+#11'ClientWidth'#3#178#1#8'TabOrder'#2#10#0#9'TCheckBox'#8'FirstChk'#4'Left'
+#2#6#6'Height'#2#19#3'Top'#2#255#5'Width'#3#199#0#7'Caption'#6'$First data r'
+'ecord is the scoring key'#7'OnClick'#7#13'FirstChkClick'#8'TabOrder'#2#0#0#0
+#9'TCheckBox'#9'SimultChk'#4'Left'#3#215#0#6'Height'#2#19#3'Top'#2#255#5'Wid'
+'th'#3#199#0#7'Caption'#6' Simultaneous Multiple Regression'#8'TabOrder'#2#1
+#0#0#9'TCheckBox'#8'CorrsChk'#4'Left'#3#216#0#6'Height'#2#19#3'Top'#2#15#5'W'
+'idth'#3#142#0#7'Caption'#6#24'Intercorrelations Matrix'#8'TabOrder'#2#2#0#0
+#9'TCheckBox'#7'PlotChk'#4'Left'#3#216#0#6'Height'#2#19#3'Top'#2#31#5'Width'
+#3#168#0#7'Caption'#6#29'Plot Total Score Distribution'#8'TabOrder'#2#3#0#0#9
+'TCheckBox'#7'DescChk'#4'Left'#3#216#0#6'Height'#2#19#3'Top'#2'/'#5'Width'#3
+#222#0#7'Caption'#6'%Means, Variances, Standard Deviations'#8'TabOrder'#2#4#0
+#0#9'TCheckBox'#7'HoytChk'#4'Left'#3#215#0#6'Height'#2#19#3'Top'#2'?'#5'Widt'
+'h'#3#213#0#7'Caption'#6'''Hoyt''s Intraclass Reliability Estimates'#8'TabOr'
+'der'#2#5#0#0#9'TCheckBox'#12'MeansPlotChk'#4'Left'#3#216#0#6'Height'#2#19#3
+'Top'#2'O'#5'Width'#2'j'#7'Caption'#6#15'Plot Item Means'#8'TabOrder'#2#6#0#0
+#0#9'TGroupBox'#9'GroupBox2'#4'Left'#3'Y'#1#6'Height'#3#235#0#3'Top'#2#10#5
+'Width'#3#231#0#7'Caption'#6#12'Item Scoring'#12'ClientHeight'#3#217#0#11'Cl'
+'ientWidth'#3#227#0#8'TabOrder'#2#11#0#6'TLabel'#6'Label7'#4'Left'#2#8#6'Hei'
+'ght'#2#16#3'Top'#2#4#5'Width'#2'K'#7'Caption'#6#12'Item Number:'#11'ParentC'
+'olor'#8#0#0#6'TLabel'#6'Label8'#4'Left'#2#6#6'Height'#2#16#3'Top'#2#29#5'Wi'
+'dth'#2' '#7'Caption'#6#4'Down'#11'ParentColor'#8#0#0#6'TLabel'#6'Label9'#4
+'Left'#3#196#0#6'Height'#2#16#3'Top'#2#25#5'Width'#2#16#7'Caption'#6#2'Up'#11
+'ParentColor'#8#0#0#6'TLabel'#7'Label10'#4'Left'#2#7#6'Height'#2#16#3'Top'#2
+';'#5'Width'#3#196#0#7'Caption'#6'$NOTE: 1 to 5 responses are permitted'#11
+'ParentColor'#8#0#0#6'TLabel'#7'Label11'#4'Left'#2#7#6'Height'#2#16#3'Top'#2
+'V'#5'Width'#3#128#0#7'Caption'#6#21'Item Response Number:'#11'ParentColor'#8
+#0#0#6'TLabel'#7'Label12'#4'Left'#2#7#6'Height'#2#16#3'Top'#2'p'#5'Width'#2
+'6'#7'Caption'#6#9'Response:'#11'ParentColor'#8#0#0#6'TLabel'#7'Label13'#4'L'
+'eft'#2#8#6'Height'#2#16#3'Top'#3#148#0#5'Width'#2'O'#7'Caption'#6#14'Score '
+'(Weight)'#11'ParentColor'#8#0#0#6'TLabel'#7'Label14'#4'Left'#2#8#6'Height'#2
+#16#3'Top'#3#183#0#5'Width'#2' '#7'Caption'#6#4'Down'#11'ParentColor'#8#0#0#6
+'TLabel'#7'Label15'#4'Left'#3#193#0#6'Height'#2#16#3'Top'#3#180#0#5'Width'#2
+#16#7'Caption'#6#2'Up'#11'ParentColor'#8#0#0#5'TEdit'#10'ItemNoEdit'#4'Left'
+#2'M'#6'Height'#2#23#3'Top'#2#254#5'Width'#2'+'#8'TabOrder'#2#0#4'Text'#6#1
+'1'#0#0#10'TScrollBar'#10'ItemScroll'#4'Left'#2'-'#6'Height'#2#18#3'Top'#2#25
+#5'Width'#3#144#0#3'Min'#2#1#8'PageSize'#2#0#8'Position'#2#1#8'TabOrder'#2#1
+#8'OnChange'#7#16'ItemScrollChange'#0#0#5'TEdit'#10'RespNoEdit'#4'Left'#3#136
+#0#6'Height'#2#23#3'Top'#2'N'#5'Width'#2'.'#8'TabOrder'#2#2#4'Text'#6#1'1'#0
+#0#5'TEdit'#12'ResponseEdit'#4'Left'#2'H'#6'Height'#2#23#3'Top'#2'l'#5'Width'
+#3#136#0#8'TabOrder'#2#3#0#0#5'TEdit'#9'ScoreEdit'#4'Left'#2'W'#6'Height'#2
+#23#3'Top'#3#142#0#5'Width'#2''''#8'TabOrder'#2#4#4'Text'#6#1'1'#0#0#10'TScr'
,'ollBar'#14'ResponseScroll'#4'Left'#2'('#6'Height'#2#18#3'Top'#3#177#0#5'Wid'
+'th'#3#144#0#3'Max'#2#5#3'Min'#2#1#8'PageSize'#2#0#8'Position'#2#1#8'TabOrde'
+'r'#2#5#8'OnChange'#7#20'ResponseScrollChange'#0#0#0#9'TGroupBox'#9'GroupBox'
+'3'#4'Left'#3'Y'#1#6'Height'#2'b'#3'Top'#3#255#0#5'Width'#3#229#0#7'Caption'
+#6#22'Obtain Total Score By:'#12'ClientHeight'#2'P'#11'ClientWidth'#3#225#0#8
+'TabOrder'#2#12#0#6'TLabel'#6'Label6'#4'Left'#3#165#0#6'Height'#2#16#3'Top'#2
+' '#5'Width'#2'#'#7'Caption'#6#5'wrong'#11'ParentColor'#8#0#0#12'TRadioButto'
+'n'#8'NoCorBtn'#4'Left'#2#9#6'Height'#2#19#3'Top'#2#6#5'Width'#2'j'#7'Captio'
+'n'#6#14'Number Correct'#8'TabOrder'#2#0#0#0#12'TRadioButton'#13'FractWrongB'
+'tn'#4'Left'#2#9#6'Height'#2#19#3'Top'#2' '#5'Width'#2'm'#7'Caption'#6#18'No'
+'. Correct - 1 / '#8'TabOrder'#2#1#0#0#5'TEdit'#9'FractEdit'#4'Left'#2'u'#6
+'Height'#2#23#3'Top'#2#30#5'Width'#2'%'#8'TabOrder'#2#2#4'Text'#6#1'1'#0#0#12
+'TRadioButton'#10'SumRespBtn'#4'Left'#2#9#6'Height'#2#19#3'Top'#2'8'#5'Width'
+#3#170#0#7'Caption'#6#25'Sum of Weighted Responses'#8'TabOrder'#2#3#0#0#0#7
+'TButton'#8'ResetBtn'#4'Left'#3#216#1#6'Height'#2#27#3'Top'#3'h'#1#5'Width'#2
+'Q'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#13#0#0
+#7'TButton'#9'CancelBtn'#4'Left'#3#216#1#6'Height'#2#27#3'Top'#3#136#1#5'Wid'
+'th'#2'Q'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#7'OnClick'#7#14'CancelB'
+'tnClick'#8'TabOrder'#2#14#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#216#1#6'H'
+'eight'#2#27#3'Top'#3#168#1#5'Width'#2'Q'#7'Caption'#6#7'Compute'#7'OnClick'
+#7#15'ComputeBtnClick'#8'TabOrder'#2#15#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3
+#216#1#6'Height'#2#27#3'Top'#3#200#1#5'Width'#2'Q'#7'Caption'#6#6'Return'#11
+'ModalResult'#2#1#7'OnClick'#7#14'ReturnBtnClick'#8'TabOrder'#2#16#0#0#9'TCh'
+'eckBox'#10'ReplaceChk'#4'Left'#2#16#6'Height'#2#19#3'Top'#3#136#1#5'Width'#3
+#206#0#7'Caption'#6'#Replace grid items with item scores'#8'TabOrder'#2#17#0
+#0#9'TCheckBox'#6'AddChk'#4'Left'#2#16#6'Height'#2#19#3'Top'#3#152#1#5'Width'
+#3#161#0#7'Caption'#6#27'Add Test scores to the grid'#8'TabOrder'#2#18#0#0#9
+'TCheckBox'#7'ListChk'#4'Left'#2#16#6'Height'#2#19#3'Top'#3#168#1#5'Width'#2
+'`'#7'Caption'#6#16'List test scores'#8'TabOrder'#2#19#0#0#9'TCheckBox'#8'Al'
+'phaChk'#4'Left'#2#16#6'Height'#2#19#3'Top'#3#184#1#5'Width'#3#160#0#7'Capti'
+'on'#6#26'Cronbach Alpha Reliability'#8'TabOrder'#2#20#0#0#9'TCheckBox'#7'St'
+'epChk'#4'Left'#2#16#6'Height'#2#19#3'Top'#3#200#1#5'Width'#3#156#0#7'Captio'
+'n'#6#26'Stepwise KR#20 Reliability'#8'TabOrder'#2#21#0#0#0
]);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,250 @@
object TestSpecsForm: TTestSpecsForm
Left = 60
Height = 635
Top = 137
Width = 1114
Caption = 'Test Specification'
ClientHeight = 635
ClientWidth = 1114
OnShow = FormShow
LCLVersion = '0.9.30.4'
object ReturnBtn: TButton
Left = 984
Height = 30
Top = 593
Width = 92
Caption = 'Return'
OnClick = ReturnBtnClick
TabOrder = 0
end
object Label1: TLabel
Left = 9
Height = 16
Top = 17
Width = 131
Caption = 'Specification File Name: '
ParentColor = False
end
object SpecFileEdit: TEdit
Left = 144
Height = 23
Top = 8
Width = 393
TabOrder = 1
Text = 'SpecFileEdit'
end
object SelectChoiceBox: TCheckGroup
Left = 7
Height = 167
Top = 73
Width = 242
AutoFill = True
Caption = 'Selection Options:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
Items.Strings = (
'Multiple Choice items'
'True or False items'
'Essay items'
'Matching items'
)
OnItemClick = SelectChoiceBoxItemClick
TabOrder = 2
Data = {
0400000002020202
}
end
object Label2: TLabel
Left = 16
Height = 16
Top = 304
Width = 179
Caption = 'Number of Items of a Given Type:'
ParentColor = False
end
object Label3: TLabel
Left = 15
Height = 16
Top = 367
Width = 68
Caption = 'True or False'
ParentColor = False
end
object Label4: TLabel
Left = 16
Height = 16
Top = 336
Width = 85
Caption = 'Multiple Choice'
ParentColor = False
end
object Label5: TLabel
Left = 16
Height = 16
Top = 407
Width = 52
Caption = 'Matching'
ParentColor = False
end
object Label6: TLabel
Left = 16
Height = 16
Top = 447
Width = 29
Caption = 'Essay'
ParentColor = False
end
object TFNoEdit: TEdit
Left = 112
Height = 23
Top = 367
Width = 54
TabOrder = 3
Text = 'TFNoEdit'
end
object EssayNoEdit: TEdit
Left = 112
Height = 23
Top = 440
Width = 54
TabOrder = 4
Text = 'Edit1'
end
object MatchNoEdit: TEdit
Left = 112
Height = 23
Top = 400
Width = 54
TabOrder = 5
Text = 'Edit1'
end
object MCNoEdit: TEdit
Left = 112
Height = 23
Top = 329
Width = 54
TabOrder = 6
Text = 'Edit1'
end
object TFItemNoLabel: TLabel
Left = 328
Height = 16
Top = 47
Width = 75
Caption = 'Item Number:'
ParentColor = False
end
object ItemNoEdit: TEdit
Left = 431
Height = 23
Top = 40
Width = 44
TabOrder = 7
Text = '1'
end
object ItemCodeLabel: TLabel
Left = 497
Height = 16
Top = 47
Width = 93
Caption = 'Item Major Code:'
ParentColor = False
end
object MajorCodeEdit: TEdit
Left = 601
Height = 23
Top = 40
Width = 41
TabOrder = 8
Text = '1'
end
object MinorCodeLabel: TLabel
Left = 657
Height = 16
Top = 45
Width = 94
Caption = 'Item Minor Code:'
ParentColor = False
end
object MinorCodeEdit: TEdit
Left = 761
Height = 23
Top = 40
Width = 45
TabOrder = 9
Text = '0'
end
object Panel1: TPanel
Left = 264
Height = 495
Top = 73
Width = 812
BevelInner = bvRaised
BorderStyle = bsSingle
TabOrder = 10
end
object SelectItemBtn: TButton
Left = 264
Height = 30
Top = 593
Width = 112
Caption = 'Select this item'
OnClick = SelectItemBtnClick
TabOrder = 11
end
object SkipBtn: TButton
Left = 393
Height = 32
Top = 592
Width = 105
Caption = 'Skip this item'
OnClick = SkipBtnClick
TabOrder = 12
end
object Label7: TLabel
Left = 824
Height = 16
Top = 45
Width = 57
Caption = 'Item Type:'
ParentColor = False
end
object SelectedEdit: TEdit
Left = 888
Height = 23
Top = 37
Width = 183
TabOrder = 13
Text = 'SelectedEdit'
end
object Label8: TLabel
Left = 16
Height = 16
Top = 514
Width = 149
Caption = 'Current no. items specified: '
ParentColor = False
end
object NoItemsEdit: TEdit
Left = 167
Height = 23
Top = 507
Width = 46
TabOrder = 14
Text = 'NoItemsEdit'
end
object OpenDialog1: TOpenDialog
left = 902
top = 584
end
object SaveDialog1: TSaveDialog
left = 808
top = 587
end
end

View File

@ -0,0 +1,62 @@
LazarusResources.Add('TTestSpecsForm','FORMDATA',[
'TPF0'#14'TTestSpecsForm'#13'TestSpecsForm'#4'Left'#2'<'#6'Height'#3'{'#2#3'T'
+'op'#3#137#0#5'Width'#3'Z'#4#7'Caption'#6#18'Test Specification'#12'ClientHe'
+'ight'#3'{'#2#11'ClientWidth'#3'Z'#4#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6
+#8'0.9.30.4'#0#7'TButton'#9'ReturnBtn'#4'Left'#3#216#3#6'Height'#2#30#3'Top'
+#3'Q'#2#5'Width'#2'\'#7'Caption'#6#6'Return'#7'OnClick'#7#14'ReturnBtnClick'
+#8'TabOrder'#2#0#0#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2#16#3'Top'#2
+#17#5'Width'#3#131#0#7'Caption'#6#25'Specification File Name: '#11'ParentCol'
+'or'#8#0#0#5'TEdit'#12'SpecFileEdit'#4'Left'#3#144#0#6'Height'#2#23#3'Top'#2
+#8#5'Width'#3#137#1#8'TabOrder'#2#1#4'Text'#6#12'SpecFileEdit'#0#0#11'TCheck'
+'Group'#15'SelectChoiceBox'#4'Left'#2#7#6'Height'#3#167#0#3'Top'#2'I'#5'Widt'
+'h'#3#242#0#8'AutoFill'#9#7'Caption'#6#18'Selection Options:'#28'ChildSizing'
+'.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.'
+'EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVer'
+'tical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14
+'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'Chil'
+'dSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Controls'
+'PerLine'#2#1#13'Items.Strings'#1#6#21'Multiple Choice items'#6#19'True or F'
+'alse items'#6#11'Essay items'#6#14'Matching items'#0#11'OnItemClick'#7#24'S'
+'electChoiceBoxItemClick'#8'TabOrder'#2#2#4'Data'#10#8#0#0#0#4#0#0#0#2#2#2#2
+#0#0#6'TLabel'#6'Label2'#4'Left'#2#16#6'Height'#2#16#3'Top'#3'0'#1#5'Width'#3
+#179#0#7'Caption'#6' Number of Items of a Given Type:'#11'ParentColor'#8#0#0
+#6'TLabel'#6'Label3'#4'Left'#2#15#6'Height'#2#16#3'Top'#3'o'#1#5'Width'#2'D'
+#7'Caption'#6#13'True or False'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4
+'Left'#2#16#6'Height'#2#16#3'Top'#3'P'#1#5'Width'#2'U'#7'Caption'#6#15'Multi'
+'ple Choice'#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#2#16#6'Height'
+#2#16#3'Top'#3#151#1#5'Width'#2'4'#7'Caption'#6#8'Matching'#11'ParentColor'#8
+#0#0#6'TLabel'#6'Label6'#4'Left'#2#16#6'Height'#2#16#3'Top'#3#191#1#5'Width'
+#2#29#7'Caption'#6#5'Essay'#11'ParentColor'#8#0#0#5'TEdit'#8'TFNoEdit'#4'Lef'
+'t'#2'p'#6'Height'#2#23#3'Top'#3'o'#1#5'Width'#2'6'#8'TabOrder'#2#3#4'Text'#6
+#8'TFNoEdit'#0#0#5'TEdit'#11'EssayNoEdit'#4'Left'#2'p'#6'Height'#2#23#3'Top'
+#3#184#1#5'Width'#2'6'#8'TabOrder'#2#4#4'Text'#6#5'Edit1'#0#0#5'TEdit'#11'Ma'
+'tchNoEdit'#4'Left'#2'p'#6'Height'#2#23#3'Top'#3#144#1#5'Width'#2'6'#8'TabOr'
+'der'#2#5#4'Text'#6#5'Edit1'#0#0#5'TEdit'#8'MCNoEdit'#4'Left'#2'p'#6'Height'
+#2#23#3'Top'#3'I'#1#5'Width'#2'6'#8'TabOrder'#2#6#4'Text'#6#5'Edit1'#0#0#6'T'
+'Label'#13'TFItemNoLabel'#4'Left'#3'H'#1#6'Height'#2#16#3'Top'#2'/'#5'Width'
+#2'K'#7'Caption'#6#12'Item Number:'#11'ParentColor'#8#0#0#5'TEdit'#10'ItemNo'
+'Edit'#4'Left'#3#175#1#6'Height'#2#23#3'Top'#2'('#5'Width'#2','#8'TabOrder'#2
+#7#4'Text'#6#1'1'#0#0#6'TLabel'#13'ItemCodeLabel'#4'Left'#3#241#1#6'Height'#2
+#16#3'Top'#2'/'#5'Width'#2']'#7'Caption'#6#16'Item Major Code:'#11'ParentCol'
+'or'#8#0#0#5'TEdit'#13'MajorCodeEdit'#4'Left'#3'Y'#2#6'Height'#2#23#3'Top'#2
+'('#5'Width'#2')'#8'TabOrder'#2#8#4'Text'#6#1'1'#0#0#6'TLabel'#14'MinorCodeL'
+'abel'#4'Left'#3#145#2#6'Height'#2#16#3'Top'#2'-'#5'Width'#2'^'#7'Caption'#6
+#16'Item Minor Code:'#11'ParentColor'#8#0#0#5'TEdit'#13'MinorCodeEdit'#4'Lef'
+'t'#3#249#2#6'Height'#2#23#3'Top'#2'('#5'Width'#2'-'#8'TabOrder'#2#9#4'Text'
+#6#1'0'#0#0#6'TPanel'#6'Panel1'#4'Left'#3#8#1#6'Height'#3#239#1#3'Top'#2'I'#5
+'Width'#3','#3#10'BevelInner'#7#8'bvRaised'#11'BorderStyle'#7#8'bsSingle'#8
+'TabOrder'#2#10#0#0#7'TButton'#13'SelectItemBtn'#4'Left'#3#8#1#6'Height'#2#30
+#3'Top'#3'Q'#2#5'Width'#2'p'#7'Caption'#6#16'Select this item'#7'OnClick'#7
+#18'SelectItemBtnClick'#8'TabOrder'#2#11#0#0#7'TButton'#7'SkipBtn'#4'Left'#3
+#137#1#6'Height'#2' '#3'Top'#3'P'#2#5'Width'#2'i'#7'Caption'#6#14'Skip this '
+'item'#7'OnClick'#7#12'SkipBtnClick'#8'TabOrder'#2#12#0#0#6'TLabel'#6'Label7'
+#4'Left'#3'8'#3#6'Height'#2#16#3'Top'#2'-'#5'Width'#2'9'#7'Caption'#6#10'Ite'
+'m Type:'#11'ParentColor'#8#0#0#5'TEdit'#12'SelectedEdit'#4'Left'#3'x'#3#6'H'
+'eight'#2#23#3'Top'#2'%'#5'Width'#3#183#0#8'TabOrder'#2#13#4'Text'#6#12'Sele'
+'ctedEdit'#0#0#6'TLabel'#6'Label8'#4'Left'#2#16#6'Height'#2#16#3'Top'#3#2#2#5
+'Width'#3#149#0#7'Caption'#6#29'Current no. items specified: '#11'ParentColo'
+'r'#8#0#0#5'TEdit'#11'NoItemsEdit'#4'Left'#3#167#0#6'Height'#2#23#3'Top'#3
+#251#1#5'Width'#2'.'#8'TabOrder'#2#14#4'Text'#6#11'NoItemsEdit'#0#0#11'TOpen'
+'Dialog'#11'OpenDialog1'#4'left'#3#134#3#3'top'#3'H'#2#0#0#11'TSaveDialog'#11
+'SaveDialog1'#4'left'#3'('#3#3'top'#3'K'#2#0#0#0
]);

View File

@ -0,0 +1,301 @@
unit TestSpecsUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls;
type
{ TTestSpecsForm }
TTestSpecsForm = class(TForm)
NoItemsEdit: TEdit;
Label8: TLabel;
SelectedEdit: TEdit;
Label7: TLabel;
SkipBtn: TButton;
SelectItemBtn: TButton;
ItemCodeLabel: TLabel;
ItemNoEdit: TEdit;
MajorCodeEdit: TEdit;
MinorCodeEdit: TEdit;
MinorCodeLabel: TLabel;
Panel1: TPanel;
TFItemNoLabel: TLabel;
TFNoEdit: TEdit;
EssayNoEdit: TEdit;
MatchNoEdit: TEdit;
MCNoEdit: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
SelectChoiceBox: TCheckGroup;
SpecFileEdit: TEdit;
Label1: TLabel;
OpenDialog1: TOpenDialog;
ReturnBtn: TButton;
SaveDialog1: TSaveDialog;
procedure FormShow(Sender: TObject);
procedure ReturnBtnClick(Sender: TObject);
procedure SelectItemBtnClick(Sender: TObject);
procedure SelectChoiceBoxItemClick(Sender: TObject; Index: integer);
procedure SkipBtnClick(Sender: TObject);
procedure ShowMCItem(Sender: TObject; index : integer);
procedure ShowTFItem(Sender: TObject; index : integer);
procedure ShowEssayItem(Sender: TObject; index : integer);
procedure ShowMatchItem(Sender: TObject; index : integer);
private
{ private declarations }
public
{ public declarations }
testno : integer;
end;
var
TestSpecsForm: TTestSpecsForm;
implementation
uses ItemBankingUnit;
{ TTestSpecsForm }
procedure TTestSpecsForm.ReturnBtnClick(Sender: TObject);
begin
ItemBankFrm.BankInfo.TestItems := testno;
ItemBankFrm.NSpecifiedEdit.Text := IntToStr(testno);
TestSpecsForm.Hide;
Close;
end;
procedure TTestSpecsForm.SelectItemBtnClick(Sender: TObject);
begin
testno := testno + 1;
ItemBankFrm.TestContents[testno].ItemNumber := StrToInt(ItemNoEdit.Text);
ItemBankFrm.TestContents[testno].MajorCode := StrToInt(MajorCodeEdit.Text);
ItemBankFrm.TestContents[testno].MinorCode := StrToInt(MinorCodeEdit.Text);
ItemBankFrm.TestContents[testno].ItemType := SelectedEdit.Text;
NoItemsEdit.Text := IntToStr(testno);
end;
procedure TTestSpecsForm.FormShow(Sender: TObject);
begin
testno := 0;
NoItemsEdit.Text := '0';
end;
procedure TTestSpecsForm.SelectChoiceBoxItemClick(Sender: TObject; Index: integer);
var
count, nomc, notf, nomatch, noessay, i : integer;
response : string;
begin
nomc := StrToInt(MCNoEdit.Text);
notf := StrToInt(TFNoEdit.Text);
nomatch := StrToInt(MatchNoEdit.Text);
noessay := StrToInt(EssayNoEdit.Text);
case Index of
0 : begin // Select multiple choice items
SelectedEdit.Text := 'MC';
for i := 1 to nomc do
begin
ShowMCItem(self,i);
response := InputBox('Add item to test','Add?','Y');
if response = 'Y' then SelectItemBtnClick(self) else SkipBtnClick(self);
end;
end;
1 : begin // Select true or false items
SelectedEdit.Text := 'TF';
for i := 1 to notf do
begin
ShowTFItem(self,i);
response := InputBox('Add item to test','Add?','Y');
if response = 'Y' then SelectItemBtnClick(self) else SkipBtnClick(self);
end;
end;
2 : begin // Select Essay items
SelectedEdit.Text := 'Essay';
for i := 1 to noessay do
begin
ShowEssayItem(self,i);
response := InputBox('Add item to test','Add?','Y');
if response = 'Y' then SelectItemBtnClick(self) else SkipBtnClick(self);
end;
end;
3 : begin // Select matching items
SelectedEdit.Text := 'Matching';
for i := 1 to nomc do
begin
ShowMatchItem(self,i);
response := InputBox('Add item to test','Add?','Y');
if response = 'Y' then SelectItemBtnClick(self) else SkipBtnClick(self);
end;
end;
end;
end;
procedure TTestSpecsForm.SkipBtnClick(Sender: TObject);
begin
ShowMessage('Item skipped');
end;
procedure TTestSpecsForm.ShowMCItem(Sender: TObject; index : integer);
var
outline : string;
nochoices : integer;
space : integer;
begin
Panel1.Canvas.Clear;
space := Panel1.Canvas.Height div 9;
ItemNoEdit.Text := IntToStr(ItemBankFrm.MCItemInfo[index].itemnumber);
MajorCodeEdit.Text := IntToStr(ItemBankFrm.MCItemInfo[index].MajorCode);
MinorCodeEdit.Text := IntToStr(ItemBankFrm.MCItemInfo[index].MinorCode);
outline := ItemBankFrm.MCItemInfo[index].ItemStem;
Panel1.Canvas.TextOut(1,space,outline);
nochoices := ItemBankFrm.MCItemInfo[index].NoChoices ;
if nochoices > 0 then
begin
outline := format('Choice A %s',[ItemBankFrm.MCItemInfo[index].ChoiceOne]);
Panel1.Canvas.TextOut(1,space*2,outline);
end;
if nochoices > 1 then
begin
outline := format('Choice B %s',[ItemBankFrm.MCItemInfo[index].ChoiceTwo]);
Panel1.Canvas.TextOut(1,space*3,outline);
end;
if nochoices > 2 then
begin
outline := format('Choice C %s',[ItemBankFrm.MCItemInfo[index].ChoiceThree]);
Panel1.Canvas.TextOut(1,space*4,outline);
end;
if nochoices > 3 then
begin
outline := format('Choice D %s',[ItemBankFrm.MCItemInfo[index].ChoiceFour]);
Panel1.Canvas.TextOut(1,space*5,outline);
end;
if nochoices > 4 then
begin
outline := format('Choice E %s',[ItemBankFrm.MCItemInfo[index].ChoiceFive]);
Panel1.Canvas.TextOut(1,space*6,outline);
end;
outline := format('Correct Choice %s',[ItemBankFrm.MCItemInfo[index].CorrectChoice]);
Panel1.Canvas.TextOut(1,space*7,outline);
outline := format('Graphic Image %s',[ItemBankFrm.MCItemInfo[index].PicName]);
Panel1.Canvas.TextOut(1,space*8,outline);
end;
procedure TTestSpecsForm.ShowTFItem(Sender: TObject; index : integer);
var
outline : string;
nochoices : integer;
space : integer;
begin
Panel1.Canvas.Clear;
space := Panel1.Canvas.Height div 9;
ItemNoEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[index].itemnumber);
MajorCodeEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[index].MajorCode);
MinorCodeEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[index].MinorCode);
outline := ItemBankFrm.TFItemInfo[index].ItemStem;
Panel1.Canvas.TextOut(1,space,outline);
outline := ItemBankFrm.TFItemInfo[index].CorrectChoice ;
Panel1.Canvas.TextOut(1,space*2,outline);
outline := ItemBankFrm.TFItemInfo[index].PicName ;
Panel1.Canvas.TextOut(1,space*3,outline);
end;
procedure TTestSpecsForm.ShowEssayItem(Sender: TObject; index : integer);
var
outline : string;
nochoices : integer;
space : integer;
begin
Panel1.Canvas.Clear;
space := Panel1.Canvas.Height div 9;
ItemNoEdit.Text := IntToStr(ItemBankFrm.EssayInfo[index].itemnumber);
MajorCodeEdit.Text := IntToStr(ItemBankFrm.EssayInfo[index].MajorCode);
MinorCodeEdit.Text := IntToStr(ItemBankFrm.EssayInfo[index].MinorCode);
outline := ItemBankFrm.EssayInfo[index].ItemStem;
Panel1.Canvas.TextOut(1,space,outline);
outline := ItemBankFrm.EssayInfo[index].Answer ;
Panel1.Canvas.TextOut(1,space*2,outline);
outline := ItemBankFrm.EssayInfo[index].PicName ;
Panel1.Canvas.TextOut(1,space*3,outline);
end;
procedure TTestSpecsForm.ShowMatchItem(Sender: TObject; index : integer);
var
outline : string;
nochoices : integer;
space : integer;
noleft, noright : integer;
begin
Panel1.Canvas.Clear;
noleft := ItemBankFrm.MatchInfo[index].NLeft;
noright := ItemBankFrm.MatchInfo[index].NRight;
space := Panel1.Canvas.Height div 13;
ItemNoEdit.Text := IntToStr(ItemBankFrm.MatchInfo[index].itemnumber);
MajorCodeEdit.Text := IntToStr(ItemBankFrm.MatchInfo[index].MajorCode);
MinorCodeEdit.Text := IntToStr(ItemBankFrm.MatchInfo[index].MinorCode);
// do left and right stems
if noleft > 0 then
begin
outline := format('Left Item 1 %s',[ItemBankFrm.MatchInfo[index].Left1]);
Panel1.Canvas.TextOut(1,space,outline);
end;
if noright > 0 then
begin
outline := format(' Right Item 1 %s',[ItemBankFrm.MatchInfo[index].Right1]);
Panel1.Canvas.TextOut(1,space*2,outline);
end;
if noleft > 1 then
begin
outline := format('Left Item 2 %s',[ItemBankFrm.MatchInfo[index].Left2]);
Panel1.Canvas.TextOut(1,space*3,outline);
end;
if noright > 1 then
begin
outline := format(' Right Item 2 %s',[ItemBankFrm.MatchInfo[index].Right2]);
Panel1.Canvas.TextOut(1,space*4,outline);
end;
if noleft > 2 then
begin
outline := format('Left Item 3 %s',[ItemBankFrm.MatchInfo[index].Left3]);
Panel1.Canvas.TextOut(1,space*5,outline);
end;
if noright > 2 then
begin
outline := format(' Right Item 3 %s',[ItemBankFrm.MatchInfo[index].Right3]);
Panel1.Canvas.TextOut(1,space*6,outline);
end;
if noleft > 3 then
begin
outline := format('Left Item 4 %s',[ItemBankFrm.MatchInfo[index].Left4]);
Panel1.Canvas.TextOut(1,space*7,outline);
end;
if noright > 3 then
begin
outline := format(' Right Item 4 %s',[ItemBankFrm.MatchInfo[index].Right4]);
Panel1.Canvas.TextOut(1,space*8,outline);
end;
if noleft > 4 then
begin
outline := format('Left Item 5 %s',[ItemBankFrm.MatchInfo[index].Left5]);
Panel1.Canvas.TextOut(1,space*9,outline);
end;
if noright > 4 then
begin
outline := format(' Right Item 5 %s',[ItemBankFrm.MatchInfo[index].Right5]);
Panel1.Canvas.TextOut(1,space*10,outline);
end;
outline := ItemBankFrm.MatchInfo[index].CorrectChoice ;
Panel1.Canvas.TextOut(1,space*11,outline);
outline := ItemBankFrm.MatchInfo[index].PicName ;
Panel1.Canvas.TextOut(1,space*12,outline);
end;
initialization
{$I testspecsunit.lrs}
end.

View File

@ -0,0 +1,204 @@
object TFItemForm: TTFItemForm
Left = 210
Height = 501
Top = 113
Width = 627
Caption = 'True-False Item Development'
ClientHeight = 501
ClientWidth = 627
OnShow = FormShow
LCLVersion = '0.9.30'
object Memo1: TMemo
Left = 16
Height = 117
Top = 11
Width = 592
Lines.Strings = (
'Directions: To create a True or False item, you will need to enter the number of an item code which contains'
'both a major code and a minor code. It is suggested you print all item codes from the options menu on the'
'main procedure page of the item banking program. You can however, browse the item codes from this form.'
'After you have selected an item code number, enter the item stem in the space provided. Your item can also'
'include a jpeg picture prior to the presentation of the item on a test. To find the image, click the jpeg browse'
'button until you see the image you wish to include. When that item is shown, click the Select button to save'
'the name of the image file.'
)
TabOrder = 0
end
object TFItemNoLabel: TLabel
Left = 7
Height = 16
Top = 179
Width = 96
Caption = 'T-F Item Number:'
ParentColor = False
end
object TFItemNoEdit: TEdit
Left = 112
Height = 23
Top = 172
Width = 44
TabOrder = 1
Text = '1'
end
object ItemCodeLabel: TLabel
Left = 176
Height = 16
Top = 179
Width = 93
Caption = 'Item Major Code:'
ParentColor = False
end
object MajorCodeEdit: TEdit
Left = 280
Height = 23
Top = 172
Width = 41
TabOrder = 2
Text = '1'
end
object MinorCodeLabel: TLabel
Left = 336
Height = 16
Top = 177
Width = 94
Caption = 'Item Minor Code:'
ParentColor = False
end
object MinorCodeEdit: TEdit
Left = 440
Height = 23
Top = 172
Width = 45
TabOrder = 3
Text = '0'
end
object CodeBrowseBtn: TButton
Left = 506
Height = 28
Top = 168
Width = 106
Caption = 'Browse Items'
OnClick = CodeBrowseBtnClick
TabOrder = 4
end
object ItemStemLabel: TLabel
Left = 8
Height = 16
Top = 220
Width = 58
Caption = 'Item Stem:'
ParentColor = False
end
object ItemStemEdit: TEdit
Left = 73
Height = 23
Top = 213
Width = 539
TabOrder = 5
Text = 'ItemStemEdit'
end
object AnswerLabel: TLabel
Left = 8
Height = 16
Top = 256
Width = 84
Caption = 'Answer (T or F):'
ParentColor = False
end
object AnswerEdit: TEdit
Left = 96
Height = 23
Top = 249
Width = 29
TabOrder = 6
end
object jpeglabel: TLabel
Left = 10
Height = 16
Top = 299
Width = 225
Caption = 'jpeg photo to display prior to item (if any):'
ParentColor = False
end
object jpegnameEdit: TEdit
Left = 240
Height = 23
Top = 292
Width = 372
TabOrder = 7
Text = 'jpegnameEdit'
end
object jpegBrowseBtn: TButton
Left = 7
Height = 30
Top = 337
Width = 118
Caption = 'Browse jpeg Images'
OnClick = jpegBrowseBtnClick
TabOrder = 8
end
object Image1: TImage
Left = 138
Height = 151
Top = 337
Width = 211
end
object SelectImageBtn: TButton
Left = 10
Height = 26
Top = 408
Width = 112
Caption = 'Select Shown Image'
OnClick = SelectImageBtnClick
TabOrder = 9
end
object ItemSaveBtn: TButton
Left = 368
Height = 33
Top = 336
Width = 111
Caption = 'Save this item'
OnClick = ItemSaveBtnClick
TabOrder = 10
end
object StartNewBtn: TButton
Left = 498
Height = 30
Top = 392
Width = 111
Caption = 'Start a new item'
OnClick = StartNewBtnClick
TabOrder = 11
end
object ReturnBtn: TButton
Left = 432
Height = 30
Top = 456
Width = 111
Caption = 'Return'
OnClick = ReturnBtnClick
TabOrder = 12
end
object PreviousBtn: TButton
Left = 498
Height = 32
Top = 337
Width = 110
Caption = 'Show Previous Item'
OnClick = PreviousBtnClick
TabOrder = 13
end
object ShowNextBtn: TButton
Left = 369
Height = 30
Top = 392
Width = 109
Caption = 'Show Next Item'
OnClick = ShowNextBtnClick
TabOrder = 14
end
object OpenPictureDialog1: TOpenPictureDialog
left = 384
top = 448
end
end

View File

@ -0,0 +1,60 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TTFItemForm','FORMDATA',[
'TPF0'#11'TTFItemForm'#10'TFItemForm'#4'Left'#3#210#0#6'Height'#3#245#1#3'Top'
+#2'q'#5'Width'#3's'#2#7'Caption'#6#27'True-False Item Development'#12'Client'
+'Height'#3#245#1#11'ClientWidth'#3's'#2#6'OnShow'#7#8'FormShow'#10'LCLVersio'
+'n'#6#6'0.9.30'#0#5'TMemo'#5'Memo1'#4'Left'#2#16#6'Height'#2'u'#3'Top'#2#11#5
+'Width'#3'P'#2#13'Lines.Strings'#1#6'mDirections: To create a True or False'
+' item, you will need to enter the number of an item code which contains'#6
+'jboth a major code and a minor code. It is suggested you print all item co'
+'des from the options menu on the'#6'hmain procedure page of the item bankin'
+'g program. You can however, browse the item codes from this form.'#6'kAfte'
+'r you have selected an item code number, enter the item stem in the space p'
+'rovided. Your item can also'#6'qinclude a jpeg picture prior to the presen'
+'tation of the item on a test. To find the image, click the jpeg browse'#6
+'mbutton until you see the image you wish to include. When that item is sho'
+'wn, click the Select button to save'#6#27'the name of the image file.'#0#8
+'TabOrder'#2#0#0#0#6'TLabel'#13'TFItemNoLabel'#4'Left'#2#7#6'Height'#2#16#3
+'Top'#3#179#0#5'Width'#2'`'#7'Caption'#6#16'T-F Item Number:'#11'ParentColor'
+#8#0#0#5'TEdit'#12'TFItemNoEdit'#4'Left'#2'p'#6'Height'#2#23#3'Top'#3#172#0#5
+'Width'#2','#8'TabOrder'#2#1#4'Text'#6#1'1'#0#0#6'TLabel'#13'ItemCodeLabel'#4
+'Left'#3#176#0#6'Height'#2#16#3'Top'#3#179#0#5'Width'#2']'#7'Caption'#6#16'I'
+'tem Major Code:'#11'ParentColor'#8#0#0#5'TEdit'#13'MajorCodeEdit'#4'Left'#3
+#24#1#6'Height'#2#23#3'Top'#3#172#0#5'Width'#2')'#8'TabOrder'#2#2#4'Text'#6#1
+'1'#0#0#6'TLabel'#14'MinorCodeLabel'#4'Left'#3'P'#1#6'Height'#2#16#3'Top'#3
+#177#0#5'Width'#2'^'#7'Caption'#6#16'Item Minor Code:'#11'ParentColor'#8#0#0
+#5'TEdit'#13'MinorCodeEdit'#4'Left'#3#184#1#6'Height'#2#23#3'Top'#3#172#0#5
+'Width'#2'-'#8'TabOrder'#2#3#4'Text'#6#1'0'#0#0#7'TButton'#13'CodeBrowseBtn'
+#4'Left'#3#250#1#6'Height'#2#28#3'Top'#3#168#0#5'Width'#2'j'#7'Caption'#6#12
+'Browse Items'#7'OnClick'#7#18'CodeBrowseBtnClick'#8'TabOrder'#2#4#0#0#6'TLa'
+'bel'#13'ItemStemLabel'#4'Left'#2#8#6'Height'#2#16#3'Top'#3#220#0#5'Width'#2
+':'#7'Caption'#6#10'Item Stem:'#11'ParentColor'#8#0#0#5'TEdit'#12'ItemStemEd'
+'it'#4'Left'#2'I'#6'Height'#2#23#3'Top'#3#213#0#5'Width'#3#27#2#8'TabOrder'#2
+#5#4'Text'#6#12'ItemStemEdit'#0#0#6'TLabel'#11'AnswerLabel'#4'Left'#2#8#6'He'
+'ight'#2#16#3'Top'#3#0#1#5'Width'#2'T'#7'Caption'#6#16'Answer (T or F):'#11
+'ParentColor'#8#0#0#5'TEdit'#10'AnswerEdit'#4'Left'#2'`'#6'Height'#2#23#3'To'
+'p'#3#249#0#5'Width'#2#29#8'TabOrder'#2#6#0#0#6'TLabel'#9'jpeglabel'#4'Left'
+#2#10#6'Height'#2#16#3'Top'#3'+'#1#5'Width'#3#225#0#7'Caption'#6'-jpeg photo'
+' to display prior to item (if any):'#11'ParentColor'#8#0#0#5'TEdit'#12'jpeg'
+'nameEdit'#4'Left'#3#240#0#6'Height'#2#23#3'Top'#3'$'#1#5'Width'#3't'#1#8'Ta'
+'bOrder'#2#7#4'Text'#6#12'jpegnameEdit'#0#0#7'TButton'#13'jpegBrowseBtn'#4'L'
+'eft'#2#7#6'Height'#2#30#3'Top'#3'Q'#1#5'Width'#2'v'#7'Caption'#6#18'Browse '
+'jpeg Images'#7'OnClick'#7#18'jpegBrowseBtnClick'#8'TabOrder'#2#8#0#0#6'TIma'
+'ge'#6'Image1'#4'Left'#3#138#0#6'Height'#3#151#0#3'Top'#3'Q'#1#5'Width'#3#211
+#0#0#0#7'TButton'#14'SelectImageBtn'#4'Left'#2#10#6'Height'#2#26#3'Top'#3#152
+#1#5'Width'#2'p'#7'Caption'#6#18'Select Shown Image'#7'OnClick'#7#19'SelectI'
+'mageBtnClick'#8'TabOrder'#2#9#0#0#7'TButton'#11'ItemSaveBtn'#4'Left'#3'p'#1
+#6'Height'#2'!'#3'Top'#3'P'#1#5'Width'#2'o'#7'Caption'#6#14'Save this item'#7
+'OnClick'#7#16'ItemSaveBtnClick'#8'TabOrder'#2#10#0#0#7'TButton'#11'StartNew'
+'Btn'#4'Left'#3#242#1#6'Height'#2#30#3'Top'#3#136#1#5'Width'#2'o'#7'Caption'
+#6#16'Start a new item'#7'OnClick'#7#16'StartNewBtnClick'#8'TabOrder'#2#11#0
+#0#7'TButton'#9'ReturnBtn'#4'Left'#3#176#1#6'Height'#2#30#3'Top'#3#200#1#5'W'
+'idth'#2'o'#7'Caption'#6#6'Return'#7'OnClick'#7#14'ReturnBtnClick'#8'TabOrde'
+'r'#2#12#0#0#7'TButton'#11'PreviousBtn'#4'Left'#3#242#1#6'Height'#2' '#3'Top'
+#3'Q'#1#5'Width'#2'n'#7'Caption'#6#18'Show Previous Item'#7'OnClick'#7#16'Pr'
+'eviousBtnClick'#8'TabOrder'#2#13#0#0#7'TButton'#11'ShowNextBtn'#4'Left'#3'q'
+#1#6'Height'#2#30#3'Top'#3#136#1#5'Width'#2'm'#7'Caption'#6#14'Show Next Ite'
+'m'#7'OnClick'#7#16'ShowNextBtnClick'#8'TabOrder'#2#14#0#0#18'TOpenPictureDi'
+'alog'#18'OpenPictureDialog1'#4'left'#3#128#1#3'top'#3#192#1#0#0#0
]);

View File

@ -0,0 +1,259 @@
unit TFItemUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, ExtDlgs, outputunit;
type
{ TTFItemForm }
TTFItemForm = class(TForm)
ShowNextBtn: TButton;
PreviousBtn: TButton;
ItemSaveBtn: TButton;
OpenPictureDialog1: TOpenPictureDialog;
StartNewBtn: TButton;
ReturnBtn: TButton;
SelectImageBtn: TButton;
Image1: TImage;
jpegBrowseBtn: TButton;
CodeBrowseBtn: TButton;
AnswerEdit: TEdit;
jpegnameEdit: TEdit;
ItemStemEdit: TEdit;
ItemStemLabel: TLabel;
AnswerLabel: TLabel;
jpeglabel: TLabel;
MinorCodeEdit: TEdit;
MinorCodeLabel: TLabel;
MajorCodeEdit: TEdit;
ItemCodeLabel: TLabel;
TFItemNoEdit: TEdit;
TFItemNoLabel: TLabel;
Memo1: TMemo;
procedure CodeBrowseBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ItemSaveBtnClick(Sender: TObject);
procedure jpegBrowseBtnClick(Sender: TObject);
procedure PreviousBtnClick(Sender: TObject);
procedure ReturnBtnClick(Sender: TObject);
procedure SelectImageBtnClick(Sender: TObject);
procedure ShowNextBtnClick(Sender: TObject);
procedure StartNewBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
TFItemForm: TTFItemForm;
implementation
uses ItemBankingUnit;
{ TTFItemForm }
procedure TTFItemForm.jpegBrowseBtnClick(Sender: TObject);
VAR
JPEG : TJPEGImage;
begin
OpenPictureDialog1.Options := OpenPictureDialog1.Options+[ofFileMustExist];
if not OpenPictureDialog1.Execute then exit;
try
JPEG := TJPEGImage.Create;
try
JPEG.LoadFromFile(OpenPictureDialog1.FileName);
Image1.Picture.Assign(JPEG);
finally
JPEG.Free;
end;
except
on E: Exception do begin
MessageDlg('Error','Error: '+E.Message,mtError,[mbOk],0);
end;
end;
Image1.Proportional := true;
end;
procedure TTFItemForm.PreviousBtnClick(Sender: TObject);
Var
response : string;
itemno : integer;
JPEG : TJPEGImage;
begin
response := InputBox('Code Number:','Number:','1');
itemno := StrToInt(response);
if itemno <= ItemBankFrm.BankInfo.NTFItems then
begin
TFItemNoEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[itemno].ItemNumber);
MajorCodeEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[itemno].majorcode);
MinorCodeEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[itemno].minorcode);
ItemStemEdit.Text := ItemBankFrm.TFItemInfo[itemno].ItemStem ;
AnswerEdit.Text := ItemBankFrm.TFItemInfo[itemno].CorrectChoice;
jpegnameEdit.Text := ItemBankFrm.TFItemInfo[itemno].PicName;
if jpegnameEdit.Text <> 'none' then
begin
JPEG := TJPEGImage.Create;
try
JPEG.LoadFromFile(jpegnameEdit.Text);
Image1.Picture.Assign(JPEG);
finally
JPEG.Free;
Image1.Proportional := true;
end;
end;
end;
end;
procedure TTFItemForm.ReturnBtnClick(Sender: TObject);
begin
TFItemForm.Hide;
Close;
end;
procedure TTFItemForm.ItemSaveBtnClick(Sender: TObject);
var
currentno : integer;
count : integer;
begin
count := ItemBankFrm.BankInfo.NTFItems;
currentno := StrToInt(TFItemNoEdit.Text);
if currentno > count then
begin
ItemBankFrm.BankInfo.NTFItems := currentno;
ItemBankFrm.NTFItemsText.Text := IntToStr(currentno);
end;
ItemBankFrm.TFItemInfo[currentno].ItemNumber := currentno;
ItemBankFrm.TFItemInfo[currentno].majorcode := StrToInt(MajorCodeEdit.Text);
ItemBankFrm.TFItemInfo[currentno].minorcode := StrToInt(MinorCodeEdit.Text);
ItemBankFrm.TFItemInfo[currentno].ItemStem := ItemStemEdit.Text;
ItemBankFrm.TFItemInfo[currentno].CorrectChoice := AnswerEdit.text[1];
ItemBankFrm.TFItemInfo[currentno].PicName := jpegnameEdit.Text;
end;
procedure TTFItemForm.CodeBrowseBtnClick(Sender: TObject);
var
count : integer;
i : integer;
outline : string;
begin
OutPutFrm.RichEdit.Clear;
count := ItemBankFrm.BankInfo.NTFItems;
OutPutFrm.RichEdit.Lines.Add('Current Items');
OutPutFrm.RichEdit.Lines.Add('');
for i := 1 to count do
begin
outline := format('Item number %3d',[ItemBankFrm.TFItemInfo[i].itemnumber]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Major Code %3d',[ItemBankFrm.TFItemInfo[i].majorcode]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Minor Code %3d',[ItemBankFrm.TFItemInfo[i].minorcode]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Item Stem %s',[ItemBankFrm.TFItemInfo[i].ItemStem]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Correct Choice %s',[ItemBankFrm.TFItemInfo[i].CorrectChoice]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Graphic Image %s',[ItemBankFrm.TFItemInfo[i].PicName]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('');
end;
OutPutFrm.ShowModal;
end;
procedure TTFItemForm.FormShow(Sender: TObject);
Var
nitems : integer;
JPEG : TJPEGImage;
begin
if ItemBankFrm.BankInfo.NTFItems > 0 then
begin
nitems := ItemBankFrm.BankInfo.NTFItems;
TFItemNoEdit.Text := '1'; //IntToStr(ItemBankFrm.TFItemInfo[1].ItemNumber);
MajorCodeEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[1].majorcode) ;
MinorCodeEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[1].minorcode);
ItemStemEdit.Text := ItemBankFrm.TFItemInfo[1].ItemStem;
AnswerEdit.Text := ItemBankFrm.TFItemInfo[1].CorrectChoice;
jpegnameEdit.Text := ItemBankFrm.TFItemInfo[1].PicName;
if jpegnameEdit.Text <> 'none' then
begin
JPEG := TJPEGImage.Create;
try
JPEG.LoadFromFile(jpegnameEdit.Text);
Image1.Picture.Assign(JPEG);
finally
JPEG.Free;
Image1.Proportional := true;
end;
end;
end else
begin
TFItemNoEdit.Text := '1';
MajorCodeEdit.Text := '1';
MinorCodeEdit.Text := '0';
ItemStemEdit.Text := '';
AnswerEdit.Text := '';
jpegnameEdit.Text := '';
Image1.Canvas.Clear;
end;
end;
procedure TTFItemForm.SelectImageBtnClick(Sender: TObject);
begin
jpegnameEdit.Text := OpenPictureDialog1.FileName;
end;
procedure TTFItemForm.ShowNextBtnClick(Sender: TObject);
var
count : integer;
itemno : integer;
JPEG : TJPEGImage;
begin
itemno := StrToInt(TFItemNoEdit.Text) + 1;
count := ItemBankFrm.BankInfo.NTFItems;
if count <= itemno then
begin
TFItemNoEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[itemno].ItemNumber);
MajorCodeEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[itemno].majorcode) ;
MinorCodeEdit.Text := IntToStr(ItemBankFrm.TFItemInfo[itemno].minorcode);
ItemStemEdit.Text := ItemBankFrm.TFItemInfo[itemno].ItemStem;
AnswerEdit.Text := ItemBankFrm.TFItemInfo[itemno].CorrectChoice;
jpegnameEdit.Text := ItemBankFrm.TFItemInfo[itemno].PicName;
if jpegnameEdit.Text <> 'none' then
begin
JPEG := TJPEGImage.Create;
try
JPEG.LoadFromFile(jpegnameEdit.Text);
Image1.Picture.Assign(JPEG);
finally
JPEG.Free;
Image1.Proportional := true;
end;
end;
end;
end;
procedure TTFItemForm.StartNewBtnClick(Sender: TObject);
var
currentno : integer;
begin
currentno := ItemBankFrm.BankInfo.NTFItems + 1;
TFItemNoEdit.Text := IntToStr(currentno);
currentno := StrToInt(MinorCodeEdit.Text);
MinorCodeEdit.Text := IntToStr(currentno + 1);
ItemStemEdit.Text := '';
AnswerEdit.Text := '';
jpegnameEdit.Text := 'none';
Image1.Canvas.Clear;
end;
initialization
{$I tfitemunit.lrs}
end.

View File

@ -0,0 +1,96 @@
object TprobForm: TTprobForm
Left = 288
Height = 142
Top = 161
Width = 398
Caption = 'Probability of a larger Student t value'
ClientHeight = 142
ClientWidth = 398
OnShow = ResetBtnClick
LCLVersion = '0.9.30'
object Label1: TLabel
Left = 9
Height = 16
Top = 14
Width = 94
Caption = 'Student t value = '
ParentColor = False
end
object tValueEdit: TEdit
Left = 123
Height = 23
Top = 7
Width = 62
TabOrder = 0
Text = 'tValueEdit'
end
object Label2: TLabel
Left = 195
Height = 16
Top = 14
Width = 112
Caption = 'with deg. freedom = '
ParentColor = False
end
object DFEdit: TEdit
Left = 311
Height = 23
Top = 7
Width = 50
TabOrder = 1
Text = 'DFEdit'
end
object Label3: TLabel
Left = 8
Height = 16
Top = 47
Width = 136
Caption = 'Probability larger value = '
ParentColor = False
end
object ProbEdit: TEdit
Left = 145
Height = 23
Top = 39
Width = 74
TabOrder = 2
Text = 'ProbEdit'
end
object CancelBtn: TButton
Left = 8
Height = 33
Top = 80
Width = 82
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 3
end
object ResetBtn: TButton
Left = 104
Height = 33
Top = 80
Width = 82
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 4
end
object ComputeBtn: TButton
Left = 200
Height = 33
Top = 80
Width = 82
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 5
end
object ReturnBtn: TButton
Left = 296
Height = 33
Top = 80
Width = 77
Caption = 'Return'
ModalResult = 1
TabOrder = 6
end
end

View File

@ -0,0 +1,26 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TTprobForm','FORMDATA',[
'TPF0'#10'TTprobForm'#9'TprobForm'#4'Left'#3' '#1#6'Height'#3#142#0#3'Top'#3
+#161#0#5'Width'#3#142#1#7'Caption'#6'''Probability of a larger Student t val'
+'ue'#12'ClientHeight'#3#142#0#11'ClientWidth'#3#142#1#6'OnShow'#7#13'ResetBt'
+'nClick'#10'LCLVersion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Heig'
+'ht'#2#16#3'Top'#2#14#5'Width'#2'^'#7'Caption'#6#18'Student t value = '#11'P'
+'arentColor'#8#0#0#5'TEdit'#10'tValueEdit'#4'Left'#2'{'#6'Height'#2#23#3'Top'
+#2#7#5'Width'#2'>'#8'TabOrder'#2#0#4'Text'#6#10'tValueEdit'#0#0#6'TLabel'#6
+'Label2'#4'Left'#3#195#0#6'Height'#2#16#3'Top'#2#14#5'Width'#2'p'#7'Caption'
+#6#20'with deg. freedom = '#11'ParentColor'#8#0#0#5'TEdit'#6'DFEdit'#4'Left'
+#3'7'#1#6'Height'#2#23#3'Top'#2#7#5'Width'#2'2'#8'TabOrder'#2#1#4'Text'#6#6
+'DFEdit'#0#0#6'TLabel'#6'Label3'#4'Left'#2#8#6'Height'#2#16#3'Top'#2'/'#5'Wi'
+'dth'#3#136#0#7'Caption'#6#27'Probability larger value = '#11'ParentColor'#8
+#0#0#5'TEdit'#8'ProbEdit'#4'Left'#3#145#0#6'Height'#2#23#3'Top'#2''''#5'Widt'
+'h'#2'J'#8'TabOrder'#2#2#4'Text'#6#8'ProbEdit'#0#0#7'TButton'#9'CancelBtn'#4
+'Left'#2#8#6'Height'#2'!'#3'Top'#2'P'#5'Width'#2'R'#6'Cancel'#9#7'Caption'#6
+#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#3#0#0#7'TButton'#8'ResetBtn'#4
+'Left'#2'h'#6'Height'#2'!'#3'Top'#2'P'#5'Width'#2'R'#7'Caption'#6#5'Reset'#7
+'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#4#0#0#7'TButton'#10'ComputeBtn'#4
+'Left'#3#200#0#6'Height'#2'!'#3'Top'#2'P'#5'Width'#2'R'#7'Caption'#6#7'Compu'
+'te'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#5#0#0#7'TButton'#9'Retur'
+'nBtn'#4'Left'#3'('#1#6'Height'#2'!'#3'Top'#2'P'#5'Width'#2'M'#7'Caption'#6#6
+'Return'#11'ModalResult'#2#1#8'TabOrder'#2#6#0#0#0
]);

View File

@ -0,0 +1,67 @@
unit TprobUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, functionslib;
type
{ TTprobForm }
TTprobForm = class(TForm)
CancelBtn: TButton;
tValueEdit: TEdit;
ComputeBtn: TButton;
DFEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
ProbEdit: TEdit;
ResetBtn: TButton;
ReturnBtn: TButton;
procedure ComputeBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
TprobForm: TTprobForm;
implementation
{ TTprobForm }
procedure TTprobForm.ResetBtnClick(Sender: TObject);
begin
tValueEdit.Text := '';
DFEdit.Text := '';
ProbEdit.Text := '';
end;
procedure TTprobForm.ComputeBtnClick(Sender: TObject);
VAR
tvalue, dfvalue, prob : double;
outvalue : string;
begin
tvalue := StrToFloat(tValueEdit.Text);
dfvalue := StrToFloat(DFEdit.Text);
if tvalue >= 0.0 then prob := 0.5 * probt(tvalue,dfvalue);
if tvalue < 0.0 then prob := 1.0 - probt(tvalue,dfvalue) +
(0.5 * probt(tvalue,dfvalue)) ;
if tvalue = 0.0 then prob := 0.50;
outvalue := format('%6.4f',[prob]);
ProbEdit.Text := outvalue;
end;
initialization
{$I tprobunit.lrs}
end.

View File

@ -0,0 +1,372 @@
object TransFrm: TTransFrm
Left = 127
Height = 412
Top = 100
Width = 591
Caption = 'Transformations'
ClientHeight = 412
ClientWidth = 591
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 8
Height = 14
Top = 8
Width = 55
Caption = 'VARIABLES'
ParentColor = False
end
object Label2: TLabel
Left = 229
Height = 14
Top = 24
Width = 69
Caption = 'Arguement V1'
ParentColor = False
end
object Label3: TLabel
Left = 233
Height = 14
Top = 104
Width = 45
Caption = 'Constant'
ParentColor = False
end
object Label4: TLabel
Left = 228
Height = 14
Top = 200
Width = 69
Caption = 'Arguement V2'
ParentColor = False
end
object Label5: TLabel
Left = 104
Height = 14
Top = 336
Width = 109
Caption = 'Save New Variable As:'
ParentColor = False
end
object Label6: TLabel
Left = 369
Height = 14
Top = 312
Width = 122
Caption = 'Selected Transformation:'
ParentColor = False
end
object VarList: TListBox
Left = 8
Height = 285
Top = 24
Width = 156
ItemHeight = 0
TabOrder = 0
end
object V1InBtn: TBitBtn
Left = 181
Height = 29
Top = 24
Width = 34
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = V1InBtnClick
TabOrder = 1
end
object V1OutBtn: TBitBtn
Left = 181
Height = 32
Top = 56
Width = 35
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = V1OutBtnClick
TabOrder = 2
end
object V2InBtn: TBitBtn
Left = 181
Height = 31
Top = 200
Width = 35
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = V2InBtnClick
TabOrder = 3
end
object V2OutBtn: TBitBtn
Left = 181
Height = 27
Top = 232
Width = 36
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = V2OutBtnClick
TabOrder = 4
end
object V1Edit: TEdit
Left = 228
Height = 21
Top = 40
Width = 117
TabOrder = 5
Text = 'V1Edit'
end
object ConstantEdit: TEdit
Left = 229
Height = 21
Top = 120
Width = 115
TabOrder = 6
Text = 'ConstantEdit'
end
object V2Edit: TEdit
Left = 228
Height = 21
Top = 216
Width = 114
TabOrder = 7
Text = 'V2Edit'
end
object TransList: TListBox
Left = 367
Height = 279
Top = 16
Width = 211
Items.Strings = (
'New = V1 + C'
'New = V1 - C'
'New = V1 * C'
'New = V1 / C'
'New = V1 ^ C'
'New = V1 + V2'
'New = V1 - V2'
'New = V1 * V2'
'New = V1 / V2'
'New = V1 ^ V2'
'New = ln(V1) {base e}'
'New = log(V1) {base 10}'
'New = exp(v1) {base e}'
'New = exp(V1) {base 10}'
'New = Sin(V1)'
'New = Cos(V1)'
'New = Tan(V1)'
'New = ArcSin(V1)'
'New = ArcCos(V1)'
'New = ArcTan(V1)'
'New = Z(V1)'
'New = Rank(V1)'
'New = ProbZ(V1)'
'New = NormDistZ(V1)'
'New = Abs(V1)'
'New = C'
'New = C - X'
'New = C / X'
)
ItemHeight = 13
OnClick = TransListClick
TabOrder = 8
end
object SaveEdit: TEdit
Left = 228
Height = 21
Top = 329
Width = 113
TabOrder = 9
Text = 'SaveEdit'
end
object TransEdit: TEdit
Left = 368
Height = 21
Top = 329
Width = 193
TabOrder = 10
Text = 'TransEdit'
end
object ResetBtn: TButton
Left = 128
Height = 28
Top = 368
Width = 78
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 11
end
object CancelBtn: TButton
Left = 240
Height = 28
Top = 368
Width = 78
Caption = 'Cancel'
ModalResult = 2
TabOrder = 12
end
object ComputeBtn: TButton
Left = 367
Height = 26
Top = 370
Width = 78
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 13
end
object ReturnBtn: TButton
Left = 480
Height = 26
Top = 371
Width = 78
Caption = 'Return'
ModalResult = 1
TabOrder = 14
end
object HelpBtn: TButton
Tag = 150
Left = 16
Height = 29
Top = 368
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 15
end
end

View File

@ -0,0 +1,252 @@
LazarusResources.Add('TTransFrm','FORMDATA',[
'TPF0'#9'TTransFrm'#8'TransFrm'#4'Left'#2#127#6'Height'#3#156#1#3'Top'#2'd'#5
+'Width'#3'O'#2#7'Caption'#6#15'Transformations'#12'ClientHeight'#3#156#1#11
+'ClientWidth'#3'O'#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2'#0#6
+'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#14#3'Top'#2#8#5'Width'#2'7'#7'Cap'
+'tion'#6#9'VARIABLES'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#3#229
+#0#6'Height'#2#14#3'Top'#2#24#5'Width'#2'E'#7'Caption'#6#12'Arguement V1'#11
+'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#233#0#6'Height'#2#14#3'Top'
+#2'h'#5'Width'#2'-'#7'Caption'#6#8'Constant'#11'ParentColor'#8#0#0#6'TLabel'
+#6'Label4'#4'Left'#3#228#0#6'Height'#2#14#3'Top'#3#200#0#5'Width'#2'E'#7'Cap'
+'tion'#6#12'Arguement V2'#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#2
+'h'#6'Height'#2#14#3'Top'#3'P'#1#5'Width'#2'm'#7'Caption'#6#21'Save New Vari'
+'able As:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label6'#4'Left'#3'q'#1#6'Height'
+#2#14#3'Top'#3'8'#1#5'Width'#2'z'#7'Caption'#6#24'Selected Transformation:'
+#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#6'Height'#3#29#1#3
+'Top'#2#24#5'Width'#3#156#0#10'ItemHeight'#2#0#8'TabOrder'#2#0#0#0#7'TBitBtn'
+#7'V1InBtn'#4'Left'#3#181#0#6'Height'#2#29#3'Top'#2#24#5'Width'#2'"'#10'Glyp'
+'h.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0
+#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'
+#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'
+#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'
+#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255
+#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165
+#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201
+#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140
+'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255
+#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154
+#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194
+#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'
+#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'
+#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/'
+'x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#12'V1InBtnClick'#8
+'TabOrder'#2#1#0#0#7'TBitBtn'#8'V1OutBtn'#4'Left'#3#181#0#6'Height'#2' '#3'T'
+'op'#2'8'#5'Width'#2'#'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0
+#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0
+#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'
+#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161
+'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131
+#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/'
+'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'
+#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255
+#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132
+#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255
+#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154
+#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255
+#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201
+#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'
+#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num'
+'Glyphs'#2#0#7'OnClick'#7#13'V1OutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#7
+'V2InBtn'#4'Left'#3#181#0#6'Height'#2#31#3'Top'#3#200#0#5'Width'#2'#'#10'Gly'
+'ph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0
+#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
,#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'
+#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'
+#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'
+#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255
+#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165
+#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201
+#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140
+'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255
+#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154
+#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194
+#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'
+#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'
+#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/'
+'x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#12'V2InBtnClick'#8
+'TabOrder'#2#3#0#0#7'TBitBtn'#8'V2OutBtn'#4'Left'#3#181#0#6'Height'#2#27#3'T'
+'op'#3#232#0#5'Width'#2'$'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0
+#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'
+#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'
+#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161
+'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131
+#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/'
,'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'
+#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255
+#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132
+#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255
+#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154
+#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255
+#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201
+#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'
+#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num'
+'Glyphs'#2#0#7'OnClick'#7#13'V2OutBtnClick'#8'TabOrder'#2#4#0#0#5'TEdit'#6'V'
+'1Edit'#4'Left'#3#228#0#6'Height'#2#21#3'Top'#2'('#5'Width'#2'u'#8'TabOrder'
+#2#5#4'Text'#6#6'V1Edit'#0#0#5'TEdit'#12'ConstantEdit'#4'Left'#3#229#0#6'Hei'
+'ght'#2#21#3'Top'#2'x'#5'Width'#2's'#8'TabOrder'#2#6#4'Text'#6#12'ConstantEd'
+'it'#0#0#5'TEdit'#6'V2Edit'#4'Left'#3#228#0#6'Height'#2#21#3'Top'#3#216#0#5
+'Width'#2'r'#8'TabOrder'#2#7#4'Text'#6#6'V2Edit'#0#0#8'TListBox'#9'TransList'
+#4'Left'#3'o'#1#6'Height'#3#23#1#3'Top'#2#16#5'Width'#3#211#0#13'Items.Strin'
+'gs'#1#6#12'New = V1 + C'#6#12'New = V1 - C'#6#12'New = V1 * C'#6#12'New = V'
+'1 / C'#6#12'New = V1 ^ C'#6#13'New = V1 + V2'#6#13'New = V1 - V2'#6#13'New '
+'= V1 * V2'#6#13'New = V1 / V2'#6#13'New = V1 ^ V2'#6#21'New = ln(V1) {base '
+'e}'#6#23'New = log(V1) {base 10}'#6#22'New = exp(v1) {base e}'#6#23'New = e'
+'xp(V1) {base 10}'#6#13'New = Sin(V1)'#6#13'New = Cos(V1)'#6#13'New = Tan(V1'
+')'#6#16'New = ArcSin(V1)'#6#16'New = ArcCos(V1)'#6#16'New = ArcTan(V1)'#6#11
+'New = Z(V1)'#6#14'New = Rank(V1)'#6#15'New = ProbZ(V1)'#6#19'New = NormDist'
+'Z(V1)'#6#13'New = Abs(V1)'#6#7'New = C'#6#11'New = C - X'#6#11'New = C / X'
+#0#10'ItemHeight'#2#13#7'OnClick'#7#14'TransListClick'#8'TabOrder'#2#8#0#0#5
+'TEdit'#8'SaveEdit'#4'Left'#3#228#0#6'Height'#2#21#3'Top'#3'I'#1#5'Width'#2
+'q'#8'TabOrder'#2#9#4'Text'#6#8'SaveEdit'#0#0#5'TEdit'#9'TransEdit'#4'Left'#3
+'p'#1#6'Height'#2#21#3'Top'#3'I'#1#5'Width'#3#193#0#8'TabOrder'#2#10#4'Text'
+#6#9'TransEdit'#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#128#0#6'Height'#2#28#3
+'Top'#3'p'#1#5'Width'#2'N'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnCli'
+'ck'#8'TabOrder'#2#11#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#240#0#6'Height'#2
+#28#3'Top'#3'p'#1#5'Width'#2'N'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8
+'TabOrder'#2#12#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3'o'#1#6'Height'#2#26#3
+'Top'#3'r'#1#5'Width'#2'N'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBt'
+'nClick'#8'TabOrder'#2#13#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#224#1#6'Heig'
+'ht'#2#26#3'Top'#3's'#1#5'Width'#2'N'#7'Caption'#6#6'Return'#11'ModalResult'
+#2#1#8'TabOrder'#2#14#0#0#7'TButton'#7'HelpBtn'#3'Tag'#3#150#0#4'Left'#2#16#6
+'Height'#2#29#3'Top'#3'p'#1#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7
+#12'HelpBtnClick'#8'TabOrder'#2#15#0#0#0
]);

View File

@ -0,0 +1,316 @@
unit TransFrmUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, Globals, FunctionsLib, Math, DataProcs, DictionaryUnit,
contexthelpunit;
type
{ TTransFrm }
TTransFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
ConstantEdit: TEdit;
TransEdit: TEdit;
Label6: TLabel;
SaveEdit: TEdit;
Label5: TLabel;
TransList: TListBox;
V2Edit: TEdit;
Label3: TLabel;
Label4: TLabel;
V1Edit: TEdit;
Label2: TLabel;
V1InBtn: TBitBtn;
V1OutBtn: TBitBtn;
V2InBtn: TBitBtn;
V2OutBtn: TBitBtn;
Label1: TLabel;
VarList: TListBox;
procedure HelpBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure CancelBtnClick(Sender: TObject);
procedure ReturnBtnClick(Sender: TObject);
procedure ComputeBtnClick(Sender: TObject);
procedure TransListClick(Sender: TObject);
procedure V1InBtnClick(Sender: TObject);
procedure V1OutBtnClick(Sender: TObject);
procedure V2InBtnClick(Sender: TObject);
procedure V2OutBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
TransFrm: TTransFrm;
implementation
uses MainUnit;
procedure TTransFrm.ResetBtnClick(Sender: TObject);
var i : integer;
begin
VarList.Clear;
V1Edit.Text := '';
V2Edit.Text := '';
ConstantEdit.Text := '';
SaveEdit.Text := '';
TransEdit.Text := '';
V1InBtn.Visible := true;
V2InBtn.Visible := true;
V1OutBtn.Visible := false;
V2OutBtn.Visible := false;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TTransFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
//-------------------------------------------------------------------
procedure TTransFrm.CancelBtnClick(Sender: TObject);
begin
TransFrm.Hide;
end;
//-------------------------------------------------------------------
procedure TTransFrm.ReturnBtnClick(Sender: TObject);
begin
TransFrm.Hide;
end;
//-------------------------------------------------------------------
procedure TTransFrm.ComputeBtnClick(Sender: TObject);
var
i, TIndex, v1col, v2col, gridcol : integer;
index, pcntile : DblDyneVec;
cellstring : string;
TwoArgs : boolean;
constant, mean, stddev, N, X, Y, Z : double;
begin
constant := 0.0;
TwoArgs := false;
v1col := 1;
v2col := 2;
Y := 0.0;
Z := 0.0;
mean := 0.0;
stddev := 0.0;
if (TransEdit.Text = '') then
begin
ShowMessage('ERROR! First click on the desired transformation.');
exit;
end;
if (V1Edit.Text = '') then
begin
ShowMessage('ERROR! First click on a variable to transform.');
exit;
end;
if (SaveEdit.Text = '') then
begin
ShowMessage('ERROR! Enter a label for the new variable.');
exit;
end;
// Check to see if the transformation requires two variables
TIndex := TransList.ItemIndex;
if ((TIndex > 4) and (TIndex < 10)) then
begin
TwoArgs := true;
if (V2Edit.Text = '') then
begin
ShowMessage('Select a variable for the V2 arguement.');
exit;
end;
end;
// Find column of variable one and two (if selected)
for i := 1 to NoVariables do
begin
cellstring := OS3MainFrm.DataGrid.Cells[i,0];
if V1Edit.Text = cellstring then v1col := i;
if (TwoArgs) then
begin
if cellstring = v2Edit.Text then v2col := i;
end;
end;
// Check for a constant
if (ConstantEdit.Text <> '') then
constant := StrToFloat(ConstantEdit.Text);
// Add new column to grid
gridcol := NoVariables + 1;
DictionaryFrm.NewVar(gridcol);
DictionaryFrm.DictGrid.Cells[1,gridcol] := SaveEdit.Text;
OS3MainFrm.DataGrid.Cells[gridcol,0] := SaveEdit.Text;
cellstring := SaveEdit.Text;
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
// OS3MainFrm.DataGrid.ColCount := OS3MainFrm.DataGrid.ColCount + 1;
SetLength(index,NoCases);
SetLength(pcntile, NoCases);
// Do the appropriate transformation
if (TIndex = 21) then Rank(v1col, index); // get ranks
if ((TIndex = 22) or (TIndex = 24)) then PRank(v1col, pcntile); // get percentile ranks
if ((TIndex = 20) or (TIndex = 23)) then // z transformation - need mean and stddev
begin
mean := 0.0;
stddev := 0.0;
for i := 1 to NoCases do
begin
if IsFiltered(i) then continue;
X := StrToFloat(OS3MainFrm.DataGrid.Cells[v1col,i]);
mean := mean + X;
stddev := stddev + (X * X);
end;
N := NoCases;
stddev := stddev - (mean * mean) / N;
stddev := stddev / (N - 1.0);
stddev := sqrt(stddev);
mean := mean / N;
end;
for i := 1 to NoCases do // cases
begin
if IsFiltered(i) then continue;
cellstring := Trim((OS3MainFrm.DataGrid.Cells[v1col,i]));
if cellstring = '' then continue;
X := StrToFloat(cellstring);
if TwoArgs then Y := StrToFloat(OS3MainFrm.DataGrid.Cells[v2col,i]);
case TIndex of
0 : Z := X + constant;// V1 + C
1 : Z := X - constant;// V1 - C
2 : Z := X * constant;// V1 * C
3 : Z := X / constant;// V1 / C
4 : Z := power(X,constant);// v1 ** C
5 : Z := X + Y;// V1 + V2
6 : Z := X - Y;// V1 - V2
7 : Z := X * Y;// V1 * V2
8 : Z := X / Y;// V1 / V2
9 : Z := power(X,Y);// V1 ** V2
10: Z := ln(X);// ln(V1)
11: Z := log10(X);// log(V1)
12: Z := exp(X);// exp(V1)
13: Z := power(10.0,X);// exp(V1) base 10
14: Z := sin(X);// sin(V1)
15: Z := cos(X);// cos(V1)
16: Z := tan(X);// tan(V1)
17: Z := arcsin(X);// arcsin(V1)
18: Z := arccos(X);// arccos(V1)
19: Z := arctan(X);// arctan(V1)
20: Z := (X - mean) / stddev;// z(V1)
21: Z := index[i-1];// Rank(V1)
22: Z := pcntile[i-1] * 100.0;// %ilerank(V1)
23: // probz(V1)
begin
Y := (X - mean) / stddev;
Z := probz(Y);
end;
24: // inversez(V1) - convert to %ile ranks first
begin
Y := pcntile[i-1]; // y is %ile rank of X
Z := inversez(Y);
end;
25: Z := abs(X);// absolute value of V1: (abs(V1)
26: // New := C
begin
Z := constant;
end;
27: Z := constant - X;// New := C - V1
28: Z := constant / X;// New := C / V1
end;
OS3MainFrm.DataGrid.Cells[gridcol,i] := FloatToStr(Z);
end;
OS3MainFrm.DataGrid.Cells[gridcol,0] := SaveEdit.Text;
// cleanup
index := nil;
pcntile := nil;
end;
//-------------------------------------------------------------------
procedure TTransFrm.TransListClick(Sender: TObject);
var
index : integer;
begin
index := TransList.ItemIndex;
TransEdit.Text := TransList.Items.Strings[index];
end;
//--------------------------------------------------------------------
procedure TTransFrm.V1InBtnClick(Sender: TObject);
var
index : integer;
begin
index := VarList.ItemIndex;
V1Edit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
V1OutBtn.Visible := true;
V1InBtn.Visible := false;
end;
//--------------------------------------------------------------------
procedure TTransFrm.V1OutBtnClick(Sender: TObject);
begin
VarList.Items.Add(V1Edit.Text);
V1Edit.Text := '';
V1InBtn.Visible := true;
V1OutBtn.Visible := false;
end;
//--------------------------------------------------------------------
procedure TTransFrm.V2InBtnClick(Sender: TObject);
var
index : integer;
begin
index := VarList.ItemIndex;
V2Edit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
V2OutBtn.Visible := true;
V2InBtn.Visible := false;
end;
//--------------------------------------------------------------------
procedure TTransFrm.V2OutBtnClick(Sender: TObject);
begin
VarList.Items.Add(V2Edit.Text);
V2Edit.Text := '';
V2InBtn.Visible := true;
V2OutBtn.Visible := false;
end;
//--------------------------------------------------------------------
procedure TTransFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
//--------------------------------------------------------------------
initialization
{$I transfrmunit.lrs}
end.

View File

@ -0,0 +1,360 @@
object TtestFrm: TTtestFrm
Left = 214
Height = 485
Top = 123
Width = 598
Caption = 'Comparison of Two Sample Means'
ClientHeight = 485
ClientWidth = 598
OnShow = FormShow
LCLVersion = '0.9.30'
object Label1: TLabel
Left = 8
Height = 16
Top = 458
Width = 150
Caption = 'Percent Confidence Interval:'
ParentColor = False
end
object Panel1: TPanel
Left = 8
Height = 239
Top = 193
Width = 578
ClientHeight = 239
ClientWidth = 578
TabOrder = 0
object SelVarLabel: TLabel
Left = 16
Height = 16
Top = 9
Width = 85
Caption = 'Select Variables:'
ParentColor = False
end
object FirstVarLabel: TLabel
Left = 194
Height = 16
Top = 32
Width = 71
Caption = 'First Variable:'
ParentColor = False
end
object SecdVarLabel: TLabel
Left = 194
Height = 16
Top = 82
Width = 88
Caption = 'Second Variable:'
ParentColor = False
end
object GrpLabel: TLabel
Left = 191
Height = 16
Top = 138
Width = 68
Caption = 'Group Code:'
ParentColor = False
end
object ListBox1: TListBox
Left = 15
Height = 201
Top = 23
Width = 161
ItemHeight = 0
OnClick = ListBox1Click
TabOrder = 0
end
object Var1: TEdit
Left = 281
Height = 23
Top = 23
Width = 121
TabOrder = 1
Text = 'Var1'
end
object Var2: TEdit
Left = 280
Height = 23
Top = 72
Width = 121
TabOrder = 2
Text = 'Var2'
end
object Grp: TEdit
Left = 280
Height = 23
Top = 130
Width = 119
TabOrder = 3
Text = 'Grp'
end
object GroupCodeBtn: TRadioButton
Left = 191
Height = 19
Top = 176
Width = 130
Caption = 'Specify Group Codes'
TabOrder = 4
end
object Memo1: TMemo
Left = 410
Height = 215
Top = 9
Width = 155
Lines.Strings = (
'Directions: For '
'independent'
'groups data, first click the'
'variable to be analyzed '
'then'
'click the variable '
'containing'
'group codes.'
'For dependent variables it'
'is assumed the data for '
'each pair of values are '
'in a case. Enter the names'
'of those two variables.'
)
TabOrder = 5
end
end
object Panel2: TPanel
Left = 7
Height = 107
Top = 73
Width = 579
ClientHeight = 107
ClientWidth = 579
TabOrder = 1
object Mean1Label: TLabel
Left = 17
Height = 16
Top = 19
Width = 40
Caption = 'Mean 1'
ParentColor = False
end
object Mean2Label: TLabel
Left = 15
Height = 16
Top = 55
Width = 40
Caption = 'Mean 2'
ParentColor = False
end
object SD1Label: TLabel
Left = 146
Height = 16
Top = 19
Width = 56
Caption = 'Std. Dev. 1'
ParentColor = False
end
object SD2Label: TLabel
Left = 144
Height = 16
Top = 54
Width = 56
Caption = 'Std. Dev. 2'
ParentColor = False
end
object SampSize1Label: TLabel
Left = 304
Height = 16
Top = 19
Width = 72
Caption = 'Sample Size 1'
ParentColor = False
end
object SampSize2Label: TLabel
Left = 303
Height = 16
Top = 51
Width = 72
Caption = 'Sample Size 2'
ParentColor = False
end
object CorBetweenLabel: TLabel
Left = 16
Height = 16
Top = 82
Width = 148
Caption = 'Correlation Between Scores:'
ParentColor = False
end
object Mean1: TEdit
Left = 62
Height = 23
Top = 15
Width = 66
TabOrder = 0
Text = 'Mean1'
end
object Mean2: TEdit
Left = 62
Height = 23
Top = 50
Width = 66
TabOrder = 1
Text = 'Mean2'
end
object SD1: TEdit
Left = 208
Height = 23
Top = 15
Width = 60
TabOrder = 2
Text = 'SD1'
end
object SD2: TEdit
Left = 208
Height = 23
Top = 49
Width = 60
TabOrder = 3
Text = 'SD2'
end
object N1: TEdit
Left = 377
Height = 23
Top = 14
Width = 62
TabOrder = 4
Text = 'N1'
end
object N2: TEdit
Left = 376
Height = 23
Top = 47
Width = 63
TabOrder = 5
Text = 'N2'
end
object Cor12: TEdit
Left = 159
Height = 23
Top = 78
Width = 47
TabOrder = 6
Text = 'Cor12'
end
end
object RadioGroup1: TRadioGroup
Left = 7
Height = 63
Top = 2
Width = 199
AutoFill = True
Caption = 'Data Entry By:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 45
ClientWidth = 195
Items.Strings = (
'Values Entered on this Form'
'Values in the data grid file'
)
OnClick = RadioGroup1Click
TabOrder = 2
end
object RadioGroup2: TRadioGroup
Left = 217
Height = 62
Top = 3
Width = 210
AutoFill = True
Caption = 'Test Assumptions:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 44
ClientWidth = 206
Items.Strings = (
'Independent Scores'
'Correlated Scores'
)
OnClick = RadioGroup2Click
TabOrder = 3
end
object CInterval: TEdit
Left = 159
Height = 23
Top = 456
Width = 46
TabOrder = 4
Text = '95.0'
end
object ResetBtn: TButton
Left = 217
Height = 28
Top = 444
Width = 66
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 5
end
object CancelBtn: TButton
Left = 312
Height = 28
Top = 444
Width = 66
Caption = 'Cancel'
ModalResult = 2
TabOrder = 6
end
object ComputeBtn: TButton
Left = 416
Height = 28
Top = 444
Width = 66
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 7
end
object ReturnBtn: TButton
Left = 512
Height = 28
Top = 444
Width = 66
Caption = 'Return'
ModalResult = 1
TabOrder = 8
end
object RadioGroup3: TRadioGroup
Left = 432
Height = 58
Top = 8
Width = 154
AutoFill = True
Caption = 'Test Probability'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 40
ClientWidth = 150
ItemIndex = 0
Items.Strings = (
'Two-tailed (default)'
'One-tailed'
)
TabOrder = 9
end
end

View File

@ -0,0 +1,96 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TTtestFrm','FORMDATA',[
'TPF0'#9'TTtestFrm'#8'TtestFrm'#4'Left'#3#214#0#6'Height'#3#229#1#3'Top'#2'{'
+#5'Width'#3'V'#2#7'Caption'#6#30'Comparison of Two Sample Means'#12'ClientHe'
+'ight'#3#229#1#11'ClientWidth'#3'V'#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'
+#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#16#3'Top'#3#202#1
+#5'Width'#3#150#0#7'Caption'#6#28'Percent Confidence Interval:'#11'ParentCol'
+'or'#8#0#0#6'TPanel'#6'Panel1'#4'Left'#2#8#6'Height'#3#239#0#3'Top'#3#193#0#5
+'Width'#3'B'#2#12'ClientHeight'#3#239#0#11'ClientWidth'#3'B'#2#8'TabOrder'#2
+#0#0#6'TLabel'#11'SelVarLabel'#4'Left'#2#16#6'Height'#2#16#3'Top'#2#9#5'Widt'
+'h'#2'U'#7'Caption'#6#17'Select Variables:'#11'ParentColor'#8#0#0#6'TLabel'
+#13'FirstVarLabel'#4'Left'#3#194#0#6'Height'#2#16#3'Top'#2' '#5'Width'#2'G'#7
+'Caption'#6#15'First Variable:'#11'ParentColor'#8#0#0#6'TLabel'#12'SecdVarLa'
+'bel'#4'Left'#3#194#0#6'Height'#2#16#3'Top'#2'R'#5'Width'#2'X'#7'Caption'#6
+#16'Second Variable:'#11'ParentColor'#8#0#0#6'TLabel'#8'GrpLabel'#4'Left'#3
+#191#0#6'Height'#2#16#3'Top'#3#138#0#5'Width'#2'D'#7'Caption'#6#11'Group Cod'
+'e:'#11'ParentColor'#8#0#0#8'TListBox'#8'ListBox1'#4'Left'#2#15#6'Height'#3
+#201#0#3'Top'#2#23#5'Width'#3#161#0#10'ItemHeight'#2#0#7'OnClick'#7#13'ListB'
+'ox1Click'#8'TabOrder'#2#0#0#0#5'TEdit'#4'Var1'#4'Left'#3#25#1#6'Height'#2#23
+#3'Top'#2#23#5'Width'#2'y'#8'TabOrder'#2#1#4'Text'#6#4'Var1'#0#0#5'TEdit'#4
+'Var2'#4'Left'#3#24#1#6'Height'#2#23#3'Top'#2'H'#5'Width'#2'y'#8'TabOrder'#2
+#2#4'Text'#6#4'Var2'#0#0#5'TEdit'#3'Grp'#4'Left'#3#24#1#6'Height'#2#23#3'Top'
+#3#130#0#5'Width'#2'w'#8'TabOrder'#2#3#4'Text'#6#3'Grp'#0#0#12'TRadioButton'
+#12'GroupCodeBtn'#4'Left'#3#191#0#6'Height'#2#19#3'Top'#3#176#0#5'Width'#3
+#130#0#7'Caption'#6#19'Specify Group Codes'#8'TabOrder'#2#4#0#0#5'TMemo'#5'M'
+'emo1'#4'Left'#3#154#1#6'Height'#3#215#0#3'Top'#2#9#5'Width'#3#155#0#13'Line'
+'s.Strings'#1#6#17'Directions: For '#6#11'independent'#6#28'groups data, fi'
+'rst click the'#6#24'variable to be analyzed '#6#4'then'#6#19'click the vari'
+'able '#6#10'containing'#6#12'group codes.'#6#26'For dependent variables it'
+#6#24'is assumed the data for '#6#24'each pair of values are '#6#27'in a cas'
+'e. Enter the names'#6#23'of those two variables.'#0#8'TabOrder'#2#5#0#0#0#6
+'TPanel'#6'Panel2'#4'Left'#2#7#6'Height'#2'k'#3'Top'#2'I'#5'Width'#3'C'#2#12
+'ClientHeight'#2'k'#11'ClientWidth'#3'C'#2#8'TabOrder'#2#1#0#6'TLabel'#10'Me'
+'an1Label'#4'Left'#2#17#6'Height'#2#16#3'Top'#2#19#5'Width'#2'('#7'Caption'#6
+#6'Mean 1'#11'ParentColor'#8#0#0#6'TLabel'#10'Mean2Label'#4'Left'#2#15#6'Hei'
+'ght'#2#16#3'Top'#2'7'#5'Width'#2'('#7'Caption'#6#6'Mean 2'#11'ParentColor'#8
+#0#0#6'TLabel'#8'SD1Label'#4'Left'#3#146#0#6'Height'#2#16#3'Top'#2#19#5'Widt'
+'h'#2'8'#7'Caption'#6#11'Std. Dev. 1'#11'ParentColor'#8#0#0#6'TLabel'#8'SD2L'
+'abel'#4'Left'#3#144#0#6'Height'#2#16#3'Top'#2'6'#5'Width'#2'8'#7'Caption'#6
+#11'Std. Dev. 2'#11'ParentColor'#8#0#0#6'TLabel'#14'SampSize1Label'#4'Left'#3
+'0'#1#6'Height'#2#16#3'Top'#2#19#5'Width'#2'H'#7'Caption'#6#13'Sample Size 1'
+#11'ParentColor'#8#0#0#6'TLabel'#14'SampSize2Label'#4'Left'#3'/'#1#6'Height'
+#2#16#3'Top'#2'3'#5'Width'#2'H'#7'Caption'#6#13'Sample Size 2'#11'ParentColo'
+'r'#8#0#0#6'TLabel'#15'CorBetweenLabel'#4'Left'#2#16#6'Height'#2#16#3'Top'#2
+'R'#5'Width'#3#148#0#7'Caption'#6#27'Correlation Between Scores:'#11'ParentC'
+'olor'#8#0#0#5'TEdit'#5'Mean1'#4'Left'#2'>'#6'Height'#2#23#3'Top'#2#15#5'Wid'
+'th'#2'B'#8'TabOrder'#2#0#4'Text'#6#5'Mean1'#0#0#5'TEdit'#5'Mean2'#4'Left'#2
+'>'#6'Height'#2#23#3'Top'#2'2'#5'Width'#2'B'#8'TabOrder'#2#1#4'Text'#6#5'Mea'
+'n2'#0#0#5'TEdit'#3'SD1'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#2#15#5'Width'
+#2'<'#8'TabOrder'#2#2#4'Text'#6#3'SD1'#0#0#5'TEdit'#3'SD2'#4'Left'#3#208#0#6
+'Height'#2#23#3'Top'#2'1'#5'Width'#2'<'#8'TabOrder'#2#3#4'Text'#6#3'SD2'#0#0
+#5'TEdit'#2'N1'#4'Left'#3'y'#1#6'Height'#2#23#3'Top'#2#14#5'Width'#2'>'#8'Ta'
+'bOrder'#2#4#4'Text'#6#2'N1'#0#0#5'TEdit'#2'N2'#4'Left'#3'x'#1#6'Height'#2#23
+#3'Top'#2'/'#5'Width'#2'?'#8'TabOrder'#2#5#4'Text'#6#2'N2'#0#0#5'TEdit'#5'Co'
+'r12'#4'Left'#3#159#0#6'Height'#2#23#3'Top'#2'N'#5'Width'#2'/'#8'TabOrder'#2
+#6#4'Text'#6#5'Cor12'#0#0#0#11'TRadioGroup'#11'RadioGroup1'#4'Left'#2#7#6'He'
+'ight'#2'?'#3'Top'#2#2#5'Width'#3#199#0#8'AutoFill'#9#7'Caption'#6#14'Data E'
+'ntry By:'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpac'
+'ing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27
+'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.'
+'ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14
+'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'
+#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'-'#11'ClientWidth'#3
+#195#0#13'Items.Strings'#1#6#27'Values Entered on this Form'#6#28'Values in '
+'the data grid file'#0#7'OnClick'#7#16'RadioGroup1Click'#8'TabOrder'#2#2#0#0
+#11'TRadioGroup'#11'RadioGroup2'#4'Left'#3#217#0#6'Height'#2'>'#3'Top'#2#3#5
,'Width'#3#210#0#8'AutoFill'#9#7'Caption'#6#17'Test Assumptions:'#28'ChildSiz'
+'ing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizi'
+'ng.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enlarge'
+'Vertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7
+#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'C'
+'hildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Contr'
+'olsPerLine'#2#1#12'ClientHeight'#2','#11'ClientWidth'#3#206#0#13'Items.Stri'
+'ngs'#1#6#18'Independent Scores'#6#17'Correlated Scores'#0#7'OnClick'#7#16'R'
+'adioGroup2Click'#8'TabOrder'#2#3#0#0#5'TEdit'#9'CInterval'#4'Left'#3#159#0#6
+'Height'#2#23#3'Top'#3#200#1#5'Width'#2'.'#8'TabOrder'#2#4#4'Text'#6#4'95.0'
+#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#217#0#6'Height'#2#28#3'Top'#3#188#1#5
+'Width'#2'B'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'
+#2#5#0#0#7'TButton'#9'CancelBtn'#4'Left'#3'8'#1#6'Height'#2#28#3'Top'#3#188#1
+#5'Width'#2'B'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#6#0#0
+#7'TButton'#10'ComputeBtn'#4'Left'#3#160#1#6'Height'#2#28#3'Top'#3#188#1#5'W'
+'idth'#2'B'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOr'
+'der'#2#7#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#0#2#6'Height'#2#28#3'Top'#3
+#188#1#5'Width'#2'B'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2
+#8#0#0#11'TRadioGroup'#11'RadioGroup3'#4'Left'#3#176#1#6'Height'#2':'#3'Top'
+#2#8#5'Width'#3#154#0#8'AutoFill'#9#7'Caption'#6#16'Test Probability'#28'Chi'
+'ldSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'Chil'
+'dSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.En'
+'largeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizont'
+'al'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'
+#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.C'
+'ontrolsPerLine'#2#1#12'ClientHeight'#2'('#11'ClientWidth'#3#150#0#9'ItemInd'
+'ex'#2#0#13'Items.Strings'#1#6#20'Two-tailed (default)'#6#10'One-tailed'#0#8
+'TabOrder'#2#9#0#0#0
]);

View File

@ -0,0 +1,464 @@
unit TtestUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, MainUnit, Globals, FunctionsLib, OutPutUnit, DataProcs;
type
{ TTtestFrm }
TTtestFrm = class(TForm)
RadioGroup3: TRadioGroup;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
CorBetweenLabel: TLabel;
Cor12: TEdit;
CInterval: TEdit;
Grp: TEdit;
GroupCodeBtn: TRadioButton;
Label1: TLabel;
Memo1: TMemo;
Var2: TEdit;
Var1: TEdit;
FirstVarLabel: TLabel;
GrpLabel: TLabel;
SecdVarLabel: TLabel;
ListBox1: TListBox;
SelVarLabel: TLabel;
N2: TEdit;
N1: TEdit;
SampSize2Label: TLabel;
SampSize1Label: TLabel;
SD2: TEdit;
SD1: TEdit;
SD2Label: TLabel;
SD1Label: TLabel;
Mean2: TEdit;
Mean1: TEdit;
Mean2Label: TLabel;
Mean1Label: TLabel;
Panel1: TPanel;
Panel2: TPanel;
RadioGroup1: TRadioGroup;
RadioGroup2: TRadioGroup;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure RadioGroup2Click(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
independent : boolean;
griddata : boolean;
public
{ public declarations }
end;
var
TtestFrm: TTtestFrm;
implementation
{ TTtestFrm }
procedure TTtestFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
RadioGroup1.ItemIndex := 0;
RadioGroup2.ItemIndex := 0;
Panel1.Visible := false;
Panel2.Visible := true;
ListBox1.Clear;
Var1.Text := '';
Var2.Text := '';
Mean1.Text := '';
Mean2.Text := '';
SD1.Text := '';
SD2.Text := '';
N1.Text := '';
N2.Text := '';
Cor12.Text := '';
independent := true;
griddata := false;
CorBetweenLabel.Visible := false;
Cor12.Visible := false;
GroupCodeBtn.Checked := false;
Grp.Text := '';
for i := 1 to NoVariables do
ListBox1.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
GrpLabel.Visible := false;
Grp.Visible := false;
Grp.Text := '';
end;
procedure TTtestFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TTtestFrm.ComputeBtnClick(Sender: TObject);
var
M1, M2, Dif, stddev1, stddev2, r12, z, stderr1, stderr2 : double;
tequal, tunequal, cov12, lowci, hici, F, Fp, df1, df2 : double;
tprobability, zprobability, stderrt, stderrz, value1, value2 : double;
variance1, variance2, pooled, sedif, df, ConfInt, tconfint : double;
i, j, v1, v2, ncases1, ncases2, NoSelected : integer;
group, min, max : integer;
ColNoSelected : IntDyneVec;
response, cellstring, label1Str, label2Str, outline : string;
begin
SetLength(ColNoSelected,NoVariables);
ncases1 := 0;
ncases2 := 0;
variance1 := 0.0;
variance2 := 0.0;
M1 := 0.0;
M2 := 0.0;
Dif := 0.0;
r12 := 0.0;
v1 := 0;
v2 := 0;
stddev1 := 0.0;
stddev2 := 0.0;
ConfInt := (100.0 - StrToFloat(CInterval.Text)) / 2.0 ;
ConfInt := (100.0 - ConfInt) / 100.0; // one tail
if independent then Var2.Text := Grp.Text;
if griddata then // data read from grid
begin
for i := 1 to NoVariables do
begin
if Var1.Text = OS3MainFrm.DataGrid.Cells[i,0] then
begin
v1 := i;
ColNoSelected[0] := i;
label1Str := Var1.Text;
end;
if Var2.Text = OS3MainFrm.DataGrid.Cells[i,0] then
begin
v2 := i;
ColNoSelected[1] := i;
label2Str := Var2.Text;
end;
end; // next variable
ncases1 := 0;
ncases2 := 0;
NoSelected := 2;
M1 := 0.0;
M2 := 0.0;
variance1 := 0.0;
variance2 := 0.0;
r12 := 0.0;
if not independent then // correlated data
begin
for i := 1 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
ncases1 := ncases1 + 1;
value1 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v1,i]));
value2 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i]));
M1 := M1 + value1;
M2 := M2 + value2;
variance1 := variance1 + (value1 * value1);
variance2 := variance2 + (value2 * value2);
r12 := r12 + value1 * value2;
end;
ncases2 := ncases1;
variance1 := variance1 - ((M1 * M1) / ncases1);
variance1 := variance1 / (ncases1 - 1);
stddev1 := sqrt(variance1);
variance2 := variance2 - ((M2 * M2) / ncases2);
variance2 := variance2 / (ncases2 - 1);
stddev2 := sqrt(variance2);
r12 := r12 - ((M1 * M2) / ncases1);
r12 := r12 / (ncases1 - 1);
cov12 := r12;
r12 := r12 / (stddev1 * stddev2);
M1 := M1 / ncases1;
M2 := M2 / ncases2;
Dif := M1 - M2;
end; //if not independent
if independent then
begin
if GroupCodeBtn.Checked then
begin
response := InputBox('Group 1','Enter the code for group 1','1');
min := StrToInt(response);
response := InputBox('Group 2','Enter the code for group 2','2');
max := StrToInt(response);
end
else begin
min := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,1])));
max := min;
end;
for i := 2 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i])));
if GroupCodeBtn.Checked = false then
begin
if group < min then min := group;
if group > max then max := group;
end;
end;
for i := 1 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
value1 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v1,i]));
value2 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i]));
group := round(value2);
if group = min then
begin
M1 := M1 + value1;
variance1 := variance1 + (value1 * value1);
ncases1 := ncases1 + 1;
end
else if group = max then
begin
M2 := M2 + value1;
variance2 := variance2 + (value1 * value1);
ncases2 := Ncases2 + 1;
end;
end; // next case
variance1 := variance1 - ((M1 * M1) / ncases1);
variance1 := variance1 / (ncases1 - 1);
stddev1 := sqrt(variance1);
variance2 := variance2 - ((M2 * M2) / ncases2);
variance2 := variance2 / (ncases2 - 1);
stddev2 := sqrt(variance2);
M1 := M1 / ncases1;
M2 := M2 / ncases2;
Dif := M1 - M2;
Label1Str := format('Group %d',[min]);
Label2Str := format('Group %d',[max]);
end; // if independent data
end; // if reading grid data
if not griddata then // data read from form
begin
M1 := StrToFloat(Mean1.Text);
M2 := StrToFloat(Mean2.Text);
stddev1 := StrToFloat(SD1.Text);
stddev2 := StrToFloat(SD2.Text);
ncases1 := round(StrToFloat(N1.Text));
ncases2 := round(StrToFloat(N2.Text));
variance1 := stddev1 * stddev1;
variance2 := stddev2 * stddev2;
Label1Str := 'Group 1';
Label2Str := 'Group 2';
Dif := M1 - M2;
if not independent then
begin
r12 := StrToFloat(Cor12.Text);
cov12 := r12 * stddev1 * stddev2;
end;
end;
// Initialize output form
OutPutFrm.RichEdit.Clear;
OutPutFrm.RichEdit.Lines.Add('COMPARISON OF TWO MEANS');
OutPutFrm.RichEdit.Lines.Add('');
// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify;
// Calculate pooled and independent t and z values and test statistic
if independent then
begin
stderr1 := sqrt(variance1 / ncases1);
Stderr2 := sqrt(variance2 / ncases2);
OutPutFrm.RichEdit.Lines.Add('Variable Mean Variance Std.Dev. S.E.Mean N');
outline := format('%-10s%8.2f %8.2f %8.2f %8.2f %d',
[Label1Str,M1, variance1, stddev1, stderr1, ncases1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('%-10s%8.2f %8.2f %8.2f %8.2f %d',
[Label2Str, M2, variance2, stddev2, stderr2, ncases2]);
OutPutFrm.RichEdit.Lines.Add(outline);
pooled := ((ncases1-1) * variance1) + ((ncases2-1) * variance2);
pooled := pooled / (ncases1 + ncases2 - 2);
pooled := pooled * ( 1.0 / ncases1 + 1.0 / ncases2);
sedif := sqrt(pooled);
tequal := dif / sedif;
df := ncases1 + ncases2 - 2;
tprobability := probt(tequal,df);
if RadioGroup3.ItemIndex = 1 then tprobability := 0.5 * tprobability;
outline := format('Assuming = variances, t = %8.3f with probability = %6.4f and %3.0f degrees of freedom',
[tequal, tprobability, df]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Difference = %8.2f and Standard Error of difference = %8.2f',
[dif, sedif]);
OutPutFrm.RichEdit.Lines.Add(outline);
tconfint := inverset(ConfInt,df);
lowci := dif - tconfint * sedif;
hici := dif + tconfint * sedif;
outline := format('Confidence interval = (%8.2f,%8.2f)',[lowci,hici]);
OutPutFrm.RichEdit.Lines.Add(outline);
// now for unequal variances
sedif := sqrt((variance1 / ncases1) + (variance2 / ncases2));
tunequal := dif / sedif;
df := sqr((variance1 / ncases1) + (variance2 / ncases2));
df := df / (sqr(variance1 / ncases1) / (ncases1 - 1) +
sqr(variance2 / ncases2) / (ncases2 - 1) );
tprobability := probt(tequal,df);
if RadioGroup3.ItemIndex = 1 then tprobability := 0.5 * tprobability;
outline := format('Assuming unequal variances, t = %8.3f with probability = %6.4f and %5.2f degrees of freedom',
[tunequal, tprobability, df]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Difference = %8.2f and Standard Error of difference = %8.2f',
[dif, sedif]);
OutPutFrm.RichEdit.Lines.Add(outline);
tconfint := inverset(ConfInt,df);
lowci := dif - tconfint * sedif;
hici := dif + tconfint * sedif;
outline := format('Confidence interval = (%8.2f,%8.2f)',[lowci,hici]);
OutPutFrm.RichEdit.Lines.Add(outline);
df1 := ncases1 - 1;
df2 := ncases2 - 1;
if variance1 > variance2 then
begin
F := variance1 / variance2;
Fp := probf(F,df1,df2);
end
else
begin
F := variance2 / variance1;
Fp := probf(F,df2,df1);
end;
outline := format('F test for equal variances = %8.3f, Probability = %6.4f',
[F, fp]);
OutPutFrm.RichEdit.Lines.Add(outline);
end
else
begin // dependent t test
stderr1 := sqrt(variance1 / ncases1);
Stderr2 := sqrt(variance2 / ncases2);
OutPutFrm.RichEdit.Lines.Add('Variable Mean Variance Std.Dev. S.E.Mean N');
outline := format('%-10s%8.2f %8.2f %8.2f %8.2f %d',
[Label1Str ,M1, variance1, stddev1, stderr1, ncases1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('%-10s%8.2f %8.2f %8.2f %8.2f %d',
[Label2Str,M2, variance2, stddev2, stderr2, ncases2]);
OutPutFrm.RichEdit.Lines.Add(outline);
sedif := variance1 + variance2 - (2.0 * cov12);
sedif := sqrt(sedif / ncases1);
tequal := Dif / sedif;
df := ncases1 - 1;
tprobability := probt(tequal,df);
outline := format('Assuming dependent samples, t = %8.3f with probability = %6.4f and %3.0f degrees of freedom',
[tequal, tprobability, df]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Correlation between %s and %s = %6.3f',
[Label1Str,Label2Str,r12]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Difference = %8.2f and Standard Error of difference = %8.2f',
[dif, sedif]);
OutPutFrm.RichEdit.Lines.Add(outline);
tconfint := inverset(ConfInt,df);
lowci := dif - tconfint * sedif;
hici := dif + tconfint * sedif;
outline := format('Confidence interval = (%8.2f,%8.2f)',
[lowci,hici]);
OutPutFrm.RichEdit.Lines.Add(outline);
tequal := variance1 - variance2;
tequal := tequal / sqrt( (4 * variance1 * variance2)/(ncases1 - 2) *
(1.0 - sqr(r12)) );
df := ncases1 - 2;
tprobability := probt(tequal,df);
outline := format('t for test of equal variances = %8.3f with probability = %6.4f',
[tequal,tprobability]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
OutPutFrm.ShowModal();
ColNoSelected := nil;
// TtestFrm.Hide;
end;
procedure TTtestFrm.ListBox1Click(Sender: TObject);
VAR index : integer;
begin
index := ListBox1.ItemIndex;
if not independent then
begin
if Var1.Text <> '' then Var2.Text := ListBox1.Items.Strings[index]
else Var1.Text := ListBox1.Items.Strings[index];
end;
if independent then
begin
if Var1.Text <> '' then Grp.Text := ListBox1.Items.Strings[index]
else Var1.Text := ListBox1.Items.Strings[index];
end;
end;
procedure TTtestFrm.RadioGroup1Click(Sender: TObject);
VAR index : integer;
begin
index := RadioGroup1.ItemIndex;
if index = 0 then
begin
Panel2.Visible := true;
Panel1.Visible := false;
griddata := false;
end
else
begin
Panel1.Visible := true;
Panel2.Visible := false;
griddata := true;
if RadioGroup2.ItemIndex = 1 then
begin
SecdVarLabel.Visible := true;
Var2.Visible := true;
Grp.Visible := false;
GrpLabel.Visible := false;
end
else
begin
SecdVarLabel.Visible := false;
Var2.Visible := false;
Grp.Visible := true;
GrpLabel.Visible := true;
end;
end;
end;
procedure TTtestFrm.RadioGroup2Click(Sender: TObject);
VAR index : integer;
begin
index := RadioGroup2.ItemIndex;
if index = 0 then
begin
independent := true;
CorBetweenLabel.Visible := false;
Cor12.Visible := false;
Grp.Visible := true;
GrpLabel.Visible := true;
GroupCodeBtn.Visible := true;
SecdVarLabel.Visible := false;
Var2.Visible := false;
end
else
begin
independent := false;
CorBetweenLabel.Visible := true;
Cor12.Visible := true;
GrpLabel.Visible := false;
Grp.Visible := false;
GroupCodeBtn.Visible := false;
SecdVarLabel.Visible := true;
Var2.Visible := true;
end;
end;
initialization
{$I ttestunit.lrs}
end.

View File

@ -0,0 +1,348 @@
object TwoCorrsFrm: TTwoCorrsFrm
Left = 157
Height = 424
Top = 127
Width = 541
Caption = 'Comparison of Two Correlations'
ClientHeight = 424
ClientWidth = 541
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label14: TLabel
Left = 354
Height = 14
Top = 359
Width = 140
Caption = 'Percent Confidence Interval:'
ParentColor = False
end
object RadioGroup1: TRadioGroup
Left = 16
Height = 69
Top = 9
Width = 246
AutoFill = True
Caption = 'Data Entered From:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 51
ClientWidth = 242
Items.Strings = (
'Values entered on this form.'
'Values in the data grid from a file.'
)
OnClick = RadioGroup1Click
TabOrder = 0
end
object RadioGroup2: TRadioGroup
Left = 279
Height = 71
Top = 7
Width = 231
AutoFill = True
Caption = 'Test Assumptions:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 53
ClientWidth = 227
Items.Strings = (
'Independent Correlations.'
'Dependent Correlations.'
)
OnClick = RadioGroup2Click
TabOrder = 1
end
object Panel1: TPanel
Left = 16
Height = 136
Top = 88
Width = 494
ClientHeight = 136
ClientWidth = 494
TabOrder = 2
object corxylabel: TLabel
Left = 16
Height = 14
Top = 16
Width = 85
Caption = 'Correlation r(x,y)'
ParentColor = False
end
object corxzlabel: TLabel
Left = 17
Height = 14
Top = 48
Width = 84
Caption = 'Correlation r(x,z)'
ParentColor = False
end
object coryzlabel: TLabel
Left = 16
Height = 14
Top = 80
Width = 84
Caption = 'Correlation r(y,z)'
ParentColor = False
end
object sampsizelabel: TLabel
Left = 17
Height = 14
Top = 109
Width = 61
Caption = 'Sample Size:'
ParentColor = False
end
object firstcorlabel: TLabel
Left = 264
Height = 14
Top = 16
Width = 82
Caption = 'First Correlation:'
ParentColor = False
end
object size1label: TLabel
Left = 265
Height = 14
Top = 50
Width = 70
Caption = 'Sample Size 1:'
ParentColor = False
end
object SecdCorLabel: TLabel
Left = 264
Height = 14
Top = 78
Width = 96
Caption = 'Second Correlation:'
ParentColor = False
end
object Size2Label: TLabel
Left = 263
Height = 14
Top = 111
Width = 70
Caption = 'Sample Size 2:'
ParentColor = False
end
object rxy: TEdit
Left = 118
Height = 21
Top = 9
Width = 62
TabOrder = 0
Text = 'rxy'
end
object SampSize: TEdit
Left = 118
Height = 21
Top = 104
Width = 62
TabOrder = 1
Text = 'Edit1'
end
object rxy1: TEdit
Left = 376
Height = 21
Top = 9
Width = 56
TabOrder = 2
Text = 'rxy1'
end
end
object rxz: TEdit
Left = 136
Height = 21
Top = 128
Width = 62
TabOrder = 3
Text = 'Edit1'
end
object ryz: TEdit
Left = 136
Height = 21
Top = 160
Width = 62
TabOrder = 4
Text = 'Edit1'
end
object Size1: TEdit
Left = 392
Height = 21
Top = 128
Width = 56
TabOrder = 5
Text = 'Edit1'
end
object rxy2: TEdit
Left = 392
Height = 21
Top = 158
Width = 56
TabOrder = 6
Text = 'Edit1'
end
object Size2: TEdit
Left = 392
Height = 21
Top = 192
Width = 56
TabOrder = 7
Text = 'Edit1'
end
object Panel2: TPanel
Left = 16
Height = 181
Top = 232
Width = 330
ClientHeight = 181
ClientWidth = 330
TabOrder = 8
object SelVarLabel: TLabel
Left = 9
Height = 14
Top = 8
Width = 80
Caption = 'Select Variables:'
ParentColor = False
end
object xlabel: TLabel
Left = 152
Height = 14
Top = 25
Width = 18
Caption = 'X ='
ParentColor = False
end
object ylabel: TLabel
Left = 152
Height = 14
Top = 57
Width = 18
Caption = 'Y ='
ParentColor = False
end
object zlabel: TLabel
Left = 152
Height = 14
Top = 89
Width = 18
Caption = 'Z ='
ParentColor = False
end
object GroupLabel: TLabel
Left = 152
Height = 14
Top = 120
Width = 41
Caption = 'Group ='
ParentColor = False
end
object VarList: TListBox
Left = 8
Height = 140
Top = 26
Width = 138
ItemHeight = 0
OnClick = VarListClick
TabOrder = 0
end
object Xvar: TEdit
Left = 200
Height = 21
Top = 24
Width = 108
TabOrder = 1
Text = 'Xvar'
end
end
object Yvar: TEdit
Left = 216
Height = 21
Top = 288
Width = 108
TabOrder = 9
Text = 'Edit1'
end
object Zvar: TEdit
Left = 216
Height = 21
Top = 320
Width = 108
TabOrder = 10
Text = 'Edit1'
end
object GroupVar: TEdit
Left = 216
Height = 21
Top = 352
Width = 108
TabOrder = 11
Text = 'Edit1'
end
object CInterval: TEdit
Left = 496
Height = 21
Top = 352
Width = 36
TabOrder = 12
Text = 'CInterval'
end
object ResetBtn: TButton
Left = 440
Height = 29
Top = 232
Width = 70
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 13
end
object CancelBtn: TButton
Left = 354
Height = 32
Top = 272
Width = 78
Caption = 'Cancel'
ModalResult = 2
TabOrder = 14
end
object ComputeBtn: TButton
Left = 440
Height = 32
Top = 272
Width = 70
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 15
end
object ReturnBtn: TButton
Left = 354
Height = 29
Top = 312
Width = 80
Caption = 'Return'
ModalResult = 1
TabOrder = 16
end
object HelpBtn: TButton
Tag = 151
Left = 354
Height = 29
Top = 232
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 17
end
end

View File

@ -0,0 +1,88 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TTwoCorrsFrm','FORMDATA',[
'TPF0'#12'TTwoCorrsFrm'#11'TwoCorrsFrm'#4'Left'#3#157#0#6'Height'#3#168#1#3'T'
+'op'#2#127#5'Width'#3#29#2#7'Caption'#6#30'Comparison of Two Correlations'#12
+'ClientHeight'#3#168#1#11'ClientWidth'#3#29#2#6'OnShow'#7#8'FormShow'#10'LCL'
+'Version'#6#8'0.9.28.2'#0#6'TLabel'#7'Label14'#4'Left'#3'b'#1#6'Height'#2#14
+#3'Top'#3'g'#1#5'Width'#3#140#0#7'Caption'#6#28'Percent Confidence Interval:'
+#11'ParentColor'#8#0#0#11'TRadioGroup'#11'RadioGroup1'#4'Left'#2#16#6'Height'
+#2'E'#3'Top'#2#9#5'Width'#3#246#0#8'AutoFill'#9#7'Caption'#6#18'Data Entered'
+' From:'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacin'
+'g'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27
+'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.'
+'ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14
+'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'
+#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'3'#11'ClientWidth'#3
+#242#0#13'Items.Strings'#1#6#28'Values entered on this form.'#6'$Values in t'
+'he data grid from a file.'#0#7'OnClick'#7#16'RadioGroup1Click'#8'TabOrder'#2
+#0#0#0#11'TRadioGroup'#11'RadioGroup2'#4'Left'#3#23#1#6'Height'#2'G'#3'Top'#2
+#7#5'Width'#3#231#0#8'AutoFill'#9#7'Caption'#6#17'Test Assumptions:'#28'Chil'
+'dSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'Child'
+'Sizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enl'
+'argeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizonta'
+'l'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'
+#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.C'
+'ontrolsPerLine'#2#1#12'ClientHeight'#2'5'#11'ClientWidth'#3#227#0#13'Items.'
+'Strings'#1#6#25'Independent Correlations.'#6#23'Dependent Correlations.'#0#7
+'OnClick'#7#16'RadioGroup2Click'#8'TabOrder'#2#1#0#0#6'TPanel'#6'Panel1'#4'L'
+'eft'#2#16#6'Height'#3#136#0#3'Top'#2'X'#5'Width'#3#238#1#12'ClientHeight'#3
+#136#0#11'ClientWidth'#3#238#1#8'TabOrder'#2#2#0#6'TLabel'#10'corxylabel'#4
+'Left'#2#16#6'Height'#2#14#3'Top'#2#16#5'Width'#2'U'#7'Caption'#6#18'Correla'
+'tion r(x,y)'#11'ParentColor'#8#0#0#6'TLabel'#10'corxzlabel'#4'Left'#2#17#6
+'Height'#2#14#3'Top'#2'0'#5'Width'#2'T'#7'Caption'#6#18'Correlation r(x,z)'
+#11'ParentColor'#8#0#0#6'TLabel'#10'coryzlabel'#4'Left'#2#16#6'Height'#2#14#3
+'Top'#2'P'#5'Width'#2'T'#7'Caption'#6#18'Correlation r(y,z)'#11'ParentColor'
+#8#0#0#6'TLabel'#13'sampsizelabel'#4'Left'#2#17#6'Height'#2#14#3'Top'#2'm'#5
+'Width'#2'='#7'Caption'#6#12'Sample Size:'#11'ParentColor'#8#0#0#6'TLabel'#13
+'firstcorlabel'#4'Left'#3#8#1#6'Height'#2#14#3'Top'#2#16#5'Width'#2'R'#7'Cap'
+'tion'#6#18'First Correlation:'#11'ParentColor'#8#0#0#6'TLabel'#10'size1labe'
+'l'#4'Left'#3#9#1#6'Height'#2#14#3'Top'#2'2'#5'Width'#2'F'#7'Caption'#6#14'S'
+'ample Size 1:'#11'ParentColor'#8#0#0#6'TLabel'#12'SecdCorLabel'#4'Left'#3#8
+#1#6'Height'#2#14#3'Top'#2'N'#5'Width'#2'`'#7'Caption'#6#19'Second Correlati'
+'on:'#11'ParentColor'#8#0#0#6'TLabel'#10'Size2Label'#4'Left'#3#7#1#6'Height'
+#2#14#3'Top'#2'o'#5'Width'#2'F'#7'Caption'#6#14'Sample Size 2:'#11'ParentCol'
+'or'#8#0#0#5'TEdit'#3'rxy'#4'Left'#2'v'#6'Height'#2#21#3'Top'#2#9#5'Width'#2
+'>'#8'TabOrder'#2#0#4'Text'#6#3'rxy'#0#0#5'TEdit'#8'SampSize'#4'Left'#2'v'#6
+'Height'#2#21#3'Top'#2'h'#5'Width'#2'>'#8'TabOrder'#2#1#4'Text'#6#5'Edit1'#0
+#0#5'TEdit'#4'rxy1'#4'Left'#3'x'#1#6'Height'#2#21#3'Top'#2#9#5'Width'#2'8'#8
+'TabOrder'#2#2#4'Text'#6#4'rxy1'#0#0#0#5'TEdit'#3'rxz'#4'Left'#3#136#0#6'Hei'
+'ght'#2#21#3'Top'#3#128#0#5'Width'#2'>'#8'TabOrder'#2#3#4'Text'#6#5'Edit1'#0
+#0#5'TEdit'#3'ryz'#4'Left'#3#136#0#6'Height'#2#21#3'Top'#3#160#0#5'Width'#2
+'>'#8'TabOrder'#2#4#4'Text'#6#5'Edit1'#0#0#5'TEdit'#5'Size1'#4'Left'#3#136#1
+#6'Height'#2#21#3'Top'#3#128#0#5'Width'#2'8'#8'TabOrder'#2#5#4'Text'#6#5'Edi'
+'t1'#0#0#5'TEdit'#4'rxy2'#4'Left'#3#136#1#6'Height'#2#21#3'Top'#3#158#0#5'Wi'
+'dth'#2'8'#8'TabOrder'#2#6#4'Text'#6#5'Edit1'#0#0#5'TEdit'#5'Size2'#4'Left'#3
+#136#1#6'Height'#2#21#3'Top'#3#192#0#5'Width'#2'8'#8'TabOrder'#2#7#4'Text'#6
+#5'Edit1'#0#0#6'TPanel'#6'Panel2'#4'Left'#2#16#6'Height'#3#181#0#3'Top'#3#232
+#0#5'Width'#3'J'#1#12'ClientHeight'#3#181#0#11'ClientWidth'#3'J'#1#8'TabOrde'
+'r'#2#8#0#6'TLabel'#11'SelVarLabel'#4'Left'#2#9#6'Height'#2#14#3'Top'#2#8#5
+'Width'#2'P'#7'Caption'#6#17'Select Variables:'#11'ParentColor'#8#0#0#6'TLab'
+'el'#6'xlabel'#4'Left'#3#152#0#6'Height'#2#14#3'Top'#2#25#5'Width'#2#18#7'Ca'
+'ption'#6#3'X ='#11'ParentColor'#8#0#0#6'TLabel'#6'ylabel'#4'Left'#3#152#0#6
+'Height'#2#14#3'Top'#2'9'#5'Width'#2#18#7'Caption'#6#3'Y ='#11'ParentColor'#8
+#0#0#6'TLabel'#6'zlabel'#4'Left'#3#152#0#6'Height'#2#14#3'Top'#2'Y'#5'Width'
+#2#18#7'Caption'#6#3'Z ='#11'ParentColor'#8#0#0#6'TLabel'#10'GroupLabel'#4'L'
+'eft'#3#152#0#6'Height'#2#14#3'Top'#2'x'#5'Width'#2')'#7'Caption'#6#7'Group '
+'='#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#6'Height'#3#140
,#0#3'Top'#2#26#5'Width'#3#138#0#10'ItemHeight'#2#0#7'OnClick'#7#12'VarListCl'
+'ick'#8'TabOrder'#2#0#0#0#5'TEdit'#4'Xvar'#4'Left'#3#200#0#6'Height'#2#21#3
+'Top'#2#24#5'Width'#2'l'#8'TabOrder'#2#1#4'Text'#6#4'Xvar'#0#0#0#5'TEdit'#4
+'Yvar'#4'Left'#3#216#0#6'Height'#2#21#3'Top'#3' '#1#5'Width'#2'l'#8'TabOrder'
+#2#9#4'Text'#6#5'Edit1'#0#0#5'TEdit'#4'Zvar'#4'Left'#3#216#0#6'Height'#2#21#3
+'Top'#3'@'#1#5'Width'#2'l'#8'TabOrder'#2#10#4'Text'#6#5'Edit1'#0#0#5'TEdit'#8
+'GroupVar'#4'Left'#3#216#0#6'Height'#2#21#3'Top'#3'`'#1#5'Width'#2'l'#8'TabO'
+'rder'#2#11#4'Text'#6#5'Edit1'#0#0#5'TEdit'#9'CInterval'#4'Left'#3#240#1#6'H'
+'eight'#2#21#3'Top'#3'`'#1#5'Width'#2'$'#8'TabOrder'#2#12#4'Text'#6#9'CInter'
+'val'#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#184#1#6'Height'#2#29#3'Top'#3#232
+#0#5'Width'#2'F'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabO'
+'rder'#2#13#0#0#7'TButton'#9'CancelBtn'#4'Left'#3'b'#1#6'Height'#2' '#3'Top'
+#3#16#1#5'Width'#2'N'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'
+#2#14#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#184#1#6'Height'#2' '#3'Top'#3
+#16#1#5'Width'#2'F'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'
+#8'TabOrder'#2#15#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'b'#1#6'Height'#2#29#3
+'Top'#3'8'#1#5'Width'#2'P'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabO'
+'rder'#2#16#0#0#7'TButton'#7'HelpBtn'#3'Tag'#3#151#0#4'Left'#3'b'#1#6'Height'
+#2#29#3'Top'#3#232#0#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12'Help'
+'BtnClick'#8'TabOrder'#2#17#0#0#0
]);

View File

@ -0,0 +1,658 @@
unit TwoCorrsUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, MainUnit, Globals, FunctionsLib, OutPutUnit, DataProcs,
contexthelpunit;
type
{ TTwoCorrsFrm }
TTwoCorrsFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
CInterval: TEdit;
Label14: TLabel;
Xvar: TEdit;
Yvar: TEdit;
Zvar: TEdit;
GroupVar: TEdit;
xlabel: TLabel;
ylabel: TLabel;
zlabel: TLabel;
GroupLabel: TLabel;
SelVarLabel: TLabel;
VarList: TListBox;
Panel2: TPanel;
rxy1: TEdit;
Size1: TEdit;
rxy2: TEdit;
Size2: TEdit;
firstcorlabel: TLabel;
size1label: TLabel;
SecdCorLabel: TLabel;
Size2Label: TLabel;
rxy: TEdit;
rxz: TEdit;
ryz: TEdit;
SampSize: TEdit;
corxylabel: TLabel;
corxzlabel: TLabel;
coryzlabel: TLabel;
sampsizelabel: TLabel;
Panel1: TPanel;
RadioGroup1: TRadioGroup;
RadioGroup2: TRadioGroup;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure RadioGroup2Click(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure VarListClick(Sender: TObject);
private
{ private declarations }
independent : boolean;
griddata : boolean;
public
{ public declarations }
end;
var
TwoCorrsFrm: TTwoCorrsFrm;
implementation
{ TTwoCorrsFrm }
procedure TTwoCorrsFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
RadioGroup1.ItemIndex := 0;
RadioGroup2.ItemIndex := 0;
Panel1.Visible := true;
Panel2.Visible := false;
VarList.Clear;
Xvar.Text := '';
Yvar.Text := '';
Zvar.Text := '';
Xvar.Visible := false;
Yvar.Visible := false;
Zvar.Visible := false;
corxylabel.Visible := false;
corxzlabel.Visible := false;
coryzlabel.Visible := false;
GroupVar.Text := '';
GroupVar.Visible := false;
sampsizelabel.Visible := false;
rxy.Text := '';
rxz.Text := '';
ryz.Text := '';
SampSize.Text := '';
rxy1.Text := '';
rxy2.Text := '';
Size1.Text := '';
Size2.Text := '';
firstcorlabel.Visible := true;
size1label.Visible := true;
SecdCorLabel.Visible := true;
Size2Label.Visible := true;
rxy.Visible := false;
rxz.Visible := false;
ryz.Visible := false;
rxy1.Visible := true;
rxy2.Visible := true;
Size1.Visible := true;
Size2.Visible := true;
SelVarLabel.Visible := true;
xlabel.Visible := true;
ylabel.Visible := true;
zlabel.Visible := false;
Zvar.Visible := false;
GroupLabel.Visible := true;
independent := true;
griddata := false;
CInterval.Text := '95.0';
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TTwoCorrsFrm.VarListClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
if Xvar.Text = '' then
begin
Xvar.Text := VarList.Items.Strings[index];
exit;
end;
if Yvar.Text = '' then
begin
Yvar.Text := VarList.Items.Strings[index];
exit;
end;
if not independent then
begin
if Zvar.Text = '' then
begin
Zvar.Text := VarList.Items.Strings[index];
exit;
end;
end;
if independent then
begin
if GroupVar.Text = '' then
begin
GroupVar.Text := VarList.Items.Strings[index];
exit;
end;
end;
end;
procedure TTwoCorrsFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TTwoCorrsFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TTwoCorrsFrm.ComputeBtnClick(Sender: TObject);
var
Corxy, Corxz, Coryz, Cor1, Cor2, alpha, tvalue, df1, df2 : double;
CorDif, zOne, zTwo, zDif, StdErr, zValue, zprobability : double;
UCL, LCL, ztest, ConfLevel, tprobability, ttest : double;
mean1, mean2, mean3, variance1, variance2, variance3 : double;
stddev1, stddev2, stddev3, value1, value2, value3 : double;
meanx1, meanx2, meany1, meany2, varx1, varx2, vary1, vary2 : double;
sdx1, sdx2, sdy1, sdy2, value : double;
SSize1, SSize2, SSize, v1, v2, v3, grp, ncases, NoSelected: integer;
min, max, grpval, ncases1, ncases2, i : integer;
cellstring, outline : string;
ColNoSelected : IntDyneVec;
begin
SetLength(ColNoSelected,NoVariables);
Corxy := 0.0;
Corxz := 0.0;
Coryz := 0.0;
Cor1 := 0.0;
Cor2 := 0.0;
mean1 := 0.0;
mean2 := 0.0;
mean3 := 0.0;
variance1 := 0.0;
variance2 := 0.0;
variance3 := 0.0;
meanx1 := 0.0;
meanx2 := 0.0;
meany1 := 0.0;
if not griddata then // use data on the form
begin
if independent then // read data from form and obtain results
begin
Cor1 := StrToFloat(rxy1.Text);
Cor2 := StrToFloat(rxy2.Text);
SSize1 := StrToInt(Size1.Text);
SSize2 := StrToInt(Size2.Text);
ConfLevel := StrToFloat(CInterval.Text) / 100.0;
CorDif := Cor1 - Cor2;
zOne := 0.5 * ln((1.0 + Cor1) / (1.0 - Cor1));
zTwo := 0.5 * ln((1.0 + Cor2) / (1.0 - Cor2));
zDif := zOne - zTwo;
StdErr := sqrt((1.0 / (SSize1 - 3.0)) + (1.0 / (SSize2 -3.0)));
zValue := zDif / StdErr;
alpha := (1.0 - ConfLevel) / 2.0;
zTest := inversez(1.0 - alpha);
zprobability := 1.0 - probz(zValue);
UCL := zDif + StdErr * zTest;
LCL := zDif - StdErr * zTest;
UCL := (exp(2.0 * UCL) - 1.0) / (exp(2.0 * UCL) + 1.0);
LCL := (exp(2.0 * LCL) - 1.0) / (exp(2.0 * LCL) + 1.0);
end;
if not independent then // obtain data from form and obtain results
begin
Corxy := StrToFloat(rxy.Text);
Corxz := StrToFloat(rxz.Text);
Coryz := StrToFloat(ryz.Text);
SSize := StrToInt(SampSize.Text);
ConfLevel := StrToFloat(CInterval.Text) / 100.0;
CorDif := Corxy - Corxz;
alpha := (1.0 - ConfLevel) / 2.0;
tvalue := (CorDif * sqrt((SSize - 3.0) * (1.0 + Coryz))) /
sqrt(2.0 * (1.0 - (Corxy * Corxy) - (Corxz * Corxz) -
(Coryz * Coryz) + (2.0 * Corxy * Corxz * Coryz)));
df1 := 1.0;
df2 := SSize - 3.0;
tprobability := probt(tvalue,df2);
ttest := inverset(1.0 - alpha, df2);
end;
end;
if griddata then
begin
v1 := 1;
v2 := 1;
grp := 1;
if independent then // read grid data for independent r's
begin
for i := 1 to NoVariables do
begin
cellstring := OS3MainFrm.DataGrid.Cells[i,0];
if cellstring = Xvar.Text then v1 := i;
if cellstring = Yvar.Text then v2 := i;
if cellstring = GroupVar.Text then grp := i;
end;
ColNoSelected[0] := v1;
ColNoSelected[1] := v2;
ColNoSelected[2] := grp;
NoSelected := 3;
meanx1 := 0.0;
meany1 := 0.0;
varx1 := 0.0;
vary1 := 0.0;
meanx2 := 0.0;
meany2 := 0.0;
varx2 := 0.0;
vary2 := 0.0;
Cor1 := 0.0;
Cor2 := 0.0;
ncases1 := 0;
ncases2 := 0;
min := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[grp,1])));
max := min;
for i := 2 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
grpval := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[grp,i])));
if grpval > max then max := grpval;
if grpval < min then min := grpval;
end;
for i := 1 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
grpval := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[grp,i])));
if grpval = min then
begin
ncases1 := ncases1 + 1;
value1 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v1,i]));
meanx1 := meanx1 + value1;
varx1 := varx1 + (value1 * value1);
value2 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i]));
meany1 := meany1 + value2;
vary1 := vary1 + (value2 * value2);
Cor1 := Cor1 + (value1 * value2);
end;
if grpval = max then
begin
ncases2 := ncases2 + 1;
value1 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v1,i]));
meanx2 := meanx2 + value1;
varx2 := varx2 + (value1 * value1);
value2 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i]));
meany2 := meany2 + value2;
vary2 := vary2 + (value2 * value2);
Cor2 := Cor2 + (value1 * value2);
end;
end; // next case
varx1 := varx1 - (meanx1 * meanx1) / ncases1;
varx1 := varx1 / (ncases1 - 1.0);
varx2 := varx2 - (meanx2 * meanx2) / ncases2;
varx2 := varx2 / (ncases2 - 1.0);
vary1 := vary1 - (meany1 * meany1) / ncases1;
vary1 := vary1 / (ncases1 - 1.0);
vary2 := vary2 - (meany2 * meany2) / ncases2;
vary2 := vary2 / (ncases2 - 1.0);
Cor1 := Cor1 - (meanx1 * meany1) / ncases1;
Cor1 := Cor1 / (ncases1 - 1.0);
Cor2 := Cor2 - (meanx2 * meany2) / ncases2;
Cor2 := Cor2 / (ncases2 - 1.0);
sdx1 := sqrt(varx1);
sdx2 := sqrt(varx2);
sdy1 := sqrt(vary1);
sdy2 := sqrt(vary2);
Cor1 := Cor1 / (sdx1 * sdy1);
Cor2 := Cor2 / (sdx2 * sdy2);
meanx1 := meanx1 / ncases1;
meany1 := meany1 / ncases1;
meanx2 := meanx2 / ncases2;
meany2 := meany2 / ncases2;
SSize1 := ncases1;
SSize2 := ncases2;
ConfLevel := StrToFloat(CInterval.Text) / 100.0;
CorDif := Cor1 - Cor2;
zOne := 0.5 * ln((1.0 + Cor1) / (1.0 - Cor1));
zTwo := 0.5 * ln((1.0 + Cor2) / (1.0 - Cor2));
zDif := zOne - zTwo;
StdErr := sqrt((1.0 / (SSize1 - 3.0)) + (1.0 / (SSize2 -3.0)));
zValue := zDif / StdErr;
alpha := (1.0 - ConfLevel) / 2.0;
zTest := inversez(1.0 - alpha);
zprobability := 1.0 - probz(zValue);
UCL := zDif + StdErr * zTest;
LCL := zDif - StdErr * zTest;
UCL := (exp(2.0 * UCL) - 1.0) / (exp(2.0 * UCL) + 1.0);
LCL := (exp(2.0 * LCL) - 1.0) / (exp(2.0 * LCL) + 1.0);
end;
if not independent then // read grid data for dependent r's
begin
mean1 := 0.0;
mean2 := 0.0;
mean3 := 0.0;
variance1 := 0.0;
variance2 := 0.0;
variance3 := 0.0;
Corxy := 0.0;
Corxz := 0.0;
Coryz := 0.0;
ncases := 0;
for i := 1 to NoVariables do
begin
cellstring := OS3MainFrm.DataGrid.Cells[i,0];
if cellstring = Xvar.Text then v1 := i;
if cellstring = Yvar.Text then v2 := i;
if cellstring = ZVar.Text then v3 := i;
end;
ColNoSelected[0] := v1;
ColNoSelected[1] := v2;
ColNoSelected[2] := v3;
NoSelected := 3;
for i := 1 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
ncases := ncases + 1;
value1 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v1,i]));
value2 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i]));
value3 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v3,i]));
mean1 := mean1 + value1;
mean2 := mean2 + value2;
mean3 := mean3 + value3;
variance1 := variance1 + (value1 * value1);
variance2 := variance2 + (value2 * value2);
variance3 := variance3 + (value3 * value3);
Corxy := Corxy + (value1 * value2);
Corxz := Corxz + (value1 * value3);
Coryz := Coryz + (value2 * value3);
end;
variance1 := variance1 - (mean1 * mean1) / ncases;
variance1 := variance1 / (ncases - 1.0);
stddev1 := sqrt(variance1);
variance2 := variance2 - (mean2 * mean2) / ncases;
variance2 := variance2 / (ncases - 1.0);
stddev2 := sqrt(variance2);
variance3 := variance3 - (mean3 * mean3) / ncases;
variance3 := variance3 / (ncases - 1.0);
stddev3 := sqrt(variance3);
Corxy := Corxy - (mean1 * mean2) / ncases;
Corxy := Corxy / (ncases - 1.0);
Corxy := Corxy / (stddev1 * stddev2);
Corxz := Corxz - (mean1 * mean3) / ncases;
Corxz := Corxz / (ncases - 1.0);
Corxz := Corxz / (stddev1 * stddev3);
Coryz := Coryz - (mean2 * mean3) / ncases;
Coryz := Coryz / (ncases - 1.0);
Coryz := Coryz / (stddev2 * stddev3);
mean1 := mean1 / ncases;
mean2 := mean2 / ncases;
mean3 := mean3 / ncases;
SSize := ncases;
ConfLevel := StrToFloat(CInterval.Text) / 100.0;
CorDif := Corxy - Corxz;
alpha := (1.0 - ConfLevel) / 2.0;
tvalue := (CorDif * sqrt((SSize - 3.0) * (1.0 + Coryz))) /
sqrt(2.0 * (1.0 - (Corxy * Corxy) - (Corxz * Corxz) -
(Coryz * Coryz) + (2.0 * Corxy * Corxz * Coryz)));
df1 := 1.0;
df2 := SSize - 3.0;
tprobability := probt(tvalue,df2);
ttest := inverset(1.0 - alpha, df2);
end;
end;
// Initialize output form
OutPutFrm.RichEdit.Clear;
OutPutFrm.RichEdit.Lines.Add('COMPARISON OF TWO CORRELATIONS');
OutPutFrm.RichEdit.Lines.Add('');
// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify;
if independent then
begin
outline := format('Correlation one = %6.3f',[Cor1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Sample size one = %d',[SSize1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Correlation two = %6.3f',[Cor2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline :=format('Sample size two = %d',[SSize2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Difference between correlations = %6.3f',[CorDif]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Confidence level selected = %s',[CInterval.Text]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z for Correlation One = %6.3f',[zOne]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z for Correlation Two = %6.3f',[zTwo]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z difference = %6.3f',[zDif]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Standard error of difference = %6.3f',[StdErr]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z test statistic = %6.3f',[zValue]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Probability > |z| = %6.3f',[zprobability]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z Required for significance = %6.3f',[zTest]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('Note: above is a two-tailed test.');
outline := format('Confidence Limits = (%6.3f,%6.3f)',[LCL,UCL]);
OutPutFrm.RichEdit.Lines.Add(outline);
if griddata then
begin
outline := format('Mean X for group 1 = %9.3f',[meanx1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Mean X for group 2 = %9.3f',[meanx2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Std.Dev. X for group 1 = %9.3f',[sdx1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Std.Dev. X for group 2 = %9.3f',[sdx2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Mean y for group 1 = %9.3f',[meany1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Mean Y for group 2 = %9.3f',[meany2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Std.Dev. Y for group 1 = %9.3f',[sdy1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Std.Dev. Y for group 2 = %9.3f',[sdy2]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
end;
if not independent then
begin
outline := format('Correlation x with y = %6.3f',[Corxy]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Correlation x with z = %6.3f',[Corxz]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Correlation y with z = %6.3f',[Coryz]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Sample size = %d',[SSize]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Confidence Level Selected = %s',[CInterval.Text]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Difference r(x,y) - r(x,z) = %6.3f',[CorDif]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline :=format('t test statistic = %6.3f',[tvalue]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Probability > |t| = %6.3f',[tprobability]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('t value for significance = %6.3f',[ttest]);
OutPutFrm.RichEdit.Lines.Add(outline);
if griddata then
begin
OutPutFrm.RichEdit.Lines.Add('Variable Mean Variance Std.Dev.');
outline := format(' X %9.3f %9.3f %9.3f',
[mean1, variance1, stddev1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format(' Y %9.3f %9.3f %9.3f',
[mean2, variance2, stddev2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format(' Z %9.3f %9.3f %9.3f',
[mean3, variance3, stddev3]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
end;
OutPutFrm.ShowModal;
ColNoSelected := nil;
end;
procedure TTwoCorrsFrm.RadioGroup1Click(Sender: TObject);
VAR index : integer;
begin
index := RadioGroup1.ItemIndex;
if index = 0 then
begin
Panel2.Visible := false;
Panel1.Visible := true;
griddata := false;
yvar.Visible := false;
xvar.Visible := false;
groupvar.Visible := false;
rxy1.Visible := true;
rxy2.Visible := true;
size1.Visible := true;
size2.Visible := true;
end
else
begin
Panel1.Visible := false;
Panel2.Visible := true;
xvar.Visible := true;
yvar.Visible := true;
groupvar.Visible := true;
griddata := true;
rxy1.Visible := false;
rxy2.Visible := false;
size1.Visible := false;
size2.Visible := false;
end;
end;
procedure TTwoCorrsFrm.RadioGroup2Click(Sender: TObject);
VAR index1, index2 : integer;
begin
index2 := RadioGroup2.ItemIndex;
index1 := RadioGroup1.ItemIndex;
if ((index2 = 0) and (index1 = 0)) then // form input with independent corrs
begin
independent := true;
panel2.Visible := false;
panel1.Visible := true;
// GroupVar.Visible := true;
// GroupLabel.Visible := true;
corxylabel.Visible := false;
corxzlabel.Visible := false;
coryzlabel.Visible := false;
// Xvar.Visible := true;
// Yvar.Visible := true;
// Zvar.Visible := false;
// SelVarLabel.Visible := true;
// xlabel.Visible := true;
// ylabel.Visible := true;
// Zlabel.Visible := false;
rxy1.Visible := true;
rxy2.Visible := true;
Size1.Visible := true;
Size2.Visible := true;
firstcorlabel.Visible := true;
size1label.Visible := true;
SecdCorLabel.Visible := true;
Size2Label.Visible := true;
rxy.Visible := false;
rxz.Visible := false;
ryz.Visible := false;
SampSize.Visible := false;
SampSizeLabel.Visible := false;
end;
if ((index2 = 0) and (index1 = 1)) then // grid data for independent corrs
begin
Panel1.Visible := false;
Panel2.Visible := true;
xlabel.Visible := true;
ylabel.Visible := true;
zlabel.Visible := false;
xvar.Visible := true;
yvar.Visible := true;
zvar.Visible := false;
grouplabel.Visible := true;
groupvar.Visible := true;
end;
if ((index2 = 1) and (index1 = 0)) then // form data for dependent corrs
begin
Panel1.Visible := true;
Panel2.Visible := false;
corxylabel.Visible := true;
corxzlabel.Visible := true;
coryzlabel.Visible := true;
rxy.Visible := true;
rxz.Visible := true;
ryz.Visible := true;
sampsizelabel.Visible := true;
sampsize.Visible := true;
firstcorlabel.Visible := false;
rxy1.Visible := false;
size1label.Visible := false;
size1.Visible := false;
SecdCorLabel.Visible := false;
rxy2.Visible := false;
size2label.Visible := false;
size2.Visible := false;
end;
if ((index2 = 1) and (index1 = 1)) then // grid data for dependent corrs
begin
Panel1.Visible := false;
Panel2.Visible := true;
independent := false;
GroupVar.Visible := false;
sampsizelabel.Visible := true;
corxylabel.Visible := true;
corxzlabel.Visible := true;
coryzlabel.Visible := true;
xvar.Visible := true;
yvar.Visible := true;
Zvar.Visible := true;
zlabel.Visible := true;
SelVarLabel.Visible := true;
xlabel.Visible := true;
ylabel.Visible := true;
GroupLabel.Visible := false;
// rxy1.Visible := false;
// rxy2.Visible := false;
// Size1.Visible := false;
// Size2.Visible := false;
// firstcorlabel.Visible := false;
// size1label.Visible := false;
// SecdCorLabel.Visible := false;
// Size2Label.Visible := false;
// rxy.Visible := true;
// rxz.Visible := true;
// ryz.Visible := true;
// SampSize.Visible := true;
end;
end;
initialization
{$I twocorrsunit.lrs}
end.

View File

@ -0,0 +1,348 @@
object TwoPropFrm: TTwoPropFrm
Left = 108
Height = 397
Top = 170
Width = 525
Caption = 'Test of Equality for two Proportions'
ClientHeight = 397
ClientWidth = 525
OnShow = FormShow
LCLVersion = '0.9.28.2'
object ConfLabel: TLabel
Left = 288
Height = 14
Top = 336
Width = 140
Caption = 'Percent Confidence Interval:'
ParentColor = False
end
object RadioGroup1: TRadioGroup
Left = 8
Height = 60
Top = 9
Width = 215
AutoFill = True
Caption = 'Data Entry By:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 42
ClientWidth = 211
Items.Strings = (
'Values Entered on this Form'
'Values in the Data Grid'
)
OnClick = RadioGroup1Click
TabOrder = 0
end
object RadioGroup2: TRadioGroup
Left = 296
Height = 60
Top = 8
Width = 214
AutoFill = True
Caption = 'Test Assumptions:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 42
ClientWidth = 210
Items.Strings = (
'Independent Proportions'
'Dependent Proportions'
)
OnClick = RadioGroup2Click
TabOrder = 1
end
object Panel1: TPanel
Left = 9
Height = 104
Top = 72
Width = 503
ClientHeight = 104
ClientWidth = 503
TabOrder = 2
object Samp1Label: TLabel
Left = 8
Height = 14
Top = 15
Width = 73
Caption = 'Sample 1 Freq.'
ParentColor = False
end
object Samp2Label: TLabel
Left = 9
Height = 14
Top = 47
Width = 73
Caption = 'Sample 2 Freq.'
ParentColor = False
end
object Samp1SizeLabel: TLabel
Left = 150
Height = 14
Top = 15
Width = 61
Caption = 'Sample Size:'
ParentColor = False
end
object Samp2SizeLabel: TLabel
Left = 152
Height = 14
Top = 46
Width = 61
Caption = 'Sample Size:'
ParentColor = False
end
object DepSamp2Label: TLabel
Left = 287
Height = 14
Top = 56
Width = 41
Caption = 'Sample2'
ParentColor = False
end
object DepSamp1Label: TLabel
Left = 383
Height = 14
Top = 8
Width = 41
Caption = 'Sample1'
ParentColor = False
end
object Samp10Label: TLabel
Left = 366
Height = 14
Top = 24
Width = 7
Caption = '0'
ParentColor = False
end
object Samp11Label: TLabel
Left = 424
Height = 14
Top = 24
Width = 7
Caption = '1'
ParentColor = False
end
object Samp20Label: TLabel
Left = 335
Height = 14
Top = 41
Width = 7
Caption = '0'
ParentColor = False
end
object Samp21Label: TLabel
Left = 335
Height = 14
Top = 72
Width = 7
Caption = '1'
ParentColor = False
end
object IndFreq1: TEdit
Left = 95
Height = 21
Top = 8
Width = 42
TabOrder = 0
Text = 'IndFreq1'
end
object IndFreq2: TEdit
Left = 96
Height = 21
Top = 41
Width = 41
TabOrder = 1
Text = 'IndFreq2'
end
object IndSize1: TEdit
Left = 225
Height = 21
Top = 8
Width = 45
TabOrder = 2
Text = 'IndSize1'
end
object IndSize2: TEdit
Left = 223
Height = 21
Top = 40
Width = 46
TabOrder = 3
Text = 'IndSize2'
end
object DepFreq00: TEdit
Left = 351
Height = 21
Top = 43
Width = 37
TabOrder = 4
Text = 'DepFreq00'
end
object DepFreq10: TEdit
Left = 408
Height = 21
Top = 43
Width = 40
TabOrder = 5
Text = 'DepFreq10'
end
object DepFreq01: TEdit
Left = 351
Height = 21
Top = 67
Width = 38
TabOrder = 6
Text = 'DepFreq01'
end
object DepFreq11: TEdit
Left = 407
Height = 21
Top = 68
Width = 40
TabOrder = 7
Text = 'DepFreq11'
end
end
object Panel2: TPanel
Left = 7
Height = 199
Top = 184
Width = 273
ClientHeight = 199
ClientWidth = 273
TabOrder = 3
object Label11: TLabel
Left = 10
Height = 14
Top = 9
Width = 80
Caption = 'Select Variables:'
ParentColor = False
end
object FirstVarLabel: TLabel
Left = 150
Height = 14
Top = 16
Width = 63
Caption = 'First Variable'
ParentColor = False
end
object SecdVarLabel: TLabel
Left = 150
Height = 14
Top = 71
Width = 77
Caption = 'Second Variable'
ParentColor = False
end
object GrpLabel: TLabel
Left = 151
Height = 14
Top = 128
Width = 58
Caption = 'Group Code'
ParentColor = False
end
object VarList: TListBox
Left = 9
Height = 166
Top = 24
Width = 126
ItemHeight = 0
OnClick = VarListClick
TabOrder = 0
end
object Var1: TEdit
Left = 148
Height = 21
Top = 31
Width = 107
TabOrder = 1
Text = 'Var1'
end
object Var2: TEdit
Left = 149
Height = 21
Top = 86
Width = 106
TabOrder = 2
Text = 'Var2'
end
object Grp: TEdit
Left = 150
Height = 21
Top = 145
Width = 105
TabOrder = 3
Text = 'Grp'
end
end
object CInterval: TEdit
Left = 464
Height = 21
Top = 329
Width = 41
TabOrder = 4
Text = '95.0'
end
object ResetBtn: TButton
Left = 432
Height = 29
Top = 184
Width = 76
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 5
end
object CancelBtn: TButton
Left = 296
Height = 32
Top = 232
Width = 76
Caption = 'Cancel'
ModalResult = 2
TabOrder = 6
end
object ComputeBtn: TButton
Left = 432
Height = 32
Top = 232
Width = 76
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 7
end
object ReturnBtn: TButton
Left = 360
Height = 32
Top = 280
Width = 76
Caption = 'Return'
ModalResult = 1
TabOrder = 8
end
object HelpBtn: TButton
Tag = 152
Left = 296
Height = 29
Top = 184
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 9
end
end

View File

@ -0,0 +1,86 @@
LazarusResources.Add('TTwoPropFrm','FORMDATA',[
'TPF0'#11'TTwoPropFrm'#10'TwoPropFrm'#4'Left'#2'l'#6'Height'#3#141#1#3'Top'#3
+#170#0#5'Width'#3#13#2#7'Caption'#6'$Test of Equality for two Proportions'#12
+'ClientHeight'#3#141#1#11'ClientWidth'#3#13#2#6'OnShow'#7#8'FormShow'#10'LCL'
+'Version'#6#8'0.9.28.2'#0#6'TLabel'#9'ConfLabel'#4'Left'#3' '#1#6'Height'#2
+#14#3'Top'#3'P'#1#5'Width'#3#140#0#7'Caption'#6#28'Percent Confidence Interv'
+'al:'#11'ParentColor'#8#0#0#11'TRadioGroup'#11'RadioGroup1'#4'Left'#2#8#6'He'
+'ight'#2'<'#3'Top'#2#9#5'Width'#3#215#0#8'AutoFill'#9#7'Caption'#6#14'Data E'
+'ntry By:'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpac'
+'ing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27
+'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.'
+'ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14
+'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'
+#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'*'#11'ClientWidth'#3
+#211#0#13'Items.Strings'#1#6#27'Values Entered on this Form'#6#23'Values in '
+'the Data Grid'#0#7'OnClick'#7#16'RadioGroup1Click'#8'TabOrder'#2#0#0#0#11'T'
+'RadioGroup'#11'RadioGroup2'#4'Left'#3'('#1#6'Height'#2'<'#3'Top'#2#8#5'Widt'
+'h'#3#214#0#8'AutoFill'#9#7'Caption'#6#17'Test Assumptions:'#28'ChildSizing.'
+'LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.E'
+'nlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVert'
+'ical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14
+'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'Chil'
+'dSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Controls'
+'PerLine'#2#1#12'ClientHeight'#2'*'#11'ClientWidth'#3#210#0#13'Items.Strings'
+#1#6#23'Independent Proportions'#6#21'Dependent Proportions'#0#7'OnClick'#7
+#16'RadioGroup2Click'#8'TabOrder'#2#1#0#0#6'TPanel'#6'Panel1'#4'Left'#2#9#6
+'Height'#2'h'#3'Top'#2'H'#5'Width'#3#247#1#12'ClientHeight'#2'h'#11'ClientWi'
+'dth'#3#247#1#8'TabOrder'#2#2#0#6'TLabel'#10'Samp1Label'#4'Left'#2#8#6'Heigh'
+'t'#2#14#3'Top'#2#15#5'Width'#2'I'#7'Caption'#6#14'Sample 1 Freq.'#11'Parent'
+'Color'#8#0#0#6'TLabel'#10'Samp2Label'#4'Left'#2#9#6'Height'#2#14#3'Top'#2'/'
+#5'Width'#2'I'#7'Caption'#6#14'Sample 2 Freq.'#11'ParentColor'#8#0#0#6'TLabe'
+'l'#14'Samp1SizeLabel'#4'Left'#3#150#0#6'Height'#2#14#3'Top'#2#15#5'Width'#2
+'='#7'Caption'#6#12'Sample Size:'#11'ParentColor'#8#0#0#6'TLabel'#14'Samp2Si'
+'zeLabel'#4'Left'#3#152#0#6'Height'#2#14#3'Top'#2'.'#5'Width'#2'='#7'Caption'
+#6#12'Sample Size:'#11'ParentColor'#8#0#0#6'TLabel'#13'DepSamp2Label'#4'Left'
+#3#31#1#6'Height'#2#14#3'Top'#2'8'#5'Width'#2')'#7'Caption'#6#7'Sample2'#11
+'ParentColor'#8#0#0#6'TLabel'#13'DepSamp1Label'#4'Left'#3#127#1#6'Height'#2
+#14#3'Top'#2#8#5'Width'#2')'#7'Caption'#6#7'Sample1'#11'ParentColor'#8#0#0#6
+'TLabel'#11'Samp10Label'#4'Left'#3'n'#1#6'Height'#2#14#3'Top'#2#24#5'Width'#2
+#7#7'Caption'#6#1'0'#11'ParentColor'#8#0#0#6'TLabel'#11'Samp11Label'#4'Left'
+#3#168#1#6'Height'#2#14#3'Top'#2#24#5'Width'#2#7#7'Caption'#6#1'1'#11'Parent'
+'Color'#8#0#0#6'TLabel'#11'Samp20Label'#4'Left'#3'O'#1#6'Height'#2#14#3'Top'
+#2')'#5'Width'#2#7#7'Caption'#6#1'0'#11'ParentColor'#8#0#0#6'TLabel'#11'Samp'
+'21Label'#4'Left'#3'O'#1#6'Height'#2#14#3'Top'#2'H'#5'Width'#2#7#7'Caption'#6
+#1'1'#11'ParentColor'#8#0#0#5'TEdit'#8'IndFreq1'#4'Left'#2'_'#6'Height'#2#21
+#3'Top'#2#8#5'Width'#2'*'#8'TabOrder'#2#0#4'Text'#6#8'IndFreq1'#0#0#5'TEdit'
+#8'IndFreq2'#4'Left'#2'`'#6'Height'#2#21#3'Top'#2')'#5'Width'#2')'#8'TabOrde'
+'r'#2#1#4'Text'#6#8'IndFreq2'#0#0#5'TEdit'#8'IndSize1'#4'Left'#3#225#0#6'Hei'
+'ght'#2#21#3'Top'#2#8#5'Width'#2'-'#8'TabOrder'#2#2#4'Text'#6#8'IndSize1'#0#0
+#5'TEdit'#8'IndSize2'#4'Left'#3#223#0#6'Height'#2#21#3'Top'#2'('#5'Width'#2
+'.'#8'TabOrder'#2#3#4'Text'#6#8'IndSize2'#0#0#5'TEdit'#9'DepFreq00'#4'Left'#3
+'_'#1#6'Height'#2#21#3'Top'#2'+'#5'Width'#2'%'#8'TabOrder'#2#4#4'Text'#6#9'D'
+'epFreq00'#0#0#5'TEdit'#9'DepFreq10'#4'Left'#3#152#1#6'Height'#2#21#3'Top'#2
+'+'#5'Width'#2'('#8'TabOrder'#2#5#4'Text'#6#9'DepFreq10'#0#0#5'TEdit'#9'DepF'
+'req01'#4'Left'#3'_'#1#6'Height'#2#21#3'Top'#2'C'#5'Width'#2'&'#8'TabOrder'#2
+#6#4'Text'#6#9'DepFreq01'#0#0#5'TEdit'#9'DepFreq11'#4'Left'#3#151#1#6'Height'
+#2#21#3'Top'#2'D'#5'Width'#2'('#8'TabOrder'#2#7#4'Text'#6#9'DepFreq11'#0#0#0
+#6'TPanel'#6'Panel2'#4'Left'#2#7#6'Height'#3#199#0#3'Top'#3#184#0#5'Width'#3
+#17#1#12'ClientHeight'#3#199#0#11'ClientWidth'#3#17#1#8'TabOrder'#2#3#0#6'TL'
+'abel'#7'Label11'#4'Left'#2#10#6'Height'#2#14#3'Top'#2#9#5'Width'#2'P'#7'Cap'
+'tion'#6#17'Select Variables:'#11'ParentColor'#8#0#0#6'TLabel'#13'FirstVarLa'
+'bel'#4'Left'#3#150#0#6'Height'#2#14#3'Top'#2#16#5'Width'#2'?'#7'Caption'#6
+#14'First Variable'#11'ParentColor'#8#0#0#6'TLabel'#12'SecdVarLabel'#4'Left'
+#3#150#0#6'Height'#2#14#3'Top'#2'G'#5'Width'#2'M'#7'Caption'#6#15'Second Var'
+'iable'#11'ParentColor'#8#0#0#6'TLabel'#8'GrpLabel'#4'Left'#3#151#0#6'Height'
,#2#14#3'Top'#3#128#0#5'Width'#2':'#7'Caption'#6#10'Group Code'#11'ParentColo'
+'r'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#9#6'Height'#3#166#0#3'Top'#2#24#5
+'Width'#2'~'#10'ItemHeight'#2#0#7'OnClick'#7#12'VarListClick'#8'TabOrder'#2#0
+#0#0#5'TEdit'#4'Var1'#4'Left'#3#148#0#6'Height'#2#21#3'Top'#2#31#5'Width'#2
+'k'#8'TabOrder'#2#1#4'Text'#6#4'Var1'#0#0#5'TEdit'#4'Var2'#4'Left'#3#149#0#6
+'Height'#2#21#3'Top'#2'V'#5'Width'#2'j'#8'TabOrder'#2#2#4'Text'#6#4'Var2'#0#0
+#5'TEdit'#3'Grp'#4'Left'#3#150#0#6'Height'#2#21#3'Top'#3#145#0#5'Width'#2'i'
+#8'TabOrder'#2#3#4'Text'#6#3'Grp'#0#0#0#5'TEdit'#9'CInterval'#4'Left'#3#208#1
+#6'Height'#2#21#3'Top'#3'I'#1#5'Width'#2')'#8'TabOrder'#2#4#4'Text'#6#4'95.0'
+#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#176#1#6'Height'#2#29#3'Top'#3#184#0#5
+'Width'#2'L'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'
+#2#5#0#0#7'TButton'#9'CancelBtn'#4'Left'#3'('#1#6'Height'#2' '#3'Top'#3#232#0
+#5'Width'#2'L'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#6#0#0
+#7'TButton'#10'ComputeBtn'#4'Left'#3#176#1#6'Height'#2' '#3'Top'#3#232#0#5'W'
+'idth'#2'L'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOr'
+'der'#2#7#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'h'#1#6'Height'#2' '#3'Top'#3
+#24#1#5'Width'#2'L'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2
+#8#0#0#7'TButton'#7'HelpBtn'#3'Tag'#3#152#0#4'Left'#3'('#1#6'Height'#2#29#3
+'Top'#3#184#0#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClic'
+'k'#8'TabOrder'#2#9#0#0#0
]);

View File

@ -0,0 +1,477 @@
unit TwoPropUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, MainUnit, Globals, FunctionsLib, OutPutUnit, DataProcs,
contexthelpunit;
type
{ TTwoPropFrm }
TTwoPropFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
DepFreq00: TEdit;
DepFreq10: TEdit;
DepFreq01: TEdit;
DepFreq11: TEdit;
CInterval: TEdit;
Grp: TEdit;
GrpLabel: TLabel;
ConfLabel: TLabel;
Var2: TEdit;
SecdVarLabel: TLabel;
Var1: TEdit;
IndSize2: TEdit;
IndSize1: TEdit;
IndFreq2: TEdit;
IndFreq1: TEdit;
Samp1Label: TLabel;
Samp21Label: TLabel;
Label11: TLabel;
FirstVarLabel: TLabel;
Samp2Label: TLabel;
Samp1SizeLabel: TLabel;
Samp2SizeLabel: TLabel;
DepSamp2Label: TLabel;
DepSamp1Label: TLabel;
Samp10Label: TLabel;
Samp11Label: TLabel;
Samp20Label: TLabel;
VarList: TListBox;
Panel1: TPanel;
Panel2: TPanel;
RadioGroup1: TRadioGroup;
RadioGroup2: TRadioGroup;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure RadioGroup2Click(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure VarListClick(Sender: TObject);
private
{ private declarations }
independent : boolean;
griddata : boolean;
public
{ public declarations }
end;
var
TwoPropFrm: TTwoPropFrm;
implementation
{ TTwoPropFrm }
procedure TTwoPropFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
RadioGroup1.ItemIndex := 0;
RadioGroup2.ItemIndex := 0;
Panel1.Visible := true;
Panel2.Visible := false;
VarList.Clear;
Var1.Text := '';
Var2.Text := '';
independent := true;
griddata := false;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
GrpLabel.Visible := true;
Grp.Visible := true;
Grp.Text := '';
Var2.Visible := false;
SecdVarLabel.Visible := false;
DepSamp1Label.Visible := false;
DepSamp2Label.Visible := false;
Samp10Label.Visible := false;
Samp11Label.Visible := false;
Samp20Label.Visible := false;
Samp21Label.Visible := false;
DepFreq00.Visible := false;
DepFreq00.Text := '';
DepFreq01.Visible := false;
DepFreq01.Text := '';
DepFreq10.Visible := false;
DepFreq10.Text := '';
DepFreq11.Visible := false;
DepFreq11.Text := '';
IndFreq1.Text := '';
IndFreq2.Text := '';
IndSize1.Text := '';
IndSize2.Text := '';
end;
procedure TTwoPropFrm.VarListClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
if not independent then
begin
if Var1.Text <> '' then Var2.Text := VarList.Items.Strings[index]
else Var1.Text := VarList.Items.Strings[index];
end;
if independent then
begin
if Var1.Text <> '' then Grp.Text := VarList.Items.Strings[index]
else Var1.Text := VarList.Items.Strings[index];
end;
end;
procedure TTwoPropFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TTwoPropFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TTwoPropFrm.ComputeBtnClick(Sender: TObject);
var
ConfInt, Prop1, Prop2, Prop3, Prop4, zstatistic, zprobability : double;
PropDif, stderr, criticalz, UCL, LCL, value1, value2, ztest : double;
P, Q : double;
i, j, v1, v2, NoSelected, f1, f2, f3, f4, ncases1, ncases2 : integer;
min, max, group, AB, AC, CD, BD : integer;
ColNoSelected : IntDyneVec;
outline, label1, label2 : string;
errorstate : boolean;
begin
// Initialize output form
OutPutFrm.RichEdit.Clear;
stderr := 0.0;
PropDif := 0.0;
v2 := 0;
ztest := 0.0;
Prop1 := 0.0;
Prop2 := 0.0;
NoSelected := 0;
v1 := 0;
zstatistic := 0.0;
zprobability := 0.0;
UCL := 0.0;
LCL := 0.0;
OutPutFrm.RichEdit.Lines.Add('COMPARISON OF TWO PROPORTIONS');
OutPutFrm.RichEdit.Lines.Add('');
// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify;
SetLength(ColNoSelected,NoVariables);
ConfInt := (100.0 - StrToFloat(CInterval.Text)) / 2.0 ;
ConfInt := (100.0 - ConfInt) / 100.0; // one tail
ncases1 := 0;
ncases2 := 0;
f1 := 0;
f2 := 0;
f3 := 0;
f4 := 0;
if independent then Var2.Text := Grp.Text;
if griddata then // data read from grid
begin
for i := 1 to NoVariables do
begin
if Var1.Text = OS3MainFrm.DataGrid.Cells[i,0] then
begin
v1 := i;
ColNoSelected[0] := i;
label1 := Var1.Text;
end;
if Var2.Text = OS3MainFrm.DataGrid.Cells[i,0] then
begin
v2 := i;
ColNoSelected[1] := i;
label2 := Var2.Text;
end;
end; // next variable
if not independent then // correlated data
begin
for i := 1 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
ncases1 := ncases1 + 1;
value1 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v1,i]));
value2 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i]));
f1 := f1 + round(value1);
f2 := f2 + round(value2);
end; // next case
f3 := ncases1 - f1;
f4 := ncases1 - f2;
AB := f1 + f2;
AC := f1 + f3;
CD := f3 + f4;
BD := f2 + f4;
Prop1 := BD / ncases1;
Prop2 := AB / ncases1;
stderr := sqrt((f1 / ncases1 + f4 / ncases1) / ncases1);
PropDif := Prop1 - Prop2;
zstatistic := PropDif / stderr;
ztest := inversez(ConfInt);
zprobability := 1.0 - probz(abs(zstatistic));
UCL := PropDif + stderr * ztest;
LCL := PropDif - stderr * ztest;
end; // if not independent
if independent then
begin
min := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,1])));
max := min;
for i := 2 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i])));
if group < min then min := group;
if group > max then max := group;
end;
for i := 1 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
value1 := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v1,i]));
group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[v2,i])));
if group = min then
begin
f1 := f1 + round(value1);
ncases1 := ncases1 + 1;
end
else
begin
f2 := f2 + round(value1);
ncases2 := ncases2 + 1;
end;
end; // next case
Prop1 := f1 / ncases1;
Prop2 := f2 / ncases2;
PropDif := Prop1 - Prop2;
P := (f1 + f2) / (ncases1 + ncases2);
Q := 1.0 - P;
stderr := sqrt(P * Q * ((1.0 / ncases1) + (1.0 / ncases2)));
zstatistic := (Prop1 - Prop2) / stderr;
zprobability := 1.0 - probz(abs(zstatistic));
ztest := inversez(ConfInt);
UCL := PropDif + ztest * stderr;
LCL := PropDif - ztest * stderr;
end; // end if independent
end; // if reading grid data
if not griddata then // data read from form
begin
if not independent then // correlated data
begin
f1 := round(StrToFloat(DepFreq00.Text));
f2 := round(StrToFloat(DepFreq10.Text));
f3 := round(StrToFloat(DepFreq01.Text));
f4 := round(StrToFloat(DepFreq11.Text));
ncases1 := f1 + f2 + f3 + f4;
AB := f1 + f2;
AC := f1 + f3;
CD := f3 + f4;
BD := f2 + f4;
Prop1 := BD / ncases1;
Prop2 := AB / ncases1;
stderr := sqrt((f1 / ncases1 + f4 / ncases1) / ncases1);
PropDif := Prop1 - Prop2;
zstatistic := PropDif / stderr;
ztest := inversez(ConfInt);
zprobability := 1.0 - probz(abs(zstatistic));
UCL := PropDif + stderr * ztest;
LCL := PropDif - stderr * ztest;
end; // if not independent
if independent then // independent data
begin
f1 := StrToInt(IndFreq1.Text);
f2 := StrToInt(IndFreq2.Text);
ncases1 := StrToInt(IndSize1.Text);
ncases2 := StrToInt(IndSize2.Text);
Prop1 := f1 / ncases1;
Prop2 := f2 / ncases2;
PropDif := Prop1 - Prop2;
P := (f1 + f2) / (ncases1 + ncases2);
Q := 1.0 - P;
stderr := sqrt(P * Q * ((1.0 / ncases1) + (1.0 / ncases2)));
zstatistic := (Prop1 - Prop2) / stderr;
zprobability := 1.0 - probz(abs(zstatistic));
ztest := inversez(ConfInt);
UCL := PropDif + ztest * stderr;
LCL := PropDif - ztest * stderr;
end;
end;
// Print the results
if not independent then
begin
OutPutFrm.RichEdit.Lines.Add('Test for Difference Between Two Dependent Proportions');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('Entered Values');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('Sample 1');
OutPutFrm.RichEdit.Lines.Add(' 0 1 sum');
OutPutFrm.RichEdit.Lines.Add(' -----------------------');
outline := format(' 0 |%5d %5d %5d |',[f1,f2,AB]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add(' 2 --------|-------|------');
outline := format(' 1 |%5d %5d %5d |',[f3,f4,CD]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add(' --------|-------|------');
outline := format(' sum | %5d %5d %5d |',[AC,BD,ncases1]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('');
outline := format('Confidence Level selected = %s',[CInterval.Text]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Proportion 1 = %9.3f and Proportion 2 = %9.3f with %d cases',
[Prop1, Prop2, ncases1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Difference in proportions = %9.3f',[PropDif]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Standard Error of Difference = %9.3f',[stderr]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z test statistic = %9.3f with probability = %6.4f',
[zstatistic,zprobability]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z value for confidence interval = %6.3f',[ztest]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Confidence Interval: (%9.3f,%9.3f)',[LCL,UCL]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
if independent then
begin
OutPutFrm.RichEdit.Lines.Add('Test for Difference Between Two Independent Proportions');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('Entered Values');
OutPutFrm.RichEdit.Lines.Add('');
outline := format('Sample 1: Frequency = %5d for %5d cases.',
[f1, ncases1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Sample 2: Frequency = %5d for %5d cases.',
[f2, ncases2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Proportion 1 = %9.3f, Proportion 2 = %9.3f, Difference = %9.3f',
[Prop1, Prop2, PropDif]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Standard Error of Difference = %9.3f',[stderr]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Confidence Level selected = %s',[CInterval.Text]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z test statistic = %9.3f with probability = %6.4f',
[zstatistic,zprobability]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('z value for confidence interval = %6.3f',[ztest]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Confidence Interval: (%9.3f,%9.3f)',[LCL,UCL]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
OutPutFrm.ShowModal;
ColNoSelected := nil;
end;
procedure TTwoPropFrm.RadioGroup2Click(Sender: TObject);
VAR index : integer;
begin
index := RadioGroup2.ItemIndex;
if index = 0 then
begin
independent := true;
DepFreq00.Visible := false;
DepFreq01.Visible := false;
DepFreq10.Visible := false;
DepFreq11.Visible := false;
Samp11Label.Visible := false;
Samp10Label.Visible := false;
Samp20Label.Visible := false;
Samp21Label.Visible := false;
DepSamp1Label.Visible := false;
DepSamp2Label.Visible := false;
IndFreq1.Visible := true;
IndFreq2.Visible := true;
IndSize1.Visible := true;
IndSize2.Visible := true;
Samp1Label.Visible := true;
Samp2Label.Visible := true;
Samp1SizeLabel.Visible := true;
Samp2SizeLabel.Visible := true;
FirstVarLabel.Visible := true;
SecdVarLabel.Visible := false;
GrpLabel.Visible := true;
Var1.Visible := true;
Var2.Visible := false;
Grp.Visible := true;
end
else
begin
independent := false;
DepFreq00.Visible := true;
DepFreq01.Visible := true;
DepFreq10.Visible := true;
DepFreq11.Visible := true;
DepSamp1Label.Visible := true;
DepSamp2Label.Visible := true;
Samp11Label.Visible := true;
Samp10Label.Visible := true;
Samp20Label.Visible := true;
Samp21Label.Visible := true;
DepSamp1Label.Visible := true;
DepSamp2Label.Visible := true;
IndFreq1.Visible := false;
IndFreq2.Visible := false;
IndSize1.Visible := false;
IndSize2.Visible := false;
Samp1Label.Visible := false;
Samp2Label.Visible := false;
Samp1SizeLabel.Visible := false;
Samp2SizeLabel.Visible := false;
FirstVarLabel.Visible := true;
SecdVarLabel.Visible := true;
GrpLabel.Visible := false;
Var1.Visible := true;
Var2.Visible := true;
Grp.Visible := false;
end;
end;
procedure TTwoPropFrm.RadioGroup1Click(Sender: TObject);
VAR index : integer;
begin
index := RadioGroup2.ItemIndex;
if index = 0 then // independent data
begin
independent := true;
end
else // dependent data
begin
independent := false;
end;
if RadioGroup1.ItemIndex = 0 then // form data
begin
Panel2.Visible := false;
Panel1.Visible := true;
griddata := false;
end
else // grid data
begin
Panel1.Visible := false;
Panel2.Visible := true;
griddata := true;
end;
end;
initialization
{$I twopropunit.lrs}
end.

View File

@ -0,0 +1,412 @@
object TwoSLSFrm: TTwoSLSFrm
Left = 154
Height = 478
Top = 103
Width = 485
Caption = 'Two Stage Least Squares Regression'
ClientHeight = 478
ClientWidth = 485
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 9
Height = 14
Top = 6
Width = 44
Caption = 'Variables'
ParentColor = False
end
object Label2: TLabel
Left = 225
Height = 14
Top = 17
Width = 95
Caption = 'Dependent Variable'
ParentColor = False
end
object Label3: TLabel
Left = 225
Height = 14
Top = 95
Width = 105
Caption = 'Explanatory Variables'
ParentColor = False
end
object Label4: TLabel
Left = 224
Height = 14
Top = 248
Width = 108
Caption = 'Instrumental Variables'
ParentColor = False
end
object VarList: TListBox
Left = 8
Height = 372
Top = 25
Width = 167
ItemHeight = 0
MultiSelect = True
TabOrder = 0
end
object DepIn: TBitBtn
Left = 184
Height = 25
Top = 26
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = DepInClick
TabOrder = 1
end
object DepOut: TBitBtn
Left = 184
Height = 25
Top = 56
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = DepOutClick
TabOrder = 2
end
object ExpIn: TBitBtn
Left = 184
Height = 25
Top = 112
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = ExpInClick
TabOrder = 3
end
object ExpOut: TBitBtn
Left = 184
Height = 25
Top = 144
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = ExpOutClick
TabOrder = 4
end
object InstIn: TBitBtn
Left = 184
Height = 25
Top = 264
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = InstInClick
TabOrder = 5
end
object InstOut: TBitBtn
Left = 184
Height = 25
Top = 296
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
TabOrder = 6
end
object DepVarEdit: TEdit
Left = 223
Height = 21
Top = 38
Width = 139
TabOrder = 7
Text = 'DepVarEdit'
end
object Explanatory: TListBox
Left = 225
Height = 129
Top = 113
Width = 137
ItemHeight = 0
MultiSelect = True
TabOrder = 8
end
object Instrumental: TListBox
Left = 225
Height = 130
Top = 266
Width = 136
ItemHeight = 0
TabOrder = 9
end
object GroupBox1: TGroupBox
Left = 8
Height = 63
Top = 408
Width = 287
Caption = 'Options'
ClientHeight = 45
ClientWidth = 283
TabOrder = 10
object ProxyRegShowChk: TCheckBox
Left = 9
Height = 17
Top = 2
Width = 255
Caption = 'Show Regression Results for each Proxy Variable'
TabOrder = 0
end
object SaveItChk: TCheckBox
Left = 9
Height = 17
Top = 24
Width = 261
Caption = 'Save Predicted and Residuals of 2nd Stage to Grid'
TabOrder = 1
end
end
object ResetBtn: TButton
Left = 392
Height = 27
Top = 56
Width = 78
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 11
end
object CancelBtn: TButton
Left = 392
Height = 27
Top = 104
Width = 78
Caption = 'Cancel'
ModalResult = 2
TabOrder = 12
end
object ComputeBtn: TButton
Left = 392
Height = 27
Top = 152
Width = 78
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 13
end
object ReturnBtn: TButton
Left = 392
Height = 27
Top = 200
Width = 80
Caption = 'Return'
ModalResult = 1
TabOrder = 14
end
object HelpBtn: TButton
Tag = 153
Left = 392
Height = 29
Top = 8
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 15
end
end

View File

@ -0,0 +1,346 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TTwoSLSFrm','FORMDATA',[
'TPF0'#10'TTwoSLSFrm'#9'TwoSLSFrm'#4'Left'#3#154#0#6'Height'#3#222#1#3'Top'#2
+'g'#5'Width'#3#229#1#7'Caption'#6'"Two Stage Least Squares Regression'#12'Cl'
+'ientHeight'#3#222#1#11'ClientWidth'#3#229#1#6'OnShow'#7#8'FormShow'#10'LCLV'
+'ersion'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2#14#3'To'
+'p'#2#6#5'Width'#2','#7'Caption'#6#9'Variables'#11'ParentColor'#8#0#0#6'TLab'
+'el'#6'Label2'#4'Left'#3#225#0#6'Height'#2#14#3'Top'#2#17#5'Width'#2'_'#7'Ca'
+'ption'#6#18'Dependent Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4
+'Left'#3#225#0#6'Height'#2#14#3'Top'#2'_'#5'Width'#2'i'#7'Caption'#6#21'Expl'
+'anatory Variables'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#3#224#0
+#6'Height'#2#14#3'Top'#3#248#0#5'Width'#2'l'#7'Caption'#6#22'Instrumental Va'
+'riables'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#6'Height'
+#3't'#1#3'Top'#2#25#5'Width'#3#167#0#10'ItemHeight'#2#0#11'MultiSelect'#9#8
+'TabOrder'#2#0#0#0#7'TBitBtn'#5'DepIn'#4'Left'#3#184#0#6'Height'#2#25#3'Top'
+#2#26#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'
+#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0
+#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%'
+'i)'#247'!c$'#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'
+#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'
+#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'
+#139'I'#255'!c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255
+#160#215#169#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152
+#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193
+#128#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'
+#199't'#255#165#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255
+#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139
+#255#129#197#135#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255
+#255#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'
+#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'
+#163'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'
+#247';'#136'B'#219#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'
+#187'A'#145'I'#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#10'Dep'
+'InClick'#8'TabOrder'#2#1#0#0#7'TBitBtn'#6'DepOut'#4'Left'#3#184#0#6'Height'
,#2#25#3'Top'#2'8'#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0
+#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0
+#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161
+'V'#6'G'#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'
+#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255
+'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'
+#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255
+#255#255#0'e'#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148
+#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255
+'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255
+#255#0#255#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214
+#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137
+#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i'
+')'#255#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139
+#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255
+'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195
+'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'
+#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#7'OnClick'#7#11'DepOutClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#5'Exp'
+'In'#4'Left'#3#184#0#6'Height'#2#25#3'Top'#2'p'#5'Width'#2#29#10'Glyph.Data'
+#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0
+#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^'
+' '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177
+'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255
+'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255
+#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255
+#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142
+#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'
+#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162
+#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255
+#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130
+#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199
+'t'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255
+'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'
+#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#7'OnClick'#7#10'ExpInClick'#8'TabOrder'#2#3#0#0
+#7'TBitBtn'#6'ExpOut'#4'Left'#3#184#0#6'Height'#2#25#3'Top'#3#144#0#5'Width'
+#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0
+#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8'
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['#170'd'#255
+'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%'
+'i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'#196'{'#200
+#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139
+#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'
,#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0'h'#199't'#201
+#127#204#138#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159
+#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197
+#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0
+#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X'
+#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'
+#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#11'ExpOutClick'#8'Ta'
+'bOrder'#2#4#0#0#7'TBitBtn'#6'InstIn'#4'Left'#3#184#0#6'Height'#2#25#3'Top'#3
+#8#1#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'
+#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0
+#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%'
+'i)'#247'!c$'#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'
+#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'
+#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'
+#139'I'#255'!c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255
+#160#215#169#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152
+#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193
+#128#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'
+#199't'#255#165#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255
+#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139
+#255#129#197#135#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255
+#255#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'
+#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'
+#163'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'
+#247';'#136'B'#219#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'
+#187'A'#145'I'#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#11'Ins'
+'tInClick'#8'TabOrder'#2#5#0#0#7'TBitBtn'#7'InstOut'#4'Left'#3#184#0#6'Heigh'
+'t'#2#25#3'Top'#3'('#1#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'
+#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0
+'d'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+'M'#161'V'#6'G'#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169
+'\'#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'
+#255'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255
+'5'#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0
+#255#255#255#0'e'#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255
+#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137
+#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255
+#255#255#0#255#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158
+#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255
+#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255
+'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139
+#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255
+'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195
+'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'
+#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#8'TabOrder'#2#6#0#0#5'TEdit'#10'DepVarEdit'#4'Left'#3#223#0#6'Hei'
,'ght'#2#21#3'Top'#2'&'#5'Width'#3#139#0#8'TabOrder'#2#7#4'Text'#6#10'DepVarE'
+'dit'#0#0#8'TListBox'#11'Explanatory'#4'Left'#3#225#0#6'Height'#3#129#0#3'To'
+'p'#2'q'#5'Width'#3#137#0#10'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2
+#8#0#0#8'TListBox'#12'Instrumental'#4'Left'#3#225#0#6'Height'#3#130#0#3'Top'
+#3#10#1#5'Width'#3#136#0#10'ItemHeight'#2#0#8'TabOrder'#2#9#0#0#9'TGroupBox'
+#9'GroupBox1'#4'Left'#2#8#6'Height'#2'?'#3'Top'#3#152#1#5'Width'#3#31#1#7'Ca'
+'ption'#6#7'Options'#12'ClientHeight'#2'-'#11'ClientWidth'#3#27#1#8'TabOrder'
+#2#10#0#9'TCheckBox'#15'ProxyRegShowChk'#4'Left'#2#9#6'Height'#2#17#3'Top'#2
+#2#5'Width'#3#255#0#7'Caption'#6'/Show Regression Results for each Proxy Var'
+'iable'#8'TabOrder'#2#0#0#0#9'TCheckBox'#9'SaveItChk'#4'Left'#2#9#6'Height'#2
+#17#3'Top'#2#24#5'Width'#3#5#1#7'Caption'#6'1Save Predicted and Residuals of'
+' 2nd Stage to Grid'#8'TabOrder'#2#1#0#0#0#7'TButton'#8'ResetBtn'#4'Left'#3
+#136#1#6'Height'#2#27#3'Top'#2'8'#5'Width'#2'N'#7'Caption'#6#5'Reset'#7'OnCl'
+'ick'#7#13'ResetBtnClick'#8'TabOrder'#2#11#0#0#7'TButton'#9'CancelBtn'#4'Lef'
+'t'#3#136#1#6'Height'#2#27#3'Top'#2'h'#5'Width'#2'N'#7'Caption'#6#6'Cancel'
+#11'ModalResult'#2#2#8'TabOrder'#2#12#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3
+#136#1#6'Height'#2#27#3'Top'#3#152#0#5'Width'#2'N'#7'Caption'#6#7'Compute'#7
+'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#13#0#0#7'TButton'#9'ReturnBtn'
+#4'Left'#3#136#1#6'Height'#2#27#3'Top'#3#200#0#5'Width'#2'P'#7'Caption'#6#6
+'Return'#11'ModalResult'#2#1#8'TabOrder'#2#14#0#0#7'TButton'#7'HelpBtn'#3'Ta'
+'g'#3#153#0#4'Left'#3#136#1#6'Height'#2#29#3'Top'#2#8#5'Width'#2'N'#7'Captio'
+'n'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2#15#0#0#0
]);

View File

@ -0,0 +1,496 @@
unit TwoSLSUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, Globals, Math, functionslib, MainUnit, matrixlib, dataprocs,
dictionaryunit, OutPutUnit, contexthelpunit;
type
{ TTwoSLSFrm }
TTwoSLSFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
ProxyRegShowChk: TCheckBox;
SaveItChk: TCheckBox;
DepIn: TBitBtn;
DepOut: TBitBtn;
ExpIn: TBitBtn;
ExpOut: TBitBtn;
GroupBox1: TGroupBox;
InstIn: TBitBtn;
InstOut: TBitBtn;
DepVarEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Explanatory: TListBox;
Instrumental: TListBox;
VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject);
procedure DepInClick(Sender: TObject);
procedure DepOutClick(Sender: TObject);
procedure ExpInClick(Sender: TObject);
procedure ExpOutClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure InstInClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure PredictIt(ColNoSelected : IntDyneVec; NoVars : integer;
Means, StdDevs, BetaWeights : DblDyneVec;
StdErrEst : double; NoIndepVars : integer);
private
{ private declarations }
public
{ public declarations }
end;
var
TwoSLSFrm: TTwoSLSFrm;
implementation
{ TTwoSLSFrm }
procedure TTwoSLSFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
VarList.Clear;
Explanatory.Clear;
Instrumental.Clear;
DepVarEdit.Text := '';
ProxyRegShowChk.Checked := false;
DepIn.Visible := true;
DepOut.Visible := false;
ExpIn.Visible := true;
ExpOut.Visible := false;
InstIn.Visible := true;
InstOut.Visible := false;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TTwoSLSFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TTwoSLSFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TTwoSLSFrm.InstInClick(Sender: TObject);
VAR i : integer;
begin
if (VarList.Items.Count < 1) then exit;
i := 0;
while (i < VarList.Items.Count) do
begin
if (VarList.Selected[i]) then
begin
Instrumental.Items.Add(VarList.Items.Strings[i]);
end;
i := i + 1;
end;
InstOut.Visible := true;
if (VarList.Items.Count < 1) then InstIn.Visible := false;
end;
procedure TTwoSLSFrm.DepInClick(Sender: TObject);
VAR index : integer;
begin
if (VarList.Items.Count < 1) then exit;
index := VarList.ItemIndex;
DepVarEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
DepOut.Visible := true;
DepIn.Visible := false;
end;
procedure TTwoSLSFrm.ComputeBtnClick(Sender: TObject);
label cleanup;
VAR
i, j, k, DepCol, NoInst, NoExp, NoProx, Noindep : integer;
IndepCols, ProxSrcCols, ExpCols, InstCols, ProxCols : IntDyneVec;
DepProx, NCases, col, counter : integer;
ExpLabels, InstLabels, ProxLabels, RowLabels, ProxSrcLabels : StrDyneVec;
outstr : string;
R2, F, stderrest, X, Y : double;
Means, Variances, StdDevs, BWeights : DblDyneVec;
BetaWeights, BStdErrs, Bttests, tprobs : DblDyneVec;
ProxVals : DblDyneMat;
errorcode, PrintDesc, PrintCorrs, PrintInverse, PrintCoefs, SaveCorrs : boolean;
found : boolean;
result, intvalue : integer;
dblvalue : double;
strvalue : string;
begin
if (ProxyRegShowChk.Checked) then
begin
PrintDesc := true;
PrintCorrs := true;
PrintInverse := false;
PrintCoefs := true;
SaveCorrs := false;
end
else
begin
PrintDesc := false;
PrintCorrs := false;
PrintInverse := false;
PrintCoefs := false;
SaveCorrs := false;
end;
SetLength(Means,NoVariables+2);
SetLength(Variances,NoVariables+2);
SetLength(StdDevs,NoVariables+2);
SetLength(BWeights,NoVariables+2);
SetLength(BetaWeights,NoVariables+2);
SetLength(BStdErrs,NoVariables+2);
SetLength(Bttests,NoVariables+2);
SetLength(tprobs,NoVariables+2);
SetLength(ExpLabels,NoVariables+2);
SetLength(ExpCols,NoVariables+2);
SetLength(InstLabels,NoVariables+2);
SetLength(InstCols,NoVariables+2);
SetLength(ProxCols,NoVariables);
SetLength(ProxLabels,NoVariables);
SetLength(IndepCols,NoVariables);
SetLength(RowLabels,NoVariables);
SetLength(ProxSrcCols,NoVariables);
SetLength(ProxSrcLabels,NoVariables);
SetLength(ProxVals,NoCases,NoVariables);
// Get variables to analyze
NCases := NoCases;
NoInst := Instrumental.Items.Count;
NoExp := Explanatory.Items.Count;
if (NoInst < NoExp) then
begin
ShowMessage('The no. of Instrumental must equal or exceed the Explanatory');
goto cleanup;
end;
for i := 0 to NoVariables - 1 do
begin
if (OS3MainFrm.DataGrid.Cells[i+1,0] = DepVarEdit.Text) then
begin
DepCol := i + 1;
// result := VarTypeChk(DepCol,0);
// if (result :=:= 1) goto cleanup;
end;
for j := 0 to NoExp - 1 do
begin
if (OS3MainFrm.DataGrid.Cells[i+1,0] = Explanatory.Items.Strings[j]) then
begin
ExpCols[j] := i+1;
// result := VarTypeChk(i+1,0);
// if (result :=:= 1) goto cleanup;
ExpLabels[j] := Explanatory.Items.Strings[j];
end;
end; // next j
for j := 0 to NoInst - 1 do
begin
if (OS3MainFrm.DataGrid.Cells[i+1,0] = Instrumental.Items.Strings[j]) then
begin
InstCols[j] := i+1;
// result := VarTypeChk(i+1,0);
// if (result :=:= 1) goto cleanup;
InstLabels[j] := Instrumental.Items.Strings[j];
end;
end; // next j
end; // next i
// Get prox variables which are the variables common to exp and inst lists
NoProx := 0;
for i := 0 to NoInst - 1 do
begin
for j := 0 to NoExp - 1 do
begin
if (ExpLabels[j] = InstLabels[i]) then
begin
ProxLabels[NoProx] := 'P_' + InstLabels[i];
ProxSrcLabels[NoProx] := InstLabels[i];
ProxCols[NoProx] := InstCols[i];
NoProx := NoProx + 1;
end;
end;
end;
// Output Parameters of the Analysis
OutPutFrm.RichEdit.Clear;
OutPutFrm.RichEdit.Lines.Add('FILE: ' + OS3MainFrm.FileNameEdit.Text);
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('Dependent := ' + DepVarEdit.Text);
OutPutFrm.RichEdit.Lines.Add('Explanatory Variables:');
for i := 0 to NoExp - 1 do OutPutFrm.RichEdit.Lines.Add(ExpLabels[i]);
OutPutFrm.RichEdit.Lines.Add('Instrumental Variables:');
for i := 0 to NoInst - 1 do OutPutFrm.RichEdit.Lines.Add(InstLabels[i]);
OutPutFrm.RichEdit.Lines.Add('Proxy Variables:');
for i := 0 to NoProx - 1 do OutPutFrm.RichEdit.Lines.Add(ProxLabels[i]);
OutPutFrm.RichEdit.Lines.Add('');
// Compute the prox regressions for the instrumental variables
for i := 0 to NoProx - 1 do
begin
DictionaryFrm.DictGrid.ColCount := 8;
col := NoVariables + 1;
// NoVariables := col;
DictionaryFrm.NewVar(col); // create column for proxy (predicted values)
DictionaryFrm.DictGrid.Cells[1,col] := ProxLabels[i];
OS3MainFrm.DataGrid.Cells[col,0] := ProxLabels[i];
ProxSrcCols[i] := col;
DepProx := ProxCols[i];
Noindep := 0;
for j := 0 to NoInst - 1 do
begin
if (DepProx <> InstCols[j]) then // don't include the prox itself!
begin
IndepCols[Noindep] := InstCols[j];
RowLabels[Noindep] := InstLabels[j];
Noindep := Noindep + 1;
end;
end;
for j := 0 to NoExp - 1 do
begin
found := false;
for k := 0 to NoProx - 1 do
if (ExpCols[j] = ProxCols[k]) then found := true; // don't include the proxs themselves
if (not found) then
begin
IndepCols[Noindep] := ExpCols[j];
RowLabels[Noindep] := ExpLabels[j];
Noindep := Noindep + 1;
end;
end;
IndepCols[Noindep] := DepProx;
OutPutFrm.RichEdit.Lines.Add('Analysis for ' + ProxLabels[i]);
OutPutFrm.RichEdit.Lines.Add('Dependent: ' + ProxSrcLabels[i]);
OutPutFrm.RichEdit.Lines.Add('Independent: ');
for j := 0 to Noindep - 1 do OutPutFrm.RichEdit.Lines.Add(RowLabels[j]);
// OutPutFrm.ShowModal();
mreg(Noindep, IndepCols, DepProx, RowLabels, Means, Variances, StdDevs,
BWeights, BetaWeights, BStdErrs, Bttests, tprobs, R2, stderrest,
NCases, errorcode, PrintDesc);
// save predicted scores at column := NoVariables and in ProxVals array
for j := 1 to NoCases do
begin
Y := 0.0;
for k := 0 to Noindep - 1 do
begin
col := IndepCols[k];
X := StrToFloat(OS3MainFrm.DataGrid.Cells[col,j]);
Y := Y + BWeights[k] * X;
end;
Y := Y + BWeights[Noindep]; // intercept
col := NoVariables;
outstr := format('%12.5f',[Y]);
OS3MainFrm.DataGrid.Cells[col,j] := outstr;
end; // next case
end; // next proxy
// OutPutFrm.ShowModal();
// Compute the OLS using the Prox values and explanatory
Noindep := 0;
counter := 0;
for i := 0 to NoExp - 1 do
begin
for j := 0 to NoInst - 1 do
begin
if (ExpLabels[i] = InstLabels[j]) then // use proxy
begin
IndepCols[Noindep] := ProxSrcCols[counter];
RowLabels[Noindep] := ProxLabels[counter];
counter := counter + 1;
break;
end
else
begin
IndepCols[Noindep] := ExpCols[i];
RowLabels[Noindep] := ExpLabels[i];
end;
end;
Noindep := Noindep + 1;
end;
PrintDesc := true;
PrintCorrs := true;
PrintInverse := false;
PrintCoefs := true;
SaveCorrs := false;
IndepCols[Noindep] := DepCol;
mreg(Noindep, IndepCols, DepCol, RowLabels, Means, Variances, StdDevs,
BWeights, BetaWeights, BStdErrs, Bttests, tprobs, R2, stderrest,
NCases, errorcode, PrintDesc);
OutPutFrm.ShowModal;
if (SaveItChk.Checked) then
begin
PredictIt(IndepCols, Noindep+1, Means, StdDevs, BetaWeights, stderrest, Noindep);
end;
// cleanup
cleanup:
ProxVals := nil;
ProxSrcLabels := nil;
ProxSrcCols := nil;
RowLabels := nil;
IndepCols := nil;
ProxLabels := nil;
ProxCols := nil;
InstCols := nil;
InstLabels := nil;
ExpCols := nil;
ExpLabels := nil;
tprobs := nil;
Bttests := nil;
BStdErrs := nil;
BetaWeights := nil;
BWeights := nil;
StdDevs := nil;
Variances := nil;
Means := nil;
end;
procedure TTwoSLSFrm.DepOutClick(Sender: TObject);
begin
if (DepVarEdit.Text = '') then exit;
VarList.Items.Add(DepVarEdit.Text);
DepVarEdit.Text := '';
DepIn.Visible := true;
DepOut.Visible := false;
end;
procedure TTwoSLSFrm.ExpInClick(Sender: TObject);
VAR i : integer;
begin
if (VarList.Items.Count < 1) then exit;
i := 0;
while (i < VarList.Items.Count) do
begin
if (VarList.Selected[i]) then
begin
Explanatory.Items.Add(VarList.Items.Strings[i]);
end;
i := i + 1;
end;
ExpOut.Visible := true;
if (VarList.Items.Count < 1) then ExpIn.Visible := false;
end;
procedure TTwoSLSFrm.ExpOutClick(Sender: TObject);
VAR index : integer;
begin
index := Explanatory.ItemIndex;
Explanatory.Items.Delete(index);
ExpIn.Visible := true;
if (Explanatory.Items.Count < 1) then ExpOut.Visible := false;
end;
procedure TTwoSLSFrm.PredictIt(ColNoSelected : IntDyneVec; NoVars : integer;
Means, StdDevs, BetaWeights : DblDyneVec;
StdErrEst : double; NoIndepVars : integer);
VAR
col, i, j, k, Index, IndexX, IndexY : integer;
predicted, zpredicted, z1, z2, resid, Term1, Term2, residsqr : double;
StdErrPredict, t95, Hi95, Low95 : double;
astring : string;
begin
// routine obtains predicted raw and standardized scores and their
// residuals. It is assumed that the dependent variable is last in the
// list of variable column pointers stored in the ColNoSelected vector.
// Get the z predicted score and its residual
col := NoVariables + 1;
// NoVariables := col;
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'Pred.z';
OS3MainFrm.DataGrid.Cells[col,0] := 'Pred.z';
col := NoVariables + 1;
// NoVariables := col;
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'zResid.';
OS3MainFrm.DataGrid.Cells[col,0] := 'zResid.';
// OS3MainFrm.DataGrid.ColCount := OS3MainFrm.DataGrid.ColCount + 2;
for i := 1 to NoCases do
begin
zpredicted := 0.0;
for j := 0 to NoIndepVars - 1 do
begin
k := ColNoSelected[j];
z1 := (StrToFloat(OS3MainFrm.DataGrid.Cells[k,i]) -
Means[j]) / StdDevs[j];
zpredicted := zpredicted + (z1 * BetaWeights[j]);
end;
astring := format('%8.4f',[zpredicted]);
OS3MainFrm.DataGrid.Cells[col-1,i] := astring;
Index := ColNoSelected[NoVars-1];
z2 := StrToFloat(OS3MainFrm.DataGrid.Cells[Index,i]);
z2 := (z2 - Means[NoVars-1]) / StdDevs[NoVars-1]; // z score
astring := format('%8.4f',[z2 - zpredicted]); // z residual
OS3MainFrm.DataGrid.Cells[col,i] := astring;
end;
// Get raw predicted and residuals
col := NoVariables + 1;
// NoVariables := col;
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'Pred.Raw';
OS3MainFrm.DataGrid.Cells[col,0] := 'Pred.Raw';
// calculate raw predicted scores and store in grid at col
for i := 1 to NoCases do
begin // predicted raw obtained from previously predicted z score
predicted := StrToFloat(OS3MainFrm.DataGrid.Cells[col-2,i]) *
StdDevs[NoVars-1] + Means[NoVars-1];
astring := format('%8.3f',[predicted]);
OS3MainFrm.DataGrid.Cells[col,i] := astring;
end;
// Calculate residuals of predicted raw scores begin
col := NoVariables +1;
// NoVariables := col;
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'RawResid.';
OS3MainFrm.DataGrid.Cells[col,0] := 'RawResid.';
for i := 1 to NoCases do
begin
Index := ColNoSelected[NoVars-1];
resid := StrToFloat(OS3MainFrm.DataGrid.Cells[col-1,i]) -
StrToFloat(OS3MainFrm.DataGrid.Cells[Index,i]);
astring := format('%8.3f',[resid]);
OS3MainFrm.DataGrid.Cells[col,i] := astring;
end;
// get square of raw residuals
col := NoVariables + 1;
// NoVariables := col;
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'ResidSqr';
OS3MainFrm.DataGrid.Cells[col,0] := 'ResidSqr';
for i := 1 to NoCases do
begin
residsqr := StrToFloat(OS3MainFrm.DataGrid.Cells[col-1,i]);
residsqr := residsqr * residsqr;
astring := format('%8.3f',[residsqr]);
OS3MainFrm.DataGrid.Cells[col,i] := astring;
end;
end;
initialization
{$I twoslsunit.lrs}
end.

View File

@ -0,0 +1,451 @@
object TwoWayLogLinFrm: TTwoWayLogLinFrm
Left = 155
Height = 383
Top = 101
Width = 607
Caption = 'Log Linear Analysis of a 2x2 Table'
ClientHeight = 383
ClientWidth = 607
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 206
Height = 14
Top = 78
Width = 63
Caption = 'Row Variable'
ParentColor = False
end
object Label2: TLabel
Left = 206
Height = 14
Top = 161
Width = 77
Caption = 'Column Variable'
ParentColor = False
end
object Label3: TLabel
Left = 205
Height = 14
Top = 247
Width = 93
Caption = 'Frequency Variable'
ParentColor = False
end
object NoRowsLabel: TLabel
Left = 327
Height = 14
Top = 8
Width = 64
Caption = 'No. of Rows:'
ParentColor = False
end
object NoColsLabel: TLabel
Left = 456
Height = 14
Top = 8
Width = 78
Caption = 'No. of Columns:'
ParentColor = False
end
object FileFromGrp: TRadioGroup
Left = 6
Height = 64
Top = 0
Width = 189
AutoFill = True
Caption = 'Enter Data From:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 46
ClientWidth = 185
Items.Strings = (
'File Data in the Main Grid'
'Data Entered on this Form'
)
OnClick = FileFromGrpClick
TabOrder = 0
end
object VarList: TListBox
Left = 6
Height = 299
Top = 72
Width = 149
ItemHeight = 0
TabOrder = 1
end
object RowInBtn: TBitBtn
Left = 168
Height = 26
Top = 80
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = RowInBtnClick
TabOrder = 2
end
object RowOutBtn: TBitBtn
Left = 168
Height = 26
Top = 112
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = RowOutBtnClick
TabOrder = 3
end
object ColInBtn: TBitBtn
Left = 168
Height = 26
Top = 160
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = ColInBtnClick
TabOrder = 4
end
object ColOutBtn: TBitBtn
Left = 168
Height = 26
Top = 192
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = ColOutBtnClick
TabOrder = 5
end
object FreqInBtn: TBitBtn
Left = 168
Height = 26
Top = 248
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = FreqInBtnClick
TabOrder = 6
end
object FreqOutBtn: TBitBtn
Left = 168
Height = 26
Top = 280
Width = 29
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = FreqOutBtnClick
TabOrder = 7
end
object RowVarEdit: TEdit
Left = 205
Height = 21
Top = 96
Width = 113
TabOrder = 8
Text = 'RowVarEdit'
end
object ColVarEdit: TEdit
Left = 206
Height = 21
Top = 176
Width = 113
TabOrder = 9
Text = 'Edit1'
end
object FreqVarEdit: TEdit
Left = 205
Height = 21
Top = 272
Width = 113
TabOrder = 10
Text = 'Edit1'
end
object NoRowsEdit: TEdit
Left = 392
Height = 21
Top = 1
Width = 39
OnKeyPress = NoRowsEditKeyPress
TabOrder = 11
Text = 'NoRowsEdit'
end
object NoColsEdit: TEdit
Left = 552
Height = 21
Top = 1
Width = 39
OnKeyPress = NoColsEditKeyPress
TabOrder = 12
Text = 'Edit1'
end
object Grid: TStringGrid
Left = 327
Height = 270
Top = 36
Width = 267
ColCount = 2
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goTabs, goSmoothScroll]
RowCount = 2
TabOrder = 13
end
object ResetBtn: TButton
Left = 256
Height = 29
Top = 336
Width = 72
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 14
end
object CancelBtn: TButton
Left = 336
Height = 29
Top = 336
Width = 72
Caption = 'Cancel'
ModalResult = 2
TabOrder = 15
end
object ComputeBtn: TButton
Left = 424
Height = 30
Top = 336
Width = 72
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 16
end
object ReturnBtn: TButton
Left = 512
Height = 30
Top = 336
Width = 79
Caption = 'Return'
ModalResult = 1
TabOrder = 17
end
object HelpBtn: TButton
Tag = 154
Left = 168
Height = 29
Top = 336
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 18
end
end

View File

@ -0,0 +1,359 @@
LazarusResources.Add('TTwoWayLogLinFrm','FORMDATA',[
'TPF0'#16'TTwoWayLogLinFrm'#15'TwoWayLogLinFrm'#4'Left'#3#155#0#6'Height'#3
+#127#1#3'Top'#2'e'#5'Width'#3'_'#2#7'Caption'#6'"Log Linear Analysis of a 2x'
+'2 Table'#12'ClientHeight'#3#127#1#11'ClientWidth'#3'_'#2#6'OnShow'#7#8'Form'
+'Show'#10'LCLVersion'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#3#206#0#6
+'Height'#2#14#3'Top'#2'N'#5'Width'#2'?'#7'Caption'#6#12'Row Variable'#11'Par'
+'entColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#3#206#0#6'Height'#2#14#3'Top'#3
+#161#0#5'Width'#2'M'#7'Caption'#6#15'Column Variable'#11'ParentColor'#8#0#0#6
+'TLabel'#6'Label3'#4'Left'#3#205#0#6'Height'#2#14#3'Top'#3#247#0#5'Width'#2
+']'#7'Caption'#6#18'Frequency Variable'#11'ParentColor'#8#0#0#6'TLabel'#11'N'
+'oRowsLabel'#4'Left'#3'G'#1#6'Height'#2#14#3'Top'#2#8#5'Width'#2'@'#7'Captio'
+'n'#6#12'No. of Rows:'#11'ParentColor'#8#0#0#6'TLabel'#11'NoColsLabel'#4'Lef'
+'t'#3#200#1#6'Height'#2#14#3'Top'#2#8#5'Width'#2'N'#7'Caption'#6#15'No. of C'
+'olumns:'#11'ParentColor'#8#0#0#11'TRadioGroup'#11'FileFromGrp'#4'Left'#2#6#6
+'Height'#2'@'#3'Top'#2#0#5'Width'#3#189#0#8'AutoFill'#9#7'Caption'#6#16'Ente'
+'r Data From:'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottom'
+'Spacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResiz'
+'e'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildS'
+'izing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'
+#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBot'
+'tom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'.'#11'ClientWid'
+'th'#3#185#0#13'Items.Strings'#1#6#26'File Data in the Main Grid'#6#25'Data '
+'Entered on this Form'#0#7'OnClick'#7#16'FileFromGrpClick'#8'TabOrder'#2#0#0
+#0#8'TListBox'#7'VarList'#4'Left'#2#6#6'Height'#3'+'#1#3'Top'#2'H'#5'Width'#3
+#149#0#10'ItemHeight'#2#0#8'TabOrder'#2#1#0#0#7'TBitBtn'#8'RowInBtn'#4'Left'
+#3#168#0#6'Height'#2#26#3'Top'#2'P'#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0
+'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0
+#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'
+#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'
+#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255
+#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211
+#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130
+#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'
+#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171
+#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204
+#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'
+#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255
+'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161
+'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#13'RowInBtnClick'#8'TabOr'
+'der'#2#2#0#0#7'TBitBtn'#9'RowOutBtn'#4'Left'#3#168#0#6'Height'#2#26#3'Top'#2
+'p'#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0
+#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0
+#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153
+'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'
+#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255
+'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'
+#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195
+'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144
+#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255
+'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255
+#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212
+#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133
+#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255
+#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135
+#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'
+#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyp'
+'hs'#2#0#7'OnClick'#7#14'RowOutBtnClick'#8'TabOrder'#2#3#0#0#7'TBitBtn'#8'Co'
+'lInBtn'#4'Left'#3#168#0#6'Height'#2#26#3'Top'#3#160#0#5'Width'#2#29#10'Glyp'
,'h.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0
+#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'
+#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'
+#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'
+#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255
+#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165
+#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201
+#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140
+'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255
+#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154
+#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194
+#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'
+#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'
+#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/'
+'x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#13'ColInBtnClick'
+#8'TabOrder'#2#4#0#0#7'TBitBtn'#9'ColOutBtn'#4'Left'#3#168#0#6'Height'#2#26#3
+'Top'#3#192#0#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0
+#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0
+'d'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
,#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'
+#6'G'#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217
+'M'#161'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193
+#131#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'
+#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255
+#0'e'#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157
+#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195
+#132#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0
+#255#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255
+#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144
+#255#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255
+#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'
+#201#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153
+'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#14'ColOutBtnClick'#8'TabOrder'#2#5#0#0#7
+'TBitBtn'#9'FreqInBtn'#4'Left'#3#168#0#6'Height'#2#26#3'Top'#3#248#0#5'Width'
+#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0
+#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'
+#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'
+#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'
+#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!'
+'c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169
+#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203
+#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190
,'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165
+#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255
+#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135
+#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199
+'t'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255
+'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157
+'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#14
+'FreqInBtnClick'#8'TabOrder'#2#6#0#0#7'TBitBtn'#10'FreqOutBtn'#4'Left'#3#168
+#0#6'Height'#2#26#3'Top'#3#24#1#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4
+#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0
+#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207
+'q'#190'{'#255'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'
+#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255
+#255#255#0#255#255#255#0'e'#195'q'#196'{'#200#134#255#156#213#165#255#152#211
+#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130
+#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'
+#255#255#255#255#0#255#255#255#0'h'#199't'#201#127#204#138#255#162#216#171
+#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204
+#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'x'
+#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209
+#128#205#139#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'
+#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255
+'*p/'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'
+#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'
+#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#15'FreqOutBtnClick'#8'Tab'
+'Order'#2#7#0#0#5'TEdit'#10'RowVarEdit'#4'Left'#3#205#0#6'Height'#2#21#3'Top'
+#2'`'#5'Width'#2'q'#8'TabOrder'#2#8#4'Text'#6#10'RowVarEdit'#0#0#5'TEdit'#10
+'ColVarEdit'#4'Left'#3#206#0#6'Height'#2#21#3'Top'#3#176#0#5'Width'#2'q'#8'T'
+'abOrder'#2#9#4'Text'#6#5'Edit1'#0#0#5'TEdit'#11'FreqVarEdit'#4'Left'#3#205#0
+#6'Height'#2#21#3'Top'#3#16#1#5'Width'#2'q'#8'TabOrder'#2#10#4'Text'#6#5'Edi'
+'t1'#0#0#5'TEdit'#10'NoRowsEdit'#4'Left'#3#136#1#6'Height'#2#21#3'Top'#2#1#5
+'Width'#2''''#10'OnKeyPress'#7#18'NoRowsEditKeyPress'#8'TabOrder'#2#11#4'Tex'
+'t'#6#10'NoRowsEdit'#0#0#5'TEdit'#10'NoColsEdit'#4'Left'#3'('#2#6'Height'#2
+#21#3'Top'#2#1#5'Width'#2''''#10'OnKeyPress'#7#18'NoColsEditKeyPress'#8'TabO'
+'rder'#2#12#4'Text'#6#5'Edit1'#0#0#11'TStringGrid'#4'Grid'#4'Left'#3'G'#1#6
+'Height'#3#14#1#3'Top'#2'$'#5'Width'#3#11#1#8'ColCount'#2#2#7'Options'#11#15
+'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13'goRan'
+'geSelect'#9'goEditing'#6'goTabs'#14'goSmoothScroll'#0#8'RowCount'#2#2#8'Tab'
+'Order'#2#13#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#0#1#6'Height'#2#29#3'Top'#3
+'P'#1#5'Width'#2'H'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'T'
+'abOrder'#2#14#0#0#7'TButton'#9'CancelBtn'#4'Left'#3'P'#1#6'Height'#2#29#3'T'
+'op'#3'P'#1#5'Width'#2'H'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOr'
+'der'#2#15#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#168#1#6'Height'#2#30#3'To'
+'p'#3'P'#1#5'Width'#2'H'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnC'
+'lick'#8'TabOrder'#2#16#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#0#2#6'Height'#2
+#30#3'Top'#3'P'#1#5'Width'#2'O'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8
+'TabOrder'#2#17#0#0#7'TButton'#7'HelpBtn'#3'Tag'#3#154#0#4'Left'#3#168#0#6'H'
+'eight'#2#29#3'Top'#3'P'#1#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12
+'HelpBtnClick'#8'TabOrder'#2#18#0#0#0
]);

View File

@ -0,0 +1,885 @@
unit TwoWayLogLinUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, Buttons, Grids, OutPutUnit, Math, MainUnit, FunctionsLib,
Globals, DataProcs, contexthelpunit;
type
{ TTwoWayLogLinFrm }
TTwoWayLogLinFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
RowInBtn: TBitBtn;
RowOutBtn: TBitBtn;
ColInBtn: TBitBtn;
ColOutBtn: TBitBtn;
FreqInBtn: TBitBtn;
FreqOutBtn: TBitBtn;
NoRowsEdit: TEdit;
NoColsEdit: TEdit;
NoRowsLabel: TLabel;
NoColsLabel: TLabel;
RowVarEdit: TEdit;
ColVarEdit: TEdit;
FreqVarEdit: TEdit;
FileFromGrp: TRadioGroup;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Grid: TStringGrid;
VarList: TListBox;
procedure ColInBtnClick(Sender: TObject);
procedure ColOutBtnClick(Sender: TObject);
procedure ComputeBtnClick(Sender: TObject);
procedure FileFromGrpClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FreqInBtnClick(Sender: TObject);
procedure FreqOutBtnClick(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure NoColsEditKeyPress(Sender: TObject; var Key: char);
procedure NoRowsEditKeyPress(Sender: TObject; var Key: char);
procedure ResetBtnClick(Sender: TObject);
procedure RowInBtnClick(Sender: TObject);
procedure RowOutBtnClick(Sender: TObject);
private
{ private declarations }
procedure PrintTable(Nrows, Ncols : integer;
VAR Data : DblDyneMat;
VAR RowMarg : DblDyneVec;
VAR ColMarg : DblDyneVec;
Total : double);
procedure Iterate(Nrows, Ncols : integer;
VAR Data : DblDyneMat;
VAR RowMarg : DblDyneVec;
VAR ColMarg : DblDyneVec;
VAR Total : double;
VAR Expected : DblDyneMat;
VAR NewRowMarg : DblDyneVec;
VAR NewColMarg : DblDyneVec;
VAR NewTotal : double);
procedure PrintLamdas(Nrows,Ncols : integer;
Var CellLambdas : DblDyneCube;
mu : double);
public
{ public declarations }
end;
var
TwoWayLogLinFrm: TTwoWayLogLinFrm;
implementation
{ TTwoWayLogLinFrm }
procedure TTwoWayLogLinFrm.ResetBtnClick(Sender: TObject);
VAR i, j : integer;
begin
for i := 0 to Grid.RowCount - 1 do
for j := 0 to Grid.ColCount - 1 do
Grid.Cells[j,i] := '';
Grid.ColCount := 3;
Grid.RowCount := 2;
Grid.Cells[0,0] := 'ROW';
Grid.Cells[1,0] := 'COL';
Grid.Cells[2,0] := 'FREQ';
VarList.Clear;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
RowVarEdit.Text := '';
ColVarEdit.Text := '';
FreqVarEdit.Text := '';
NoRowsEdit.Text := '';
NoColsEdit.Text := '';
VarList.Visible := false;
RowInBtn.Visible := false;
RowOutBtn.Visible := false;
ColInBtn.Visible := false;
ColOutBtn.Visible := false;
FreqInBtn.Visible := false;
FreqOutBtn.Visible := false;
Label1.Visible := false;
Label2.Visible := false;
Label3.Visible := false;
RowVarEdit.Visible := false;
ColVarEdit.Visible := false;
FreqVarEdit.Visible := false;
// Memo1.Visible := false;
NoRowsLabel.Visible := false;
NoColsLabel.Visible := false;
NoRowsEdit.Visible := false;
NoColsEdit.Visible := false;
Grid.Visible := false;
end;
procedure TTwoWayLogLinFrm.RowInBtnClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
RowVarEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
RowOutBtn.Visible := true;
RowInBtn.Visible := false;
end;
procedure TTwoWayLogLinFrm.RowOutBtnClick(Sender: TObject);
begin
VarList.Items.Add(RowVarEdit.Text);
RowInBtn.Visible := true;
RowOutBtn.Visible := false;
RowVarEdit.Text := '';
end;
procedure TTwoWayLogLinFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(Self);
end;
procedure TTwoWayLogLinFrm.FreqInBtnClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
FreqVarEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
FreqOutBtn.Visible := true;
FreqInBtn.Visible := false;
end;
procedure TTwoWayLogLinFrm.FreqOutBtnClick(Sender: TObject);
begin
VarList.Items.Add(FreqVarEdit.Text);
FreqInBtn.Visible := true;
FreqOutBtn.Visible := false;
FreqVarEdit.Text := '';
end;
procedure TTwoWayLogLinFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TTwoWayLogLinFrm.NoColsEditKeyPress(Sender: TObject; var Key: char);
var
i, j, row : integer;
Ncols, Nrows : integer;
begin
if ord(Key) = 13 then
begin
Nrows := StrToInt(NoRowsEdit.Text);
Ncols := StrToInt(NoColsEdit.Text);
Grid.RowCount := (Nrows * Ncols) + 1;
// setup row and column values in the grid
row := 1;
for j := 1 to Ncols do
begin
for i := 1 to Nrows do
begin
Grid.Cells[0,row] := IntToStr(i);
Grid.Cells[1,row] := IntToStr(j);
row := row + 1;
end;
end;
Grid.SetFocus;
end;
end;
procedure TTwoWayLogLinFrm.NoRowsEditKeyPress(Sender: TObject; var Key: char);
begin
if ord(Key) = 13 then NoColsEdit.SetFocus;
end;
procedure TTwoWayLogLinFrm.ComputeBtnClick(Sender: TObject);
var
Data : DblDyneMat;
NewData : DblDyneMat;
Prop : DblDyneMat;
LogData : DblDyneMat;
Expected : DblDyneMat;
i, j, k : integer;
RowMarg : DblDyneVec;
NewRowMarg : DblDyneVec;
RowLogs : DblDyneVec;
ColMarg : DblDyneVec;
NewColMarg : DblDyneVec;
ColLogs : DblDyneVec;
CellLambdas : DblDyneCube;
Total : double;
NewTotal : double;
TotalLogs : double;
mu : double;
row, col : integer;
ModelTotal : double;
astr : string;
Ysqr : double;
DF : integer;
chisqr, prob : double;
odds : double;
Nrows, Ncols : integer;
RowCol, ColCol, Fcol : integer;
GridPos : IntDyneVec;
value : integer;
Fx : double;
begin
Total := 0.0;
TotalLogs := 0.0;
Nrows := 0;
Ncols := 0;
if FileFromGrp.ItemIndex = 0 then // mainfrm input
begin
SetLength(GridPos,3);
for i := 1 to NoVariables do
begin
if RowVarEdit.Text = OS3MainFrm.DataGrid.Cells[i,0] then GridPos[0] := i;
if ColVarEdit.Text = OS3MainFrm.DataGrid.Cells[i,0] then GridPos[1] := i;
if FreqVarEdit.Text = OS3MainFrm.DataGrid.Cells[i,0] then GridPos[2] := i;
end;
// get no. of rows and columns
for i := 1 to OS3MainFrm.DataGrid.RowCount - 1 do
begin
value := StrToInt(OS3MainFrm.DataGrid.Cells[GridPos[0],i]);
if value > Nrows then Nrows := value;
value := StrToInt(OS3MainFrm.DataGrid.Cells[GridPos[1],i]);
if value > Ncols then Ncols := value;
end;
// Get data
SetLength(Data,Nrows+1,Ncols+1);
SetLength(CellLambdas,Nrows+1,Ncols+1,4);
SetLength(RowMarg,Nrows+1);
SetLength(RowLogs,Nrows+1);
SetLength(ColMarg,Ncols+1);
SetLength(ColLogs,Ncols+1);
SetLength(Prop,Nrows+1,Ncols+1);
SetLength(LogData,Nrows+1,Ncols+1);
SetLength(Expected,Nrows+1,Ncols+1);
SetLength(NewData,Nrows+1,Ncols+1);
SetLength(NewRowMarg,Nrows+1);
SetLength(NewColMarg,Ncols+1);
for i := 1 to Nrows do
for j := 1 to Ncols do
Data[i,j] := 0.0;
rowcol := GridPos[0];
colcol := GridPos[1];
Fcol := GridPos[2];
for i := 1 to OS3MainFrm.DataGrid.RowCount - 1 do
begin
if Not GoodRecord(i, 3, GridPos) then continue;
row := StrToInt(OS3MainFrm.DataGrid.Cells[rowcol,i]);
col := StrToInt(OS3MainFrm.DataGrid.Cells[colcol,i]);
Fx := StrToInt(OS3MainFrm.DataGrid.Cells[Fcol,i]);
Data[row,col] := Data[row,col] + Fx;
Total := Total + Fx;
end;
GridPos := nil;
end;
if FileFromGrp.ItemIndex = 1 then // form data
begin
Nrows := StrToInt(NoRowsEdit.Text);
Ncols := StrToInt(NoColsEdit.Text);
SetLength(Data,Nrows+1,Ncols+1);
SetLength(CellLambdas,Nrows+1,Ncols+1,4);
SetLength(RowMarg,Nrows+1);
SetLength(RowLogs,Nrows+1);
SetLength(ColMarg,Ncols+1);
SetLength(ColLogs,Ncols+1);
SetLength(Prop,Nrows+1,Ncols+1);
SetLength(LogData,Nrows+1,Ncols+1);
SetLength(Expected,Nrows+1,Ncols+1);
SetLength(NewData,Nrows+1,Ncols+1);
SetLength(NewRowMarg,Nrows+1);
SetLength(NewColMarg,Ncols+1);
end;
for i := 1 to Nrows do
for j := 1 to Ncols do
for k := 1 to 3 do CellLambdas[i,j,k] := 0.0;
for i := 1 to Nrows do
begin
RowMarg[i] := 0.0;
RowLogs[i] := 0.0;
end;
for j := 1 to Ncols do
begin
ColMarg[j] := 0.0;
ColLogs[j] := 0.0;
end;
if FileFromGrp.ItemIndex = 1 then // get data from grid
begin
for i := 1 to (Nrows * Ncols) do
begin
row := StrToInt(Grid.Cells[0,i]);
col := StrToInt(Grid.Cells[1,i]);
Data[row,col] := StrToFloat(Grid.Cells[2,i]);
Total := Total + Data[row,col];
end;
end;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
RowMarg[i] := RowMarg[i] + Data[i,j];
ColMarg[j] := ColMarg[j] + Data[i,j];
Prop[i,j] := Prop[i,j] / Total;
LogData[i,j] := ln(Data[i,j]);
end;
end;
// report cross-products odds and log odds ratios
OutPutFrm.RichEdit.Clear;
astr := 'ANALYSES FOR AN I BY J CLASSIFICATION TABLE';
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
astr := 'Reference: G.J.G. Upton, The Analysis of Cross-tabulated Data, 1980';
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
if (Nrows = 2) and (Ncols = 2) then
begin
odds := (Data[1,1] * Data[2,2]) / (Data[1,2] * Data[2,1]);
astr := format('Cross-Products Odds Ratio = %6.3f',[odds]);
OutPutFrm.RichEdit.Lines.Add(astr);
astr := format('Log odds of the cross-products ratio = %6.3f',[ln(odds)]);
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
end;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
RowLogs[i] := RowLogs[i] + LogData[i,j];
ColLogs[j] := ColLogs[j] + LogData[i,j];
TotalLogs := TotalLogs + LogData[i,j];
end;
end;
for i := 1 to Nrows do RowLogs[i] := RowLogs[i] / Ncols;
for j := 1 to Ncols do ColLogs[j] := ColLogs[j] / Nrows;
TotalLogs := TotalLogs / (Nrows * Ncols);
mu := TotalLogs;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
CellLambdas[i,j,1] := RowLogs[i] - TotalLogs;
CellLambdas[i,j,2] := ColLogs[j] - TotalLogs;
CellLambdas[i,j,3] := LogData[i,j] - RowLogs[i] - ColLogs[j] + TotalLogs;
end;
end;
// Get expected values for saturated model
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
ModelTotal := mu;
for k := 1 to 3 do
ModelTotal := ModelTotal + CellLambdas[i,j,k];
Expected[i,j] := exp(ModelTotal);
end;
end;
// Get Y square for saturated model
Ysqr := 0.0;
for i := 1 to Nrows do
for j := 1 to Ncols do
Ysqr := Ysqr + Data[i,j] * (ln(Data[i,j]) - ln(Expected[i,j]));
Ysqr := 2.0 * Ysqr;
// write out values for saturated model
astr := 'Saturated Model Results';
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
astr := 'Observed Frequencies';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintTable(Nrows,Ncols,Data,RowMarg,ColMarg,Total);
astr := 'Log frequencies, row average and column average of log frequencies';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintTable(Nrows,Ncols,LogData,RowLogs,ColLogs,TotalLogs);
astr := 'Expected Frequencies';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintTable(Nrows,Ncols,Expected,RowMarg,ColMarg,Total);
astr := 'Cell Parameters';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintLamdas(Nrows,Ncols,CellLambdas, mu);
astr := 'Y squared statistic for model fit = ' + format('%6.3f',[Ysqr]);
astr := astr + ' D.F. = 0';
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
// Do the model of independence
astr := 'Independent Effects Model Results';
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
astr := 'Expected Frequencies';
OutPutFrm.RichEdit.Lines.Add(astr);
Iterate(Nrows,Ncols,Data,RowMarg,ColMarg,Total,Expected,NewRowMarg,NewColMarg,NewTotal);
PrintTable(Nrows,Ncols,Expected,NewRowMarg,NewColMarg,NewTotal);
for i := 1 to Nrows do
for j := 1 to Ncols do
LogData[i,j] := ln(Expected[i,j]);
for i := 1 to Nrows do RowLogs[i] := 0.0;
for j := 1 to Ncols do ColLogs[j] := 0.0;
TotalLogs := 0.0;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
RowLogs[i] := RowLogs[i] + LogData[i,j];
ColLogs[j] := ColLogs[j] + LogData[i,j];
TotalLogs := TotalLogs + LogData[i,j];
end;
end;
for i := 1 to Nrows do RowLogs[i] := RowLogs[i] / Ncols;
for j := 1 to Ncols do ColLogs[j] := ColLogs[j] / Nrows;
TotalLogs := TotalLogs / (Nrows * Ncols);
mu := TotalLogs;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
CellLambdas[i,j,1] := RowLogs[i] - TotalLogs;
CellLambdas[i,j,2] := ColLogs[j] - TotalLogs;
CellLambdas[i,j,3] := LogData[i,j] - RowLogs[i] - ColLogs[j] + TotalLogs;
end;
end;
astr := 'Cell Parameters';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintLamdas(Nrows,Ncols,CellLambdas,mu);
Ysqr := 0.0;
for i := 1 to Nrows do
for j := 1 to Ncols do
Ysqr := Ysqr + Data[i,j] * (ln(Data[i,j]) - ln(Expected[i,j]));
Ysqr := 2.0 * Ysqr;
OutPutFrm.RichEdit.Lines.Add('');
astr := 'Y squared statistic for model fit = ' + format('%6.3f',[Ysqr]);
DF := (NRows - 1) * (NCols - 1);
astr := astr + ' D.F. = ' + IntToStr(DF);
OutPutFrm.RichEdit.Lines.Add(astr);
chisqr := 0.0;
for i := 1 to Nrows do
for j := 1 to Ncols do
chisqr := chisqr + (power((Data[i,j] - Expected[i,j]),2) / Expected[i,j]);
astr := format('Chi-squared = %6.3f with %d D.F.',[chisqr,DF]);
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
// Do no Column Effects model
astr := 'No Column Effects Model Results';
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
for i := 1 to Nrows do
for j := 1 to Ncols do
Expected[i,j] := RowMarg[i] / Ncols;
for i := 1 to Nrows do NewRowMarg[i] := 0.0;
for j := 1 to Ncols do NewColMarg[j] := 0.0;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
NewRowMarg[i] := NewRowMarg[i] + Expected[i,j];
NewColMarg[j] := NewColMarg[j] + Expected[i,j];
end;
end;
astr := 'Expected Frequencies';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintTable(Nrows,Ncols,Expected,NewRowMarg,NewColMarg,NewTotal);
for i := 1 to Nrows do
for j := 1 to Ncols do
LogData[i,j] := ln(Expected[i,j]);
for i := 1 to Nrows do RowLogs[i] := 0.0;
for j := 1 to Ncols do ColLogs[j] := 0.0;
TotalLogs := 0.0;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
RowLogs[i] := RowLogs[i] + LogData[i,j];
ColLogs[j] := ColLogs[j] + LogData[i,j];
TotalLogs := TotalLogs + LogData[i,j];
end;
end;
for i := 1 to Nrows do RowLogs[i] := RowLogs[i] / Ncols;
for j := 1 to Ncols do ColLogs[j] := ColLogs[j] / Nrows;
TotalLogs := TotalLogs / (Nrows * Ncols);
mu := TotalLogs;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
CellLambdas[i,j,1] := RowLogs[i] - TotalLogs;
CellLambdas[i,j,2] := ColLogs[j] - TotalLogs;
CellLambdas[i,j,3] := LogData[i,j] - RowLogs[i] - ColLogs[j] + TotalLogs;
end;
end;
astr := 'Cell Parameters';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintLamdas(Nrows,Ncols,CellLambdas,mu);
Ysqr := 0.0;
for i := 1 to Nrows do
for j := 1 to Ncols do
Ysqr := Ysqr + Data[i,j] * (ln(Data[i,j]) - ln(Expected[i,j]));
Ysqr := 2.0 * Ysqr;
OutPutFrm.RichEdit.Lines.Add('');
astr := 'Y squared statistic for model fit = ' + format('%6.3f',[Ysqr]);
DF := (Nrows - 1) * Ncols;
astr := astr + ' D.F. = ' + IntToStr(DF);
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
// Do no Row Effects model
astr := 'No Row Effects Model Results';
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
for i := 1 to Nrows do
for j := 1 to Ncols do
Expected[i,j] := ColMarg[j] / Nrows;
for i := 1 to Nrows do NewRowMarg[i] := 0.0;
for j := 1 to Ncols do NewColMarg[j] := 0.0;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
NewRowMarg[i] := NewRowMarg[i] + Expected[i,j];
NewColMarg[j] := NewColMarg[j] + Expected[i,j];
end;
end;
astr := 'Expected Frequencies';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintTable(Nrows,Ncols,Expected,NewRowMarg,NewColMarg,NewTotal);
for i := 1 to Nrows do
for j := 1 to Ncols do
LogData[i,j] := ln(Expected[i,j]);
for i := 1 to Nrows do RowLogs[i] := 0.0;
for j := 1 to Ncols do ColLogs[j] := 0.0;
TotalLogs := 0.0;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
RowLogs[i] := RowLogs[i] + LogData[i,j];
ColLogs[j] := ColLogs[j] + LogData[i,j];
TotalLogs := TotalLogs + LogData[i,j];
end;
end;
for i := 1 to Nrows do RowLogs[i] := RowLogs[i] / Ncols;
for j := 1 to Ncols do ColLogs[j] := ColLogs[j] / Nrows;
TotalLogs := TotalLogs / (Nrows * Ncols);
mu := TotalLogs;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
CellLambdas[i,j,1] := RowLogs[i] - TotalLogs;
CellLambdas[i,j,2] := ColLogs[j] - TotalLogs;
CellLambdas[i,j,3] := LogData[i,j] - RowLogs[i] - ColLogs[j] + TotalLogs;
end;
end;
astr := 'Cell Parameters';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintLamdas(Nrows,Ncols,CellLambdas,mu);
Ysqr := 0.0;
for i := 1 to Nrows do
for j := 1 to Ncols do
Ysqr := Ysqr + Data[i,j] * (ln(Data[i,j]) - ln(Expected[i,j]));
Ysqr := 2.0 * Ysqr;
OutPutFrm.RichEdit.Lines.Add('');
astr := 'Y squared statistic for model fit = ' + format('%6.3f',[Ysqr]);
DF := (Ncols - 1) * Nrows;
astr := astr + ' D.F. = ' + IntToStr(DF);
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
// Do equiprobability model
astr := 'Equiprobability Effects Model Results';
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
for i := 1 to Nrows do
for j := 1 to Ncols do
Expected[i,j] := Total / (Nrows * Ncols);
for i := 1 to Nrows do NewRowMarg[i] := Total / (Nrows * Ncols);
for j := 1 to 2 do NewColMarg[j] := Total / (Nrows * Ncols);
astr := 'Expected Frequencies';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintTable(Nrows,Ncols,Expected,NewRowMarg,NewColMarg,NewTotal);
for i := 1 to Nrows do
for j := 1 to Ncols do
LogData[i,j] := ln(Expected[i,j]);
for i := 1 to Nrows do RowLogs[i] := 0.0;
for j := 1 to Ncols do ColLogs[j] := 0.0;
TotalLogs := 0.0;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
RowLogs[i] := RowLogs[i] + LogData[i,j];
ColLogs[j] := ColLogs[j] + LogData[i,j];
TotalLogs := TotalLogs + LogData[i,j];
end;
end;
for i := 1 to Nrows do RowLogs[i] := RowLogs[i] / Ncols;
for j := 1 to Ncols do ColLogs[j] := ColLogs[j] / Nrows;
TotalLogs := TotalLogs / (Nrows * Ncols);
mu := TotalLogs;
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
CellLambdas[i,j,1] := RowLogs[i] - TotalLogs;
CellLambdas[i,j,2] := ColLogs[j] - TotalLogs;
CellLambdas[i,j,3] := LogData[i,j] - RowLogs[i] - ColLogs[j] + TotalLogs;
end;
end;
astr := 'Cell Parameters';
OutPutFrm.RichEdit.Lines.Add(astr);
PrintLamdas(Nrows,Ncols,CellLambdas,mu);
Ysqr := 0.0;
for i := 1 to Nrows do
for j := 1 to Ncols do
Ysqr := Ysqr + Data[i,j] * (ln(Data[i,j]) - ln(Expected[i,j]));
Ysqr := 2.0 * Ysqr;
OutPutFrm.RichEdit.Lines.Add('');
astr := 'Y squared statistic for model fit = ' + format('%6.3f',[Ysqr]);
DF := Nrows * Ncols - 1;
astr := astr + ' D.F. = ' + IntToStr(DF);
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
NewColMarg := nil;
NewRowMarg := nil;
NewData := nil;
Expected := nil;
LogData := nil;
Prop := nil;
ColLogs := nil;
ColMarg := nil;
RowLogs := nil;
RowMarg := nil;
CellLambdas := nil;
Data := nil;
end;
procedure TTwoWayLogLinFrm.FileFromGrpClick(Sender: TObject);
begin
if FileFromGrp.ItemIndex = 0 then // file from main form
begin
VarList.Visible := true;
RowInBtn.Visible := true;
RowOutBtn.Visible := false;
ColInBtn.Visible := true;
ColOutBtn.Visible := false;
FreqInBtn.Visible := true;
FreqOutBtn.Visible := false;
Label1.Visible := true;
Label2.Visible := true;
Label3.Visible := true;
RowVarEdit.Visible := true;
ColVarEdit.Visible := true;
FreqVarEdit.Visible := true;
// Memo1.Visible := false;
NoRowsLabel.Visible := false;
NoColsLabel.Visible := false;
NoRowsEdit.Visible := false;
NoColsEdit.Visible := false;
Grid.Visible := false;
end;
if FileFromGrp.ItemIndex = 1 then // data from this form
begin
VarList.Visible := false;
RowInBtn.Visible := false;
RowOutBtn.Visible := false;
ColInBtn.Visible := false;
ColOutBtn.Visible := false;
FreqInBtn.Visible := false;
FreqOutBtn.Visible := false;
Label1.Visible := false;
Label2.Visible := false;
Label3.Visible := false;
RowVarEdit.Visible := false;
ColVarEdit.Visible := false;
FreqVarEdit.Visible := false;
// Memo1.Visible := true;
NoRowsLabel.Visible := true;
NoColsLabel.Visible := true;
NoRowsEdit.Visible := true;
NoColsEdit.Visible := true;
Grid.Visible := true;
end;
end;
procedure TTwoWayLogLinFrm.ColInBtnClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
ColVarEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
ColOutBtn.Visible := true;
ColInBtn.Visible := false;
end;
procedure TTwoWayLogLinFrm.ColOutBtnClick(Sender: TObject);
begin
VarList.Items.Add(ColVarEdit.Text);
ColInBtn.Visible := true;
ColOutBtn.Visible := false;
ColVarEdit.Text := '';
end;
procedure TTwoWayLogLinFrm.PrintTable(Nrows, Ncols : integer;
VAR Data : DblDyneMat;
VAR RowMarg : DblDyneVec;
VAR ColMarg : DblDyneVec;
Total : double);
var
astr : string;
i, j : integer;
begin
astr := 'ROW/COL ';
for j := 1 to Ncols do astr := astr + format(' %3d ',[j]);
astr := astr + ' TOTAL';
OutPutFrm.RichEdit.Lines.Add(astr);
for i := 1 to Nrows do
begin
astr := format(' %3d ',[i]);
for j := 1 to Ncols do
astr := astr + format(' %8.2f ',[Data[i,j]]);
astr := astr + format(' %8.2f ',[RowMarg[i]]);
OutPutFrm.RichEdit.Lines.Add(astr);
end;
astr := 'TOTAL ';
for j := 1 to Ncols do astr := astr + format(' %8.2f ',[ColMarg[j]]);
astr := astr + format(' %8.2f ',[Total]);
OutPutFrm.RichEdit.Lines.Add(astr);
OutPutFrm.RichEdit.Lines.Add('');
end;
procedure TTwoWayLogLinFrm.Iterate(Nrows, Ncols : integer;
VAR Data : DblDyneMat;
VAR RowMarg : DblDyneVec;
VAR ColMarg : DblDyneVec;
VAR Total : double;
VAR Expected : DblDyneMat;
VAR NewRowMarg : DblDyneVec;
VAR NewColMarg : DblDyneVec;
VAR NewTotal : double);
Label Step;
var
Aprevious : DblDyneMat;
i, j : integer;
delta : double;
difference : double;
begin
delta := 0.1;
difference := 0.0;
SetLength(Aprevious,Nrows+1,Ncols+1);
// initialize expected values
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
expected[i,j] := 1.0;
Aprevious[i,j] := 1.0;
end;
end;
Step:
// step 1: initialize new row margins and calculate expected value
for i := 1 to Nrows do
for j := 1 to Ncols do
newrowmarg[i] := newrowmarg[i] + expected[i,j];
for i := 1 to Nrows do
for j := 1 to Ncols do
expected[i,j] := (RowMarg[i] / newrowmarg[i]) * expected[i,j];
// step 2: initialize new col margins and calculate expected values
for i := 1 to Nrows do
for j := 1 to Ncols do
newcolmarg[j] := newcolmarg[j] + expected[i,j];
for i := 1 to Nrows do
for j := 1 to Ncols do
expected[i,j] := (ColMarg[j] / newcolmarg[j]) * expected[i,j];
// step 3: check for change and quit if smaller than delta
for i := 1 to Nrows do
for j := 1 to Ncols do
if abs(APrevious[i,j]-expected[i,j]) > difference then
difference := abs(APrevious[i,j]-expected[i,j]);
if difference < delta then
begin
newtotal := 0.0;
for i := 1 to Nrows do
for j := 1 to Ncols do
newtotal := newtotal + expected[i,j];
exit;
end
else begin
for i := 1 to Nrows do
for j := 1 to Ncols do
APrevious[i,j] := expected[i,j];
for i := 1 to Nrows do newrowmarg[i] := 0.0;
for j := 1 to Ncols do newcolmarg[j] := 0.0;
difference := 0.0;
goto step;
end;
Aprevious := nil;
end;
procedure TTwoWayLogLinFrm.PrintLamdas(Nrows,Ncols : integer;
Var CellLambdas : DblDyneCube;
mu : double);
var
i, j, k : integer;
astr : string;
begin
astr := 'ROW COL MU LAMBDA ROW LAMBDA COL LAMBDA ROW x COL';
OutPutFrm.RichEdit.Lines.Add(astr);
for i := 1 to Nrows do
begin
for j := 1 to Ncols do
begin
astr := format('%3d %3d ',[i,j]);
astr := astr + format('%6.3f ',[mu]);
for k := 1 to 3 do
astr := astr + format(' %6.3f ',[CellLambdas[i,j,k]]);
OutPutFrm.RichEdit.Lines.Add(astr);
end;
end;
OutPutFrm.RichEdit.Lines.Add('');
end;
initialization
{$I twowayloglinunit.lrs}
end.

View File

@ -0,0 +1,96 @@
object TwozProbForm: TTwozProbForm
Left = 288
Height = 126
Top = 161
Width = 392
Caption = 'Probability between two z scores'
ClientHeight = 126
ClientWidth = 392
OnShow = ResetBtnClick
LCLVersion = '0.9.30'
object Label1: TLabel
Left = 6
Height = 16
Top = 14
Width = 157
Caption = 'The probability between z1 = '
ParentColor = False
end
object Z1Edit: TEdit
Left = 162
Height = 23
Top = 7
Width = 60
TabOrder = 0
Text = 'Z1Edit'
end
object Label2: TLabel
Left = 229
Height = 16
Top = 14
Width = 49
Caption = 'and z2 = '
ParentColor = False
end
object Z2Edit: TEdit
Left = 280
Height = 23
Top = 8
Width = 54
TabOrder = 1
Text = 'Z2Edit'
end
object Label3: TLabel
Left = 9
Height = 16
Top = 44
Width = 72
Caption = 'Probability = '
ParentColor = False
end
object ProbEdit: TEdit
Left = 81
Height = 23
Top = 37
Width = 75
TabOrder = 2
Text = 'ProbEdit'
end
object CancelBtn: TButton
Left = 8
Height = 26
Top = 74
Width = 75
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 3
end
object ResetBtn: TButton
Left = 104
Height = 26
Top = 74
Width = 75
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 4
end
object ComputeBtn: TButton
Left = 200
Height = 26
Top = 74
Width = 75
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 5
end
object ReturnBtn: TButton
Left = 296
Height = 26
Top = 74
Width = 75
Caption = 'Return'
ModalResult = 1
TabOrder = 6
end
end

View File

@ -0,0 +1,26 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TTwozProbForm','FORMDATA',[
'TPF0'#13'TTwozProbForm'#12'TwozProbForm'#4'Left'#3' '#1#6'Height'#2'~'#3'Top'
+#3#161#0#5'Width'#3#136#1#7'Caption'#6' Probability between two z scores'#12
+'ClientHeight'#2'~'#11'ClientWidth'#3#136#1#6'OnShow'#7#13'ResetBtnClick'#10
+'LCLVersion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#6#6'Height'#2#16#3
+'Top'#2#14#5'Width'#3#157#0#7'Caption'#6#29'The probability between z1 = '#11
+'ParentColor'#8#0#0#5'TEdit'#6'Z1Edit'#4'Left'#3#162#0#6'Height'#2#23#3'Top'
+#2#7#5'Width'#2'<'#8'TabOrder'#2#0#4'Text'#6#6'Z1Edit'#0#0#6'TLabel'#6'Label'
+'2'#4'Left'#3#229#0#6'Height'#2#16#3'Top'#2#14#5'Width'#2'1'#7'Caption'#6#9
+'and z2 = '#11'ParentColor'#8#0#0#5'TEdit'#6'Z2Edit'#4'Left'#3#24#1#6'Height'
+#2#23#3'Top'#2#8#5'Width'#2'6'#8'TabOrder'#2#1#4'Text'#6#6'Z2Edit'#0#0#6'TLa'
+'bel'#6'Label3'#4'Left'#2#9#6'Height'#2#16#3'Top'#2','#5'Width'#2'H'#7'Capti'
+'on'#6#14'Probability = '#11'ParentColor'#8#0#0#5'TEdit'#8'ProbEdit'#4'Left'
+#2'Q'#6'Height'#2#23#3'Top'#2'%'#5'Width'#2'K'#8'TabOrder'#2#2#4'Text'#6#8'P'
+'robEdit'#0#0#7'TButton'#9'CancelBtn'#4'Left'#2#8#6'Height'#2#26#3'Top'#2'J'
+#5'Width'#2'K'#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabO'
+'rder'#2#3#0#0#7'TButton'#8'ResetBtn'#4'Left'#2'h'#6'Height'#2#26#3'Top'#2'J'
+#5'Width'#2'K'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrd'
+'er'#2#4#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#200#0#6'Height'#2#26#3'Top'
+#2'J'#5'Width'#2'K'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'
+#8'TabOrder'#2#5#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'('#1#6'Height'#2#26#3
+'Top'#2'J'#5'Width'#2'K'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrd'
+'er'#2#6#0#0#0
]);

View File

@ -0,0 +1,71 @@
unit TwozProbUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, functionslib;
type
{ TTwozProbForm }
TTwozProbForm = class(TForm)
CancelBtn: TButton;
ResetBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
ProbEdit: TEdit;
Label3: TLabel;
Z2Edit: TEdit;
Label2: TLabel;
Z1Edit: TEdit;
Label1: TLabel;
procedure ComputeBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
TwozProbForm: TTwozProbForm;
implementation
{ TTwozProbForm }
procedure TTwozProbForm.ResetBtnClick(Sender: TObject);
begin
ProbEdit.Text := '';
Z1Edit.Text := '';
Z2Edit.Text := '';
end;
procedure TTwozProbForm.ComputeBtnClick(Sender: TObject);
VAR
z1, z2, prob : double;
outvalue : string;
begin
z1 := StrToFloat(Z1Edit.Text);
z2 := StrToFloat(Z2Edit.Text);
if z1 < z2 then
begin
prob := probz(z2) - probz(z1);
end;
if z1 > z2 then
begin
prob := probz(z1) - probz(z2);
end;
outvalue := format('%6.4f',[prob]);
ProbEdit.Text := outvalue;
end;
initialization
{$I twozprobunit.lrs}
end.

View File

@ -0,0 +1,139 @@
object UChartFrm: TUChartFrm
Left = 190
Height = 329
Top = 118
Width = 399
Caption = 'Defects per unit U Chart'
ClientHeight = 329
ClientWidth = 399
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 8
Height = 14
Top = 8
Width = 90
Caption = 'Selection Variables'
ParentColor = False
end
object Label2: TLabel
Left = 179
Height = 14
Top = 26
Width = 107
Caption = 'Measurement Variable'
ParentColor = False
end
object Label3: TLabel
Left = 179
Height = 14
Top = 80
Width = 121
Caption = 'No. inspected per group:'
ParentColor = False
end
object VarList: TListBox
Left = 8
Height = 211
Top = 26
Width = 158
ItemHeight = 0
OnClick = VarListClick
TabOrder = 0
end
object MeasEdit: TEdit
Left = 179
Height = 21
Top = 40
Width = 140
TabOrder = 1
Text = 'MeasEdit'
end
object NoInspEdit: TEdit
Left = 320
Height = 21
Top = 72
Width = 43
TabOrder = 2
Text = 'NoInspEdit'
end
object SigmaOpts: TRadioGroup
Left = 176
Height = 114
Top = 104
Width = 209
AutoFill = True
Caption = 'No. of Sigma Units for UCL and LCL'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 96
ClientWidth = 205
Items.Strings = (
'3 Sigma (Default)'
'2 Sigma'
'1 Sigma'
'X Sigma where X = '
)
TabOrder = 3
end
object XSigmaEdit: TEdit
Left = 317
Height = 21
Top = 184
Width = 46
TabOrder = 4
Text = 'XSigmaEdit'
end
object ResetBtn: TButton
Left = 96
Height = 28
Top = 256
Width = 81
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 5
end
object CancelBtn: TButton
Left = 205
Height = 28
Top = 256
Width = 81
Caption = 'Cancel'
ModalResult = 2
TabOrder = 6
end
object ComputeBtn: TButton
Left = 304
Height = 28
Top = 255
Width = 81
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 7
end
object ReturnBtn: TButton
Left = 152
Height = 28
Top = 288
Width = 81
Caption = 'Return'
ModalResult = 1
TabOrder = 8
end
object HelpBtn: TButton
Tag = 155
Left = 8
Height = 29
Top = 254
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 9
end
end

View File

@ -0,0 +1,40 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TUChartFrm','FORMDATA',[
'TPF0'#10'TUChartFrm'#9'UChartFrm'#4'Left'#3#190#0#6'Height'#3'I'#1#3'Top'#2
+'v'#5'Width'#3#143#1#7'Caption'#6#24'Defects per unit U Chart'#12'ClientHeig'
+'ht'#3'I'#1#11'ClientWidth'#3#143#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6
+#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#14#3'Top'#2#8#5'W'
+'idth'#2'Z'#7'Caption'#6#19'Selection Variables'#11'ParentColor'#8#0#0#6'TLa'
+'bel'#6'Label2'#4'Left'#3#179#0#6'Height'#2#14#3'Top'#2#26#5'Width'#2'k'#7'C'
+'aption'#6#20'Measurement Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'
+#4'Left'#3#179#0#6'Height'#2#14#3'Top'#2'P'#5'Width'#2'y'#7'Caption'#6#24'No'
+'. inspected per group:'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'
+#2#8#6'Height'#3#211#0#3'Top'#2#26#5'Width'#3#158#0#10'ItemHeight'#2#0#7'OnC'
+'lick'#7#12'VarListClick'#8'TabOrder'#2#0#0#0#5'TEdit'#8'MeasEdit'#4'Left'#3
+#179#0#6'Height'#2#21#3'Top'#2'('#5'Width'#3#140#0#8'TabOrder'#2#1#4'Text'#6
+#8'MeasEdit'#0#0#5'TEdit'#10'NoInspEdit'#4'Left'#3'@'#1#6'Height'#2#21#3'Top'
+#2'H'#5'Width'#2'+'#8'TabOrder'#2#2#4'Text'#6#10'NoInspEdit'#0#0#11'TRadioGr'
+'oup'#9'SigmaOpts'#4'Left'#3#176#0#6'Height'#2'r'#3'Top'#2'h'#5'Width'#3#209
+#0#8'AutoFill'#9#7'Caption'#6'"No. of Sigma Units for UCL and LCL'#28'ChildS'
+'izing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSi'
+'zing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enlar'
+'geVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'
+#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18
+'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Cont'
+'rolsPerLine'#2#1#12'ClientHeight'#2'`'#11'ClientWidth'#3#205#0#13'Items.Str'
+'ings'#1#6#17'3 Sigma (Default)'#6#7'2 Sigma'#6#7'1 Sigma'#6#18'X Sigma wher'
+'e X = '#0#8'TabOrder'#2#3#0#0#5'TEdit'#10'XSigmaEdit'#4'Left'#3'='#1#6'Heig'
+'ht'#2#21#3'Top'#3#184#0#5'Width'#2'.'#8'TabOrder'#2#4#4'Text'#6#10'XSigmaEd'
+'it'#0#0#7'TButton'#8'ResetBtn'#4'Left'#2'`'#6'Height'#2#28#3'Top'#3#0#1#5'W'
+'idth'#2'Q'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'
+#2#5#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#205#0#6'Height'#2#28#3'Top'#3#0#1
+#5'Width'#2'Q'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#6#0#0
+#7'TButton'#10'ComputeBtn'#4'Left'#3'0'#1#6'Height'#2#28#3'Top'#3#255#0#5'Wi'
+'dth'#2'Q'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrd'
+'er'#2#7#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#152#0#6'Height'#2#28#3'Top'#3
+' '#1#5'Width'#2'Q'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2
+#8#0#0#7'TButton'#7'HelpBtn'#3'Tag'#3#155#0#4'Left'#2#8#6'Height'#2#29#3'Top'
+#3#254#0#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8
+'TabOrder'#2#9#0#0#0
]);

View File

@ -0,0 +1,286 @@
unit UChartUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, MainUnit, Globals, Math, OutPutUnit,
Buttons, DataProcs, FunctionsLib, BlankFrmUnit, contexthelpunit;
type
{ TUChartFrm }
TUChartFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
XSigmaEdit: TEdit;
NoInspEdit: TEdit;
Label3: TLabel;
MeasEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
SigmaOpts: TRadioGroup;
VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure VarListClick(Sender: TObject);
private
{ private declarations }
procedure PlotMeans(VAR means : DblDyneVec;
NoGrps : integer;
UCL, LCL, GrandMean : double;
Sender: TObject);
public
{ public declarations }
end;
var
UChartFrm: TUChartFrm;
implementation
{ TUChartFrm }
procedure TUChartFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
VarList.Clear;
MeasEdit.Text := '';
NoInspEdit.Text := '';
XSigmaEdit.Text := '';
SigmaOpts.ItemIndex := 0;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TUChartFrm.VarListClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
MeasEdit.Text := VarList.Items.Strings[index];
end;
procedure TUChartFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TUChartFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TUChartFrm.ComputeBtnClick(Sender: TObject);
var
i, MeasVar : integer;
X, size, count, UCL, LCL, Sigma : double;
GrandMean, meanc, stddevc : double;
means, defperunit : DblDyneVec;
cellstring, outline : string;
ColNoSelected : IntDyneVec;
NoSelected : integer;
begin
SetLength(ColNoSelected,2);
MeasVar := 2;
Sigma := 3.0;
for i := 1 to NoVariables do
begin
cellstring := OS3MainFrm.DataGrid.Cells[i,0];
if cellstring = MeasEdit.Text then MeasVar := i;
end;
NoSelected := 1;
ColNoSelected[0] := MeasVar;
if SigmaOpts.ItemIndex = 3 then
Sigma := StrToFloat(XSigmaEdit.Text);
if SigmaOpts.ItemIndex = 0 then Sigma := 3.0;
if SigmaOpts.ItemIndex = 1 then Sigma := 2.0;
if SigmaOpts.ItemIndex = 2 then Sigma := 1.0;
SetLength(means,NoCases + 1);
SetLength(defperunit,NoCases + 1);
GrandMean := 0.0;
size := 0.0;
count := StrToFloat(NoInspEdit.Text);
for i := 1 to NoCases do
begin
if Not GoodRecord(i,NoSelected,ColNoSelected) then continue;
X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[MeasVar,i]));
means[i] := X;
GrandMean := GrandMean + X;
defperunit[i] := means[i] / count;
size := size + count;
end;
meanc := GrandMean / size;
stddevc := sqrt(meanc / count);
UCL := meanc + (Sigma * stddevc);
LCL := meanc - (Sigma * stddevc);
// printed results
OutPutFrm.RichEdit.Lines.Add('Defects c Control Chart Results');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('Sample No Defects Defects Per Unit');
OutPutFrm.RichEdit.Lines.Add('______ __________ ________________');
for i := 1 to NoCases do
begin
outline := format(' %3d %8.2f %8.2f',[i,means[i], defperunit[i]]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
outline := format('Total Nonconformities = %8.2f',[GrandMean]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('No. of samples = %d',[NoCases]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Def. / unit mean = %8.3f and variance = %8.3f',[meanc, stddevc]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Lower Control Limit = %8.3f, Upper Control Limit = %8.3f',
[LCL, UCL]);
OutPutfrm.RichEdit.Lines.Add(outline);
OutPutFrm.ShowModal;
// show graph
PlotMeans(defperunit,NoCases,UCL,LCL,meanc,self);
defperunit := nil;
means := nil;
ColNoSelected := nil;
end;
procedure TUChartFrm.PlotMeans(var means: DblDyneVec; NoGrps: integer; UCL,
LCL, GrandMean: double; Sender: TObject);
var
i, xpos, ypos, hleft, hright, vtop, vbottom, imagewide : integer;
vhi, hwide, offset, strhi : integer;
imagehi, maxval, minval, valincr, Yvalue : double;
Title : string;
begin
maxval := -10000.0;
minval := 10000.0;
for i := 1 to NoGrps do
begin
if means[i] > maxval then maxval := means[i];
if means[i] < minval then minval := means[i];
end;
if UCL > maxval then maxval := UCL;
if LCL < minval then minval := LCL;
BlankFrm.Image1.Canvas.Clear;
BlankFrm.Show;
Title := 'DEFECT CONTROL (c) CHART FOR : ' + OS3MainFrm.FileNameEdit.Text;
BlankFrm.Caption := Title;
imagewide := BlankFrm.Image1.Width;
imagehi := BlankFrm.Image1.Height;
vtop := 20;
vbottom := round(imagehi) - 80;
vhi := vbottom - vtop;
hleft := 100;
hright := imagewide - 80;
hwide := hright - hleft;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
// Draw chart border
BlankFrm.Image1.Canvas.Rectangle(hleft,vtop-10,hleft+hwide,vtop+vhi+10);
// draw Grand Mean
ypos := round(vhi * ( (maxval - GrandMean) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.Brush.Color := clLtGray;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'MEAN';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
// draw horizontal axis
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.MoveTo(hleft,vbottom + 20);
BlankFrm.Image1.Canvas.LineTo(hright,vbottom + 20);
for i := 1 to NoGrps do
begin
ypos := vbottom + 10;
xpos := round((hwide / NoGrps)* i + hleft);
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
ypos := ypos + 10;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := format('%d',[i]);
offset := BlankFrm.Image1.Canvas.TextWidth(Title) div 2;
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
xpos := xpos - offset;
ypos := ypos + strhi;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
xpos := 10;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,'GROUPS:');
end;
// Draw vertical axis
valincr := (maxval - minval) / 10.0;
for i := 1 to 11 do
begin
Title := format('%8.2f',[maxval - ((i-1)*valincr)]);
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
xpos := 10;
Yvalue := maxval - (valincr * (i-1));
ypos := round(vhi * ( (maxval - Yvalue) / (maxval - minval)));
ypos := ypos + vtop - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
// draw lines for means of the groups
ypos := round(vhi * ( (maxval - means[1]) / (maxval - minval)));
ypos := ypos + vtop;
xpos := round((hwide / NoGrps) + hleft);
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
for i := 2 to NoGrps do
begin
ypos := round(vhi * ( (maxval - means[i]) / (maxval - minval)));
ypos := ypos + vtop;
xpos := round((hwide / NoGrps)* i + hleft);
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
end;
// Draw upper and lower confidence intervals
ypos := round(vhi * ( (maxval - UCL) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'UCL';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
ypos := round(vhi * ( (maxval - LCL) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'LCL';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
initialization
{$I uchartunit.lrs}
end.

View File

@ -0,0 +1,287 @@
object WilcoxonFrm: TWilcoxonFrm
Left = 130
Height = 300
Top = 100
Width = 335
BorderStyle = bsDialog
Caption = 'Wilcoxon Matched Pairs Signed Ranks Test'
ClientHeight = 300
ClientWidth = 335
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 6
Height = 14
Top = 8
Width = 90
Caption = 'Variables Available'
ParentColor = False
end
object Label2: TLabel
Left = 216
Height = 14
Top = 24
Width = 48
Caption = 'Variable 1'
ParentColor = False
end
object Label3: TLabel
Left = 216
Height = 14
Top = 112
Width = 48
Caption = 'Variable 2'
ParentColor = False
end
object VarList: TListBox
Left = 6
Height = 245
Top = 24
Width = 153
ItemHeight = 0
TabOrder = 0
end
object Var1In: TBitBtn
Left = 168
Height = 30
Top = 24
Width = 34
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = Var1InClick
TabOrder = 1
end
object Var1Out: TBitBtn
Left = 168
Height = 30
Top = 56
Width = 34
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = Var1OutClick
TabOrder = 2
end
object Var2In: TBitBtn
Left = 168
Height = 30
Top = 112
Width = 34
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = Var2InClick
TabOrder = 3
end
object Var2Out: TBitBtn
Left = 168
Height = 30
Top = 144
Width = 34
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = Var2OutClick
TabOrder = 4
end
object Var1Edit: TEdit
Left = 216
Height = 21
Top = 40
Width = 113
TabOrder = 5
Text = 'Var1Edit'
end
object Var2Edit: TEdit
Left = 216
Height = 21
Top = 128
Width = 113
TabOrder = 6
Text = 'Edit1'
end
object ResetBtn: TButton
Left = 169
Height = 29
Top = 216
Width = 64
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 7
end
object CancelBtn: TButton
Left = 264
Height = 29
Top = 216
Width = 64
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 8
end
object ComputeBtn: TButton
Left = 169
Height = 29
Top = 256
Width = 64
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 9
end
object ReturnBtn: TButton
Left = 264
Height = 29
Top = 256
Width = 64
Caption = 'Return'
ModalResult = 1
TabOrder = 10
end
object HelpBtn: TButton
Tag = 156
Left = 208
Height = 29
Top = 176
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 11
end
end

View File

@ -0,0 +1,235 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TWilcoxonFrm','FORMDATA',[
'TPF0'#12'TWilcoxonFrm'#11'WilcoxonFrm'#4'Left'#3#130#0#6'Height'#3','#1#3'To'
+'p'#2'd'#5'Width'#3'O'#1#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6'(Wilcoxo'
+'n Matched Pairs Signed Ranks Test'#12'ClientHeight'#3','#1#11'ClientWidth'#3
+'O'#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2'#0#6'TLabel'#6'Lab'
+'el1'#4'Left'#2#6#6'Height'#2#14#3'Top'#2#8#5'Width'#2'Z'#7'Caption'#6#19'Va'
+'riables Available'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#3#216#0
+#6'Height'#2#14#3'Top'#2#24#5'Width'#2'0'#7'Caption'#6#10'Variable 1'#11'Par'
+'entColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#216#0#6'Height'#2#14#3'Top'#2
+'p'#5'Width'#2'0'#7'Caption'#6#10'Variable 2'#11'ParentColor'#8#0#0#8'TListB'
+'ox'#7'VarList'#4'Left'#2#6#6'Height'#3#245#0#3'Top'#2#24#5'Width'#3#153#0#10
+'ItemHeight'#2#0#8'TabOrder'#2#0#0#0#7'TBitBtn'#6'Var1In'#4'Left'#3#168#0#6
+'Height'#2#30#3'Top'#2#24#5'Width'#2'"'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0
+'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4
+#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'
+#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'
+#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255#255#0
+#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211#161#255
+#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137
+#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255
+#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171#255#158
+#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255
+#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'#145'P'#255
+'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'
+#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'
+#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'Var1InClick'#8'TabOrder'#2#1
+#0#0#7'TBitBtn'#7'Var1Out'#4'Left'#3#168#0#6'Height'#2#30#3'Top'#2'8'#5'Widt'
+'h'#2'"'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0
,#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0
+#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247
+'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['
+#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255
+'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'
+#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206
+#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'
+#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0
+'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212#163
+#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199
+#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0
+#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135#255']'
+#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'
+#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7
+'OnClick'#7#12'Var1OutClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#6'Var2In'#4'Left'
+#3#168#0#6'Height'#2#30#3'Top'#2'p'#5'Width'#2'"'#10'Glyph.Data'#10':'#4#0#0
+'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0
+#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'
+#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'
+#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255
+#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211
+#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130
+#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'
+#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171
+#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204
+#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'
+#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255
+'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161
+'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'Var2InClick'#8'TabOrde'
+'r'#2#3#0#0#7'TBitBtn'#7'Var2Out'#4'Left'#3#168#0#6'Height'#2#30#3'Top'#3#144
+#0#5'Width'#2'"'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0
+#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0
+#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153
+'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'
+#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255
+'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'
+#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195
+'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144
+#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255
+'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255
,#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212
+#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133
+#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255
+#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135
+#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'
+#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyp'
+'hs'#2#0#7'OnClick'#7#12'Var2OutClick'#8'TabOrder'#2#4#0#0#5'TEdit'#8'Var1Ed'
+'it'#4'Left'#3#216#0#6'Height'#2#21#3'Top'#2'('#5'Width'#2'q'#8'TabOrder'#2#5
+#4'Text'#6#8'Var1Edit'#0#0#5'TEdit'#8'Var2Edit'#4'Left'#3#216#0#6'Height'#2
+#21#3'Top'#3#128#0#5'Width'#2'q'#8'TabOrder'#2#6#4'Text'#6#5'Edit1'#0#0#7'TB'
+'utton'#8'ResetBtn'#4'Left'#3#169#0#6'Height'#2#29#3'Top'#3#216#0#5'Width'#2
+'@'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#7#0#0
+#7'TButton'#9'CancelBtn'#4'Left'#3#8#1#6'Height'#2#29#3'Top'#3#216#0#5'Width'
+#2'@'#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#8
+#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#169#0#6'Height'#2#29#3'Top'#3#0#1#5
+'Width'#2'@'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabO'
+'rder'#2#9#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#8#1#6'Height'#2#29#3'Top'#3
+#0#1#5'Width'#2'@'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2
+#10#0#0#7'TButton'#7'HelpBtn'#3'Tag'#3#156#0#4'Left'#3#208#0#6'Height'#2#29#3
+'Top'#3#176#0#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClic'
+'k'#8'TabOrder'#2#11#0#0#0
]);

View File

@ -0,0 +1,306 @@
unit WilcoxonUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, MainUnit, OutPutUnit, FunctionsLib,
Globals, DataProcs, Math, contexthelpunit;
type
{ TWilcoxonFrm }
TWilcoxonFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
Var1Edit: TEdit;
Var2Edit: TEdit;
Label2: TLabel;
Label3: TLabel;
Var1In: TBitBtn;
Var1Out: TBitBtn;
Var2In: TBitBtn;
Var2Out: TBitBtn;
Label1: TLabel;
VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure Var1InClick(Sender: TObject);
procedure Var1OutClick(Sender: TObject);
procedure Var2InClick(Sender: TObject);
procedure Var2OutClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
WilcoxonFrm: TWilcoxonFrm;
implementation
{ TWilcoxonFrm }
procedure TWilcoxonFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
Var1Edit.Text := '';
Var2Edit.Text := '';
Var1In.Visible := true;
Var1Out.Visible := false;
Var2In.Visible := true;
Var2Out.Visible := false;
VarList.Items.Clear;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TWilcoxonFrm.Var1InClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
Var1Edit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
Var1In.Visible := false;
Var1Out.Visible := true;
end;
procedure TWilcoxonFrm.Var1OutClick(Sender: TObject);
begin
VarList.Items.Add(Var1Edit.Text);
Var1Edit.Text := '';
Var1In.Visible := true;
Var1Out.Visible := false;
end;
procedure TWilcoxonFrm.Var2InClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
Var2Edit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
Var2In.Visible := false;
Var2Out.Visible := true;
end;
procedure TWilcoxonFrm.Var2OutClick(Sender: TObject);
begin
VarList.Items.Add(Var2Edit.Text);
Var2Edit.Text := '';
Var2In.Visible := true;
Var2Out.Visible := false;
end;
procedure TWilcoxonFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TWilcoxonFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TWilcoxonFrm.ComputeBtnClick(Sender: TObject);
var
zprob, numerator, denominator, z, negsum : double;
possum, t, sum, Avg : double;
A, b, d, r : DblDyneVec;
M, N, negcnt, poscnt, i, j, k, itemp, col1, col2, NoSelected : integer;
index : IntdyneVec;
ColNoSelected : IntDyneVec;
labelone, labeltwo, cellstring, outline : string;
begin
negsum := 0.0;
possum := 0.0;
NoSelected := 2;
// Allocate memory
SetLength(ColNoSelected,NoVariables);
SetLength(A,NoCases);
SetLength(b,NoCases);
SetLength(d,NoCases);
SetLength(index,NoCases);
SetLength(r,NoCases);
// Get column numbers and labels of variables selected
for i := 1 to NoVariables do
begin
cellstring := OS3MainFrm.DataGrid.Cells[i,0];
if cellstring = Var1Edit.Text then
begin
ColNoSelected[0] := i;
labelone := cellstring;
end;
if cellstring = Var2Edit.Text then
begin
ColNoSelected[1] := i;
labeltwo := cellstring;
end;
end;
// Get scores and differences
N := 0;
for i := 1 to NoCases do
begin
if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue;
N := N + 1;
index[i-1] := N;
col1 := ColNoSelected[0];
col2 := ColNoSelected[1];
A[N-1] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col1,i]));
b[N-1] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col2,i]));
d[N-1] := A[N-1] - b[N-1];
end;
// Rank on absolute score differences
for i := 1 to N - 1 do
begin
for j := i + 1 to N do
begin
if (abs(d[i-1]) > abs(d[j-1])) then
begin
t := d[i-1];
d[i-1] := d[j-1];
d[j-1] := t;
t := A[i-1];
A[i-1] := A[j-1];
A[j-1] := t;
t := b[i-1];
b[i-1] := b[j-1];
b[j-1] := t;
itemp := index[i-1];
index[i-1] := index[j-1];
index[j-1] := itemp;
end;
end;
end;
// Eliminate cases with 0 score differences
i := 1;
while (i <= N) do
begin
if (d[i-1] = 0.0) then // found a 0 score difference - move all up one
begin
if i < N then
begin
for j := i + 1 to N do
begin
d[j] := d[j-1];
A[j] := A[j-1];
b[j] := b[j-1];
index[j] := index[j-1];
end;
N := N - 1;
i := 1;
end
else begin
N := N - 1;
i := 1;
end;
end
else i := i + 1;
end;
// Assign ranks
for i := 1 to N do r[i-1] := i;
// Find matching differences and assign common rank
i := 1;
while (i < N) do
begin
M := 0;
sum := 0;
for j := i + 1 to N do
begin
if ( abs(d[j-1]) = abs(d[i-1]) ) then
begin
M := M + 1;
sum := sum + r[j-1];
end;
end;
if (M > 0) then //matched differences found - assign average rank
begin
sum := sum + r[i-1]; // add the ith value too
Avg := sum / (M + 1); // count the ith value too
for j := i to (i + M) do r[j-1] := Avg;
i := i + M + 1;
end
else i := i + 1;
end;
// Assign sign of difference to ranks
for i := 1 to N do if (d[i-1] < 0.0) then r[i-1] := -r[i-1];
// Get sum of negative and positive difference ranks
for i := 1 to N do
begin
if (d[i-1] < 0.0) then
begin
negsum := negsum + abs(r[i-1]);
negcnt := negcnt + 1;
end
else
begin
possum := possum + abs(r[i-1]);
poscnt := poscnt + 1;
end;
end;
if (negsum < possum) then t := negsum
else t := possum;
numerator := t - ((N * (N + 1)) / 4.0);
denominator := sqrt((N * (N + 1) * (2 * N + 1)) / 24.0);
z := abs(numerator / denominator);
zprob := 1.0 - probz(z);
// Now, display results
OutPutFrm.RichEdit.Clear;
OutPutFrm.RichEdit.Lines.Add('The Wilcoxon Matched-Pairs Signed-Ranks Test');
OutPutFrm.RichEdit.Lines.Add('See pages 75-83 in S. Seigel: Nonparametric Statistics for the Social Sciences');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('Ordered Cases with cases having 0 differences eliminated:');
outline := format('Number of cases with absolute differences greater than 0 = %d',[N]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('CASE %10s %10s Difference Signed Rank',
[labelone, labeltwo]);
OutPutFrm.RichEdit.Lines.Add(outline);
for i := 1 to N do
begin
outline := format('%3d %6.2f %6.2f %6.2f %6.2f',
[index[i-1], A[i-1], b[i-1], d[i-1], r[i-1]]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
OutPutFrm.RichEdit.Lines.Add('');
outline := format('Smaller sum of ranks (T) = %8.2f',[t]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Approximately normal z for test statistic T = %6.3f',[z]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Probability (1-tailed) of greater z = %6.4f',[zprob]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('NOTE: For N < 25 use tabled values for Wilcoxon Test');
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
//cleanup
r := nil;
index := nil;
d := nil;
b := nil;
A := nil;
ColNoSelected := nil;
end;
initialization
{$I wilcoxonunit.lrs}
end.

View File

@ -0,0 +1,214 @@
object WithinANOVAFrm: TWithinANOVAFrm
Left = 195
Height = 342
Top = 121
Width = 621
Caption = 'Within Subjects ANOVA and Hoyt Reliability Estimates'
ClientHeight = 342
ClientWidth = 621
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 10
Height = 14
Top = 8
Width = 90
Caption = 'Available Variables'
ParentColor = False
end
object Label2: TLabel
Left = 242
Height = 14
Top = 8
Width = 92
Caption = 'Selected Variables:'
ParentColor = False
end
object VarList: TListBox
Left = 10
Height = 279
Top = 27
Width = 179
ItemHeight = 0
MultiSelect = True
TabOrder = 0
end
object InBtn: TBitBtn
Left = 200
Height = 23
Top = 27
Width = 31
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = InBtnClick
TabOrder = 1
end
object OutBtn: TBitBtn
Left = 200
Height = 23
Top = 56
Width = 31
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = OutBtnClick
TabOrder = 2
end
object SelList: TListBox
Left = 242
Height = 279
Top = 24
Width = 184
ItemHeight = 0
TabOrder = 3
end
object GroupBox1: TGroupBox
Left = 441
Height = 98
Top = 8
Width = 168
Caption = 'Options:'
ClientHeight = 80
ClientWidth = 164
TabOrder = 4
object RelChk: TCheckBox
Left = 8
Height = 17
Top = 8
Width = 114
Caption = 'Reliability Estimates'
TabOrder = 0
end
object AssumpChk: TCheckBox
Left = 8
Height = 17
Top = 32
Width = 104
Caption = 'Test Assumptions'
TabOrder = 1
end
object PlotChk: TCheckBox
Left = 8
Height = 17
Top = 56
Width = 72
Caption = 'Plot Means'
TabOrder = 2
end
end
object ResetBtn: TButton
Left = 480
Height = 32
Top = 160
Width = 76
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 5
end
object CancelBtn: TButton
Left = 480
Height = 32
Top = 208
Width = 76
Caption = 'Cancel'
ModalResult = 2
TabOrder = 6
end
object ComputeBtn: TButton
Left = 480
Height = 32
Top = 256
Width = 76
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 7
end
object ReturnBtn: TButton
Left = 480
Height = 32
Top = 296
Width = 76
Caption = 'Return'
ModalResult = 1
TabOrder = 8
end
object HelpBtn: TButton
Tag = 157
Left = 480
Height = 29
Top = 120
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 9
end
end

View File

@ -0,0 +1,136 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TWithinANOVAFrm','FORMDATA',[
'TPF0'#15'TWithinANOVAFrm'#14'WithinANOVAFrm'#4'Left'#3#195#0#6'Height'#3'V'#1
+#3'Top'#2'y'#5'Width'#3'm'#2#7'Caption'#6'4Within Subjects ANOVA and Hoyt Re'
+'liability Estimates'#12'ClientHeight'#3'V'#1#11'ClientWidth'#3'm'#2#6'OnSho'
+'w'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'
+#2#10#6'Height'#2#14#3'Top'#2#8#5'Width'#2'Z'#7'Caption'#6#19'Available Vari'
+'ables'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#3#242#0#6'Height'#2
+#14#3'Top'#2#8#5'Width'#2'\'#7'Caption'#6#19'Selected Variables:'#11'ParentC'
+'olor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#10#6'Height'#3#23#1#3'Top'#2#27
+#5'Width'#3#179#0#10'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#7
+'TBitBtn'#5'InBtn'#4'Left'#3#200#0#6'Height'#2#23#3'Top'#2#27#5'Width'#2#31
+#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16
+#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'
+#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'
+#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'
+#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!'
+'c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169
+#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203
+#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190
+'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165
+#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255
+#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135
+#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199
+'t'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255
+'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157
+'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#10
+'InBtnClick'#8'TabOrder'#2#1#0#0#7'TBitBtn'#6'OutBtn'#4'Left'#3#200#0#6'Heig'
+'ht'#2#23#3'Top'#2'8'#5'Width'#2#31#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'
+#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0
+'d'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0
,#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+'M'#161'V'#6'G'#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169
+'\'#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'
+#255'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255
+'5'#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0
+#255#255#255#0'e'#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255
+#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137
+#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255
+#255#255#0#255#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158
+#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255
+#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255
+'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139
+#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255
+'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195
+'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'
+#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'OutBtnClick'#8'TabOrder'#2#2#0#0
+#8'TListBox'#7'SelList'#4'Left'#3#242#0#6'Height'#3#23#1#3'Top'#2#24#5'Width'
+#3#184#0#10'ItemHeight'#2#0#8'TabOrder'#2#3#0#0#9'TGroupBox'#9'GroupBox1'#4
+'Left'#3#185#1#6'Height'#2'b'#3'Top'#2#8#5'Width'#3#168#0#7'Caption'#6#8'Opt'
+'ions:'#12'ClientHeight'#2'P'#11'ClientWidth'#3#164#0#8'TabOrder'#2#4#0#9'TC'
+'heckBox'#6'RelChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2#8#5'Width'#2'r'#7'Ca'
+'ption'#6#21'Reliability Estimates'#8'TabOrder'#2#0#0#0#9'TCheckBox'#9'Assum'
+'pChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2' '#5'Width'#2'h'#7'Caption'#6#16
+'Test Assumptions'#8'TabOrder'#2#1#0#0#9'TCheckBox'#7'PlotChk'#4'Left'#2#8#6
+'Height'#2#17#3'Top'#2'8'#5'Width'#2'H'#7'Caption'#6#10'Plot Means'#8'TabOrd'
+'er'#2#2#0#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#224#1#6'Height'#2' '#3'Top'#3
+#160#0#5'Width'#2'L'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8
+'TabOrder'#2#5#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#224#1#6'Height'#2' '#3
+'Top'#3#208#0#5'Width'#2'L'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'Tab'
+'Order'#2#6#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#224#1#6'Height'#2' '#3'T'
+'op'#3#0#1#5'Width'#2'L'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnC'
+'lick'#8'TabOrder'#2#7#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#224#1#6'Height'
,#2' '#3'Top'#3'('#1#5'Width'#2'L'#7'Caption'#6#6'Return'#11'ModalResult'#2#1
+#8'TabOrder'#2#8#0#0#7'TButton'#7'HelpBtn'#3'Tag'#3#157#0#4'Left'#3#224#1#6
+'Height'#2#29#3'Top'#2'x'#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12
+'HelpBtnClick'#8'TabOrder'#2#9#0#0#0
]);

View File

@ -0,0 +1,447 @@
unit WithinANOVAUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, MainUnit, FunctionsLib, OutPutUnit, MatrixLib, Globals,
DataProcs, GraphLib, contexthelpunit;
type
{ TWithinANOVAFrm }
TWithinANOVAFrm = class(TForm)
AssumpChk: TCheckBox;
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
PlotChk: TCheckBox;
RelChk: TCheckBox;
GroupBox1: TGroupBox;
InBtn: TBitBtn;
Label2: TLabel;
SelList: TListBox;
OutBtn: TBitBtn;
Label1: TLabel;
VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure InBtnClick(Sender: TObject);
procedure OutBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
WithinANOVAFrm: TWithinANOVAFrm;
implementation
{ TWithinANOVAFrm }
procedure TWithinANOVAFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
VarList.Clear;
SelList.Clear;
PlotChk.Checked := false;
RelChk.Checked := false;
AssumpChk.Checked := false;
InBtn.Visible := true;
OutBtn.Visible := false;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TWithinANOVAFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TWithinANOVAFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TWithinANOVAFrm.ComputeBtnClick(Sender: TObject);
var
i, j, k, f3 : integer;
LabelStr : string;
NoSelected, count, IER, row : integer;
SSrows, SScols, SSwrows, SSerr, SStot : double;
MSrows, MScols, MSwrows, MSerr, MStot : double;
dfrows, dfcols, dfwrows, dferr, dftot : double;
f1, f2, probf1, probf2, GrandMean, Term1, Term2, Term3, Term4 : double;
r1, r2, r3, r4, X, avgvar, avgcov : double;
determ1, determ2, M2, C2, chi2, prob : double;
errorfound : boolean;
outline : string;
Selected : IntDyneVec;
ColLabels : StrDyneVec;
ColMeans, ColVar, RowMeans, RowVar, ColStdDev : DblDyneVec;
varcovmat, vcmat, workmat : DblDyneMat;
title : string;
begin
errorfound := false;
NoSelected := SelList.Items.Count;
SetLength(Selected,NoSelected);
SetLength(ColLabels,NoSelected);
SetLength(ColMeans,NoSelected);
SetLength(ColVar,NoSelected);
SetLength(RowMeans,NoCases);
SetLength(RowVar,NoCases);
for i := 0 to NoSelected - 1 do
begin
LabelStr := SelList.Items.Strings[i];
for j := 1 to NoVariables do
begin
if LabelStr = OS3MainFrm.DataGrid.Cells[j,0] then
begin
Selected[i] := j;
break;
end;
end;
end;
for i := 1 to NoSelected do
begin
j := Selected[i-1];
ColLabels[i-1] := OS3MainFrm.DataGrid.Cells[j,0];
end;
// Initialize values
SScols := 0.0;
SSrows := 0.0;
SStot := 0.0;
dfwrows := 0.0;
dftot := 0.0;
GrandMean := 0.0;
count := 0;
for i := 0 to NoSelected-1 do
begin
ColMeans[i] := 0.0;
ColVar[i] := 0.0;
end;
for j := 0 to NoCases-1 do
begin
RowMeans[j] := 0.0;
RowVar[j] := 0.0;
end;
// Read data and compute sums while reading
row := 0;
for i := 1 to NoCases do
begin
if NOT GoodRecord(i,NoSelected,Selected) then continue;
count := count + 1;
for j := 1 to NoSelected do
begin
k := Selected[j-1];
X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i]));
RowMeans[row] := RowMeans[row] + X;
RowVar[row] := RowVar[row] + (X * X);
ColMeans[j-1] := ColMeans[j-1] + X;
ColVar[j-1] := ColVar[j-1] + (X * X);
GrandMean := GrandMean + X;
SStot := SStot + (X * X);
end;
row := row + 1;
end;
// Calculate ANOVA results
Term1 := (GrandMean * GrandMean) / (count * NoSelected);
Term2 := SStot;
for i := 1 to count do SSrows := SSrows + (RowMeans[i-1] * RowMeans[i-1]);
Term4 := SSrows / NoSelected;
for i := 1 to NoSelected do SScols := SScols + (ColMeans[i-1] * ColMeans[i-1]);
Term3 := SScols / count;
SSrows := Term4 - Term1;
SScols := Term3 - Term1;
SSwrows := Term2 - Term4;
SSerr := Term2 - Term3 - Term4 + Term1;
SStot := Term2 - Term1;
dfrows := count - 1;
dfcols := NoSelected - 1;
dfwrows := count * (NoSelected - 1);
dferr := (count - 1) * (NoSelected - 1);
dftot := (count * NoSelected) - 1;
MSrows := SSrows / dfrows;
MScols := SScols / dfcols;
MSwrows := SSwrows / dfwrows;
MSerr := SSerr / dferr;
MStot := SStot / dftot; // variance of all scores
GrandMean := GrandMean / (count * NoSelected);
for i := 0 to count-1 do
begin
RowVar[i] := RowVar[i] - (RowMeans[i] * RowMeans[i] / NoSelected);
RowVar[i] := RowVar[i] / (NoSelected - 1);
RowMeans[i] := RowMeans[i] / NoSelected;
end;
for i := 0 to NoSelected-1 do
begin
ColVar[i] := ColVar[i] - (ColMeans[i] * ColMeans[i] / count);
ColVar[i] := ColVar[i] / (count - 1);
ColMeans[i] := ColMeans[i] / count;
end;
f1 := MScols / MSerr; // treatment F statistic
probf1 := probf(f1,dfcols,dferr);
// Do reliability terms if requested
if RelChk.Checked then
begin
r1 := 1.0 - (MSwrows / MSrows); // unadjusted reliability of test
r2 := (MSrows - MSwrows) / (MSrows + (NoSelected - 1) * MSwrows);
// r2 is unadjusted reliability of a single item
r3 := (MSrows - MSerr) / MSrows; // Cronbach alpha for test
r4 := (MSrows - MSerr) / (MSrows + (NoSelected - 1) * MSerr);
// r4 is adjusted reliability of a single item
end;
// do homogeneity of variance and covariance checks if requested
// print results
OutPutFrm.RichEdit.Clear;
OutPutFrm.RichEdit.Lines.Add('Treatments by Subjects (AxS) ANOVA Results.');
OutPutFrm.RichEdit.Lines.Add('');
outline := 'Data File = ' + OS3MainFrm.FileNameEdit.Text;
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('-----------------------------------------------------------');
OutPutFrm.RichEdit.Lines.Add('SOURCE DF SS MS F Prob. > F');
OutPutFrm.RichEdit.Lines.Add('-----------------------------------------------------------');
outline := format('SUBJECTS %4.0f%10.3f%10.3f',[dfrows,SSrows,MSrows]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('WITHIN SUBJECTS%4.0f%10.3f%10.3f',[dfwrows,SSwrows,MSwrows]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format(' TREATMENTS %4.0f%10.3f%10.3f%10.3f%10.3f',[dfcols,SScols,MScols,f1,probf1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format(' RESIDUAL %4.0f%10.3f%10.3f',[dferr,SSerr,MSerr]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('-----------------------------------------------------------');
outline := format('TOTAL %4.0f%10.3f%10.3f',[dftot,SStot,MStot]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('-----------------------------------------------------------');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('TREATMENT (COLUMN) MEANS AND STANDARD DEVIATIONS');
OutPutFrm.RichEdit.Lines.Add('VARIABLE MEAN STD.DEV.');
for i := 1 to NoSelected do
begin
outline := format('%-8s%10.3f%10.3f',[ColLabels[i-1],ColMeans[i-1],sqrt(ColVar[i-1])]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
OutPutFrm.RichEdit.Lines.Add('');
outline := format('Mean of all scores = %10.3f with standard deviation = %10.3f',
[GrandMean, sqrt(MStot)]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('');
// Do reliability estimates if requested
if RelChk.Checked then
begin
OutPutFrm.RichEdit.Lines.Add('RELIABILITY ESTIMATES');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('TYPE OF ESTIMATE VALUE');
outline := format('Unadjusted total reliability %7.3f',[r1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Unadjusted item reliability %7.3f',[r2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Adjusted total (Cronbach) %7.3f',[r3]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Adjusted item reliability %7.3f',[r4]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('');
end;
// Test assumptions of variance - covariance homogeneity if requested
if AssumpChk.Checked then
begin
SetLength(varcovmat,NoSelected+1,NoSelected+1);
SetLength(vcmat,NoSelected+1,NoSelected+1);
SetLength(workmat,NoSelected+1,NoSelected+1);
SetLength(ColStdDev,NoSelected);
errorfound := false;
count := NoCases;
OutPutFrm.RichEdit.Lines.Add('BOX TEST FOR HOMOGENEITY OF VARIANCE-COVARIANCE MATRIX');
OutPutFrm.RichEdit.Lines.Add('');
GridCovar(NoSelected,Selected,varcovmat,ColMeans,ColVar,ColStdDev,errorfound,count);
title := 'SAMPLE COVARIANCE MATRIX';
MAT_PRINT(varcovmat,NoSelected,NoSelected,title, ColLabels, ColLabels,NoCases);
if errorfound then
ShowMessage('ERROR! Zero variance found for a variable.');
// get average of variances into workmat diagonal and average of
// covariances into workmat off-diagonals (See Winer, pg 371)
avgvar := 0.0;
avgcov := 0.0;
for i := 0 to NoSelected-1 do vcmat[i,i] := varcovmat[i,i];
for i := 0 to NoSelected-2 do
begin
for j := i+1 to NoSelected-1 do
begin
vcmat[i,j] := varcovmat[i,j];
vcmat[j,i] := vcmat[i,j];
end;
end;
for i := 0 to NoSelected-1 do avgvar := avgvar + varcovmat[i,i];
for i := 0 to NoSelected-2 do
for j := i+1 to NoSelected-1 do avgcov := avgcov + varcovmat[i,j];
avgvar := avgvar / NoSelected;
avgcov := avgcov / (NoSelected * NoSelected - 1) / 2.0;
for i := 0 to NoSelected-1 do workmat[i,i] := avgvar;
for i := 0 to NoSelected-2 do
begin
for j := i+1 to NoSelected-1 do
begin
workmat[i,j] := avgcov;
workmat[j,i] := workmat[i,j];
end;
end;
// get determinants of varcov and workmat
determ1 := 0.0;
determ2 := 0.0;
M2 := 0.0;
C2 := 0.0;
chi2 := 0.0;
f2 := 0;
prob := 0.0;
Determ(vcmat,NoSelected,NoSelected,determ1,errorfound);
if determ1 < 0.0 then determ1 := 0.0;
Determ(workmat,NoSelected,NoSelected,determ2,errorfound);
if determ2 < 0.0 then determ2 := 0.0;
count := NoCases;
GridCovar(NoSelected,Selected,varcovmat,ColMeans,ColVar,ColStdDev,errorfound,count);
errorfound := false;
if ((determ1 > 0.0) and (determ2 > 0.0)) then
M2 := -(NoCases*NoSelected - 1) * ln(determ1 / determ2)
else
begin
M2 := 0.0;
errorfound := true;
ShowMessage('ERROR! A determinant <= zero was found.');
end;
if not errorfound then
begin
C2 := NoSelected * (NoSelected+1) * (NoSelected + 1) * (2 * NoSelected - 3);
C2 := C2 / (6 * (count - 1)*(NoSelected - 1) * (NoSelected * NoSelected + NoSelected - 4));
chi2 := (1.0 - C2) * M2;
f3 := (NoSelected * NoSelected + NoSelected - 4) div 2;
if ((chi2 > 0.01) and (chi2 < 1000.0)) then
prob := chisquaredprob(chi2,f3)
else
begin
if chi2 <= 0.0 then prob := 1.0;
if chi2 >= 1000.0 then prob := 0.0;
end;
end;
title := 'ASSUMED POP. COVARIANCE MATRIX';
for i := 0 to NoSelected-1 do
for j := 0 to NoSelected-1 do
varcovmat[i,j] := workmat[i,j];
MAT_PRINT(varcovmat,NoSelected,NoSelected,title, ColLabels, ColLabels,NoCases);
outline := format('Determinant of variance-covariance matrix = %10.3g',[determ1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Determinant of homogeneity matrix = %10.3g',[determ2]);
OutPutFrm.RichEdit.Lines.Add(outline);
if errorfound = false then
begin
outline := format('ChiSquare = %10.3f with %3d degrees of freedom',[chi2,f3]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Probability of larger chisquare = %6.3g',[1.0-prob]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
// deallocate heap
ColStdDev := nil;
workmat := nil;
vcmat := nil;
varcovmat := nil;
end;
OutPutFrm.ShowModal;
{ Now, plot values if indicated in options list }
if PlotChk.Checked then
begin
SetLength(GraphFrm.Xpoints,1,NoSelected);
SetLength(GraphFrm.Ypoints,1,NoSelected);
// use rowvar to hold variable no.
for i := 1 to NoSelected do
begin
rowvar[i-1] := Selected[i-1];
GraphFrm.Xpoints[0,i-1] := Selected[i-1];
GraphFrm.Ypoints[0,i-1] := ColMeans[i-1];
end;
GraphFrm.nosets := 1;
GraphFrm.nbars := NoSelected;
GraphFrm.Heading := 'WITHIN SUBJECTS ANOVA';
GraphFrm.XTitle := 'Repeated Measure Var. No.';
GraphFrm.YTitle := 'Mean';
GraphFrm.barwideprop := 0.5;
GraphFrm.AutoScale := true;
GraphFrm.GraphType := 2; // 3d Vertical Bar Chart
GraphFrm.BackColor := clYellow;
GraphFrm.WallColor := clBlack;
GraphFrm.FloorColor := clLtGray;
GraphFrm.ShowBackWall := true;
GraphFrm.ShowModal;
end;
// deallocate space on the heap used for variables
RowVar := nil;
RowMeans := nil;
ColVar := nil;
ColMeans := nil;
ColLabels := nil;
GraphFrm.Xpoints := nil;
GraphFrm.Ypoints := nil;
Selected := nil;
end;
procedure TWithinANOVAFrm.InBtnClick(Sender: TObject);
VAR i, index : integer;
begin
index := VarList.Items.Count;
i := 0;
while i < index do
begin
if (VarList.Selected[i]) then
begin
SelList.Items.Add(VarList.Items.Strings[i]);
VarList.Items.Delete(i);
index := index - 1;
i := 0;
end
else i := i + 1;
end;
OutBtn.Visible := true;
end;
procedure TWithinANOVAFrm.OutBtnClick(Sender: TObject);
VAR index : integer;
begin
index := SelList.ItemIndex;
if index < 0 then
begin
OutBtn.Visible := false;
exit;
end;
VarList.Items.Add(SelList.Items.Strings[index]);
SelList.Items.Delete(index);
end;
initialization
{$I withinanovaunit.lrs}
end.

View File

@ -0,0 +1,460 @@
object WLSFrm: TWLSFrm
Left = 128
Height = 448
Top = 98
Width = 635
Caption = 'Weighted Least Squares Regression'
ClientHeight = 448
ClientWidth = 635
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 10
Height = 14
Top = 0
Width = 44
Caption = 'Variables'
ParentColor = False
end
object Label2: TLabel
Left = 232
Height = 14
Top = 7
Width = 95
Caption = 'Dependent Variable'
ParentColor = False
end
object Label3: TLabel
Left = 233
Height = 14
Top = 91
Width = 109
Caption = 'Independent Variables'
ParentColor = False
end
object Label4: TLabel
Left = 232
Height = 14
Top = 360
Width = 126
Caption = 'User''s Weigjhts (Optional)'
ParentColor = False
end
object VarList: TListBox
Left = 9
Height = 420
Top = 15
Width = 170
ItemHeight = 0
MultiSelect = True
TabOrder = 0
end
object DepInBtn: TBitBtn
Left = 192
Height = 26
Top = 16
Width = 33
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = DepInBtnClick
TabOrder = 1
end
object DepOutBtn: TBitBtn
Left = 192
Height = 26
Top = 48
Width = 33
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = DepOutBtnClick
TabOrder = 2
end
object IndInBtn: TBitBtn
Left = 192
Height = 26
Top = 96
Width = 33
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = IndInBtnClick
TabOrder = 3
end
object IndOutBtn: TBitBtn
Left = 192
Height = 26
Top = 128
Width = 33
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = IndOutBtnClick
TabOrder = 4
end
object WghtInBtn: TBitBtn
Left = 192
Height = 26
Top = 360
Width = 33
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = WghtInBtnClick
TabOrder = 5
end
object WghtOutBtn: TBitBtn
Left = 192
Height = 26
Top = 392
Width = 33
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = WghtOutBtnClick
TabOrder = 6
end
object DepVarEdit: TEdit
Left = 231
Height = 21
Top = 26
Width = 145
TabOrder = 7
Text = 'DepVarEdit'
end
object IndVarList: TListBox
Left = 233
Height = 237
Top = 112
Width = 143
ItemHeight = 0
TabOrder = 8
end
object WghtVarEdit: TEdit
Left = 231
Height = 21
Top = 376
Width = 145
TabOrder = 9
Text = 'WghtVarEdit'
end
object GroupBox1: TGroupBox
Left = 384
Height = 199
Top = 8
Width = 241
Caption = 'GroupBox1'
ClientHeight = 181
ClientWidth = 237
TabOrder = 10
object OLSChk: TCheckBox
Left = 9
Height = 17
Top = 2
Width = 194
Caption = 'Obtain OLS , save squared residuals'
TabOrder = 0
end
object PlotChk: TCheckBox
Left = 9
Height = 17
Top = 22
Width = 206
Caption = 'Plot squared residuals vs. Indep. Vars.'
TabOrder = 1
end
object RegResChk: TCheckBox
Left = 9
Height = 17
Top = 43
Width = 224
Caption = 'Regress squared residuals on Indep. Vars.'
TabOrder = 2
end
object SaveChk: TCheckBox
Left = 9
Height = 17
Top = 64
Width = 166
Caption = 'Save Estimated weights in grid'
TabOrder = 3
end
object WeightChk: TCheckBox
Left = 10
Height = 17
Top = 87
Width = 200
Caption = 'Apply weights and obtain a WLS Reg.'
TabOrder = 4
end
object OriginChk: TCheckBox
Left = 44
Height = 17
Top = 108
Width = 110
Caption = 'Through the Origin'
TabOrder = 5
end
object UserWghtsChk: TCheckBox
Left = 9
Height = 17
Top = 129
Width = 179
Caption = 'Use Weights entered by the user'
TabOrder = 6
end
object Origin2Chk: TCheckBox
Left = 44
Height = 17
Top = 151
Width = 110
Caption = 'Through the Origin'
TabOrder = 7
end
end
object ResetBtn: TButton
Left = 456
Height = 30
Top = 256
Width = 77
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 11
end
object CancelBtn: TButton
Left = 456
Height = 30
Top = 296
Width = 77
Caption = 'Cancel'
ModalResult = 2
TabOrder = 12
end
object ComputeBtn: TButton
Left = 456
Height = 30
Top = 336
Width = 77
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 13
end
object ReturnBtn: TButton
Left = 457
Height = 30
Top = 376
Width = 77
Caption = 'Return'
ModalResult = 1
TabOrder = 14
end
object HelpBtn: TButton
Tag = 158
Left = 455
Height = 29
Top = 216
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 15
end
end

View File

@ -0,0 +1,359 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TWLSFrm','FORMDATA',[
'TPF0'#7'TWLSFrm'#6'WLSFrm'#4'Left'#3#128#0#6'Height'#3#192#1#3'Top'#2'b'#5'W'
+'idth'#3'{'#2#7'Caption'#6'!Weighted Least Squares Regression'#12'ClientHeig'
+'ht'#3#192#1#11'ClientWidth'#3'{'#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6
+#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#10#6'Height'#2#14#3'Top'#2#0#5
+'Width'#2','#7'Caption'#6#9'Variables'#11'ParentColor'#8#0#0#6'TLabel'#6'Lab'
+'el2'#4'Left'#3#232#0#6'Height'#2#14#3'Top'#2#7#5'Width'#2'_'#7'Caption'#6#18
+'Dependent Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#233
+#0#6'Height'#2#14#3'Top'#2'['#5'Width'#2'm'#7'Caption'#6#21'Independent Vari'
+'ables'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#3#232#0#6'Height'#2
+#14#3'Top'#3'h'#1#5'Width'#2'~'#7'Caption'#6#26'User''s Weigjhts (Optional)'
+#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#9#6'Height'#3#164#1#3
+'Top'#2#15#5'Width'#3#170#0#10'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'
+#2#0#0#0#7'TBitBtn'#8'DepInBtn'#4'Left'#3#192#0#6'Height'#2#26#3'Top'#2#16#5
+'Width'#2'!'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0
+'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0
+#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'
+#247'!c$'#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190
+'m'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255
+'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139
+'I'#255'!c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160
+#215#169#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255
+#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128
+#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199
+'t'#255#165#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255#150
+#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255
+#129#197#135#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255
+#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255
+'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163
+'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247
+';'#136'B'#219#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187
+'A'#145'I'#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#13'DepInBt'
+'nClick'#8'TabOrder'#2#1#0#0#7'TBitBtn'#9'DepOutBtn'#4'Left'#3#192#0#6'Heigh'
,'t'#2#26#3'Top'#2'0'#5'Width'#2'!'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4
+#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'
+#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161
+'V'#6'G'#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'
+#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255
+'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'
+#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255
+#255#255#0'e'#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148
+#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255
+'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255
+#255#0#255#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214
+#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137
+#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i'
+')'#255#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139
+#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255
+'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195
+'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'
+#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#7'OnClick'#7#14'DepOutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#8
+'IndInBtn'#4'Left'#3#192#0#6'Height'#2#26#3'Top'#2'`'#5'Width'#2'!'#10'Glyph'
+'.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16
+#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184
+#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177
+'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255
+'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255
+#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255
+#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142
+#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'
+#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162
+#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255
+#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130
+#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199
+'t'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255
+'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'
+#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#7'OnClick'#7#13'IndInBtnClick'#8'TabOrder'#2#3#0
+#0#7'TBitBtn'#9'IndOutBtn'#4'Left'#3#192#0#6'Height'#2#26#3'Top'#3#128#0#5'W'
+'idth'#2'!'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0
+'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0
+#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'
+#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'
+#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255
+'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'
+#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195
+'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144
+#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255
,'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255
+#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212
+#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133
+#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255
+#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135
+#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'
+#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'
+#7#14'IndOutBtnClick'#8'TabOrder'#2#4#0#0#7'TBitBtn'#9'WghtInBtn'#4'Left'#3
+#192#0#6'Height'#2#26#3'Top'#3'h'#1#5'Width'#2'!'#10'Glyph.Data'#10':'#4#0#0
+'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0
+#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'
+#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'
+#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255
+#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211
+#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130
+#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'
+#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171
+#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204
+#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'
+#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255
+'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161
+'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255
,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#7'OnClick'#7#14'WghtInBtnClick'#8'TabOrder'#2#5#0#0#7'T'
+'BitBtn'#10'WghtOutBtn'#4'Left'#3#192#0#6'Height'#2#26#3'Top'#3#136#1#5'Widt'
+'h'#2'!'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0
+#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0
+#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247
+'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['
+#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255
+'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'
+#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206
+#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'
+#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0
+'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212#163
+#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199
+#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0
+#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135#255']'
+#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'
+#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#15'Wgh'
,'tOutBtnClick'#8'TabOrder'#2#6#0#0#5'TEdit'#10'DepVarEdit'#4'Left'#3#231#0#6
+'Height'#2#21#3'Top'#2#26#5'Width'#3#145#0#8'TabOrder'#2#7#4'Text'#6#10'DepV'
+'arEdit'#0#0#8'TListBox'#10'IndVarList'#4'Left'#3#233#0#6'Height'#3#237#0#3
+'Top'#2'p'#5'Width'#3#143#0#10'ItemHeight'#2#0#8'TabOrder'#2#8#0#0#5'TEdit'
+#11'WghtVarEdit'#4'Left'#3#231#0#6'Height'#2#21#3'Top'#3'x'#1#5'Width'#3#145
+#0#8'TabOrder'#2#9#4'Text'#6#11'WghtVarEdit'#0#0#9'TGroupBox'#9'GroupBox1'#4
+'Left'#3#128#1#6'Height'#3#199#0#3'Top'#2#8#5'Width'#3#241#0#7'Caption'#6#9
+'GroupBox1'#12'ClientHeight'#3#181#0#11'ClientWidth'#3#237#0#8'TabOrder'#2#10
+#0#9'TCheckBox'#6'OLSChk'#4'Left'#2#9#6'Height'#2#17#3'Top'#2#2#5'Width'#3
+#194#0#7'Caption'#6'#Obtain OLS , save squared residuals'#8'TabOrder'#2#0#0#0
+#9'TCheckBox'#7'PlotChk'#4'Left'#2#9#6'Height'#2#17#3'Top'#2#22#5'Width'#3
+#206#0#7'Caption'#6'''Plot squared residuals vs. Indep. Vars.'#8'TabOrder'#2
+#1#0#0#9'TCheckBox'#9'RegResChk'#4'Left'#2#9#6'Height'#2#17#3'Top'#2'+'#5'Wi'
+'dth'#3#224#0#7'Caption'#6')Regress squared residuals on Indep. Vars.'#8'Tab'
+'Order'#2#2#0#0#9'TCheckBox'#7'SaveChk'#4'Left'#2#9#6'Height'#2#17#3'Top'#2
+'@'#5'Width'#3#166#0#7'Caption'#6#30'Save Estimated weights in grid'#8'TabOr'
+'der'#2#3#0#0#9'TCheckBox'#9'WeightChk'#4'Left'#2#10#6'Height'#2#17#3'Top'#2
+'W'#5'Width'#3#200#0#7'Caption'#6'#Apply weights and obtain a WLS Reg.'#8'Ta'
+'bOrder'#2#4#0#0#9'TCheckBox'#9'OriginChk'#4'Left'#2','#6'Height'#2#17#3'Top'
+#2'l'#5'Width'#2'n'#7'Caption'#6#18'Through the Origin'#8'TabOrder'#2#5#0#0#9
+'TCheckBox'#12'UserWghtsChk'#4'Left'#2#9#6'Height'#2#17#3'Top'#3#129#0#5'Wid'
+'th'#3#179#0#7'Caption'#6#31'Use Weights entered by the user'#8'TabOrder'#2#6
+#0#0#9'TCheckBox'#10'Origin2Chk'#4'Left'#2','#6'Height'#2#17#3'Top'#3#151#0#5
+'Width'#2'n'#7'Caption'#6#18'Through the Origin'#8'TabOrder'#2#7#0#0#0#7'TBu'
+'tton'#8'ResetBtn'#4'Left'#3#200#1#6'Height'#2#30#3'Top'#3#0#1#5'Width'#2'M'
+#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#11#0#0#7
+'TButton'#9'CancelBtn'#4'Left'#3#200#1#6'Height'#2#30#3'Top'#3'('#1#5'Width'
+#2'M'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#12#0#0#7'TBut'
+'ton'#10'ComputeBtn'#4'Left'#3#200#1#6'Height'#2#30#3'Top'#3'P'#1#5'Width'#2
+'M'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#13
+#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#201#1#6'Height'#2#30#3'Top'#3'x'#1#5
+'Width'#2'M'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#14#0#0
+#7'TButton'#7'HelpBtn'#3'Tag'#3#158#0#4'Left'#3#199#1#6'Height'#2#29#3'Top'#3
+#216#0#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'Ta'
+'bOrder'#2#15#0#0#0
]);

View File

@ -0,0 +1,865 @@
unit WLSUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, Globals, MainUnit, DictionaryUnit, functionslib, matrixlib,
PlotXYUnit, outputunit, DataProcs, blankfrmunit, contexthelpunit;
type
{ TWLSFrm }
TWLSFrm = class(TForm)
DepInBtn: TBitBtn;
DepOutBtn: TBitBtn;
HelpBtn: TButton;
IndInBtn: TBitBtn;
IndOutBtn: TBitBtn;
WghtInBtn: TBitBtn;
WghtOutBtn: TBitBtn;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
OLSChk: TCheckBox;
PlotChk: TCheckBox;
RegResChk: TCheckBox;
SaveChk: TCheckBox;
WeightChk: TCheckBox;
OriginChk: TCheckBox;
UserWghtsChk: TCheckBox;
Origin2Chk: TCheckBox;
DepVarEdit: TEdit;
WghtVarEdit: TEdit;
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
IndVarList: TListBox;
VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject);
procedure DepInBtnClick(Sender: TObject);
procedure DepOutBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure IndInBtnClick(Sender: TObject);
procedure IndOutBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure WghtInBtnClick(Sender: TObject);
procedure WghtOutBtnClick(Sender: TObject);
procedure PredictIt(ColNoSelected : IntDyneVec; NoVars : integer;
Means, StdDevs, BetaWeights : DblDyneVec;
StdErrEst : double; NoIndepVars : integer);
procedure plotxy(Xpoints, Ypoints, UpConf, LowConf : DblDyneVec;
ConfBand, Xmean, Ymean, R, Slope, Intercept : double;
Xmax, Xmin, Ymax, Ymin : double;
N : integer; XLabel, YLabel : string);
private
{ private declarations }
public
{ public declarations }
end;
var
WLSFrm: TWLSFrm;
implementation
{ TWLSFrm }
procedure TWLSFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
VarList.Clear;
for i := 0 to NoVariables - 1 do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i+1,0]);
IndVarList.Clear;
DepVarEdit.Text := '';
WghtVarEdit.Text := '';
DepInBtn.Visible := true;
DepOutBtn.Visible := false;
IndInBtn.Visible := true;
IndOutBtn.Visible := false;
WghtInBtn.Visible := true;
WghtOutBtn.Visible := false;
OLSChk.Checked := true;
PlotChk.Checked := true;
RegResChk.Checked := true;
WeightChk.Checked := true;
UserWghtsChk.Checked := false;
OriginChk.Checked := true;
Origin2Chk.Checked := true;
end;
procedure TWLSFrm.WghtInBtnClick(Sender: TObject);
VAR index : integer;
begin
if (VarList.Items.Count < 1) then exit;
index := VarList.ItemIndex;
WghtVarEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
WghtOutBtn.Visible := true;
WghtInBtn.Visible := false;
end;
procedure TWLSFrm.WghtOutBtnClick(Sender: TObject);
begin
if (WghtVarEdit.Text = '') then exit;
VarList.Items.Add(WghtVarEdit.Text);
WghtVarEdit.Text := '';
WghtInBtn.Visible := true;
WghtOutBtn.Visible := false;
end;
procedure TWLSFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TWLSFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TWLSFrm.IndInBtnClick(Sender: TObject);
VAR i, index : integer;
begin
if (VarList.Items.Count < 1) then exit;
index := VarList.SelCount;
i := 0;
while (i < VarList.Items.Count) do
begin
if (VarList.Selected[i]) then
begin
IndVarList.Items.Add(VarList.Items.Strings[i]);
VarList.Items.Delete(i);
// index--;
i := 0;
end else i := i + 1;
end;
IndOutBtn.Visible := true;
if (VarList.Items.Count < 1) then IndInBtn.Visible := false;
end;
procedure TWLSFrm.IndOutBtnClick(Sender: TObject);
VAR index : integer;
begin
index := IndVarList.ItemIndex;
VarList.Items.Add(IndVarList.Items.Strings[index]);
IndVarList.Items.Delete(index);
IndInBtn.Visible := true;
if (IndVarList.Items.Count < 1) then IndOutBtn.Visible := false;
end;
procedure TWLSFrm.DepInBtnClick(Sender: TObject);
VAR index : integer;
begin
if (VarList.Items.Count < 1) then exit;
index := VarList.ItemIndex;
DepVarEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
DepOutBtn.Visible := true;
DepInBtn.Visible := false;
end;
procedure TWLSFrm.ComputeBtnClick(Sender: TObject);
VAR
i, ii, j, Noindep, DepCol, WghtCol, olddepcol, NCases, pos, col : integer;
IndepCols : IntDyneVec;
RowLabels : StrDyneVec;
R2, F, stderrest, X, Y : double;
Means, Variances, StdDevs, BWeights : DblDyneVec;
BetaWeights, BStdErrs, Bttests, tprobs : DblDyneVec;
errorcode, PrintDesc, PrintCorrs, PrintInverse, PrintCoefs, SaveCorrs : boolean;
aresult : boolean;
outval : string;
Xpoints, Ypoints, UpConf, lowConf : DblDyneVec;
Xmax, Xmin, Ymax, Ymin, Xmean, Ymean, Xvariance, Yvariance, R : double;
temp, SEPred, Slope, Intercept, DF, SSx, t, ConfBand, sedata : double;
Xstddev, Ystddev, predicted : double;
ColNoSelected : IntDyneVec;
outline : string;
XLabel, YLabel : string;
N, Xcol, Ycol, NoSelected : integer;
label cleanup;
begin
PrintDesc := true;
PrintCorrs := true;
PrintInverse := false;
PrintCoefs := true;
SaveCorrs := false;
SetLength(Means,NoVariables+2);
SetLength(Variances,NoVariables+2);
SetLength(StdDevs,NoVariables+2);
SetLength(BWeights,NoVariables+2);
SetLength(BetaWeights,NoVariables+2);
SetLength(BStdErrs,NoVariables+2);
SetLength(Bttests,NoVariables+2);
SetLength(tprobs,NoVariables+2);
SetLength(RowLabels,NoVariables+2);
SetLength(IndepCols,NoVariables+2);
SetLength(Xpoints,NoCases + 1);
SetLength(Ypoints,NoCases + 1);
SetLength(UpConf,NoCases + 1);
SetLength(lowConf,NoCases + 1);
SetLength(ColNoSelected, 2);
NCases := NoCases;
Noindep := IndVarList.Items.Count;
if (Noindep = 0) then
begin
ShowMessage('ERROR! No independent variables selected.');
goto cleanup;
end;
DepCol := 0;
WghtCol := 0;
for i := 0 to NoVariables - 1 do
begin
if (OS3MainFrm.DataGrid.Cells[i+1,0] = DepVarEdit.Text) then DepCol := i+1;
if (OS3MainFrm.DataGrid.Cells[i+1,0] = WghtVarEdit.Text) then WghtCol := i+1;
for j := 0 to Noindep - 1 do
begin
if (OS3MainFrm.DataGrid.Cells[i+1,0] = IndVarList.Items.Strings[j]) then
begin
IndepCols[j] := i+1;
RowLabels[j] := IndVarList.Items.Strings[j];
end;
end; // next j
end; // next i
if (DepCol = 0) then
begin
ShowMessage('ERROR! No independent variable selected.');
goto cleanup;
end;
// check variable types
aresult := ValidValue(DepCol,0);
if (aresult = false) then goto cleanup;
if (WghtCol > 0) then
begin
aresult := ValidValue(WghtCol,0);
if (aresult = false) then goto cleanup;
end;
for j := 0 to Noindep - 1 do
begin
aresult := ValidValue(IndepCols[j],0);
if (aresult = false) then goto cleanup;
end;
IndepCols[Noindep] := DepCol;
olddepcol := DepCol; // save dependent column so we can reuse DepCol
if (OLSChk.Checked) then // Get OLS regression
begin
OutPutFrm.RichEdit.Lines.Add('OLS REGRESSION RESULTS');
mreg(Noindep, IndepCols, DepCol, RowLabels, Means, Variances, StdDevs,
BWeights, BetaWeights, BStdErrs, Bttests, tprobs, R2, stderrest,
NCases, errorcode, PrintDesc);
// Get predicted z score, residual z score, predicted raw score,
// residual raw score and squared raw residual score. Place in the DataGrid
PredictIt(IndepCols, Noindep+1, Means, StdDevs, BetaWeights, stderrest, Noindep);
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
end;
if (( RegResChk.Checked) and (OLSChk.Checked) ) then
begin
// Regress the squared residuals on the predictors
DepCol := NoVariables;
OutPutFrm.RichEdit.Lines.Add('REGRESSION OF SQUARED RESIDUALS ON INDEPENDENT VARIABLES');
mreg(Noindep, IndepCols, DepCol, RowLabels, Means, Variances, StdDevs,
BWeights, BetaWeights, BStdErrs, Bttests, tprobs, R2, stderrest,
NCases, errorcode, PrintDesc);
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
end;
if ((WeightChk.Checked) and (RegResChk.Checked) ) then
begin
// Get predicted squared residuals and save recipricols as weights
col := NoVariables + 1;
// NoVariables := col;
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'PredResid2';
OS3MainFrm.DataGrid.Cells[col,0] := 'PredResid2';
col := NoVariables + 1;
// NoVariables := col;
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'WEIGHT';
OS3MainFrm.DataGrid.Cells[col,0] := 'WEIGHT';
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
for i := 1 to NoCases do
begin
if (ValidValue(i,col-2)) then // do we have a valid squared OLS residual?
begin
predicted := 0.0;
for j := 0 to Noindep - 1 do
begin
pos := IndepCols[j];
X := StrToFloat(OS3MainFrm.DataGrid.Cells[pos,i]);
predicted := predicted + BWeights[j] * X;
end;
predicted := predicted + BWeights[Noindep];
predicted := abs(predicted);
outval := format('%8.3f',[predicted]);
OS3MainFrm.DataGrid.Cells[col-1,i] := outval;
if (predicted > 0.0) then
begin
predicted := sqrt(predicted);
predicted := 1.0 / predicted;
end else predicted := 0.0;
outval := format('%8.3f',[predicted]);
OS3MainFrm.DataGrid.Cells[col,i] := outval;
end; // if valid case
end; // next i
end; // if regresChk
// Now, plot squared residuals against each independent variable
if ((PlotChk.Checked) and (RegResChk.Checked)) then
begin
Xcol := DepCol;
for ii := 0 to Noindep - 1 do
begin
Ycol := IndepCols[ii];
N := 0;
ColNoSelected[0] := Xcol;
ColNoSelected[1] := Ycol;
NoSelected := 2;
XLabel := OS3MainFrm.DataGrid.Cells[Xcol,0];
YLabel := OS3MainFrm.DataGrid.Cells[Ycol,0];
Xmax := -1.0e20;
Xmin := 1.0e20;
Ymax := -1.0e20;
Ymin := 1.0e20;
Xmean := 0.0;
Ymean := 0.0;
Xvariance := 0.0;
Yvariance := 0.0;
R := 0.0;
for i := 1 to NoCases do
begin
if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue;
N := N + 1;
X := StrToFloat(OS3MainFrm.DataGrid.Cells[Xcol,i]);
Y := StrToFloat(OS3MainFrm.DataGrid.Cells[Ycol,i]);
Xpoints[N] := X;
Ypoints[N] := Y;
if (X > Xmax) then Xmax := X;
if (X < Xmin) then Xmin := X;
if (Y > Ymax) then Ymax := Y;
if (Y < Ymin) then Ymin := Y;
Xmean := Xmean + X;
Ymean := Ymean + Y;
Xvariance := Xvariance + (X * X);
Yvariance := Yvariance + (Y * Y);
R := R + (X * Y);
end;
// sort on X
for i := 1 to N - 1 do
begin
for j := i + 1 to N do
begin
if (Xpoints[i] > Xpoints[j]) then //swap
begin
temp := Xpoints[i];
Xpoints[i] := Xpoints[j];
Xpoints[j] := temp;
temp := Ypoints[i];
Ypoints[i] := Ypoints[j];
Ypoints[j] := temp;
end;
end;
end;
// calculate statistics
Xvariance := Xvariance - (Xmean * Xmean / N);
SSx := Xvariance;
Xvariance := Xvariance / (N - 1);
Xstddev := sqrt(Xvariance);
Yvariance := Yvariance - (Ymean * Ymean / N);
Yvariance := Yvariance / (N - 1);
Ystddev := sqrt(Yvariance);
R := R - (Xmean * Ymean / N);
R := R / (N - 1);
R := R / (Xstddev * Ystddev);
SEPred := sqrt(1.0 - (R * R)) * Ystddev;
SEPred := SEPred * sqrt((N - 1) / (N - 2));
Xmean := Xmean / N;
Ymean := Ymean / N;
Slope := R * Ystddev / Xstddev;
Intercept := Ymean - Slope * Xmean;
// Now, print the descriptive statistics if requested
OutPutFrm.RichEdit.Lines.Add('X versus Y Plot');
OutPutFrm.RichEdit.Lines.Add('');
outline := format('X := %s, Y := %s from file: %s',[OS3MainFrm.DataGrid.Cells[Xcol,0],
OS3MainFrm.DataGrid.Cells[Ycol,0],OS3MainFrm.FileNameEdit.Text]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('Variable Mean Variance Std.Dev.');
outline := format('%-10s%8.2f %8.2f %8.2f',
[OS3MainFrm.DataGrid.Cells[Xcol,0],Xmean,Xvariance,Xstddev]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('%-10s%8.2f %8.2f %8.2f',
[OS3MainFrm.DataGrid.Cells[Ycol,0],Ymean,Yvariance,Ystddev]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Correlation := %6.4f, Slope := %8.2f, Intercept := %8.2f',
[R, Slope, Intercept]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Standard Error of Estimate := %8.2f',[SEPred]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Number of good cases := %d',[N]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear;
// get upper and lower confidence points for each X value
ConfBand := 0.95;
DF := N - 2;
t := inverset(ConfBand,DF);
for i := 1 to N do
begin
X := Xpoints[i];
predicted := Slope * X + Intercept;
sedata := SEPred * sqrt(1.0 + (1.0 / N) + ((X - Xmean) * (X - Xmean) / SSx));
UpConf[i] := predicted + (t * sedata);
lowConf[i] := predicted - (t * sedata);
if (UpConf[i] > Ymax) then Ymax := UpConf[i];
if (lowConf[i] < Ymin) then Ymin := lowConf[i];
end;
// plot the values (and optional line and confidence band if elected)
plotxy(Xpoints, Ypoints, UpConf, lowConf, ConfBand, Xmean, Ymean, R,
Slope, Intercept, Xmax, Xmin, Ymax, Ymin, N, XLabel, YLabel);
BlankFrm.ShowModal;
// cleanup
// ColNoSelected := nil;
// lowConf := nil;
// UpConf := nil;
// Ypoints := nil;
// Xpoints := nil;
end;
end;
if (UserWghtsChk.Checked) then
begin
// Weight variables and do OLS regression on weighted variables
DepCol := olddepcol;
IndepCols[Noindep] := DepCol;
for i := 1 to NoCases do
begin
Y := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[NoVariables,i])); // weight
for j := 0 to Noindep do
begin
pos := IndepCols[j];
X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[pos,i]));
X := X * Y;
OS3MainFrm.DataGrid.Cells[pos,i] := FloatToStr(X);
end;
end;
if (OriginChk.Checked) then // get means of variables and subtract from the values
begin
for j := 0 to Noindep do
begin
Means[j] := 0.0;
NCases := 0;
pos := IndepCols[j];
for i := 1 to NoCases do
begin
if (ValidValue(i,pos)) then
begin
Means[j] := Means[j] + StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[pos,i]));
NCases := NCases + 1;
end;
end;
Means[j] := Means[j] / NCases;
for i := 1 to NoCases do
begin
if (ValidValue(i,pos)) then
begin
X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[pos,i]));
X := X - Means[j];
OS3MainFrm.DataGrid.Cells[pos,i] := FloatToStr(X);
end;
end; // next i
end; // next j
end; // if origin checked
OutPutFrm.RichEdit.Lines.Add('WLS REGRESSION RESULTS');
mreg(Noindep, IndepCols, DepCol, RowLabels, Means, Variances, StdDevs,
BWeights, BetaWeights, BStdErrs, Bttests, tprobs, R2, stderrest,
NCases, errorcode, PrintDesc);
OutPutFrm.ShowModal;
end // if useweightschk checked
else if (UserWghtsChk.Checked) then // use the weights entered by the user
begin
// Weight variables and do OLS regression on weighted variables
DepCol := olddepcol;
IndepCols[Noindep] := DepCol;
for i := 1 to NoCases do
begin
Y := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[WghtCol,i])); // weight
for j := 0 to Noindep do
begin
pos := IndepCols[j];
X := StrToFloat(OS3MainFrm.DataGrid.Cells[pos,i]);
X := X * Y;
OS3MainFrm.DataGrid.Cells[pos,i] := FloatToStr(X);
end;
end;
if (OriginChk.Checked) then // get means of variables and subtract from the values
begin
for j := 0 to Noindep do
begin
Means[j] := 0.0;
NCases := 0;
pos := IndepCols[j];
for i := 1 to NoCases do
begin
if (ValidValue(i,pos)) then
begin
Means[j] := Means[j] + StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[pos,i]));
NCases := NCases + 1;
end;
end;
Means[j] := Means[j] / NCases;
for i := 1 to NoCases do
begin
if (ValidValue(i,pos)) then
begin
X := StrToFloat(OS3MainFrm.DataGrid.Cells[pos,i]);
X := X - Means[j];
OS3MainFrm.DataGrid.Cells[pos,i] := FloatToStr(X);
end;
end; // next i
end; // next j
end; // if origin checked
OutPutFrm.RichEdit.Lines.Add('WLS REGRESSION RESULTS');
mreg(Noindep, IndepCols, DepCol, RowLabels, Means, Variances, StdDevs,
BWeights, BetaWeights, BStdErrs, Bttests, tprobs, R2, stderrest,
NCases, errorcode, PrintDesc);
OutPutFrm.ShowModal;
end;
cleanup:
IndepCols := nil;
RowLabels := nil;
tprobs := nil;
Bttests := nil;
BStdErrs := nil;
BetaWeights := nil;
BWeights := nil;
StdDevs := nil;
Variances := nil;
Means := nil;
ColNoSelected := nil;
lowConf := nil;
UpConf := nil;
Ypoints := nil;
Xpoints := nil;
// reset the variables for possible second step of WLS
ResetBtnClick(self);
end;
procedure TWLSFrm.DepOutBtnClick(Sender: TObject);
begin
if (DepVarEdit.Text = '') then exit;
VarList.Items.Add(DepVarEdit.Text);
DepVarEdit.Text := '';
DepInBtn.Visible := true;
DepOutBtn.Visible := false;
end;
procedure TWLSFrm.PredictIt(ColNoSelected : IntDyneVec; NoVars : integer;
Means, StdDevs, BetaWeights : DblDyneVec;
StdErrEst : double; NoIndepVars : integer);
VAR
col, i, j, k, Index, IndexX, IndexY : integer;
predicted, zpredicted, z1, z2, resid, Term1, Term2, residsqr : double;
StdErrPredict, t95, Hi95, Low95 : double;
astring : string;
begin
// routine obtains predicted raw and standardized scores and their
// residuals. It is assumed that the dependent variable is last in the
// list of variable column pointers stored in the ColNoSelected vector.
// Get the z predicted score and its residual
col := NoVariables + 1;
// NoVariables := col;
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
DictionaryFrm.DictGrid.ColCount := 8;
DictionaryFrm.NewVar(col);
OS3MainFrm.DataGrid.Cells[col,0] := 'Pred.z';
DictionaryFrm.DictGrid.Cells[1,col] := 'Pred.z';
col := NoVariables + 1;
// NoVariables := col;
DictionaryFrm.NewVar(col);
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
OS3MainFrm.DataGrid.Cells[col,0] := 'z Resid.';
DictionaryFrm.DictGrid.Cells[1,col] := 'z Resid.';
OS3MainFrm.DataGrid.ColCount := OS3MainFrm.DataGrid.ColCount + 2;
for i := 1 to NoCases do
begin
zpredicted := 0.0;
for j := 0 to NoIndepVars - 1 do
begin
k := ColNoSelected[j];
z1 := (StrToFloat(OS3MainFrm.DataGrid.Cells[k,i]) -
Means[j]) / StdDevs[j];
zpredicted := zpredicted + (z1 * BetaWeights[j]);
end;
astring := format('%8.4f',[zpredicted]);
OS3MainFrm.DataGrid.Cells[col-1,i] := astring;
Index := ColNoSelected[NoVars-1];
z2 := StrToFloat(OS3MainFrm.DataGrid.Cells[Index,i]);
z2 := (z2 - Means[NoVars-1]) / StdDevs[NoVars-1]; // z score
astring := format('%8.4f',[z2 - zpredicted]); // z residual
OS3MainFrm.DataGrid.Cells[col,i] := astring;
end;
// Get raw predicted and residuals
col := NoVariables + 1;
// NoVariables := col;
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'Pred.Raw';
OS3MainFrm.DataGrid.Cells[col,0] := 'Pred.Raw';
// calculate raw predicted scores and store in DataGrid at col
for i := 1 to NoCases do
begin // predicted raw obtained from previously predicted z score
predicted := StrToFloat(OS3MainFrm.DataGrid.Cells[col-2,i]) *
StdDevs[NoVars-1] + Means[NoVars-1];
astring := format('%8.3f',[predicted]);
OS3MainFrm.DataGrid.Cells[col,i] := astring;
end;
// Calculate residuals of predicted raw scores end;
col := NoVariables +1;
// NoVariables := col;
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
DictionaryFrm.NewVar(col);
DictionaryFrm.DictGrid.Cells[1,col] := 'Raw Resid.';
OS3MainFrm.DataGrid.Cells[col,0] := 'Raw Resid.';
for i := 1 to NoCases do
begin
Index := ColNoSelected[NoVars-1];
resid := StrToFloat(OS3MainFrm.DataGrid.Cells[col-1,i]) -
StrToFloat(OS3MainFrm.DataGrid.Cells[Index,i]);
astring := format('%8.3f',[resid]);
OS3MainFrm.DataGrid.Cells[col,i] := astring;
end;
// get square of raw residuals
col := NoVariables + 1;
// NoVariables := col;
DictionaryFrm.NewVar(col);
OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables);
DictionaryFrm.DictGrid.Cells[1,col] := 'ResidSqr';
OS3MainFrm.DataGrid.Cells[col,0] := 'ResidSqr';
for i := 1 to NoCases do
begin
residsqr := StrToFloat(OS3MainFrm.DataGrid.Cells[col-1,i]);
residsqr := residsqr * residsqr;
astring := format('%8.3f',[residsqr]);
OS3MainFrm.DataGrid.Cells[col,i] := astring;
end;
end;
procedure TWLSFrm.plotxy(Xpoints, Ypoints, UpConf, LowConf : DblDyneVec;
ConfBand, Xmean, Ymean, R, Slope, Intercept : double;
Xmax, Xmin, Ymax, Ymin : double;
N : integer; XLabel, YLabel : string);
VAR
i, xpos, ypos, hleft, hright, vtop, vbottom, imagewide : integer;
vhi, hwide, offset, strhi, imagehi : integer;
maxval, minval, valincr, Yvalue, Xvalue, value : double;
Title, outline : string;
begin
BlankFrm.Image1.Canvas.Clear;
Title := 'X versus Y PLOT Using File: ' + OS3MainFrm.FileNameEdit.Text;
BlankFrm.Caption := Title;
imagewide := BlankFrm.Image1.Width;
imagehi := BlankFrm.Image1.Height;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
BlankFrm.Image1.Canvas.Rectangle(0,0,imagewide,imagehi);
BlankFrm.Image1.Canvas.FloodFill(0,0,clWhite,fsBorder);
vtop := 20;
vbottom := round(imagehi) - 80;
vhi := vbottom - vtop;
hleft := 100;
hright := imagewide - 80;
hwide := hright - hleft;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
// Draw chart border
BlankFrm.Image1.Canvas.Rectangle(0,0,imagewide,imagehi);
// draw Means
ypos := round(vhi * ( (Ymax - Ymean) / (Ymax - Ymin)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clGreen;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'MEAN ';
Title := Title + YLabel;
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
xpos := round(hwide * ( (Xmean - Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
ypos := vtop;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
ypos := vbottom;
BlankFrm.Image1.Canvas.Pen.Color := clGreen;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'MEAN ';
Title := Title + XLabel;
strhi := BlankFrm.Image1.Canvas.TextWidth(Title);
xpos := xpos - strhi div 2;
ypos := vtop - BlankFrm.Image1.Canvas.TextHeight(Title);
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
// draw slope line
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
Yvalue := (Xpoints[1] * Slope) + Intercept; // predicted score
ypos := round(vhi * ( (Ymax - Yvalue) / (Ymax - Ymin)));
ypos := ypos + vtop;
xpos := round(hwide * ( (Xpoints[1]- Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
Yvalue := (Xpoints[N] * Slope) + Intercept; // predicted score
ypos := round(vhi * ( (Ymax - Yvalue) / (Ymax - Ymin)));
ypos := ypos + vtop;
xpos := round(hwide * ( (Xpoints[N] - Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
// draw horizontal axis
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.MoveTo(hleft,vbottom);
BlankFrm.Image1.Canvas.LineTo(hright,vbottom);
valincr := (Xmax - Xmin) / 10.0;
for i := 1 to 11 do
begin
ypos := vbottom;
Xvalue := Xmin + valincr * (i - 1);
xpos := round(hwide * ((Xvalue - Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
ypos := ypos + 10;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
outline := format('%6.2f',[Xvalue]);
Title := outline;
offset := BlankFrm.Image1.Canvas.TextWidth(Title) div 2;
xpos := xpos - offset;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
xpos := hleft + (hwide div 2) - (BlankFrm.Image1.Canvas.TextWidth(XLabel) div 2);
ypos := vbottom + 20;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,XLabel);
outline := format('R(X,Y) := %5.3f, Slope := %6.2f, Intercept := %6.2f',
[R,Slope,Intercept]);
Title := outline;
xpos := hleft + (hwide div 2) - (BlankFrm.Image1.Canvas.TextWidth(Title) div 2);
ypos := ypos + 15;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
// Draw vertical axis
Title := YLabel;
// xpos := hleft - 10 - BlankFrm.Image1.Canvas.TextWidth(Title) / 2;
xpos := 10;
ypos := vtop - 8 - BlankFrm.Image1.Canvas.TextHeight(Title);
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,YLabel);
xpos := hleft;
ypos := vtop;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
ypos := vbottom;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
valincr := (Ymax - Ymin) / 10.0;
for i := 1 to 11 do
begin
value := Ymax - ((i-1) * valincr);
outline := format('%8.2f',[value]);
Title := outline;
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
xpos := 10;
Yvalue := Ymax - (valincr * (i-1));
ypos := round(vhi * ( (Ymax - Yvalue) / (Ymax - Ymin)));
ypos := ypos + vtop - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
xpos := hleft;
ypos := ypos + strhi div 2;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hleft - 10;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
end;
// draw points for x and y pairs
for i := 1 to N do
begin
ypos := round(vhi * ( (Ymax - Ypoints[i]) / (Ymax - Ymin)));
ypos := ypos + vtop;
xpos := round(hwide * ( (Xpoints[i] - Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.Brush.Color := clNavy;
BlankFrm.Image1.Canvas.Brush.Style := bsSolid;
BlankFrm.Image1.Canvas.Pen.Color := clNavy;
BlankFrm.Image1.Canvas.Ellipse(xpos,ypos,xpos+5,ypos+5);
end;
// draw confidence bands if requested
if not (ConfBand = 0.0) then
begin
BlankFrm.Image1.Canvas.Pen.Color := clRed;
ypos := round(vhi * ((Ymax - UpConf[1]) / (Ymax - Ymin)));
ypos := ypos + vtop;
xpos := round(hwide * ( (Xpoints[1] - Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
for i := 2 to N do
begin
ypos := round(vhi * ((Ymax - UpConf[i]) / (Ymax - Ymin)));
ypos := ypos + vtop;
xpos := round(hwide * ( (Xpoints[i] - Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
end;
ypos := round(vhi * ((Ymax - LowConf[1]) / (Ymax - Ymin)));
ypos := ypos + vtop;
xpos := round(hwide * ( (Xpoints[1] - Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
for i := 2 to N do
begin
ypos := round(vhi * ((Ymax - LowConf[i]) / (Ymax - Ymin)));
ypos := ypos + vtop;
xpos := round(hwide * ( (Xpoints[i] - Xmin) / (Xmax - Xmin)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
end;
end;
end;
initialization
{$I wlsunit.lrs}
end.

View File

@ -0,0 +1,197 @@
object XBarFrm: TXBarFrm
Left = 147
Height = 375
Top = 97
Width = 402
Caption = 'X Bar Charting Specifications'
ClientHeight = 375
ClientWidth = 402
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 8
Height = 14
Top = 8
Width = 90
Caption = 'Selection Variables'
ParentColor = False
end
object Label2: TLabel
Left = 8
Height = 14
Top = 234
Width = 97
Caption = 'Group (Lot) Variable'
ParentColor = False
end
object Label3: TLabel
Left = 8
Height = 14
Top = 280
Width = 107
Caption = 'Measurement Variable'
ParentColor = False
end
object VarList: TListBox
Left = 8
Height = 196
Top = 24
Width = 150
ItemHeight = 0
OnClick = VarListClick
TabOrder = 0
end
object GroupEdit: TEdit
Left = 5
Height = 21
Top = 248
Width = 152
TabOrder = 1
Text = 'GroupEdit'
end
object MeasEdit: TEdit
Left = 8
Height = 21
Top = 296
Width = 153
TabOrder = 2
Text = 'MeasEdit'
end
object SigmaOpts: TRadioGroup
Left = 169
Height = 128
Top = 8
Width = 223
AutoFill = True
Caption = 'No. of Sigma Units for UCL and LCL:'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 110
ClientWidth = 219
Items.Strings = (
'3 Sigma (default)'
'2 Sigma'
'1 Sigma'
'X Sigmas where X = '
)
TabOrder = 3
end
object XSigmaEdit: TEdit
Left = 304
Height = 21
Top = 104
Width = 56
TabOrder = 4
Text = 'XSigmaEdit'
end
object GroupBox1: TGroupBox
Left = 167
Height = 104
Top = 144
Width = 225
Caption = 'Options'
ClientHeight = 86
ClientWidth = 221
TabOrder = 5
object UpSpecChk: TCheckBox
Left = 7
Height = 17
Top = 3
Width = 140
Caption = 'Show Upper Spec. Level:'
TabOrder = 0
end
object LowSpecChk: TCheckBox
Left = 7
Height = 17
Top = 31
Width = 136
Caption = 'Show Lower Spec. Level'
TabOrder = 1
end
object TargetChk: TCheckBox
Left = 7
Height = 17
Top = 55
Width = 136
Caption = 'Use Target Specification'
TabOrder = 2
end
object UpSpecEdit: TEdit
Left = 159
Height = 21
Top = 0
Width = 52
TabOrder = 3
Text = 'UpSpecEdit'
end
end
object LowSpecEdit: TEdit
Left = 328
Height = 21
Top = 184
Width = 52
TabOrder = 6
Text = 'Edit1'
end
object TargetSpecEdit: TEdit
Left = 328
Height = 21
Top = 208
Width = 52
TabOrder = 7
Text = 'Edit1'
end
object ResetBtn: TButton
Left = 91
Height = 29
Top = 328
Width = 70
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 8
end
object CancelBtn: TButton
Left = 169
Height = 29
Top = 328
Width = 70
Caption = 'Cancel'
ModalResult = 2
TabOrder = 9
end
object ComputeBtn: TButton
Left = 248
Height = 29
Top = 328
Width = 70
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 10
end
object ReturnBtn: TButton
Left = 328
Height = 29
Top = 328
Width = 70
Caption = 'Return'
ModalResult = 1
TabOrder = 11
end
object HelpBtn: TButton
Tag = 159
Left = 5
Height = 29
Top = 328
Width = 78
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 12
end
end

View File

@ -0,0 +1,53 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TXBarFrm','FORMDATA',[
'TPF0'#8'TXBarFrm'#7'XBarFrm'#4'Left'#3#147#0#6'Height'#3'w'#1#3'Top'#2'a'#5
+'Width'#3#146#1#7'Caption'#6#29'X Bar Charting Specifications'#12'ClientHeig'
+'ht'#3'w'#1#11'ClientWidth'#3#146#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6
+#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#14#3'Top'#2#8#5'W'
+'idth'#2'Z'#7'Caption'#6#19'Selection Variables'#11'ParentColor'#8#0#0#6'TLa'
+'bel'#6'Label2'#4'Left'#2#8#6'Height'#2#14#3'Top'#3#234#0#5'Width'#2'a'#7'Ca'
+'ption'#6#20'Group (Lot) Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'
+#4'Left'#2#8#6'Height'#2#14#3'Top'#3#24#1#5'Width'#2'k'#7'Caption'#6#20'Meas'
+'urement Variable'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#6
+'Height'#3#196#0#3'Top'#2#24#5'Width'#3#150#0#10'ItemHeight'#2#0#7'OnClick'#7
+#12'VarListClick'#8'TabOrder'#2#0#0#0#5'TEdit'#9'GroupEdit'#4'Left'#2#5#6'He'
+'ight'#2#21#3'Top'#3#248#0#5'Width'#3#152#0#8'TabOrder'#2#1#4'Text'#6#9'Grou'
+'pEdit'#0#0#5'TEdit'#8'MeasEdit'#4'Left'#2#8#6'Height'#2#21#3'Top'#3'('#1#5
+'Width'#3#153#0#8'TabOrder'#2#2#4'Text'#6#8'MeasEdit'#0#0#11'TRadioGroup'#9
+'SigmaOpts'#4'Left'#3#169#0#6'Height'#3#128#0#3'Top'#2#8#5'Width'#3#223#0#8
+'AutoFill'#9#7'Caption'#6'#No. of Sigma Units for UCL and LCL:'#28'ChildSizi'
+'ng.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizin'
+'g.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeV'
+'ertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7
+#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'C'
+'hildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Contr'
+'olsPerLine'#2#1#12'ClientHeight'#2'n'#11'ClientWidth'#3#219#0#13'Items.Stri'
+'ngs'#1#6#17'3 Sigma (default)'#6#7'2 Sigma'#6#7'1 Sigma'#6#20'X Sigmas wher'
+'e X = '#0#8'TabOrder'#2#3#0#0#5'TEdit'#10'XSigmaEdit'#4'Left'#3'0'#1#6'Hei'
+'ght'#2#21#3'Top'#2'h'#5'Width'#2'8'#8'TabOrder'#2#4#4'Text'#6#10'XSigmaEdit'
+#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#3#167#0#6'Height'#2'h'#3'Top'#3#144#0
+#5'Width'#3#225#0#7'Caption'#6#7'Options'#12'ClientHeight'#2'V'#11'ClientWid'
+'th'#3#221#0#8'TabOrder'#2#5#0#9'TCheckBox'#9'UpSpecChk'#4'Left'#2#7#6'Heigh'
+'t'#2#17#3'Top'#2#3#5'Width'#3#140#0#7'Caption'#6#23'Show Upper Spec. Level:'
+#8'TabOrder'#2#0#0#0#9'TCheckBox'#10'LowSpecChk'#4'Left'#2#7#6'Height'#2#17#3
+'Top'#2#31#5'Width'#3#136#0#7'Caption'#6#22'Show Lower Spec. Level'#8'TabOrd'
+'er'#2#1#0#0#9'TCheckBox'#9'TargetChk'#4'Left'#2#7#6'Height'#2#17#3'Top'#2'7'
+#5'Width'#3#136#0#7'Caption'#6#24'Use Target Specification'#8'TabOrder'#2#2#0
+#0#5'TEdit'#10'UpSpecEdit'#4'Left'#3#159#0#6'Height'#2#21#3'Top'#2#0#5'Width'
+#2'4'#8'TabOrder'#2#3#4'Text'#6#10'UpSpecEdit'#0#0#0#5'TEdit'#11'LowSpecEdit'
+#4'Left'#3'H'#1#6'Height'#2#21#3'Top'#3#184#0#5'Width'#2'4'#8'TabOrder'#2#6#4
+'Text'#6#5'Edit1'#0#0#5'TEdit'#14'TargetSpecEdit'#4'Left'#3'H'#1#6'Height'#2
+#21#3'Top'#3#208#0#5'Width'#2'4'#8'TabOrder'#2#7#4'Text'#6#5'Edit1'#0#0#7'TB'
+'utton'#8'ResetBtn'#4'Left'#2'['#6'Height'#2#29#3'Top'#3'H'#1#5'Width'#2'F'#7
+'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#8#0#0#7'TB'
+'utton'#9'CancelBtn'#4'Left'#3#169#0#6'Height'#2#29#3'Top'#3'H'#1#5'Width'#2
+'F'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#9#0#0#7'TButton'
+#10'ComputeBtn'#4'Left'#3#248#0#6'Height'#2#29#3'Top'#3'H'#1#5'Width'#2'F'#7
+'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#10#0#0
+#7'TButton'#9'ReturnBtn'#4'Left'#3'H'#1#6'Height'#2#29#3'Top'#3'H'#1#5'Width'
+#2'F'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#11#0#0#7'TBut'
+'ton'#7'HelpBtn'#3'Tag'#3#159#0#4'Left'#2#5#6'Height'#2#29#3'Top'#3'H'#1#5'W'
+'idth'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2
+#12#0#0#0
]);

View File

@ -0,0 +1,409 @@
unit XBarUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, MainUnit, Globals, contexthelpunit,
DataProcs, Math, OutPutUnit, Buttons, FunctionsLib, GraphLib, BlankFrmUnit;
type
{ TXBarFrm }
TXBarFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
UpSpecEdit: TEdit;
LowSpecEdit: TEdit;
TargetSpecEdit: TEdit;
UpSpecChk: TCheckBox;
LowSpecChk: TCheckBox;
TargetChk: TCheckBox;
GroupBox1: TGroupBox;
XSigmaEdit: TEdit;
GroupEdit: TEdit;
MeasEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
SigmaOpts: TRadioGroup;
VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure VarListClick(Sender: TObject);
private
{ private declarations }
procedure PlotMeans(VAR means : DblDyneVec;
NoGrps : integer;
UCL, LCL, GrandMean : double;
TargetSpec, LowerSpec, UpperSpec : double;
Sender: TObject);
public
{ public declarations }
end;
var
XBarFrm: TXBarFrm;
implementation
{ TXBarFrm }
procedure TXBarFrm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
VarList.Clear;
GroupEdit.Text := '';
MeasEdit.Text := '';
XSigmaEdit.Text := '';
UpSpecEdit.Text := '';
LowSpecEdit.Text := '';
TargetSpecEdit.Text := '';
UpSpecChk.Checked := false;
LowSpecChk.Checked := false;
TargetChk.Checked := false;
SigmaOpts.ItemIndex := 0;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TXBarFrm.VarListClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
if GroupEdit.Text = '' then GroupEdit.Text := VarList.Items.Strings[index]
else MeasEdit.Text := VarList.Items.Strings[index];
end;
procedure TXBarFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TXBarFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TXBarFrm.ComputeBtnClick(Sender: TObject);
var
i, GrpVar, MeasVar, mingrp, maxgrp, G, range : integer;
X, UCL, LCL, Sigma, UpperSpec, LowerSpec, TargetSpec : double;
GrandMean, GrandSD, semean : double;
means, stddev : DblDyneVec;
count : IntDyneVec;
cellstring, outline : string;
ColNoSelected : IntDyneVec;
NoSelected : integer;
begin
SetLength(ColNoSelected,NoVariables);
OutPutFrm.RichEdit.Clear;
GrpVar := 1;
MeasVar := 2;
Sigma := 3.0;
UpperSpec := 0.0;
LowerSpec := 0.0;
TargetSpec := 0.0;
for i := 1 to NoVariables do
begin
cellstring := OS3MainFrm.DataGrid.Cells[i,0];
if cellstring = GroupEdit.Text then GrpVar := i;
if cellstring = MeasEdit.Text then MeasVar := i;
end;
ColNoSelected[0] := MeasVar;
ColNoSelected[1] := GrpVar;
NoSelected := 2;
if UpSpecEdit.Text <> '' then UpperSpec := StrToFloat(UpSpecEdit.Text);
if LowSpecEdit.Text <> '' then LowerSpec := StrToFloat(LowSpecEdit.Text);
if TargetSpecEdit.Text <> '' then TargetSpec := StrToFloat(TargetSpecEdit.Text);
if SigmaOpts.ItemIndex = 3 then
Sigma := StrToFloat(XSigmaEdit.Text);
if SigmaOpts.ItemIndex = 0 then Sigma := 3.0;
if SigmaOpts.ItemIndex = 1 then Sigma := 2.0;
if SigmaOpts.ItemIndex = 2 then Sigma := 1.0;
mingrp := 10000;
maxgrp := -10000;
for i := 1 to NoCases do
begin
if Not GoodRecord(i,NoSelected,ColNoSelected) then continue;
G := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[GrpVar,i])));
if G < mingrp then mingrp := G;
if G > maxgrp then maxgrp := G;
end;
range := maxgrp - mingrp + 1;
SetLength(means,range);
SetLength(count,range);
SetLength(stddev,range);
for i := 0 to range-1 do
begin
count[i] := 0;
means[i] := 0.0;
stddev[i] := 0.0;
end;
semean := 0.0;
GrandMean := 0.0;
// calculate group means, grand mean, group sd's, semeans
for i := 1 to NoCases do
begin
if Not GoodRecord(i,NoSelected,ColNoSelected) then continue;
G := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[GrpVar,i])));
G := G - mingrp + 1;
X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[MeasVar,i]));
means[G-1] := means[G-1] + X;
count[G-1] := count[G-1] + 1;
stddev[G-1] := stddev[G-1] + (X * X);
semean := semean + (X * X);
GrandMean := GrandMean + X;
end;
for i := 0 to range-1 do
begin
stddev[i] := stddev[i] -((means[i] * means[i]) / count[i]);
if count[i] > 1 then
begin
stddev[i] := stddev[i] / (count[i] - 1);
stddev[i] := sqrt(stddev[i]);
end
else stddev[i] := 0.0;
means[i] := means[i] / count[i];
end;
semean := semean - ((GrandMean * GrandMean) / NoCases);
semean := semean / (NoCases - 1);
semean := sqrt(semean);
GrandSD := semean;
semean := semean / sqrt(NoCases);
GrandMean := GrandMean / NoCases;
UCL := GrandMean + (Sigma * semean);
LCL := GrandMean - (Sigma * semean);
// printed results
OutPutFrm.RichEdit.Lines.Add('X Bar Chart Results');
OutPutFrm.RichEdit.Lines.Add('');
OutPutFrm.RichEdit.Lines.Add('Group Size Mean Std.Dev.');
OutPutFrm.RichEdit.Lines.Add('_____ ____ _________ __________');
for i := 0 to range-1 do
begin
outline := format(' %3d %3d %8.2f %8.2f',
[i+1,count[i],means[i],stddev[i]]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
outline := format('Grand Mean = %8.2f, Std.Dev. = %8.3f, Standard Error of Mean = %8.2f',
[GrandMean, GrandSD, semean]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Lower Control Limit = %8.3f, Upper Control Limit = %8.3f',
[LCL, UCL]);
OutPutfrm.RichEdit.Lines.Add(outline);
OutPutFrm.ShowModal;
// show graph
BlankFrm.Show;
PlotMeans(means,range,UCL,LCL,GrandMean,TargetSpec,
LowerSpec, UpperSpec, self);
stddev := nil;
count := nil;
means := nil;
ColNoSelected := nil;
end;
procedure TXBarFrm.PlotMeans(var means: DblDyneVec; NoGrps: integer; UCL, LCL,
GrandMean: double; TargetSpec, LowerSpec, UpperSpec: double; Sender: TObject
);
var
i, xpos, ypos, hleft, hright, vtop, vbottom, imagewide : integer;
vhi, hwide, offset, strhi : integer;
imagehi, maxval, minval, valincr, Yvalue : double;
Title : string;
begin
maxval := -10000.0;
minval := 10000.0;
for i := 0 to NoGrps-1 do
begin
if means[i] > maxval then maxval := means[i];
if means[i] < minval then minval := means[i];
end;
if UCL > maxval then maxval := UCL;
if LCL < minval then minval := LCL;
if UpSpecChk.Checked then
begin
if UpperSpec > maxval then maxval := UpperSpec;
end;
if LowSpecChk.Checked then
begin
if LowerSpec < minval then minval := LowerSpec;
end;
if TargetChk.Checked then
begin
if TargetSpec > maxval then maxval := TargetSpec;
if TargetSpec < minval then minval := TargetSpec;
end;
BlankFrm.Image1.Canvas.Clear;
// BlankFrm.Show;
Title := 'XBAR CHART FOR : ' + OS3MainFrm.FileNameEdit.Text;
BlankFrm.Caption := Title;
imagewide := BlankFrm.Image1.Width;
imagehi := BlankFrm.Image1.Height;
vtop := 20;
vbottom := round(imagehi) - 80;
vhi := vbottom - vtop;
hleft := 100;
hright := imagewide - 80;
hwide := hright - hleft;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
// Draw chart border
BlankFrm.Canvas.Rectangle(hleft,vtop-10,hleft+hwide,vtop+vhi+10);
// draw Grand Mean
ypos := round(vhi * ( (maxval - GrandMean) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'MEAN';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.Brush.Color := clLtGray;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
// draw horizontal axis
BlankFrm.Image1.Canvas.MoveTo(hleft,vbottom + 20);
BlankFrm.Image1.Canvas.LineTo(hright,vbottom + 20);
for i := 1 to NoGrps do
begin
ypos := vbottom + 10;
xpos := round((hwide / NoGrps)* i + hleft);
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
ypos := ypos + 10;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := format('%d',[i]);
offset := BlankFrm.Image1.Canvas.TextWidth(Title) div 2;
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
xpos := xpos - offset;
ypos := ypos + strhi;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
xpos := 10;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,'GROUPS:');
end;
// Draw vertical axis
valincr := (maxval - minval) / 10.0;
for i := 1 to 11 do
begin
Title := format('%8.2f',[maxval - ((i-1)*valincr)]);
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
xpos := 10;
Yvalue := maxval - (valincr * (i-1));
ypos := round(vhi * ( (maxval - Yvalue) / (maxval - minval)));
ypos := ypos + vtop - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
// draw lines for means of the groups
ypos := round(vhi * ( (maxval - means[0]) / (maxval - minval)));
ypos := ypos + vtop;
xpos := round((hwide / NoGrps) + hleft);
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
for i := 2 to NoGrps do
begin
ypos := round(vhi * ( (maxval - means[i-1]) / (maxval - minval)));
ypos := ypos + vtop;
xpos := round((hwide / NoGrps)* i + hleft);
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
end;
// Draw upper and lower confidence intervals
ypos := round(vhi * ( (maxval - UCL) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'UCL';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
ypos := round(vhi * ( (maxval - LCL) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'LCL';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
// Draw lines for specified values
if UpSpecChk.Checked then
begin
ypos := round(vhi * ( (maxval - UpperSpec) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clGreen;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'UPPER SPEC';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
if LowSpecChk.Checked then
begin
ypos := round(vhi * ( (maxval - LowerSpec) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clGreen;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'LOWER SPEC';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
if TargetChk.Checked then
begin
ypos := round(vhi * ( (maxval - TargetSpec) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clBlue;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'TARGET';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
end;
initialization
{$I xbarunit.lrs}
end.

View File

@ -0,0 +1,336 @@
object XvsMultYForm: TXvsMultYForm
Left = 288
Height = 589
Top = 117
Width = 423
Caption = 'X vs Multiple Y Plot'
ClientHeight = 589
ClientWidth = 423
OnShow = ResetBtnClick
LCLVersion = '0.9.30'
object Memo1: TMemo
Left = 8
Height = 113
Top = 7
Width = 402
Lines.Strings = (
'Directions: '
'1. Select the X variable common to all of the Y variables to be'
'selected.'
'2. Select the Y variables.'
'3. Enter a label for the plot.'
'4. Select the options desired.'
'5. Click the Compute button to obtain results.'
)
TabOrder = 0
end
object Label1: TLabel
Left = 10
Height = 16
Top = 136
Width = 51
Caption = 'Variables:'
ParentColor = False
end
object VarList: TListBox
Left = 11
Height = 292
Top = 155
Width = 174
ItemHeight = 0
TabOrder = 1
end
object XInBtn: TBitBtn
Left = 200
Height = 39
Top = 155
Width = 38
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = XInBtnClick
TabOrder = 2
end
object XOutBtn: TBitBtn
Left = 200
Height = 39
Top = 203
Width = 38
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = XOutBtnClick
TabOrder = 3
end
object YInBtn: TBitBtn
Left = 200
Height = 39
Top = 256
Width = 38
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE
6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580
3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3
71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7
74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7
74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = YInBtnClick
TabOrder = 4
end
object YOutBtn: TBitBtn
Left = 200
Height = 39
Top = 304
Width = 38
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580
3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3
71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6
89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7
74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA
90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF
FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799
4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 0
OnClick = YOutBtnClick
TabOrder = 5
end
object Label2: TLabel
Left = 251
Height = 16
Top = 154
Width = 56
Caption = 'X Variable:'
ParentColor = False
end
object Label3: TLabel
Left = 249
Height = 16
Top = 259
Width = 66
Caption = 'Y Variable(s)'
ParentColor = False
end
object XEdit: TEdit
Left = 250
Height = 23
Top = 178
Width = 160
TabOrder = 6
Text = 'XEdit'
end
object YBox: TListBox
Left = 251
Height = 174
Top = 273
Width = 159
ItemHeight = 0
TabOrder = 7
end
object Label4: TLabel
Left = 12
Height = 16
Top = 462
Width = 51
Caption = 'Plot Title:'
ParentColor = False
end
object PlotTitleEdit: TEdit
Left = 68
Height = 23
Top = 459
Width = 342
TabOrder = 8
Text = 'PlotTitleEdit'
end
object CancelBtn: TButton
Left = 201
Height = 26
Top = 499
Width = 72
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 9
end
object ResetBtn: TButton
Left = 312
Height = 26
Top = 499
Width = 72
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 10
end
object ComputeBtn: TButton
Left = 201
Height = 26
Top = 544
Width = 72
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 11
end
object ReturnBtn: TButton
Left = 312
Height = 26
Top = 544
Width = 72
Caption = 'Return'
ModalResult = 1
TabOrder = 12
end
object GroupBox1: TGroupBox
Left = 8
Height = 72
Top = 495
Width = 173
Caption = 'Options'
ClientHeight = 54
ClientWidth = 169
TabOrder = 13
object DescChk: TCheckBox
Left = 8
Height = 19
Top = 6
Width = 127
Caption = 'Descriptive Statistics'
Checked = True
State = cbChecked
TabOrder = 0
end
object LinesBox: TCheckBox
Left = 5
Height = 19
Top = 37
Width = 157
Caption = 'Connect Points with Lines'
TabOrder = 1
end
end
end

View File

@ -0,0 +1,247 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TXvsMultYForm','FORMDATA',[
'TPF0'#13'TXvsMultYForm'#12'XvsMultYForm'#4'Left'#3' '#1#6'Height'#3'M'#2#3'T'
+'op'#2'u'#5'Width'#3#167#1#7'Caption'#6#20'X vs Multiple Y Plot'#12'ClientHe'
+'ight'#3'M'#2#11'ClientWidth'#3#167#1#6'OnShow'#7#13'ResetBtnClick'#10'LCLVe'
+'rsion'#6#6'0.9.30'#0#5'TMemo'#5'Memo1'#4'Left'#2#8#6'Height'#2'q'#3'Top'#2#7
+#5'Width'#3#146#1#13'Lines.Strings'#1#6#13'Directions: '#6'A1. Select the'
+' X variable common to all of the Y variables to be'#6#9'selected.'#6#28'2. '
+' Select the Y variables.'#6' 3. Enter a label for the plot.'#6' 4. Sel'
+'ect the options desired.'#6'05. Click the Compute button to obtain result'
+'s.'#0#8'TabOrder'#2#0#0#0#6'TLabel'#6'Label1'#4'Left'#2#10#6'Height'#2#16#3
+'Top'#3#136#0#5'Width'#2'3'#7'Caption'#6#10'Variables:'#11'ParentColor'#8#0#0
+#8'TListBox'#7'VarList'#4'Left'#2#11#6'Height'#3'$'#1#3'Top'#3#155#0#5'Width'
+#3#174#0#10'ItemHeight'#2#0#8'TabOrder'#2#1#0#0#7'TBitBtn'#6'XInBtn'#4'Left'
+#3#200#0#6'Height'#2''''#3'Top'#3#155#0#5'Width'#2'&'#10'Glyph.Data'#10':'#4
+#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0
+#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'
+#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'
+#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255
+#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211
+#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130
+#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'
+#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171
+#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204
+#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'
+#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255
+'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161
+'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'XInBtnClick'#8'TabOrde'
+'r'#2#2#0#0#7'TBitBtn'#7'XOutBtn'#4'Left'#3#200#0#6'Height'#2''''#3'Top'#3
,#203#0#5'Width'#2'&'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0
+'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0
+#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'
+#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161
+'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131
+#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/'
+'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'
+#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255
+#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132
+#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255
+#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154
+#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255
+#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201
+#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'
+#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num'
+'Glyphs'#2#0#7'OnClick'#7#12'XOutBtnClick'#8'TabOrder'#2#3#0#0#7'TBitBtn'#6
+'YInBtn'#4'Left'#3#200#0#6'Height'#2''''#3'Top'#3#0#1#5'Width'#2'&'#10'Glyph'
+'.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16
+#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184
+#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177
+'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255
+'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255
+#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255
+#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142
+#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'
+#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162
+#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255
+#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130
+#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199
+'t'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255
+'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'
+#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'YInBtnClick'#8
+'TabOrder'#2#4#0#0#7'TBitBtn'#7'YOutBtn'#4'Left'#3#200#0#6'Height'#2''''#3'T'
+'op'#3'0'#1#5'Width'#2'&'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0
+#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'
+#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'
+#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161
+'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131
+#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/'
+'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'
+#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255
+#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132
,#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255
+#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154
+#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255
+#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255
+#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201
+#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'
+#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255
+#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num'
+'Glyphs'#2#0#7'OnClick'#7#12'YOutBtnClick'#8'TabOrder'#2#5#0#0#6'TLabel'#6'L'
+'abel2'#4'Left'#3#251#0#6'Height'#2#16#3'Top'#3#154#0#5'Width'#2'8'#7'Captio'
+'n'#6#11'X Variable:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#249
+#0#6'Height'#2#16#3'Top'#3#3#1#5'Width'#2'B'#7'Caption'#6#13'Y Variable(s)'
+#11'ParentColor'#8#0#0#5'TEdit'#5'XEdit'#4'Left'#3#250#0#6'Height'#2#23#3'To'
+'p'#3#178#0#5'Width'#3#160#0#8'TabOrder'#2#6#4'Text'#6#5'XEdit'#0#0#8'TListB'
+'ox'#4'YBox'#4'Left'#3#251#0#6'Height'#3#174#0#3'Top'#3#17#1#5'Width'#3#159#0
+#10'ItemHeight'#2#0#8'TabOrder'#2#7#0#0#6'TLabel'#6'Label4'#4'Left'#2#12#6'H'
+'eight'#2#16#3'Top'#3#206#1#5'Width'#2'3'#7'Caption'#6#11'Plot Title:'#11'Pa'
+'rentColor'#8#0#0#5'TEdit'#13'PlotTitleEdit'#4'Left'#2'D'#6'Height'#2#23#3'T'
+'op'#3#203#1#5'Width'#3'V'#1#8'TabOrder'#2#8#4'Text'#6#13'PlotTitleEdit'#0#0
+#7'TButton'#9'CancelBtn'#4'Left'#3#201#0#6'Height'#2#26#3'Top'#3#243#1#5'Wid'
+'th'#2'H'#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'
+#2#9#0#0#7'TButton'#8'ResetBtn'#4'Left'#3'8'#1#6'Height'#2#26#3'Top'#3#243#1
+#5'Width'#2'H'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrd'
+'er'#2#10#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#201#0#6'Height'#2#26#3'Top'
+#3' '#2#5'Width'#2'H'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClic'
+'k'#8'TabOrder'#2#11#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'8'#1#6'Height'#2
+#26#3'Top'#3' '#2#5'Width'#2'H'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8
+'TabOrder'#2#12#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#8#6'Height'#2'H'#3'T'
+'op'#3#239#1#5'Width'#3#173#0#7'Caption'#6#7'Options'#12'ClientHeight'#2'6'
+#11'ClientWidth'#3#169#0#8'TabOrder'#2#13#0#9'TCheckBox'#7'DescChk'#4'Left'#2
+#8#6'Height'#2#19#3'Top'#2#6#5'Width'#2#127#7'Caption'#6#22'Descriptive Stat'
+'istics'#7'Checked'#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#0#0#0#9'TCheckBo'
+'x'#8'LinesBox'#4'Left'#2#5#6'Height'#2#19#3'Top'#2'%'#5'Width'#3#157#0#7'Ca'
+'ption'#6#25'Connect Points with Lines'#8'TabOrder'#2#1#0#0#0#0
]);

View File

@ -0,0 +1,361 @@
unit XvsMultYUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, ExtCtrls, MainUnit, Globals, Math, OutPutUnit,
FunctionsLib, DataProcs, BlankFrmUnit, Printers, MatrixLib;
type
{ TXvsMultYForm }
TXvsMultYForm = class(TForm)
CancelBtn: TButton;
LinesBox: TCheckBox;
DescChk: TCheckBox;
GroupBox1: TGroupBox;
ResetBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
PlotTitleEdit: TEdit;
Label4: TLabel;
YBox: TListBox;
XEdit: TEdit;
Label2: TLabel;
Label3: TLabel;
XInBtn: TBitBtn;
YInBtn: TBitBtn;
Label1: TLabel;
XOutBtn: TBitBtn;
YOutBtn: TBitBtn;
VarList: TListBox;
Memo1: TMemo;
procedure ComputeBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
procedure XInBtnClick(Sender: TObject);
procedure XOutBtnClick(Sender: TObject);
procedure YInBtnClick(Sender: TObject);
procedure YOutBtnClick(Sender: TObject);
private
{ private declarations }
selected : IntDyneVec;
procedure plotxy(XValues : DblDyneVec; YValues : DblDyneMat; MaxX, MinX,
MaxY, MinY : double; N, NoY : integer);
public
{ public declarations }
end;
var
XvsMultYForm: TXvsMultYForm;
implementation
{ TXvsMultYForm }
procedure TXvsMultYForm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
VarList.Clear;
YBox.Clear;
XEdit.Clear;
XInBtn.Visible := true;
XOutBtn.Visible := false;
YInBtn.Visible := true;
YOutBtn.Visible := false;
PlotTitleEdit.Text := '';
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TXvsMultYForm.ComputeBtnClick(Sender: TObject);
VAR
i, j, k, N, NoY, XCol, NoSelecte, result, intvalue, NoSelected : integer;
YValues, RMatrix : DblDyneMat;
XValues, Means, Variances, StdDevs : DblDyneVec;
MinX, MaxX, MinY, MaxY, temp, dblvalue : double;
cellstring, strvalue, Title : string;
errorcode : boolean;
Ncases : integer;
RowLabels, ColLabels : StrDyneVec;
begin
NoY := YBox.Items.Count;
MaxX := -10000;
MinX := 10000;
MaxY := -1000;
MinY := 1000;
N := 0;
SetLength(selected,NoY + 1);
SetLength(RowLabels,NoVariables);
SetLength(ColLabels,NoVariables);
for i := 1 to NoVariables do
if Trim(XEdit.Text) = Trim(OS3MainFrm.DataGrid.Cells[i,0]) then XCol := i;
for j := 0 to NoY-1 do
begin
for i := 1 to NoVariables do
if Trim(YBox.Items.Strings[j]) = Trim(OS3MainFrm.DataGrid.Cells[i,0]) then
selected[j] := i;
end;
selected[NoY] := XCol;
NoSelected := NoY + 1;
for i := 0 to NoSelected-1 do
begin
RowLabels[i] := Trim(OS3MainFrm.DataGrid.Cells[i+1,0]);
ColLabels[i] := RowLabels[i];
end;
OutPutFrm.RichEdit.Clear;
OutPutFrm.RichEdit.Lines.Add('X VERSUS MULTIPLE Y VALUES PLOT');
OutPutFrm.RichEdit.Lines.Add('');
SetLength(YValues,NoCases+1,NoY+1);
SetLength(XValues,NoCases+1);
SetLength(Means,NoSelected+1);
SetLength(Variances,NoSelected+1);
SetLength(StdDevs,NoSelected+1);
SetLength(RMatrix,NoSelected+1,NoSelected+1);
SetLength(selected,NoVariables);
for i := 0 to NoSelected - 1 do
begin
Means[i] := 0.0;
StdDevs[i] := 0.0;
For j := 0 to NoSelected-1 do RMatrix[i,j] := 0.0;
end;
for i := 1 to NoCases do
begin
if not GoodRecord(i,NoSelected,selected) then continue;
XValues[i] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[XCol,i]));
if XValues[i] > MaxX then MaxX := XValues[i];
if XValues[i] < MinX then MinX := XValues[i];
for j := 0 to NoY - 1 do
begin
YValues[i-1,j] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[selected[j],i]));
if YValues[i-1,j] > MaxY then MaxY := YValues[i-1,j];
if YValues[i-1,j] < MinY then MinY := YValues[i-1,j];
end;
end;
// get descriptive data
if DescChk.Checked then
begin
Correlations(NoSelected,selected,RMatrix,Means,Variances,StdDevs,errorcode,Ncases);
N := Ncases;
Title := 'CORRELATIONS';
MAT_PRINT(RMatrix,NoSelected,NoSelected,Title,RowLabels,ColLabels,N);
Title := 'Means';
DynVectorPrint(Means,NoSelected,Title,RowLabels,N);
Title := 'Variances';
DynVectorPrint(Variances,NoSelected,Title,RowLabels,N);
Title := 'Standard Deviations';
DynVectorPrint(StdDevs,NoSelected,Title,RowLabels,N);
end;
OutPutFrm.ShowModal;
// sort on X
for i := 0 to N-2 do
begin
for j := i+1 to N-1 do
begin
if XValues[i] > XValues[j] then // swap
begin
temp := XValues[i];
XValues[i] := XValues[j];
XValues[j] := temp;
for k := 0 to NoY-1 do
begin
temp := YValues[i,k];
YValues[i,k] := YValues[j,k];
YValues[j,k] := temp;
end;
end;
end;
end;
plotxy(XValues, YValues, MaxX, MinX, MaxY, MinY, N, NoY);
// clean up
RMatrix := nil;
StdDevs := nil;
Variances := nil;
Means := nil;
XValues := nil;
YValues := nil;
selected := nil;
ColLabels := nil;
RowLabels := nil;
end;
procedure TXvsMultYForm.XInBtnClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
if index < 0 then exit;
XEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
XInBtn.Visible := false;
XOutBtn.Visible := true;
end;
procedure TXvsMultYForm.XOutBtnClick(Sender: TObject);
begin
VarList.Items.Add(XEdit.Text);
XEdit.Text := '';
XOutBtn.Visible := false;
XInBtn.Visible := true;
end;
procedure TXvsMultYForm.YInBtnClick(Sender: TObject);
VAR i, index : integer;
begin
index := VarList.Items.Count;
i := 0;
while i < index do
begin
if VarList.Selected[i] then
begin
YBox.Items.Add(VarList.Items.Strings[i]);
VarList.Items.Delete(i);
index := index - 1;
end
else i := i + 1;
end;
YOutBtn.Visible := true;
end;
procedure TXvsMultYForm.YOutBtnClick(Sender: TObject);
VAR index : integer;
begin
index := YBox.ItemIndex;
if index < 0 then exit;
VarList.Items.Add(YBox.Items.Strings[index]);
YBox.Items.Delete(index);
if YBox.Items.Count = 0 then YOutBtn.Visible := false;
end;
procedure TXvsMultYForm.plotxy(XValues : DblDyneVec; YValues : DblDyneMat; MaxX, MinX,
MaxY, MinY : double; N, NoY : integer);
VAR
i,j,xpos,ypos,hleft,hright,vtop,vbottom, imagewide : integer;
vhi, hwide, offset, strhi, imagehi : integer;
maxval, minval, valincr, Yvalue, Xvalue : double;
Title : string;
outline : string;
Colors : array[0..11] of integer;
begin
// routine to plot X versus multiple Y values
BlankFrm.Image1.Canvas.Clear;
BlankFrm.Show;
Colors[1] := clRed;
Colors[2] := clBlue;
Colors[3] := clGreen;
Colors[4] := clNavy;
Colors[5] := clTeal;
Colors[6] := clAqua;
Colors[7] := ClLime;
Colors[8] := clFuchsia;
Colors[9] := clGray;
Colors[10] := clPurple;
Colors[11] := clOlive;
Colors[0] := clMaroon;
imagewide := BlankFrm.Image1.Width;
imagehi := BlankFrm.Image1.Height;
BlankFrm.Image1.Canvas.FloodFill(0,0,clWhite,fsBorder);
vtop := 20;
vbottom := round(imagehi) - 80;
vhi := vbottom - vtop;
hleft := 100;
hright := imagewide - 80;
hwide := hright - hleft;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
// draw chart border
BlankFrm.Image1.Canvas.Rectangle(0,0,imagewide,imagehi);
// draw horizontal axis
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.MoveTo(hleft,vbottom);
BlankFrm.Image1.Canvas.LineTo(hright,vbottom);
valincr := (maxX - minX) / 10.0;
for i := 1 to 11 do
begin
ypos := vbottom;
Xvalue := minX + valincr * (i - 1);
xpos := round(hwide * ((Xvalue - minX) / (maxX - minX)));
xpos := xpos + hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
ypos := ypos + 10;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := format('%6.2f',[Xvalue]);
offset := BlankFrm.Image1.Canvas.TextWidth(Title) div 2;
xpos := xpos - offset;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
xpos := hleft + (hwide div 2) - (BlankFrm.Image1.Canvas.TextWidth(XEdit.Text) div 2);
ypos := vbottom + 20;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,XEdit.Text);
// draw vertical axis
Title := 'Y VALUES';
xpos := hleft - BlankFrm.Image1.Canvas.TextWidth(Title) div 2;
ypos := vtop - BlankFrm.Image1.Canvas.TextHeight(Title);
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
xpos := hleft;
ypos := vtop;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
ypos := vbottom;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
valincr := (maxY - minY) / 10.0;
for i := 1 to 11 do
begin
Title := format('%8.2f',[maxY - ((i-1)*valincr)]);
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
xpos := 10;
Yvalue := maxY - (valincr * (i-1));
ypos := round(vhi * ( (maxY - Yvalue) / (maxY - minY)));
ypos := ypos + vtop - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
xpos := hleft;
ypos := ypos + strhi div 2;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hleft - 10;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
end;
// draw points for x and y pairs
for j := 0 to NoY-1 do
begin
BlankFrm.Image1.Canvas.Brush.Style := bsSolid;
BlankFrm.Image1.Canvas.Brush.Color := Colors[j];
BlankFrm.Image1.Canvas.Pen.Color := Colors[j];
Title := Trim(OS3MainFrm.DataGrid.Cells[selected[j],0]);
for i := 1 to N do
begin
ypos := round(vhi * ( (maxY - YValues[i-1,j]) / (maxY - minY)));
ypos := ypos + vtop;
xpos := round(hwide * ( (XValues[i-1]-minX) / (maxX - minX)));
xpos := xpos + hleft;
if xpos < hleft then xpos := hleft;
if i = 1 then BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
if LinesBox.Checked then BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
BlankFrm.Image1.Canvas.Ellipse(xpos,ypos,xpos+5,ypos+5);
end;
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
xpos := hwide + hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos-strhi);
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
Title := PlotTitleEdit.Text;
BlankFrm.Caption := Title;
end;
initialization
{$I xvsmultyunit.lrs}
end.