LazStats: Add original sources, part 4

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7875 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-11-16 10:24:18 +00:00
parent ea982b8d0f
commit ec12bae971
29 changed files with 10026 additions and 0 deletions

View File

@ -0,0 +1,71 @@
unit DataUnit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, Grids, OutPutUnit, Globals;
procedure GetFileData(VAR FName : string);
procedure Allocations;
procedure DeAllocations;
implementation
uses LinPro;
procedure GetFileData(VAR FName : string);
var
F : TextFile;
i, j : integer;
begin
LinProFrm.OpenDialog1.DefaultExt := 'LPR';
LinProFrm.OpenDialog1.Filter := 'Linear Programming File (*.LPR)|*.LPR|All Files (*.*)|*.*';
LinProFrm.OpenDialog1.FilterIndex := 1;
if LinProFrm.OpenDialog1.Execute then
begin
FName := LinProFrm.OpenDialog1.FileName;
AssignFile(F,FName);
Reset(F);
readln(F,LinProFrm.NoVars);
readln(F,LinProFrm.NoMax);
readln(F,LinProFrm.NoMin);
readln(F,LinProFrm.NoEql);
readln(F,LinProFrm.MinMax);
LinProFrm.NoCoefs := LinProFrm.NoMax + LinProFrm.NoMin + LinProFrm.NoEql;
Alloc;
for i := 1 to LinProFrm.NoVars do readln(F,LinProFrm.Objective[i]);
for i := 1 to LinProFrm.NoMax do readln(F,LinProFrm.MaxConstraints[i]);
for i := 1 to LinProFrm.NoMin do readln(F,LinProFrm.MinConstraints[i]);
for i := 1 to LinProFrm.NoEql do readln(F,LinProFrm.EqlConstraints[i]);
for i := 1 to LinProFrm.NoCoefs do
for j := 1 to LinProFrm.NoVars do readln(F,LinProFrm.Coefficients[i,j]);
CloseFile(F);
end;
end;
//-------------------------------------------------------------------
procedure Allocations;
begin
SetLength(LinProFrm.Objective,LinProFrm.NoVars + 1);
SetLength(LinProFrm.MaxConstraints,LinProFrm.NoMax + 1);
SetLength(LinProFrm.MinConstraints,LinProFrm.NoMin + 1);
SetLength(LinProFrm.EqlConstraints,LinProFrm.NoEql+1);
SetLength(LinProFrm.Coefficients,LinProFrm.NoCoefs+1,LinProFrm.NoVars+1);
end;
//-------------------------------------------------------------------
procedure DeAllocations;
begin
// cleanup
LinProFrm.Coefficients := nil;
LinProFrm.EqlConstraints := nil;
LinProFrm.MinConstraints := nil;
LinProFrm.MaxConstraints := nil;
LinProFrm.Objective := nil;
end;
//-------------------------------------------------------------------
end.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,422 @@
object DIFfrm: TDIFfrm
Left = 62
Top = 100
Width = 486
Height = 466
HelpContext = 1210
Caption = 'DIF Specifications'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
HelpFile = 'OS2Help.hlp'
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 112
Width = 89
Height = 13
Caption = 'Available Variables'
end
object Label2: TLabel
Left = 200
Top = 112
Width = 70
Height = 13
Caption = 'Items Selected'
end
object Label3: TLabel
Left = 200
Top = 264
Width = 84
Height = 13
Caption = 'Grouping Variable'
end
object Label4: TLabel
Left = 200
Top = 328
Width = 110
Height = 13
Caption = 'Reference group code:'
end
object Label5: TLabel
Left = 200
Top = 352
Width = 89
Height = 13
Caption = 'Focal Group Code:'
end
object Label6: TLabel
Left = 200
Top = 376
Width = 94
Height = 13
Caption = 'No. of Score Levels'
end
object Label7: TLabel
Left = 352
Top = 288
Width = 108
Height = 13
Caption = 'Enter bounds for levels'
end
object Label8: TLabel
Left = 352
Top = 352
Width = 66
Height = 13
Caption = 'Lower Bound:'
end
object Label9: TLabel
Left = 352
Top = 376
Width = 66
Height = 13
Caption = 'Upper Bound:'
end
object Label10: TLabel
Left = 352
Top = 304
Width = 28
Height = 13
Caption = 'Down'
end
object Label11: TLabel
Left = 416
Top = 304
Width = 14
Height = 13
Caption = 'Up'
end
object Label12: TLabel
Left = 440
Top = 304
Width = 26
Height = 13
Caption = 'Level'
end
object Memo1: TMemo
Left = 8
Top = 0
Width = 457
Height = 105
Lines.Strings = (
'This procedure is an adaptation of the program written by Niels ' +
'G. Waller, Dept. of Psychology,'
'University of California - Davis, Jan. 1998. It'#39's purpose is to' +
' identify test items that differ in the '
'response pattern for two groups: a reference group and a focal g' +
'roup. The file of data to be '
'analyzed should consist of a variable containing a code designat' +
'ing the two groups and '
'variables containing subject'#39's item responses coded 0 for incorr' +
'ect and 1 for correct. No '
'missing data may be included. The results provide the Mantel-Ha' +
'enszel statistics for identifying '
'those items which are different for the two groups.')
TabOrder = 0
end
object VarList: TListBox
Left = 8
Top = 128
Width = 137
Height = 249
ItemHeight = 13
MultiSelect = True
TabOrder = 1
end
object ItemInBtn: TBitBtn
Left = 160
Top = 152
Width = 25
Height = 25
TabOrder = 2
OnClick = ItemInBtnClick
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
3333333333333333333333333333333333333333333333333333333333333333
3333333333333333333333333333333333333333333FF3333333333333003333
3333333333773FF3333333333309003333333333337F773FF333333333099900
33333FFFFF7F33773FF30000000999990033777777733333773F099999999999
99007FFFFFFF33333F7700000009999900337777777F333F7733333333099900
33333333337F3F77333333333309003333333333337F77333333333333003333
3333333333773333333333333333333333333333333333333333333333333333
3333333333333333333333333333333333333333333333333333}
NumGlyphs = 2
end
object ItemOutBtn: TBitBtn
Left = 160
Top = 184
Width = 25
Height = 25
TabOrder = 3
OnClick = ItemOutBtnClick
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
3333333333333333333333333333333333333333333333333333333333333333
3333333333333FF3333333333333003333333333333F77F33333333333009033
333333333F7737F333333333009990333333333F773337FFFFFF330099999000
00003F773333377777770099999999999990773FF33333FFFFF7330099999000
000033773FF33777777733330099903333333333773FF7F33333333333009033
33333333337737F3333333333333003333333333333377333333333333333333
3333333333333333333333333333333333333333333333333333333333333333
3333333333333333333333333333333333333333333333333333}
NumGlyphs = 2
end
object AllBtn: TBitBtn
Left = 160
Top = 216
Width = 25
Height = 25
Caption = 'ALL'
TabOrder = 4
OnClick = AllBtnClick
end
object GrpInBtn: TBitBtn
Left = 160
Top = 264
Width = 25
Height = 25
TabOrder = 5
OnClick = GrpInBtnClick
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
3333333333333333333333333333333333333333333333333333333333333333
3333333333333333333333333333333333333333333FF3333333333333003333
3333333333773FF3333333333309003333333333337F773FF333333333099900
33333FFFFF7F33773FF30000000999990033777777733333773F099999999999
99007FFFFFFF33333F7700000009999900337777777F333F7733333333099900
33333333337F3F77333333333309003333333333337F77333333333333003333
3333333333773333333333333333333333333333333333333333333333333333
3333333333333333333333333333333333333333333333333333}
NumGlyphs = 2
end
object GrpOutBtn: TBitBtn
Left = 160
Top = 296
Width = 25
Height = 25
TabOrder = 6
Glyph.Data = {
76010000424D7601000000000000760000002800000020000000100000000100
04000000000000010000120B0000120B00001000000000000000000000000000
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
3333333333333333333333333333333333333333333333333333333333333333
3333333333333FF3333333333333003333333333333F77F33333333333009033
333333333F7737F333333333009990333333333F773337FFFFFF330099999000
00003F773333377777770099999999999990773FF33333FFFFF7330099999000
000033773FF33777777733330099903333333333773FF7F33333333333009033
33333333337737F3333333333333003333333333333377333333333333333333
3333333333333333333333333333333333333333333333333333333333333333
3333333333333333333333333333333333333333333333333333}
NumGlyphs = 2
end
object GroupVarEdit: TEdit
Left = 200
Top = 280
Width = 137
Height = 21
TabOrder = 7
Text = 'GroupVarEdit'
end
object ItemsList: TListBox
Left = 200
Top = 128
Width = 137
Height = 121
ItemHeight = 13
TabOrder = 8
end
object RefGrpEdit: TEdit
Left = 312
Top = 320
Width = 25
Height = 21
TabOrder = 9
Text = 'RefGrpEdit'
end
object TrgtGrpEdit: TEdit
Left = 312
Top = 344
Width = 25
Height = 21
TabOrder = 10
Text = 'TrgtGrpEdit'
end
object ResetBtn: TButton
Left = 8
Top = 408
Width = 65
Height = 25
Caption = 'Reset'
TabOrder = 11
OnClick = ResetBtnClick
end
object ComputeBtn: TButton
Left = 208
Top = 408
Width = 65
Height = 25
Caption = 'Compute'
TabOrder = 12
OnClick = ComputeBtnClick
end
object ReturnBtn: TButton
Left = 400
Top = 408
Width = 65
Height = 25
Caption = 'Return'
ModalResult = 1
TabOrder = 13
OnClick = ReturnBtnClick
end
object GroupBox1: TGroupBox
Left = 352
Top = 112
Width = 113
Height = 169
Caption = 'Options'
TabOrder = 14
object ItemStatsChk: TCheckBox
Left = 8
Top = 16
Width = 89
Height = 17
Caption = 'Item Statistics'
Checked = True
State = cbChecked
TabOrder = 0
end
object TestStatsChk: TCheckBox
Left = 8
Top = 32
Width = 89
Height = 17
Caption = 'Test Statistics'
TabOrder = 1
end
object ItemCorrsChk: TCheckBox
Left = 8
Top = 48
Width = 97
Height = 17
Caption = 'Item Intercorr.s'
TabOrder = 2
end
object ItemTestChk: TCheckBox
Left = 8
Top = 64
Width = 89
Height = 17
Caption = 'Item-Test cor.s'
TabOrder = 3
end
object AlphaChk: TCheckBox
Left = 8
Top = 80
Width = 97
Height = 17
Caption = 'Alpha Reliability'
TabOrder = 4
end
object LogisticChk: TCheckBox
Left = 8
Top = 112
Width = 97
Height = 17
Caption = 'Logistic Regres.'
Enabled = False
TabOrder = 5
end
object MHChk: TCheckBox
Left = 8
Top = 96
Width = 97
Height = 17
Caption = 'Mantel-Haenszel'
Checked = True
State = cbChecked
TabOrder = 6
end
object CurvesChk: TCheckBox
Left = 8
Top = 128
Width = 97
Height = 17
Caption = 'Item Char. Crvs.'
TabOrder = 7
end
object CountsChk: TCheckBox
Left = 8
Top = 144
Width = 97
Height = 17
Caption = 'Level Counts'
TabOrder = 8
end
end
object LevelsEdit: TEdit
Left = 312
Top = 368
Width = 25
Height = 21
TabOrder = 15
OnExit = LevelsEditExit
end
object LevelNoEdit: TEdit
Left = 440
Top = 320
Width = 25
Height = 21
TabOrder = 16
Text = '1'
end
object LowBoundEdit: TEdit
Left = 440
Top = 344
Width = 25
Height = 21
TabOrder = 17
OnExit = LowBoundEditExit
end
object UpBoundEdit: TEdit
Left = 440
Top = 368
Width = 25
Height = 21
TabOrder = 18
OnExit = UpBoundEditExit
end
object LevelScroll: TScrollBar
Left = 352
Top = 320
Width = 81
Height = 19
Min = 1
PageSize = 0
Position = 1
TabOrder = 19
OnScroll = LevelScrollScroll
end
end

View File

@ -0,0 +1,127 @@
LazarusResources.Add('TDIFfrm','FORMDATA',[
'TPF0'#7'TDIFfrm'#6'DIFfrm'#4'Left'#2'>'#3'Top'#2'd'#5'Width'#3#230#1#6'Heigh'
+'t'#3#210#1#11'HelpContext'#3#186#4#7'Caption'#6#18'DIF Specifications'#5'Co'
+'lor'#7#9'clBtnFace'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'#7
+#12'clWindowText'#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans Serif'#10
+'Font.Style'#11#0#8'HelpFile'#6#11'OS2Help.hlp'#6'OnShow'#7#8'FormShow'#13'P'
+'ixelsPerInch'#2'`'#10'TextHeight'#2#13#0#6'TLabel'#6'Label1'#4'Left'#2#8#3
+'Top'#2'p'#5'Width'#2'Y'#6'Height'#2#13#7'Caption'#6#19'Available Variables'
+#0#0#6'TLabel'#6'Label2'#4'Left'#3#200#0#3'Top'#2'p'#5'Width'#2'F'#6'Height'
+#2#13#7'Caption'#6#14'Items Selected'#0#0#6'TLabel'#6'Label3'#4'Left'#3#200#0
+#3'Top'#3#8#1#5'Width'#2'T'#6'Height'#2#13#7'Caption'#6#17'Grouping Variable'
+#0#0#6'TLabel'#6'Label4'#4'Left'#3#200#0#3'Top'#3'H'#1#5'Width'#2'n'#6'Heigh'
+'t'#2#13#7'Caption'#6#21'Reference group code:'#0#0#6'TLabel'#6'Label5'#4'Le'
+'ft'#3#200#0#3'Top'#3'`'#1#5'Width'#2'Y'#6'Height'#2#13#7'Caption'#6#17'Foca'
+'l Group Code:'#0#0#6'TLabel'#6'Label6'#4'Left'#3#200#0#3'Top'#3'x'#1#5'Widt'
+'h'#2'^'#6'Height'#2#13#7'Caption'#6#19'No. of Score Levels'#0#0#6'TLabel'#6
+'Label7'#4'Left'#3'`'#1#3'Top'#3' '#1#5'Width'#2'l'#6'Height'#2#13#7'Caption'
+#6#23'Enter bounds for levels'#0#0#6'TLabel'#6'Label8'#4'Left'#3'`'#1#3'Top'
+#3'`'#1#5'Width'#2'B'#6'Height'#2#13#7'Caption'#6#12'Lower Bound:'#0#0#6'TLa'
+'bel'#6'Label9'#4'Left'#3'`'#1#3'Top'#3'x'#1#5'Width'#2'B'#6'Height'#2#13#7
+'Caption'#6#12'Upper Bound:'#0#0#6'TLabel'#7'Label10'#4'Left'#3'`'#1#3'Top'#3
+'0'#1#5'Width'#2#28#6'Height'#2#13#7'Caption'#6#4'Down'#0#0#6'TLabel'#7'Labe'
+'l11'#4'Left'#3#160#1#3'Top'#3'0'#1#5'Width'#2#14#6'Height'#2#13#7'Caption'#6
+#2'Up'#0#0#6'TLabel'#7'Label12'#4'Left'#3#184#1#3'Top'#3'0'#1#5'Width'#2#26#6
+'Height'#2#13#7'Caption'#6#5'Level'#0#0#5'TMemo'#5'Memo1'#4'Left'#2#8#3'Top'
+#2#0#5'Width'#3#201#1#6'Height'#2'i'#13'Lines.Strings'#1#6'_This procedure i'
+'s an adaptation of the program written by Niels G. Waller, Dept. of Psychol'
+'ogy,'#6'hUniversity of California - Davis, Jan. 1998. It''s purpose is to '
+'identify test items that differ in the '#6'^response pattern for two groups'
+': a reference group and a focal group. The file of data to be '#6'Wanalyze'
+'d should consist of a variable containing a code designating the two groups'
+' and '#6'[variables containing subject''s item responses coded 0 for incorr'
+'ect and 1 for correct. No '#6'bmissing data may be included. The results '
+'provide the Mantel-Haenszel statistics for identifying '#6'3those items whi'
+'ch are different for the two groups.'#0#8'TabOrder'#2#0#0#0#8'TListBox'#7'V'
+'arList'#4'Left'#2#8#3'Top'#3#128#0#5'Width'#3#137#0#6'Height'#3#249#0#10'It'
+'emHeight'#2#13#11'MultiSelect'#9#8'TabOrder'#2#1#0#0#7'TBitBtn'#9'ItemInBtn'
+#4'Left'#3#160#0#3'Top'#3#152#0#5'Width'#2#25#6'Height'#2#25#8'TabOrder'#2#2
+#7'OnClick'#7#14'ItemInBtnClick'#10'Glyph.Data'#10'z'#1#0#0'v'#1#0#0'BMv'#1#0
+#0#0#0#0#0'v'#0#0#0'('#0#0#0' '#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#0#1#0#0#18#11
+#0#0#18#11#0#0#16#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0
+#0#0#128#0#128#0#128#128#0#0''#0#191#191#191#0#0#0#255#0#0#255#0#0#0#255
+#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'333333333333333333333'
+'33333333333333333333333333333333333333?'#243'333333'#0'3333333w?'#243'33333'
+#9#0'333333w?'#243'3333'#9#153#0'33?'#255#255'3w?'#243#0#0#0#9#153#153#0'3'
+'wwws33w?'#9#153#153#153#153#153#153#0''#255#255#255'33?w'#0#0#0#9#153#153#0
+'3www3?w3333'#9#153#0'33333?w33333'#9#0'333333w333333'#0'3333333w33333333'
+'33333333333333333333333333333333333333333333'#9'NumGlyphs'#2#2#0#0#7'TBitBt'
+'n'#10'ItemOutBtn'#4'Left'#3#160#0#3'Top'#3#184#0#5'Width'#2#25#6'Height'#2
+#25#8'TabOrder'#2#3#7'OnClick'#7#15'ItemOutBtnClick'#10'Glyph.Data'#10'z'#1#0
+#0'v'#1#0#0'BMv'#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0' '#0#0#0#16#0#0#0#1#0#4#0#0
+#0#0#0#0#1#0#0#18#11#0#0#18#11#0#0#16#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0
+#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0''#0#191#191#191#0#0#0#255
+#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'333'
+'33333333333333333333333333333333333333333?'#243'333333'#0'333333?w'#243'333'
+'33'#0#144'33333?w7'#243'3333'#0#153#144'3333?w37'#255#255#255'3'#0#153#153
+#144#0#0#0'?w337www'#0#153#153#153#153#153#153#144'w?'#243'33'#255#255#247'3'
+#0#153#153#144#0#0#0'3w?'#243'7www33'#0#153#144'33333w?'#247#243'33333'#0#144
+'333333w7'#243'333333'#0'3333333w3333333333333333333333333333333333333333333'
+'333333333333333333333333'#9'NumGlyphs'#2#2#0#0#7'TBitBtn'#6'AllBtn'#4'Left'
+#3#160#0#3'Top'#3#216#0#5'Width'#2#25#6'Height'#2#25#7'Caption'#6#3'ALL'#8'T'
+'abOrder'#2#4#7'OnClick'#7#11'AllBtnClick'#0#0#7'TBitBtn'#8'GrpInBtn'#4'Left'
+#3#160#0#3'Top'#3#8#1#5'Width'#2#25#6'Height'#2#25#8'TabOrder'#2#5#7'OnClick'
+#7#13'GrpInBtnClick'#10'Glyph.Data'#10'z'#1#0#0'v'#1#0#0'BMv'#1#0#0#0#0#0#0
+'v'#0#0#0'('#0#0#0' '#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#0#1#0#0#18#11#0#0#18#11
,#0#0#16#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0
+#128#0#128#128#0#0''#0#191#191#191#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0
+#0#0#255#0#255#0#255#255#0#0#255#255#255#0'333333333333333333333333333333333'
+'33333333333333333333333333?'#243'333333'#0'3333333w?'#243'33333'#9#0'333333'
+'w?'#243'3333'#9#153#0'33?'#255#255'3w?'#243#0#0#0#9#153#153#0'3wwws33w?'#9
+#153#153#153#153#153#153#0''#255#255#255'33?w'#0#0#0#9#153#153#0'3www3?w33'
+'33'#9#153#0'33333?w33333'#9#0'333333w333333'#0'3333333w333333333333333333'
+'3333333333333333333333333333333333'#9'NumGlyphs'#2#2#0#0#7'TBitBtn'#9'GrpOu'
+'tBtn'#4'Left'#3#160#0#3'Top'#3'('#1#5'Width'#2#25#6'Height'#2#25#8'TabOrder'
+#2#6#10'Glyph.Data'#10'z'#1#0#0'v'#1#0#0'BMv'#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0
+' '#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#0#1#0#0#18#11#0#0#18#11#0#0#16#0#0#0#0#0#0
+#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0
+''#0#191#191#191#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0
+#255#255#0#0#255#255#255#0'33333333333333333333333333333333333333333333?'#243
+'333333'#0'333333?w'#243'33333'#0#144'33333?w7'#243'3333'#0#153#144'3333?w37'
+#255#255#255'3'#0#153#153#144#0#0#0'?w337www'#0#153#153#153#153#153#153#144
+'w?'#243'33'#255#255#247'3'#0#153#153#144#0#0#0'3w?'#243'7www33'#0#153#144'3'
+'3333w?'#247#243'33333'#0#144'333333w7'#243'333333'#0'3333333w33333333333333'
+'33333333333333333333333333333333333333333333333333333'#9'NumGlyphs'#2#2#0#0
+#5'TEdit'#12'GroupVarEdit'#4'Left'#3#200#0#3'Top'#3#24#1#5'Width'#3#137#0#6
+'Height'#2#21#8'TabOrder'#2#7#4'Text'#6#12'GroupVarEdit'#0#0#8'TListBox'#9'I'
+'temsList'#4'Left'#3#200#0#3'Top'#3#128#0#5'Width'#3#137#0#6'Height'#2'y'#10
+'ItemHeight'#2#13#8'TabOrder'#2#8#0#0#5'TEdit'#10'RefGrpEdit'#4'Left'#3'8'#1
+#3'Top'#3'@'#1#5'Width'#2#25#6'Height'#2#21#8'TabOrder'#2#9#4'Text'#6#10'Ref'
+'GrpEdit'#0#0#5'TEdit'#11'TrgtGrpEdit'#4'Left'#3'8'#1#3'Top'#3'X'#1#5'Width'
+#2#25#6'Height'#2#21#8'TabOrder'#2#10#4'Text'#6#11'TrgtGrpEdit'#0#0#7'TButto'
+'n'#8'ResetBtn'#4'Left'#2#8#3'Top'#3#152#1#5'Width'#2'A'#6'Height'#2#25#7'Ca'
+'ption'#6#5'Reset'#8'TabOrder'#2#11#7'OnClick'#7#13'ResetBtnClick'#0#0#7'TBu'
+'tton'#10'ComputeBtn'#4'Left'#3#208#0#3'Top'#3#152#1#5'Width'#2'A'#6'Height'
+#2#25#7'Caption'#6#7'Compute'#8'TabOrder'#2#12#7'OnClick'#7#15'ComputeBtnCli'
+'ck'#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#144#1#3'Top'#3#152#1#5'Width'#2'A'
+#6'Height'#2#25#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#13#7
+'OnClick'#7#14'ReturnBtnClick'#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#3'`'#1#3
+'Top'#2'p'#5'Width'#2'q'#6'Height'#3#169#0#7'Caption'#6#7'Options'#8'TabOrde'
+'r'#2#14#0#9'TCheckBox'#12'ItemStatsChk'#4'Left'#2#8#3'Top'#2#16#5'Width'#2
+'Y'#6'Height'#2#17#7'Caption'#6#15'Item Statistics'#7'Checked'#9#5'State'#7#9
+'cbChecked'#8'TabOrder'#2#0#0#0#9'TCheckBox'#12'TestStatsChk'#4'Left'#2#8#3
+'Top'#2' '#5'Width'#2'Y'#6'Height'#2#17#7'Caption'#6#15'Test Statistics'#8'T'
+'abOrder'#2#1#0#0#9'TCheckBox'#12'ItemCorrsChk'#4'Left'#2#8#3'Top'#2'0'#5'Wi'
+'dth'#2'a'#6'Height'#2#17#7'Caption'#6#16'Item Intercorr.s'#8'TabOrder'#2#2#0
+#0#9'TCheckBox'#11'ItemTestChk'#4'Left'#2#8#3'Top'#2'@'#5'Width'#2'Y'#6'Heig'
+'ht'#2#17#7'Caption'#6#15'Item-Test cor.s'#8'TabOrder'#2#3#0#0#9'TCheckBox'#8
+'AlphaChk'#4'Left'#2#8#3'Top'#2'P'#5'Width'#2'a'#6'Height'#2#17#7'Caption'#6
+#17'Alpha Reliability'#8'TabOrder'#2#4#0#0#9'TCheckBox'#11'LogisticChk'#4'Le'
+'ft'#2#8#3'Top'#2'p'#5'Width'#2'a'#6'Height'#2#17#7'Caption'#6#16'Logistic R'
+'egres.'#7'Enabled'#8#8'TabOrder'#2#5#0#0#9'TCheckBox'#5'MHChk'#4'Left'#2#8#3
+'Top'#2'`'#5'Width'#2'a'#6'Height'#2#17#7'Caption'#6#15'Mantel-Haenszel'#7'C'
+'hecked'#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#6#0#0#9'TCheckBox'#9'Curves'
+'Chk'#4'Left'#2#8#3'Top'#3#128#0#5'Width'#2'a'#6'Height'#2#17#7'Caption'#6#16
+'Item Char. Crvs.'#8'TabOrder'#2#7#0#0#9'TCheckBox'#9'CountsChk'#4'Left'#2#8
+#3'Top'#3#144#0#5'Width'#2'a'#6'Height'#2#17#7'Caption'#6#12'Level Counts'#8
+'TabOrder'#2#8#0#0#0#5'TEdit'#10'LevelsEdit'#4'Left'#3'8'#1#3'Top'#3'p'#1#5
+'Width'#2#25#6'Height'#2#21#8'TabOrder'#2#15#6'OnExit'#7#14'LevelsEditExit'#0
+#0#5'TEdit'#11'LevelNoEdit'#4'Left'#3#184#1#3'Top'#3'@'#1#5'Width'#2#25#6'He'
+'ight'#2#21#8'TabOrder'#2#16#4'Text'#6#1'1'#0#0#5'TEdit'#12'LowBoundEdit'#4
+'Left'#3#184#1#3'Top'#3'X'#1#5'Width'#2#25#6'Height'#2#21#8'TabOrder'#2#17#6
+'OnExit'#7#16'LowBoundEditExit'#0#0#5'TEdit'#11'UpBoundEdit'#4'Left'#3#184#1
+#3'Top'#3'p'#1#5'Width'#2#25#6'Height'#2#21#8'TabOrder'#2#18#6'OnExit'#7#15
+'UpBoundEditExit'#0#0#10'TScrollBar'#11'LevelScroll'#4'Left'#3'`'#1#3'Top'#3
+'@'#1#5'Width'#2'Q'#6'Height'#2#19#3'Min'#2#1#8'PageSize'#2#0#8'Position'#2#1
+#8'TabOrder'#2#19#8'OnScroll'#7#17'LevelScrollScroll'#0#0#0
]);

View File

@ -0,0 +1,53 @@
unit DifferenceUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, contexthelpunit;
type
{ TDifferenceFrm }
TDifferenceFrm = class(TForm)
CancelBtn: TButton;
HelpBtn: TButton;
OKBtn: TButton;
LagEdit: TEdit;
OrderEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
DifferenceFrm: TDifferenceFrm;
implementation
{ TDifferenceFrm }
procedure TDifferenceFrm.FormShow(Sender: TObject);
begin
LagEdit.Text := '1';
OrderEdit.Text := '1';
end;
procedure TDifferenceFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
initialization
{$I differenceunit.lrs}
end.

View File

@ -0,0 +1,71 @@
object DifferenceFrm: TDifferenceFrm
Left = 211
Height = 136
Top = 137
Width = 271
Caption = 'Differencing Specification'
ClientHeight = 136
ClientWidth = 271
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 7
Height = 14
Top = 16
Width = 102
Caption = 'Difference for lag of:'
ParentColor = False
end
object Label2: TLabel
Left = 7
Height = 14
Top = 56
Width = 114
Caption = 'No. of times to repeat: '
ParentColor = False
end
object LagEdit: TEdit
Left = 120
Height = 21
Top = 9
Width = 39
TabOrder = 0
Text = '1'
end
object OrderEdit: TEdit
Left = 120
Height = 21
Top = 49
Width = 39
TabOrder = 1
Text = '1'
end
object CancelBtn: TButton
Left = 96
Height = 31
Top = 88
Width = 78
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
end
object OKBtn: TButton
Left = 184
Height = 31
Top = 88
Width = 78
Caption = 'OK'
ModalResult = 1
TabOrder = 3
end
object HelpBtn: TButton
Tag = 121
Left = 8
Height = 32
Top = 88
Width = 82
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 4
end
end

View File

@ -0,0 +1,20 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TDifferenceFrm','FORMDATA',[
'TPF0'#14'TDifferenceFrm'#13'DifferenceFrm'#4'Left'#3#211#0#6'Height'#3#136#0
+#3'Top'#3#137#0#5'Width'#3#15#1#7'Caption'#6#26'Differencing Specification'
+#12'ClientHeight'#3#136#0#11'ClientWidth'#3#15#1#6'OnShow'#7#8'FormShow'#10
+'LCLVersion'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#7#6'Height'#2#14#3
+'Top'#2#16#5'Width'#2'f'#7'Caption'#6#22'Difference for lag of:'#11'ParentCo'
+'lor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#7#6'Height'#2#14#3'Top'#2'8'#5'Wid'
+'th'#2'r'#7'Caption'#6#24'No. of times to repeat: '#11'ParentColor'#8#0#0#5
+'TEdit'#7'LagEdit'#4'Left'#2'x'#6'Height'#2#21#3'Top'#2#9#5'Width'#2''''#8'T'
+'abOrder'#2#0#4'Text'#6#1'1'#0#0#5'TEdit'#9'OrderEdit'#4'Left'#2'x'#6'Height'
+#2#21#3'Top'#2'1'#5'Width'#2''''#8'TabOrder'#2#1#4'Text'#6#1'1'#0#0#7'TButto'
+'n'#9'CancelBtn'#4'Left'#2'`'#6'Height'#2#31#3'Top'#2'X'#5'Width'#2'N'#7'Cap'
+'tion'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#2#0#0#7'TButton'#5'OKBt'
+'n'#4'Left'#3#184#0#6'Height'#2#31#3'Top'#2'X'#5'Width'#2'N'#7'Caption'#6#2
+'OK'#11'ModalResult'#2#1#8'TabOrder'#2#3#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2
+'y'#4'Left'#2#8#6'Height'#2' '#3'Top'#2'X'#5'Width'#2'R'#7'Caption'#6#4'Help'
+#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2#4#0#0#0
]);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,406 @@
object DiscrimFrm: TDiscrimFrm
Left = 152
Height = 415
Top = 93
Width = 560
Caption = 'Discriminant Function and Multivariate Analysis of Variance'
ClientHeight = 415
ClientWidth = 560
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 6
Height = 14
Top = 2
Width = 85
Caption = 'Available Variable'
ParentColor = False
end
object Label2: TLabel
Left = 225
Height = 14
Top = 16
Width = 71
Caption = 'Group Variable'
ParentColor = False
end
object Label3: TLabel
Left = 225
Height = 14
Top = 104
Width = 90
Caption = 'Predictor Variables'
ParentColor = False
end
object VarList: TListBox
Left = 6
Height = 288
Top = 17
Width = 165
ItemHeight = 0
MultiSelect = True
TabOrder = 0
end
object DepIn: TBitBtn
Left = 184
Height = 31
Top = 17
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
}
NumGlyphs = 0
OnClick = DepInClick
TabOrder = 1
end
object DepOut: TBitBtn
Left = 184
Height = 31
Top = 56
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
}
NumGlyphs = 0
OnClick = DepOutClick
TabOrder = 2
end
object PredIn: TBitBtn
Left = 184
Height = 31
Top = 128
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
}
NumGlyphs = 0
OnClick = PredInClick
TabOrder = 3
end
object PredOut: TBitBtn
Left = 184
Height = 31
Top = 168
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
}
NumGlyphs = 0
OnClick = PredOutClick
TabOrder = 4
end
object GroupVar: TEdit
Left = 225
Height = 21
Top = 36
Width = 136
TabOrder = 5
Text = 'GroupVar'
end
object PredList: TListBox
Left = 223
Height = 182
Top = 120
Width = 139
ItemHeight = 0
TabOrder = 6
end
object GroupBox1: TGroupBox
Left = 377
Height = 294
Top = 6
Width = 174
Caption = 'Options'
ClientHeight = 276
ClientWidth = 170
TabOrder = 7
object DescChk: TCheckBox
Left = 6
Height = 17
Top = 1
Width = 119
Caption = 'Descriptive Statistics'
TabOrder = 0
end
object CorrsChk: TCheckBox
Left = 7
Height = 17
Top = 22
Width = 78
Caption = 'Correlations'
TabOrder = 1
end
object InvChk: TCheckBox
Left = 6
Height = 17
Top = 44
Width = 95
Caption = 'Matrix Inverses'
TabOrder = 2
end
object PlotChk: TCheckBox
Left = 6
Height = 17
Top = 65
Width = 73
Caption = 'Plot Scores'
TabOrder = 3
end
object ClassChk: TCheckBox
Left = 6
Height = 17
Top = 88
Width = 92
Caption = 'Classify Scores'
TabOrder = 4
end
object AnovaChk: TCheckBox
Left = 6
Height = 17
Top = 110
Width = 109
Caption = 'One-Way ANOVAs'
TabOrder = 5
end
object CrossChk: TCheckBox
Left = 6
Height = 17
Top = 130
Width = 93
Caption = 'Cross-Products'
TabOrder = 6
end
object DevCPChk: TCheckBox
Left = 6
Height = 17
Top = 152
Width = 141
Caption = 'Deviation Cross-Products'
TabOrder = 7
end
object EigensChk: TCheckBox
Left = 6
Height = 17
Top = 175
Width = 85
Caption = 'Eigen Vectors'
TabOrder = 8
end
object PCovChk: TCheckBox
Left = 7
Height = 17
Top = 194
Width = 142
Caption = 'Pooled Within Covariance'
TabOrder = 9
end
object CentroidsChk: TCheckBox
Left = 7
Height = 17
Top = 218
Width = 66
Caption = 'Centroids'
TabOrder = 10
end
object ScoresChk: TCheckBox
Left = 7
Height = 17
Top = 242
Width = 106
Caption = 'Scores to the Grid'
TabOrder = 11
end
end
object ClassSize: TRadioGroup
Left = 377
Height = 94
Top = 310
Width = 172
AutoFill = True
Caption = 'Classify Using:'
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 = 76
ClientWidth = 168
Items.Strings = (
'Equal Group Sizes'
'Existing Sample Sizes'
'Entered Prior Sizes'
)
TabOrder = 8
end
object ResetBtn: TButton
Left = 27
Height = 28
Top = 328
Width = 64
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 9
end
object CancelBtn: TButton
Left = 107
Height = 28
Top = 328
Width = 64
Caption = 'Cancel'
ModalResult = 2
TabOrder = 10
end
object ComputeBtn: TButton
Left = 216
Height = 28
Top = 328
Width = 64
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 11
end
object ReturnBtn: TButton
Left = 296
Height = 28
Top = 328
Width = 64
Caption = 'Return'
ModalResult = 1
TabOrder = 12
end
end

View File

@ -0,0 +1,264 @@
LazarusResources.Add('TDiscrimFrm','FORMDATA',[
'TPF0'#11'TDiscrimFrm'#10'DiscrimFrm'#4'Left'#3#152#0#6'Height'#3#159#1#3'Top'
+#2']'#5'Width'#3'0'#2#7'Caption'#6';Discriminant Function and Multivariate A'
+'nalysis of Variance'#12'ClientHeight'#3#159#1#11'ClientWidth'#3'0'#2#6'OnSh'
+'ow'#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#2#5'Width'#2'U'#7'Caption'#6#18'Available Varia'
+'ble'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#3#225#0#6'Height'#2
+#14#3'Top'#2#16#5'Width'#2'G'#7'Caption'#6#14'Group Variable'#11'ParentColor'
+#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#225#0#6'Height'#2#14#3'Top'#2'h'#5'Widt'
+'h'#2'Z'#7'Caption'#6#19'Predictor Variables'#11'ParentColor'#8#0#0#8'TListB'
+'ox'#7'VarList'#4'Left'#2#6#6'Height'#3' '#1#3'Top'#2#17#5'Width'#3#165#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#31#3'Top'#2#17#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#10'DepInClick'#8
+'TabOrder'#2#1#0#0#7'TBitBtn'#6'DepOut'#4'Left'#3#184#0#6'Height'#2#31#3'Top'
+#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'NumGlyp'
+'hs'#2#0#7'OnClick'#7#11'DepOutClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#6'PredI'
+'n'#4'Left'#3#184#0#6'Height'#2#31#3'Top'#3#128#0#5'Width'#2'!'#10'Glyph.Dat'
+'a'#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'PredInClick'#8
+'TabOrder'#2#3#0#0#7'TBitBtn'#7'PredOut'#4'Left'#3#184#0#6'Height'#2#31#3'To'
+'p'#3#168#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'PredOutClick'#8'TabOrder'#2#4#0#0#5'TEdit'#8'Gr'
+'oupVar'#4'Left'#3#225#0#6'Height'#2#21#3'Top'#2'$'#5'Width'#3#136#0#8'TabOr'
+'der'#2#5#4'Text'#6#8'GroupVar'#0#0#8'TListBox'#8'PredList'#4'Left'#3#223#0#6
+'Height'#3#182#0#3'Top'#2'x'#5'Width'#3#139#0#10'ItemHeight'#2#0#8'TabOrder'
+#2#6#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#3'y'#1#6'Height'#3'&'#1#3'Top'#2#6
+#5'Width'#3#174#0#7'Caption'#6#7'Options'#12'ClientHeight'#3#20#1#11'ClientW'
+'idth'#3#170#0#8'TabOrder'#2#7#0#9'TCheckBox'#7'DescChk'#4'Left'#2#6#6'Heigh'
+'t'#2#17#3'Top'#2#1#5'Width'#2'w'#7'Caption'#6#22'Descriptive Statistics'#8
+'TabOrder'#2#0#0#0#9'TCheckBox'#8'CorrsChk'#4'Left'#2#7#6'Height'#2#17#3'Top'
+#2#22#5'Width'#2'N'#7'Caption'#6#12'Correlations'#8'TabOrder'#2#1#0#0#9'TChe'
+'ckBox'#6'InvChk'#4'Left'#2#6#6'Height'#2#17#3'Top'#2','#5'Width'#2'_'#7'Cap'
+'tion'#6#15'Matrix Inverses'#8'TabOrder'#2#2#0#0#9'TCheckBox'#7'PlotChk'#4'L'
+'eft'#2#6#6'Height'#2#17#3'Top'#2'A'#5'Width'#2'I'#7'Caption'#6#11'Plot Scor'
+'es'#8'TabOrder'#2#3#0#0#9'TCheckBox'#8'ClassChk'#4'Left'#2#6#6'Height'#2#17
+#3'Top'#2'X'#5'Width'#2'\'#7'Caption'#6#15'Classify Scores'#8'TabOrder'#2#4#0
+#0#9'TCheckBox'#8'AnovaChk'#4'Left'#2#6#6'Height'#2#17#3'Top'#2'n'#5'Width'#2
+'m'#7'Caption'#6#14'One-Way ANOVAs'#8'TabOrder'#2#5#0#0#9'TCheckBox'#8'Cross'
+'Chk'#4'Left'#2#6#6'Height'#2#17#3'Top'#3#130#0#5'Width'#2']'#7'Caption'#6#14
+'Cross-Products'#8'TabOrder'#2#6#0#0#9'TCheckBox'#8'DevCPChk'#4'Left'#2#6#6
+'Height'#2#17#3'Top'#3#152#0#5'Width'#3#141#0#7'Caption'#6#24'Deviation Cros'
+'s-Products'#8'TabOrder'#2#7#0#0#9'TCheckBox'#9'EigensChk'#4'Left'#2#6#6'Hei'
+'ght'#2#17#3'Top'#3#175#0#5'Width'#2'U'#7'Caption'#6#13'Eigen Vectors'#8'Tab'
+'Order'#2#8#0#0#9'TCheckBox'#7'PCovChk'#4'Left'#2#7#6'Height'#2#17#3'Top'#3
+#194#0#5'Width'#3#142#0#7'Caption'#6#24'Pooled Within Covariance'#8'TabOrder'
+#2#9#0#0#9'TCheckBox'#12'CentroidsChk'#4'Left'#2#7#6'Height'#2#17#3'Top'#3
+#218#0#5'Width'#2'B'#7'Caption'#6#9'Centroids'#8'TabOrder'#2#10#0#0#9'TCheck'
+'Box'#9'ScoresChk'#4'Left'#2#7#6'Height'#2#17#3'Top'#3#242#0#5'Width'#2'j'#7
+'Caption'#6#18'Scores to the Grid'#8'TabOrder'#2#11#0#0#0#11'TRadioGroup'#9
+'ClassSize'#4'Left'#3'y'#1#6'Height'#2'^'#3'Top'#3'6'#1#5'Width'#3#172#0#8'A'
+'utoFill'#9#7'Caption'#6#15'Classify Using:'#28'ChildSizing.LeftRightSpacing'
+#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7
+#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomoge'
+'nousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'C'
+'hildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29
+'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'Clien'
+'tHeight'#2'L'#11'ClientWidth'#3#168#0#13'Items.Strings'#1#6#17'Equal Group '
+'Sizes'#6#21'Existing Sample Sizes'#6#19'Entered Prior Sizes'#0#8'TabOrder'#2
+#8#0#0#7'TButton'#8'ResetBtn'#4'Left'#2#27#6'Height'#2#28#3'Top'#3'H'#1#5'Wi'
+'dth'#2'@'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2
+#9#0#0#7'TButton'#9'CancelBtn'#4'Left'#2'k'#6'Height'#2#28#3'Top'#3'H'#1#5'W'
,'idth'#2'@'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#10#0#0#7
+'TButton'#10'ComputeBtn'#4'Left'#3#216#0#6'Height'#2#28#3'Top'#3'H'#1#5'Widt'
+'h'#2'@'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'
+#2#11#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'('#1#6'Height'#2#28#3'Top'#3'H'#1
+#5'Width'#2'@'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#12#0
+#0#0
]);

View File

@ -0,0 +1,158 @@
object DistribFrm: TDistribFrm
Left = 183
Height = 286
Top = 110
Width = 323
Caption = 'Distributions'
ClientHeight = 286
ClientWidth = 323
OnShow = FormShow
LCLVersion = '0.9.28.2'
object GroupBox1: TGroupBox
Left = 8
Height = 96
Top = 8
Width = 208
Caption = 'Plot Distribution:'
ClientHeight = 78
ClientWidth = 204
TabOrder = 0
object NDChk: TCheckBox
Left = 9
Height = 17
Top = 2
Width = 110
Caption = 'Normal Distribution'
OnClick = NDChkClick
TabOrder = 0
end
object ChiChk: TCheckBox
Left = 9
Height = 17
Top = 24
Width = 130
Caption = 'Chi-Square Distribution'
OnClick = ChiChkClick
TabOrder = 1
end
object FChk: TCheckBox
Left = 9
Height = 17
Top = 49
Width = 121
Caption = 'Central F Distribution'
OnClick = FChkClick
TabOrder = 2
end
end
object GroupBox2: TGroupBox
Left = 8
Height = 152
Top = 120
Width = 208
Caption = 'Parameters'
ClientHeight = 134
ClientWidth = 204
TabOrder = 1
object AlphaLabel: TLabel
Left = 8
Height = 14
Top = 15
Width = 85
Caption = 'Type I Error Rate'
ParentColor = False
end
object Label2: TLabel
Left = 8
Height = 14
Top = 46
Width = 86
Caption = 'Deg. Freedom (1)'
ParentColor = False
end
object Label3: TLabel
Left = 9
Height = 14
Top = 81
Width = 86
Caption = 'Deg. Freedom (2)'
ParentColor = False
end
object Label4: TLabel
Left = 8
Height = 14
Top = 111
Width = 27
Caption = 'Mean'
ParentColor = False
end
object AlphaEdit: TEdit
Left = 102
Height = 21
Top = 8
Width = 43
TabOrder = 0
Text = 'AlphaEdit'
end
object DF1Edit: TEdit
Left = 102
Height = 21
Top = 39
Width = 43
TabOrder = 1
Text = 'Edit1'
end
object MeanEdit: TEdit
Left = 102
Height = 21
Top = 104
Width = 43
TabOrder = 2
Text = 'Edit1'
end
object DF2Edit: TEdit
Left = 102
Height = 21
Top = 72
Width = 43
TabOrder = 3
Text = 'Edit1'
end
end
object ResetBtn: TButton
Left = 232
Height = 29
Top = 23
Width = 71
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 2
end
object CancelBtn: TButton
Left = 232
Height = 29
Top = 88
Width = 71
Caption = 'Cancel'
ModalResult = 2
TabOrder = 3
end
object ComputeBtn: TButton
Left = 232
Height = 29
Top = 152
Width = 71
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 4
end
object ReturnBtn: TButton
Left = 232
Height = 29
Top = 216
Width = 71
Caption = 'Return'
ModalResult = 1
TabOrder = 5
end
end

View File

@ -0,0 +1,38 @@
LazarusResources.Add('TDistribFrm','FORMDATA',[
'TPF0'#11'TDistribFrm'#10'DistribFrm'#4'Left'#3#183#0#6'Height'#3#30#1#3'Top'
+#2'n'#5'Width'#3'C'#1#7'Caption'#6#13'Distributions'#12'ClientHeight'#3#30#1
+#11'ClientWidth'#3'C'#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2'
+#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#8#6'Height'#2'`'#3'Top'#2#8#5'Width'#3
+#208#0#7'Caption'#6#18'Plot Distribution:'#12'ClientHeight'#2'N'#11'ClientWi'
+'dth'#3#204#0#8'TabOrder'#2#0#0#9'TCheckBox'#5'NDChk'#4'Left'#2#9#6'Height'#2
+#17#3'Top'#2#2#5'Width'#2'n'#7'Caption'#6#19'Normal Distribution'#7'OnClick'
+#7#10'NDChkClick'#8'TabOrder'#2#0#0#0#9'TCheckBox'#6'ChiChk'#4'Left'#2#9#6'H'
+'eight'#2#17#3'Top'#2#24#5'Width'#3#130#0#7'Caption'#6#23'Chi-Square Distrib'
+'ution'#7'OnClick'#7#11'ChiChkClick'#8'TabOrder'#2#1#0#0#9'TCheckBox'#4'FChk'
+#4'Left'#2#9#6'Height'#2#17#3'Top'#2'1'#5'Width'#2'y'#7'Caption'#6#22'Centra'
+'l F Distribution'#7'OnClick'#7#9'FChkClick'#8'TabOrder'#2#2#0#0#0#9'TGroupB'
+'ox'#9'GroupBox2'#4'Left'#2#8#6'Height'#3#152#0#3'Top'#2'x'#5'Width'#3#208#0
+#7'Caption'#6#10'Parameters'#12'ClientHeight'#3#134#0#11'ClientWidth'#3#204#0
+#8'TabOrder'#2#1#0#6'TLabel'#10'AlphaLabel'#4'Left'#2#8#6'Height'#2#14#3'Top'
+#2#15#5'Width'#2'U'#7'Caption'#6#17'Type I Error Rate'#11'ParentColor'#8#0#0
+#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#14#3'Top'#2'.'#5'Width'#2'V'#7
+'Caption'#6#16'Deg. Freedom (1)'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4
+'Left'#2#9#6'Height'#2#14#3'Top'#2'Q'#5'Width'#2'V'#7'Caption'#6#16'Deg. Fre'
+'edom (2)'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#2#8#6'Height'#2
+#14#3'Top'#2'o'#5'Width'#2#27#7'Caption'#6#4'Mean'#11'ParentColor'#8#0#0#5'T'
+'Edit'#9'AlphaEdit'#4'Left'#2'f'#6'Height'#2#21#3'Top'#2#8#5'Width'#2'+'#8'T'
+'abOrder'#2#0#4'Text'#6#9'AlphaEdit'#0#0#5'TEdit'#7'DF1Edit'#4'Left'#2'f'#6
+'Height'#2#21#3'Top'#2''''#5'Width'#2'+'#8'TabOrder'#2#1#4'Text'#6#5'Edit1'#0
+#0#5'TEdit'#8'MeanEdit'#4'Left'#2'f'#6'Height'#2#21#3'Top'#2'h'#5'Width'#2'+'
+#8'TabOrder'#2#2#4'Text'#6#5'Edit1'#0#0#5'TEdit'#7'DF2Edit'#4'Left'#2'f'#6'H'
+'eight'#2#21#3'Top'#2'H'#5'Width'#2'+'#8'TabOrder'#2#3#4'Text'#6#5'Edit1'#0#0
+#0#7'TButton'#8'ResetBtn'#4'Left'#3#232#0#6'Height'#2#29#3'Top'#2#23#5'Width'
+#2'G'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#2#0
+#0#7'TButton'#9'CancelBtn'#4'Left'#3#232#0#6'Height'#2#29#3'Top'#2'X'#5'Widt'
+'h'#2'G'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#3#0#0#7'TB'
+'utton'#10'ComputeBtn'#4'Left'#3#232#0#6'Height'#2#29#3'Top'#3#152#0#5'Width'
+#2'G'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2
+#4#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#232#0#6'Height'#2#29#3'Top'#3#216#0
+#5'Width'#2'G'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#5#0#0
+#0
]);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,202 @@
object SmoothDataForm: TSmoothDataForm
Left = 288
Height = 360
Top = 161
Width = 378
Caption = 'Data Smoothing'
ClientHeight = 360
ClientWidth = 378
OnShow = ResetBtnClick
LCLVersion = '0.9.30'
object Memo1: TMemo
Left = 6
Height = 79
Top = 9
Width = 362
Lines.Strings = (
'This procedure creates a new variable with the label "smoothed"'
'with data points created from the selected variable. Each new'
'data point is the average of the immediately preceding value and '
'the immediately following value. New values are therefore '
'created for the 2nd, 3rd,...,and N-1 values. The process can be'
'repeated multiple times.'
)
TabOrder = 0
end
object Label2: TLabel
Left = 8
Height = 16
Top = 96
Width = 48
Caption = 'Variables'
ParentColor = False
end
object VarList: TListBox
Left = 8
Height = 225
Top = 112
Width = 166
ItemHeight = 0
MultiSelect = True
TabOrder = 1
end
object InBtn: TBitBtn
Left = 184
Height = 39
Top = 112
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 = InBtnClick
TabOrder = 2
end
object OutBtn: TBitBtn
Left = 184
Height = 39
Top = 160
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 = OutBtnClick
TabOrder = 3
end
object VariableEdit: TEdit
Left = 232
Height = 23
Top = 139
Width = 132
TabOrder = 4
Text = 'VariableEdit'
end
object Label1: TLabel
Left = 185
Height = 16
Top = 214
Width = 101
Caption = 'Repeat smoothing '
ParentColor = False
end
object RepeatEdit: TEdit
Left = 296
Height = 23
Top = 207
Width = 31
TabOrder = 5
Text = 'RepeatEdit'
end
object Label3: TLabel
Left = 331
Height = 16
Top = 214
Width = 33
Caption = 'times.'
ParentColor = False
end
object ResetBtn: TButton
Left = 282
Height = 32
Top = 264
Width = 80
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 6
end
object CancelBtn: TButton
Left = 184
Height = 30
Top = 304
Width = 82
Caption = 'Cancel'
ModalResult = 2
TabOrder = 7
end
object ComputeBtn: TButton
Left = 282
Height = 30
Top = 304
Width = 80
Caption = 'Compute'
ModalResult = 1
OnClick = ComputeBtnClick
TabOrder = 8
end
object HelpBtn: TButton
Tag = 119
Left = 184
Height = 32
Top = 264
Width = 82
Caption = 'Help'
TabOrder = 9
end
end

View File

@ -0,0 +1,136 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TSmoothDataForm','FORMDATA',[
'TPF0'#15'TSmoothDataForm'#14'SmoothDataForm'#4'Left'#3' '#1#6'Height'#3'h'#1
+#3'Top'#3#161#0#5'Width'#3'z'#1#7'Caption'#6#14'Data Smoothing'#12'ClientHei'
+'ght'#3'h'#1#11'ClientWidth'#3'z'#1#6'OnShow'#7#13'ResetBtnClick'#10'LCLVers'
+'ion'#6#6'0.9.30'#0#5'TMemo'#5'Memo1'#4'Left'#2#6#6'Height'#2'O'#3'Top'#2#9#5
+'Width'#3'j'#1#13'Lines.Strings'#1#6'?This procedure creates a new variable '
+'with the label "smoothed"'#6'>with data points created from the selected va'
+'riable. Each new'#6'Adata point is the average of the immediately precedin'
+'g value and '#6';the immediately following value. New values are therefore'
+' '#6'@created for the 2nd, 3rd,...,and N-1 values. The process can be'#6#24
+'repeated multiple times.'#0#8'TabOrder'#2#0#0#0#6'TLabel'#6'Label2'#4'Left'
+#2#8#6'Height'#2#16#3'Top'#2'`'#5'Width'#2'0'#7'Caption'#6#9'Variables'#11'P'
+'arentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#6'Height'#3#225#0#3'To'
+'p'#2'p'#5'Width'#3#166#0#10'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2
+#1#0#0#7'TBitBtn'#5'InBtn'#4'Left'#3#184#0#6'Height'#2''''#3'Top'#2'p'#5'Wid'
+'th'#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#10
,'InBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#6'OutBtn'#4'Left'#3#184#0#6'Heig'
+'ht'#2''''#3'Top'#3#160#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'NumGlyphs'#2#0#7'OnClick'#7#11'OutBtnClick'#8'TabOrde'
+'r'#2#3#0#0#5'TEdit'#12'VariableEdit'#4'Left'#3#232#0#6'Height'#2#23#3'Top'#3
+#139#0#5'Width'#3#132#0#8'TabOrder'#2#4#4'Text'#6#12'VariableEdit'#0#0#6'TLa'
+'bel'#6'Label1'#4'Left'#3#185#0#6'Height'#2#16#3'Top'#3#214#0#5'Width'#2'e'#7
+'Caption'#6#17'Repeat smoothing '#11'ParentColor'#8#0#0#5'TEdit'#10'RepeatEd'
+'it'#4'Left'#3'('#1#6'Height'#2#23#3'Top'#3#207#0#5'Width'#2#31#8'TabOrder'#2
+#5#4'Text'#6#10'RepeatEdit'#0#0#6'TLabel'#6'Label3'#4'Left'#3'K'#1#6'Height'
+#2#16#3'Top'#3#214#0#5'Width'#2'!'#7'Caption'#6#6'times.'#11'ParentColor'#8#0
+#0#7'TButton'#8'ResetBtn'#4'Left'#3#26#1#6'Height'#2' '#3'Top'#3#8#1#5'Width'
+#2'P'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#6#0
+#0#7'TButton'#9'CancelBtn'#4'Left'#3#184#0#6'Height'#2#30#3'Top'#3'0'#1#5'Wi'
+'dth'#2'R'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#7#0#0#7
+'TButton'#10'ComputeBtn'#4'Left'#3#26#1#6'Height'#2#30#3'Top'#3'0'#1#5'Width'
,#2'P'#7'Caption'#6#7'Compute'#11'ModalResult'#2#1#7'OnClick'#7#15'ComputeBtn'
+'Click'#8'TabOrder'#2#8#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2'w'#4'Left'#3#184#0
+#6'Height'#2' '#3'Top'#3#8#1#5'Width'#2'R'#7'Caption'#6#4'Help'#8'TabOrder'#2
+#9#0#0#0
]);

View File

@ -0,0 +1,122 @@
unit DataSmoothUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Buttons, MainUnit, Globals, functionsLib, OutPutUnit, DataProcs,
DictionaryUnit, contexthelpunit;
type
{ TSmoothDataForm }
TSmoothDataForm = class(TForm)
CancelBtn: TButton;
HelpBtn: TButton;
Label3: TLabel;
ComputeBtn: TButton;
RepeatEdit: TEdit;
Label1: TLabel;
ResetBtn: TButton;
VariableEdit: TEdit;
InBtn: TBitBtn;
Label2: TLabel;
Memo1: TMemo;
OutBtn: TBitBtn;
VarList: TListBox;
procedure ComputeBtnClick(Sender: TObject);
procedure InBtnClick(Sender: TObject);
procedure OutBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
SmoothDataForm: TSmoothDataForm;
implementation
{ TSmoothDataForm }
procedure TSmoothDataForm.ResetBtnClick(Sender: TObject);
VAR i : integer;
begin
VarList.Clear;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
RepeatEdit.Text := '1';
VariableEdit.Text := '';
InBtn.Visible := true;
OutBtn.Visible := false;
end;
procedure TSmoothDataForm.InBtnClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
VariableEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
InBtn.Visible := false;
OutBtn.Visible := true;
end;
procedure TSmoothDataForm.ComputeBtnClick(Sender: TObject);
VAR
DataPts, OutPts : DblDyneVec;
value, dblvalue, avg : double;
VarCol, result, N, Reps, intvalue, i, j, col : integer;
varlabel, strvalue : string;
begin
N := NoCases;
SetLength(DataPts,N);
SetLength(OutPts,N);
Reps := StrToInt(RepeatEdit.Text);
varlabel := VariableEdit.Text;
for i := 1 to NoVariables do
if varlabel = OS3MainFrm.DataGrid.Cells[i,0] then VarCol := i;
for i := 1 to N do
begin
value := StrToFloat(OS3MainFrm.DataGrid.Cells[VarCol,i]);
DataPts[i-1] := value;
end;
// repeat smoothing for Reps times
OutPts[0] := DataPts[0];
OutPts[N-1] := DataPts[N-1];
for j := 1 to Reps do
begin
for i := 1 to N-2 do
begin
avg := (DataPts[i-1] + DataPts[i] + DataPts[i+1]) / 3.0;
OutPts[i] := avg;
end;
if j < Reps then
for i := 0 to N-1 do DataPts[i] := OutPts[i];
end;
// Create a new variable and copy smoothed data into it.
strvalue := 'Smoothed';
col := NoVariables + 1;
DictionaryFrm.NewVar(NoVariables+1);
DictionaryFrm.DictGrid.Cells[1,NoVariables] := strvalue;
OS3MainFrm.DataGrid.Cells[NoVariables,0] := strvalue;
for i := 0 to N-1 do OS3MainFrm.DataGrid.Cells[col,i+1] := FloatToStr(OutPts[i]);
end;
procedure TSmoothDataForm.OutBtnClick(Sender: TObject);
begin
VarList.Items.Add(VariableEdit.Text);
VariableEdit.Text := '';
OutBtn.Visible := false;
InBtn.Visible := true;
end;
initialization
{$I datasmoothunit.lrs}
end.

View File

@ -0,0 +1,128 @@
object DblDeclineFrm: TDblDeclineFrm
Left = 120
Height = 214
Top = 126
Width = 300
Caption = 'Double Declining Value'
ClientHeight = 214
ClientWidth = 300
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 9
Height = 14
Top = 16
Width = 52
Caption = 'Initial Cost'
ParentColor = False
end
object Label2: TLabel
Left = 9
Height = 14
Top = 56
Width = 77
Caption = 'Life Expectancy'
ParentColor = False
end
object Label3: TLabel
Left = 9
Height = 14
Top = 96
Width = 48
Caption = 'End Value'
ParentColor = False
end
object Label4: TLabel
Left = 9
Height = 14
Top = 136
Width = 94
Caption = 'Depreciation Period'
ParentColor = False
end
object Label5: TLabel
Left = 9
Height = 14
Top = 176
Width = 108
Caption = 'Obtained Depreciation'
ParentColor = False
end
object CostEdit: TEdit
Left = 121
Height = 21
Top = 9
Width = 60
TabOrder = 0
Text = 'CostEdit'
end
object LifeEdit: TEdit
Left = 120
Height = 21
Top = 49
Width = 60
TabOrder = 1
Text = 'Edit1'
end
object EndEdit: TEdit
Left = 120
Height = 21
Top = 89
Width = 60
TabOrder = 2
Text = 'Edit1'
end
object PeriodEdit: TEdit
Left = 120
Height = 21
Top = 129
Width = 60
TabOrder = 3
Text = 'Edit1'
end
object DeprecEdit: TEdit
Left = 120
Height = 21
Top = 169
Width = 60
TabOrder = 4
Text = 'Edit1'
end
object ResetBtn: TButton
Left = 200
Height = 29
Top = 56
Width = 80
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 5
end
object ComputeBtn: TButton
Left = 200
Height = 29
Top = 104
Width = 80
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 6
end
object ReturnBtn: TButton
Left = 200
Height = 29
Top = 152
Width = 80
Caption = 'Return'
ModalResult = 1
TabOrder = 7
end
object HelpBtn: TButton
Tag = 118
Left = 200
Height = 32
Top = 9
Width = 82
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 8
end
end

View File

@ -0,0 +1,32 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TDblDeclineFrm','FORMDATA',[
'TPF0'#14'TDblDeclineFrm'#13'DblDeclineFrm'#4'Left'#2'x'#6'Height'#3#214#0#3
+'Top'#2'~'#5'Width'#3','#1#7'Caption'#6#22'Double Declining Value'#12'Client'
+'Height'#3#214#0#11'ClientWidth'#3','#1#6'OnShow'#7#8'FormShow'#10'LCLVersio'
+'n'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2#14#3'Top'#2
+#16#5'Width'#2'4'#7'Caption'#6#12'Initial Cost'#11'ParentColor'#8#0#0#6'TLab'
+'el'#6'Label2'#4'Left'#2#9#6'Height'#2#14#3'Top'#2'8'#5'Width'#2'M'#7'Captio'
+'n'#6#15'Life Expectancy'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2
+#9#6'Height'#2#14#3'Top'#2'`'#5'Width'#2'0'#7'Caption'#6#9'End Value'#11'Par'
+'entColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#2#9#6'Height'#2#14#3'Top'#3#136
+#0#5'Width'#2'^'#7'Caption'#6#19'Depreciation Period'#11'ParentColor'#8#0#0#6
+'TLabel'#6'Label5'#4'Left'#2#9#6'Height'#2#14#3'Top'#3#176#0#5'Width'#2'l'#7
+'Caption'#6#21'Obtained Depreciation'#11'ParentColor'#8#0#0#5'TEdit'#8'CostE'
+'dit'#4'Left'#2'y'#6'Height'#2#21#3'Top'#2#9#5'Width'#2'<'#8'TabOrder'#2#0#4
+'Text'#6#8'CostEdit'#0#0#5'TEdit'#8'LifeEdit'#4'Left'#2'x'#6'Height'#2#21#3
+'Top'#2'1'#5'Width'#2'<'#8'TabOrder'#2#1#4'Text'#6#5'Edit1'#0#0#5'TEdit'#7'E'
+'ndEdit'#4'Left'#2'x'#6'Height'#2#21#3'Top'#2'Y'#5'Width'#2'<'#8'TabOrder'#2
+#2#4'Text'#6#5'Edit1'#0#0#5'TEdit'#10'PeriodEdit'#4'Left'#2'x'#6'Height'#2#21
+#3'Top'#3#129#0#5'Width'#2'<'#8'TabOrder'#2#3#4'Text'#6#5'Edit1'#0#0#5'TEdit'
+#10'DeprecEdit'#4'Left'#2'x'#6'Height'#2#21#3'Top'#3#169#0#5'Width'#2'<'#8'T'
+'abOrder'#2#4#4'Text'#6#5'Edit1'#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#200#0#6
+'Height'#2#29#3'Top'#2'8'#5'Width'#2'P'#7'Caption'#6#5'Reset'#7'OnClick'#7#13
+'ResetBtnClick'#8'TabOrder'#2#5#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#200#0
+#6'Height'#2#29#3'Top'#2'h'#5'Width'#2'P'#7'Caption'#6#7'Compute'#7'OnClick'
+#7#15'ComputeBtnClick'#8'TabOrder'#2#6#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3
+#200#0#6'Height'#2#29#3'Top'#3#152#0#5'Width'#2'P'#7'Caption'#6#6'Return'#11
+'ModalResult'#2#1#8'TabOrder'#2#7#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2'v'#4'Le'
+'ft'#3#200#0#6'Height'#2' '#3'Top'#2#9#5'Width'#2'R'#7'Caption'#6#4'Help'#7
+'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2#8#0#0#0
]);

View File

@ -0,0 +1,125 @@
unit DblDeclineUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Math, contexthelpunit;
type
{ TDblDeclineFrm }
TDblDeclineFrm = class(TForm)
HelpBtn: TButton;
ResetBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
CostEdit: TEdit;
LifeEdit: TEdit;
EndEdit: TEdit;
PeriodEdit: TEdit;
DeprecEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
procedure ComputeBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
function DoubleDecliningBalance(Cost, Salvage: Extended; Life, Period: Integer): Extended;
private
{ private declarations }
public
{ public declarations }
end;
var
DblDeclineFrm: TDblDeclineFrm;
implementation
{ TDblDeclineFrm }
procedure TDblDeclineFrm.ResetBtnClick(Sender: TObject);
begin
CostEdit.Text := '';
LifeEdit.Text := '';
EndEdit.Text := '';
PeriodEdit.Text := '';
DeprecEdit.Text := '';
end;
procedure TDblDeclineFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TDblDeclineFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TDblDeclineFrm.ComputeBtnClick(Sender: TObject);
VAR
Depreciation, Cost, Salvage : Extended;
Life, Period : integer;
begin
Cost := StrToFloat(CostEdit.Text);
Salvage := StrToFloat(EndEdit.Text);
Life := StrToInt(LifeEdit.Text);
Period := StrToInt(PeriodEdit.Text);
Depreciation := DoubleDecliningBalance(Cost, Salvage, Life, Period);
DeprecEdit.Text := FloatToStr(Depreciation);
end;
function TDblDeclineFrm.DoubleDecliningBalance(Cost, Salvage: Extended; Life, Period: Integer): Extended;
{ dv := cost * (1 - 2/life)**(period - 1)
DDB = (2/life) * dv
if DDB > dv - salvage then DDB := dv - salvage
if DDB < 0 then DDB := 0
}
var
DepreciatedVal, Factor: Extended;
begin
Result := 0;
if (Period < 1) or (Life < Period) or (Life < 1) or (Cost <= Salvage) then
Exit;
{depreciate everything in period 1 if life is only one or two periods}
if ( Life <= 2 ) then
begin
if ( Period = 1 ) then
DoubleDecliningBalance:=Cost-Salvage
else
DoubleDecliningBalance:=0; {all depreciation occurred in first period}
exit;
end;
Factor := 2.0 / Life;
DepreciatedVal := Cost * IntPower((1.0 - Factor), Period - 1);
{DepreciatedVal is Cost-(sum of previous depreciation results)}
Result := Factor * DepreciatedVal;
{Nominal computed depreciation for this period. The rest of the
function applies limits to this nominal value. }
{Only depreciate until total depreciation equals cost-salvage.}
if Result > DepreciatedVal - Salvage then
Result := DepreciatedVal - Salvage;
{No more depreciation after salvage value is reached. This is mostly a nit.
If Result is negative at this point, it's very close to zero.}
if Result < 0.0 then
Result := 0.0;
end;
initialization
{$I dbldeclineunit.lrs}
end.

View File

@ -0,0 +1,241 @@
object DescriptiveFrm: TDescriptiveFrm
Left = 175
Height = 388
Top = 91
Width = 434
Caption = 'Descriptive Statistics'
ClientHeight = 388
ClientWidth = 434
OnShow = FormShow
LCLVersion = '0.9.30'
object Label1: TLabel
Left = 200
Height = 16
Top = 279
Width = 175
Caption = 'Confidence Interval for the Mean'
ParentColor = False
end
object Label2: TLabel
Left = 8
Height = 16
Top = 8
Width = 48
Caption = 'Variables'
ParentColor = False
end
object Label3: TLabel
Left = 239
Height = 16
Top = 8
Width = 45
Caption = 'Selected'
ParentColor = False
end
object VarList: TListBox
Left = 8
Height = 225
Top = 24
Width = 166
ItemHeight = 0
MultiSelect = True
TabOrder = 0
end
object SelList: TListBox
Left = 239
Height = 225
Top = 24
Width = 188
ItemHeight = 0
TabOrder = 1
end
object CIEdit: TEdit
Left = 379
Height = 23
Top = 272
Width = 41
TabOrder = 2
Text = '95.0'
end
object ResetBtn: TButton
Left = 312
Height = 32
Top = 304
Width = 80
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 3
end
object CancelBtn: TButton
Left = 200
Height = 30
Top = 344
Width = 82
Caption = 'Cancel'
ModalResult = 2
OnClick = CancelBtnClick
TabOrder = 4
end
object OKBtn: TButton
Left = 312
Height = 30
Top = 344
Width = 80
Caption = 'Continue'
ModalResult = 1
OnClick = OKBtnClick
TabOrder = 5
end
object InBtn: TBitBtn
Left = 184
Height = 39
Top = 24
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 = InBtnClick
TabOrder = 6
end
object OutBtn: TBitBtn
Left = 184
Height = 39
Top = 72
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 = OutBtnClick
TabOrder = 7
end
object AllBtn: TBitBtn
Left = 184
Height = 39
Top = 136
Width = 38
Caption = 'ALL'
NumGlyphs = 0
OnClick = AllBtnClick
TabOrder = 8
end
object GroupBox1: TGroupBox
Left = 12
Height = 88
Top = 264
Width = 162
Caption = 'Options'
ClientHeight = 70
ClientWidth = 158
TabOrder = 9
object CaseChk: TCheckBox
Left = 7
Height = 19
Top = 2
Width = 115
Caption = 'Casewise Deletion'
TabOrder = 0
end
object CheckBox1: TCheckBox
Left = 7
Height = 19
Top = 16
Width = 101
Caption = 'z Scores to Grid'
TabOrder = 1
end
object PcntileChk: TCheckBox
Left = 7
Height = 19
Top = 33
Width = 138
Caption = 'Show Percentile Ranks'
TabOrder = 2
end
object AltQrtilesChk: TCheckBox
Left = 6
Height = 19
Top = 50
Width = 116
Caption = 'Show All Quartiles'
TabOrder = 3
end
end
object HelpBtn: TButton
Tag = 119
Left = 200
Height = 32
Top = 304
Width = 82
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 10
end
end

View File

@ -0,0 +1,141 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TDescriptiveFrm','FORMDATA',[
'TPF0'#15'TDescriptiveFrm'#14'DescriptiveFrm'#4'Left'#3#175#0#6'Height'#3#132
+#1#3'Top'#2'['#5'Width'#3#178#1#7'Caption'#6#22'Descriptive Statistics'#12'C'
+'lientHeight'#3#132#1#11'ClientWidth'#3#178#1#6'OnShow'#7#8'FormShow'#10'LCL'
+'Version'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#3#200#0#6'Height'#2#16#3
+'Top'#3#23#1#5'Width'#3#175#0#7'Caption'#6' Confidence Interval for the Mean'
+#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#16#3'Top'
+#2#8#5'Width'#2'0'#7'Caption'#6#9'Variables'#11'ParentColor'#8#0#0#6'TLabel'
+#6'Label3'#4'Left'#3#239#0#6'Height'#2#16#3'Top'#2#8#5'Width'#2'-'#7'Caption'
+#6#8'Selected'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#6'He'
+'ight'#3#225#0#3'Top'#2#24#5'Width'#3#166#0#10'ItemHeight'#2#0#11'MultiSelec'
+'t'#9#8'TabOrder'#2#0#0#0#8'TListBox'#7'SelList'#4'Left'#3#239#0#6'Height'#3
+#225#0#3'Top'#2#24#5'Width'#3#188#0#10'ItemHeight'#2#0#8'TabOrder'#2#1#0#0#5
+'TEdit'#6'CIEdit'#4'Left'#3'{'#1#6'Height'#2#23#3'Top'#3#16#1#5'Width'#2')'#8
+'TabOrder'#2#2#4'Text'#6#4'95.0'#0#0#7'TButton'#8'ResetBtn'#4'Left'#3'8'#1#6
+'Height'#2' '#3'Top'#3'0'#1#5'Width'#2'P'#7'Caption'#6#5'Reset'#7'OnClick'#7
+#13'ResetBtnClick'#8'TabOrder'#2#3#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#200
+#0#6'Height'#2#30#3'Top'#3'X'#1#5'Width'#2'R'#7'Caption'#6#6'Cancel'#11'Moda'
+'lResult'#2#2#7'OnClick'#7#14'CancelBtnClick'#8'TabOrder'#2#4#0#0#7'TButton'
+#5'OKBtn'#4'Left'#3'8'#1#6'Height'#2#30#3'Top'#3'X'#1#5'Width'#2'P'#7'Captio'
+'n'#6#8'Continue'#11'ModalResult'#2#1#7'OnClick'#7#10'OKBtnClick'#8'TabOrder'
+#2#5#0#0#7'TBitBtn'#5'InBtn'#4'Left'#3#184#0#6'Height'#2''''#3'Top'#2#24#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#255#255#255#0#255#255
+#255#0#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'OnCl'
+'ick'#7#10'InBtnClick'#8'TabOrder'#2#6#0#0#7'TBitBtn'#6'OutBtn'#4'Left'#3#184
+#0#6'Height'#2''''#3'Top'#2'H'#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'NumGlyphs'#2#0#7'OnClick'#7#11'OutBtnClick'#8'TabOrde'
+'r'#2#7#0#0#7'TBitBtn'#6'AllBtn'#4'Left'#3#184#0#6'Height'#2''''#3'Top'#3#136
+#0#5'Width'#2'&'#7'Caption'#6#3'ALL'#9'NumGlyphs'#2#0#7'OnClick'#7#11'AllBtn'
+'Click'#8'TabOrder'#2#8#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#12#6'Height'
+#2'X'#3'Top'#3#8#1#5'Width'#3#162#0#7'Caption'#6#7'Options'#12'ClientHeight'
+#2'F'#11'ClientWidth'#3#158#0#8'TabOrder'#2#9#0#9'TCheckBox'#7'CaseChk'#4'Le'
,'ft'#2#7#6'Height'#2#19#3'Top'#2#2#5'Width'#2's'#7'Caption'#6#17'Casewise De'
+'letion'#8'TabOrder'#2#0#0#0#9'TCheckBox'#9'CheckBox1'#4'Left'#2#7#6'Height'
+#2#19#3'Top'#2#16#5'Width'#2'e'#7'Caption'#6#16'z Scores to Grid'#8'TabOrder'
+#2#1#0#0#9'TCheckBox'#10'PcntileChk'#4'Left'#2#7#6'Height'#2#19#3'Top'#2'!'#5
+'Width'#3#138#0#7'Caption'#6#21'Show Percentile Ranks'#8'TabOrder'#2#2#0#0#9
+'TCheckBox'#13'AltQrtilesChk'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'2'#5'Width'
+#2't'#7'Caption'#6#18'Show All Quartiles'#8'TabOrder'#2#3#0#0#0#7'TButton'#7
+'HelpBtn'#3'Tag'#2'w'#4'Left'#3#200#0#6'Height'#2' '#3'Top'#3'0'#1#5'Width'#2
+'R'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2#10#0#0#0
]);

View File

@ -0,0 +1,404 @@
unit DescriptiveUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, Buttons, MainUnit, Globals, functionsLib, OutPutUnit, DataProcs,
DictionaryUnit, contexthelpunit;
type
{ TDescriptiveFrm }
TDescriptiveFrm = class(TForm)
CaseChk: TCheckBox;
CheckBox1: TCheckBox;
AltQrtilesChk: TCheckBox;
HelpBtn: TButton;
Label2: TLabel;
Label3: TLabel;
PcntileChk: TCheckBox;
GroupBox1: TGroupBox;
InBtn: TBitBtn;
OutBtn: TBitBtn;
AllBtn: TBitBtn;
ResetBtn: TButton;
CancelBtn: TButton;
OKBtn: TButton;
CIEdit: TEdit;
Label1: TLabel;
VarList: TListBox;
SelList: TListBox;
procedure AllBtnClick(Sender: TObject);
procedure CancelBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure InBtnClick(Sender: TObject);
procedure OKBtnClick(Sender: TObject);
procedure OutBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
sum, variance, stddev, value, mean, min, max, range, skew, prob, df, CI : double;
kurtosis, z, semean, seskew, sekurtosis, deviation, devsqr, M2, M3, M4 : double;
Q1, Q2, Q3, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q22, Q23, Q24, Q25, Q26 : double;
Q27, Q28, Q32, Q33, Q34, Q35, Q36, Q37, Q38, IQrange : double;
ncases, noselected : integer;
cellstring, gridstring, outline : string;
selected : IntDyneVec;
public
{ public declarations }
end;
var
DescriptiveFrm: TDescriptiveFrm;
implementation
{ TDescriptiveFrm }
procedure TDescriptiveFrm.ResetBtnClick(Sender: TObject);
var
i : integer;
begin
VarList.Clear;
SelList.Clear;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
CaseChk.Checked := false;
OutBtn.Enabled := false;
CaseChk.Checked := false;
Selected := nil;
end;
procedure TDescriptiveFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TDescriptiveFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TDescriptiveFrm.InBtnClick(Sender: TObject);
var
index, i : 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.Enabled := true;
end;
procedure TDescriptiveFrm.OKBtnClick(Sender: TObject);
var
i, j, k, m : integer;
num, den, cases : double;
values, pcntrank : DblDyneVec;
begin
noselected := SelList.Items.Count;
SetLength(Selected,noselected);
// Get selected variables
for i := 1 to noselected do
begin
cellstring := SelList.Items.Strings[i-1];
for j := 1 to NoVariables do
if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then selected[i-1] := j;
end;
OutPutFrm.RichEdit.Clear;
// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify;
OutPutFrm.RichEdit.Lines.Add('DISTRIBUTION PARAMETER ESTIMATES');
OutPutFrm.RichEdit.Lines.Add('');
SetLength(Values,NoCases);
SetLength(pcntrank,NoCases);
for j := 1 to noselected do
begin
deviation := 0.0;
devsqr := 0.0;
M2 := 0.0;
M3 := 0.0;
M4 := 0.0;
sum := 0.0;
variance := 0.0;
stddev := 0.0;
range := 0.0;
skew := 0.0;
kurtosis := 0.0;
ncases := 0;
df := 0.0;
seskew := 0.0;
kurtosis := 0.0;
sekurtosis := 0.0;
k := selected[j-1];
CI := StrToFloat(CIEdit.Text) / 100.0;
prob := CI;
CI := (1.0 - CI) / 2.0;
CI := 1.0 - CI;
if CheckBox1.Checked then // add a new column to the grid
begin
gridstring := OS3MainFrm.DataGrid.Cells[k,0];
gridstring := Gridstring + 'z';
DictionaryFrm.NewVar(NoVariables+1);
DictionaryFrm.DictGrid.Cells[1,NoVariables] := gridstring;
OS3MainFrm.DataGrid.Cells[NoVariables,0] := gridstring;
end;
// Accumulate sums of squares, sums, etc. for variable j
min := 1.0e20;
max := -1.0e20;
for i := 1 to NoCases do
begin
if not GoodRecord(i,noselected,selected) then continue;
if CaseChk.Checked then
begin
if not ValidValue(i,selected[j-1]) then continue;
end
else if not GoodRecord(i,noselected,selected) then continue;
value := StrToFloat(OS3MainFrm.DataGrid.Cells[k,i]);
ncases := ncases + 1;
values[ncases-1] := value;
df := df + 1.0;
sum := sum + value;
variance := variance + (value * value);
if (value < min) then min := value;
if (value > max) then max := value;
end;
{ for i := 0 to ncases - 1 do // this is for debugging
begin
outline := format('Value = %8.3f',[values[i]]);
OutPutFrm.RichEdit.Lines.Add(outline);
end;
OutPutFrm.ShowModal;
OutPutFrm.RichEdit.Clear; }
if ncases > 0 then
begin
mean := sum / ncases;
range := max - min;
end;
if ncases > 1 then
begin
variance := variance - (sum * sum) / ncases;
variance := variance / (ncases - 1);
stddev := sqrt(variance);
semean := sqrt(variance / ncases);
if ncases < 120 then CI := semean * inverset(CI,df)
else CI := semean * inversez(CI);
end;
if variance = 0.0 then
begin
cellstring := OS3MainFrm.DataGrid.Cells[k,0];
ShowMessage('No Variability in '+ cellstring + ' variable - ending analysis');
exit;
end;
if ncases > 3 then // obtain skew, kurtosis and z scores
begin
for i := 1 to NoCases do
begin
if CaseChk.Checked then
begin
if not ValidValue(i,selected[j-1]) then continue;
end
else if not GoodRecord(i,noselected,selected) then continue;
value := StrToFloat(OS3MainFrm.DataGrid.Cells[k,i]);
if stddev > 0.0 then
begin
deviation := value - mean;
devsqr := deviation * deviation;
M2 := M2 + devsqr;
M3 := M3 + (deviation * devsqr);
M4 := M4 + (devsqr * devsqr);
z := (value - mean) / stddev;
if CheckBox1.Checked then
begin
cellstring := format('%8.5f',[z]);
OS3MainFrm.DataGrid.Cells[NoVariables,i] := cellstring;
end;
end;
end;
if ncases > 2 then
begin
skew := (ncases * M3) /
((ncases - 1) * (ncases - 2) * stddev * variance);
cases := ncases;
num := 6.0 * cases * (cases - 1.0);
den := (cases - 2.0) * (cases + 1.0) * (cases + 3.0);
seskew := sqrt(num / den);
end;
if ncases > 3 then
begin
kurtosis := (ncases * (ncases + 1) * M4) -
(3 * M2 * M2 * (ncases - 1));
kurtosis := kurtosis /
( (ncases - 1) * (ncases - 2) * (ncases - 3) * (variance * variance) );
sekurtosis := sqrt( (4.0 * (ncases * ncases - 1) * (seskew * seskew) ) /
( (ncases - 3) * (ncases + 5) ) );
end;
end;
// output results for the kth variable
cellstring := OS3MainFrm.DataGrid.Cells[k,0];
outline := format('%s (N = %d) Sum = %14.3f',[cellstring,ncases,sum]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Mean = %10.3f Variance = %10.3f Std.Dev. = %10.3f',
[mean, variance, stddev]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Std.Error of Mean = %10.3f',[semean]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('%4.2f percent Confidence Interval for the mean = %8.3f to %8.3f',
[prob * 100.0, mean - CI, mean + CI]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Range = %10.3f Minimum = %10.3f Maximum = %10.3f',
[range, min, max]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Skewness = %10.3f Std. Error of Skew = %10.3f',
[skew, seskew]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Kurtosis = %10.3f Std. Error Kurtosis = %10.3f',
[kurtosis, sekurtosis]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('');
if ncases > 4 then // get percentiles and quartiles
begin
// get percentile ranks
if pcntilechk.Checked then PRank(k,pcntrank);
// sort values and get quartiles
for i := 0 to ncases - 2 do
begin
for m := i + 1 to ncases -1 do
begin
if values[i] > values[m] then
begin
value := values[i];
values[i] := values[m];
values[m] := value;
end;
end;
end;
Q1 := Quartiles(2,0.25,ncases,values);
Q2 := Quartiles(2,0.5,ncases,values);
Q3 := Quartiles(2,0.75,ncases,values);
IQrange := Q3 - Q1;
outline := format('First Quartile = %8.3f',[Q1]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Median = %8.3f',[Q2]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Third Quartile = %8.3f',[Q3]);
OutPutFrm.RichEdit.Lines.Add(outline);
outline := format('Interquartile range = %8.3f',[IQrange]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('');
end;
if (AltQrtilesChk.Checked) then
begin
OutPutFrm.RichEdit.Lines.Add('Alternative Methods for Obtaining Quartiles');
OutPutFrm.RichEdit.Lines.Add(' Method 1 2 3 4 5 6 7 8');
OutPutFrm.RichEdit.Lines.Add('Pcntile');
Q1 := Quartiles(1,0.25,ncases,values);
Q12 := Quartiles(2,0.25,ncases,values);
Q13 := Quartiles(3,0.25,ncases,values);
Q14 := Quartiles(4,0.25,ncases,values);
Q15 := Quartiles(5,0.25,ncases,values);
Q16 := Quartiles(6,0.25,ncases,values);
Q17 := Quartiles(7,0.25,ncases,values);
Q18 := Quartiles(8,0.25,ncases,values);
outline := format('Q1 %8.3f%8.3f%8.3f%8.3f%8.3f%8.3f%8.3f%8.3f',
[Q1,Q12,Q13,Q14,Q15,Q16,Q17,Q18]);
OutPutFrm.RichEdit.Lines.Add(outline);
Q2 := Quartiles(1,0.5,ncases,values);
Q22 := Quartiles(2,0.5,ncases,values);
Q23 := Quartiles(3,0.5,ncases,values);
Q24 := Quartiles(4,0.5,ncases,values);
Q25 := Quartiles(5,0.5,ncases,values);
Q26 := Quartiles(6,0.5,ncases,values);
Q27 := Quartiles(7,0.5,ncases,values);
Q28 := Quartiles(8,0.5,ncases,values);
outline := format('Q2 %8.3f%8.3f%8.3f%8.3f%8.3f%8.3f%8.3f%8.3f',
[Q2,Q22,Q23,Q24,Q25,Q26,Q27,Q28]);
OutPutFrm.RichEdit.Lines.Add(outline);
Q3 := Quartiles(1,0.75,ncases,values);
Q32 := Quartiles(2,0.75,ncases,values);
Q33 := Quartiles(3,0.75,ncases,values);
Q34 := Quartiles(4,0.75,ncases,values);
Q35 := Quartiles(5,0.75,ncases,values);
Q36 := Quartiles(6,0.75,ncases,values);
Q37 := Quartiles(7,0.75,ncases,values);
Q38 := Quartiles(8,0.75,ncases,values);
outline := format('Q3 %8.3f%8.3f%8.3f%8.3f%8.3f%8.3f%8.3f%8.3f',
[Q3,Q32,Q33,Q34,Q35,Q36,Q37,Q38]);
OutPutFrm.RichEdit.Lines.Add(outline);
OutPutFrm.RichEdit.Lines.Add('NOTES:');
OutPutFrm.RichEdit.Lines.Add('Method 1 is the weighted average at X[np] where n is no. of cases, p is percentile / 100');
OutPutFrm.RichEdit.Lines.Add('Method 2 is the weighted average at X[(n+1)p] This is used in this program.');
OutPutFrm.RichEdit.Lines.Add('Method 3 is the empirical distribution function.');
OutPutFrm.RichEdit.Lines.Add('Method 4 is called the empirical distribution function - averaging.');
OutPutFrm.RichEdit.Lines.Add('Method 5 is called the empirical distribution function = Interpolation.');
OutPutFrm.RichEdit.Lines.Add('Method 6 is the closest observation method.');
OutPutFrm.RichEdit.Lines.Add('Method 7 is from the TrueBasic Statistics Graphics Toolkit.');
OutPutFrm.RichEdit.Lines.Add('Method 8 was used in an older Microsoft Excel version.');
OutPutFrm.RichEdit.Lines.Add('See the internet site http://www.xycoon.com/ for the above.');
OutPutFrm.RichEdit.Lines.Add('========================================================');
OutPutFrm.RichEdit.Lines.Add('');
end; // end of experimental alternatives
end; // next j variable
OutPutFrm.ShowModal;
Selected := nil;
Values := nil;
pcntrank := nil;
end;
procedure TDescriptiveFrm.OutBtnClick(Sender: TObject);
var
index: integer;
begin
index := SelList.ItemIndex;
VarList.Items.Add(SelList.Items.Strings[index]);
SelList.Items.Delete(index);
InBtn.Enabled := true;
if SelList.Items.Count = 0 then OutBtn.Enabled := false;
end;
procedure TDescriptiveFrm.CancelBtnClick(Sender: TObject);
begin
selected := nil;
end;
procedure TDescriptiveFrm.AllBtnClick(Sender: TObject);
var
i : integer;
begin
for i := 0 to VarList.Items.Count-1 do
SelList.Items.Add(VarList.Items.Strings[i]);
VarList.Clear;
OutBtn.Enabled := true;
InBtn.Enabled := false;
end;
initialization
{$I descriptiveunit.lrs}
end.

View File

@ -0,0 +1,145 @@
object DictionaryFrm: TDictionaryFrm
Left = 95
Height = 477
Top = 97
Width = 656
Caption = 'Dictionary Form'
ClientHeight = 477
ClientWidth = 656
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 8
Height = 14
Top = 15
Width = 310
Caption = 'Note: Pressing the down arrow key will add a new row (variable)'
ParentColor = False
end
object DictGrid: TStringGrid
Left = 0
Height = 249
Top = 88
Width = 642
ColCount = 7
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goRowSelect, goSmoothScroll]
RowCount = 2
TabOrder = 0
OnClick = DictGridClick
OnKeyDown = DictGridKeyDown
end
object Panel1: TPanel
Left = 0
Height = 47
Top = 430
Width = 656
Align = alBottom
ClientHeight = 47
ClientWidth = 656
TabOrder = 1
object Label2: TLabel
Left = 8
Height = 14
Top = -382
Width = 251
Caption = 'Note: Do NOT delete a row if the data column exists'
ParentColor = False
end
object ReturnBtn: TButton
Left = 536
Height = 32
Top = 2
Width = 93
Caption = 'OK'
ModalResult = 1
OnClick = ReturnBtnClick
TabOrder = 0
end
object RowInstBtn: TButton
Left = 96
Height = 32
Top = 2
Width = 111
Caption = 'Insert Row Before'
OnClick = RowInstBtnClick
TabOrder = 1
end
end
object CancelBtn: TButton
Left = 432
Height = 32
Top = 432
Width = 93
Caption = 'Cancel'
ModalResult = 2
OnClick = CancelBtnClick
TabOrder = 2
end
object TypeCombo: TComboBox
Left = 408
Height = 21
Top = 8
Width = 106
ItemHeight = 13
ItemIndex = 0
Items.Strings = (
'Type'
'(I)nteger'
'(F)loating Point'
'(S)tring'
'(M)oney'
'(D)ate'
)
OnSelect = TypeComboSelect
Style = csDropDownList
TabOrder = 3
Text = 'Type'
end
object JustCombo: TComboBox
Left = 536
Height = 21
Top = 8
Width = 104
ItemHeight = 13
ItemIndex = 0
Items.Strings = (
'Justification'
'(L)eft'
'(C)enter'
'(R)ight'
)
OnSelect = JustComboSelect
Style = csDropDownList
TabOrder = 4
Text = 'Justification'
end
object DescMemo: TMemo
Left = 6
Height = 82
Top = 342
Width = 632
Lines.Strings = (
'Memo2'
)
TabOrder = 5
end
object HelpBtn: TButton
Tag = 120
Left = 8
Height = 32
Top = 40
Width = 82
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 6
end
object RowDelBtn: TButton
Left = 6
Height = 32
Top = 432
Width = 82
Caption = 'Delete Row'
OnClick = RowDelBtnClick
TabOrder = 7
end
end

View File

@ -0,0 +1,38 @@
LazarusResources.Add('TDictionaryFrm','FORMDATA',[
'TPF0'#14'TDictionaryFrm'#13'DictionaryFrm'#4'Left'#2'_'#6'Height'#3#221#1#3
+'Top'#2'a'#5'Width'#3#144#2#7'Caption'#6#15'Dictionary Form'#12'ClientHeight'
+#3#221#1#11'ClientWidth'#3#144#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#15#5'Wi'
+'dth'#3'6'#1#7'Caption'#6'?Note: Pressing the down arrow key will add a new '
+'row (variable)'#11'ParentColor'#8#0#0#11'TStringGrid'#8'DictGrid'#4'Left'#2
+#0#6'Height'#3#249#0#3'Top'#2'X'#5'Width'#3#130#2#8'ColCount'#2#7#7'Options'
+#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13
+'goRangeSelect'#9'goEditing'#11'goRowSelect'#14'goSmoothScroll'#0#8'RowCount'
+#2#2#8'TabOrder'#2#0#7'OnClick'#7#13'DictGridClick'#9'OnKeyDown'#7#15'DictGr'
+'idKeyDown'#0#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6'Height'#2'/'#3'Top'#3#174#1
+#5'Width'#3#144#2#5'Align'#7#8'alBottom'#12'ClientHeight'#2'/'#11'ClientWidt'
+'h'#3#144#2#8'TabOrder'#2#1#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#14
+#3'Top'#3#130#254#5'Width'#3#251#0#7'Caption'#6'3Note: Do NOT delete a row i'
+'f the data column exists'#11'ParentColor'#8#0#0#7'TButton'#9'ReturnBtn'#4'L'
+'eft'#3#24#2#6'Height'#2' '#3'Top'#2#2#5'Width'#2']'#7'Caption'#6#2'OK'#11'M'
+'odalResult'#2#1#7'OnClick'#7#14'ReturnBtnClick'#8'TabOrder'#2#0#0#0#7'TButt'
+'on'#10'RowInstBtn'#4'Left'#2'`'#6'Height'#2' '#3'Top'#2#2#5'Width'#2'o'#7'C'
+'aption'#6#17'Insert Row Before'#7'OnClick'#7#15'RowInstBtnClick'#8'TabOrder'
+#2#1#0#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#176#1#6'Height'#2' '#3'Top'#3
+#176#1#5'Width'#2']'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#7'OnClick'#7
+#14'CancelBtnClick'#8'TabOrder'#2#2#0#0#9'TComboBox'#9'TypeCombo'#4'Left'#3
+#152#1#6'Height'#2#21#3'Top'#2#8#5'Width'#2'j'#10'ItemHeight'#2#13#9'ItemInd'
+'ex'#2#0#13'Items.Strings'#1#6#4'Type'#6#9'(I)nteger'#6#16'(F)loating Point'
+#6#8'(S)tring'#6#7'(M)oney'#6#6'(D)ate'#0#8'OnSelect'#7#15'TypeComboSelect'#5
+'Style'#7#14'csDropDownList'#8'TabOrder'#2#3#4'Text'#6#4'Type'#0#0#9'TComboB'
+'ox'#9'JustCombo'#4'Left'#3#24#2#6'Height'#2#21#3'Top'#2#8#5'Width'#2'h'#10
+'ItemHeight'#2#13#9'ItemIndex'#2#0#13'Items.Strings'#1#6#13'Justification'#6
+#6'(L)eft'#6#8'(C)enter'#6#7'(R)ight'#0#8'OnSelect'#7#15'JustComboSelect'#5
+'Style'#7#14'csDropDownList'#8'TabOrder'#2#4#4'Text'#6#13'Justification'#0#0
+#5'TMemo'#8'DescMemo'#4'Left'#2#6#6'Height'#2'R'#3'Top'#3'V'#1#5'Width'#3'x'
+#2#13'Lines.Strings'#1#6#5'Memo2'#0#8'TabOrder'#2#5#0#0#7'TButton'#7'HelpBtn'
+#3'Tag'#2'x'#4'Left'#2#8#6'Height'#2' '#3'Top'#2'('#5'Width'#2'R'#7'Caption'
+#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2#6#0#0#7'TButton'#9'Ro'
+'wDelBtn'#4'Left'#2#6#6'Height'#2' '#3'Top'#3#176#1#5'Width'#2'R'#7'Caption'
+#6#10'Delete Row'#7'OnClick'#7#14'RowDelBtnClick'#8'TabOrder'#2#7#0#0#0
]);

View File

@ -0,0 +1,352 @@
unit DictionaryUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, Grids, ExtCtrls, Globals, OptionsUnit, contexthelpunit;
type
{ TDictionaryFrm }
TDictionaryFrm = class(TForm)
HelpBtn: TButton;
Label2: TLabel;
DescMemo: TMemo;
RowDelBtn: TButton;
RowInstBtn: TButton;
JustCombo: TComboBox;
TypeCombo: TComboBox;
Label1: TLabel;
ReturnBtn: TButton;
CancelBtn: TButton;
DictGrid: TStringGrid;
Panel1: TPanel;
procedure CancelBtnClick(Sender: TObject);
procedure DictGridClick(Sender: TObject);
procedure DictGridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure JustComboClick(Sender: TObject);
procedure JustComboSelect(Sender: TObject);
procedure ReturnBtnClick(Sender: TObject);
procedure RowDelBtnClick(Sender: TObject);
procedure RowInstBtnClick(Sender: TObject);
procedure Defaults(Sender: TObject; row : integer);
procedure TypeComboSelect(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
procedure DelRow(row : integer);
procedure NewVar(row : integer);
procedure PasteVar(row : integer);
procedure CopyVar(row : integer);
end;
var
DictionaryFrm: TDictionaryFrm;
implementation
{ TDictionaryFrm }
uses MainUnit;
procedure TDictionaryFrm.ReturnBtnClick(Sender: TObject);
var
i, j, count : integer;
NoRows : integer;
begin
// determine number of rows with complete data
NoRows := 0;
for i := 1 to DictGrid.RowCount - 1 do
begin
count := 0;
for j := 1 to 5 do
begin
if DictGrid.Cells[j,i] <> '' then count := count + 1;
end;
if count > 4 then NoRows := NoRows + 1;
end;
if NoRows < DictGrid.RowCount - 1 then
begin
ShowMessage('Error! A definition entry for one or more variables missing!');
DictGrid.SetFocus;
exit;
end;
// Place short labels in main grid
OS3MainFrm.DataGrid.ColCount := NoRows + 1;
for i := 1 to NoRows do OS3MainFrm.DataGrid.Cells[i,0] := DictGrid.Cells[1,i];
// Make sure integers have a 0 for decimals
for i := 1 to NoRows do
if DictGrid.Cells[4,i] = 'I' then DictGrid.Cells[5,i] := '0';
OS3MainFrm.NoVarsEdit.Text := IntToStr(OS3MainFrm.DataGrid.ColCount-1);
if OS3MainFrm.FileNameEdit.Text = '' then exit;
end;
procedure TDictionaryFrm.RowDelBtnClick(Sender: TObject);
var
index : integer;
i, j : integer;
begin
index := DictGrid.Row;
if index = DictGrid.RowCount-1 then // last row
begin
for i := 0 to 7 do DictGrid.Cells[i,index] := '';
DictGrid.RowCount := DictGrid.RowCount - 1;
VarDefined[index] := false;
end
else
begin // move lines below current lines up and delete last
for i := index+1 to DictGrid.RowCount - 1 do
begin
for j := 0 to 6 do DictGrid.Cells[j,i-1] := DictGrid.Cells[j,i];
VarDefined[i-1] := VarDefined[i];
end;
VarDefined[DictGrid.RowCount-1] := false;
DictGrid.RowCount := DictGrid.RowCount - 1;
for i := 1 to DictGrid.RowCount - 1 do // renumber rows
DictGrid.Cells[0,i] := IntToStr(i);
end;
end;
procedure TDictionaryFrm.RowInstBtnClick(Sender: TObject);
var
index : integer;
i, j : integer;
begin
index := DictGrid.Row;
DictGrid.RowCount := DictGrid.RowCount + 1; // add new row to grid
// move all rows from index down 1
for i := DictGrid.RowCount - 1 downto index+1 do
begin
for j := 1 to 6 do
begin
DictGrid.Cells[j,i] := DictGrid.Cells[j,i-1];
end;
VarDefined[i] := VarDefined[i-1];
end;
// place default values in new row
Defaults(Self,index);
VarDefined[index] := true;
end;
procedure TDictionaryFrm.FormShow(Sender: TObject);
begin
DictGrid.ColCount := 8;
if NoVariables = 0 then DictGrid.RowCount := 2
else DictGrid.RowCount := NoVariables + 1;
// insert headings
DictGrid.Cells[0,0] := 'VAR/CHAR.';
DictGrid.Cells[1,0] := 'Short Name';
DictGrid.Cells[2,0] := 'Long Name';
DictGrid.Cells[3,0] := 'Width';
DictGrid.Cells[4,0] := 'Type';
DictGrid.Cells[5,0] := 'Decimals';
DictGrid.Cells[6,0] := 'Missing';
DictGrid.Cells[7,0] := 'Justify';
DictGrid.Cells[0,1] := '1';
DictGrid.ColWidths[1] := 100;
DictGrid.ColWidths[2] := 200;
DictGrid.ColWidths[3] := 50;
DictGrid.ColWidths[4] := 50;
DictGrid.ColWidths[5] := 50;
DictGrid.ColWidths[6] := 50;
DictGrid.ColWidths[7] := 50;
// check for absence of a defined variable
if VarDefined[1] = false then
begin
// load defaults
Defaults(Self,1);
VarDefined[1] := true;
end;
end;
procedure TDictionaryFrm.HelpBtnClick(Sender: TObject);
begin
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TDictionaryFrm.JustComboClick(Sender: TObject);
var
achar : char;
astr : string;
index : integer;
GRow : integer;
begin
index := JustCombo.ItemIndex;
astr := JustCombo.Items.Strings[index];
achar := astr[2];
GRow := DictGrid.Row;
DictGrid.Cells[7,GRow] := achar;
JustCombo.Text := 'Justification';
end;
procedure TDictionaryFrm.JustComboSelect(Sender: TObject);
var
achar : char;
astr : string;
index : integer;
GRow : integer;
begin
index := JustCombo.ItemIndex;
astr := JustCombo.Items.Strings[index];
achar := astr[2];
GRow := DictGrid.Row;
if GRow>0 then DictGrid.Cells[7,GRow] := achar;
JustCombo.Text := 'Justification';
DictGrid.SetFocus;
end;
procedure TDictionaryFrm.CancelBtnClick(Sender: TObject);
begin
DictionaryFrm.Hide;
end;
procedure TDictionaryFrm.DictGridClick(Sender: TObject);
begin
DictGrid.SelectedColor := clGray;
end;
procedure TDictionaryFrm.DictGridKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
x, y, v : integer;
begin
x := DictGrid.Row;
y := DictGrid.Col;
v := ord(Key);
case v of
13 : if y = 7 then DictGrid.Col := 1 else DictGrid.Col := DictGrid.Col + 1;
40 : begin // arrow down key
if x = DictGrid.RowCount - 1 then
begin
if DictGrid.RowCount < (x + 2) then
DictGrid.RowCount := DictGrid.RowCount + 1;
Defaults(Self,x+1);
VarDefined[x+1] := true;
end;
end;
end;
end;
procedure TDictionaryFrm.Defaults(Sender: TObject; row : integer);
var i : integer;
begin
DictGrid.Cells[0,row] := IntToStr(row);
DictGrid.Cells[1,row] := 'VAR.' + IntToStr(row);
DictGrid.Cells[2,row] := 'VARIABLE ' + IntToStr(row);
DictGrid.Cells[3,row] := '8';
DictGrid.Cells[4,row] := 'F';
DictGrid.Cells[5,row] := '2';
DictGrid.Cells[6,row] := ' ';
DictGrid.Cells[7,row] := 'L';
for i := 1 to DictGrid.RowCount - 1 do DictGrid.Cells[0,i] := IntToStr(i);
if OptionsFrm.DefaultMiss = 0 then DictGrid.Cells[6,row] := '';
if OptionsFrm.DefaultMiss = 1 then DictGrid.Cells[6,row] := '.';
if OptionsFrm.DefaultMiss = 2 then DictGrid.Cells[6,row] := '0';
If OptionsFrm.DefaultMiss = 3 then DictGrid.Cells[6,row] := '99999';
if OptionsFrm.DefaultJust <> 0 then
begin
if OptionsFrm.DefaultJust = 1 then DictGrid.Cells[7,row] := 'C'
else DictGrid.Cells[7,row] := 'R';
end;
end;
procedure TDictionaryFrm.TypeComboSelect(Sender: TObject);
var
achar : char;
astr : string;
index : integer;
GRow : integer;
begin
index := TypeCombo.ItemIndex;
astr := TypeCombo.Items.Strings[index];
achar := astr[2];
GRow := DictGrid.Row;
if GRow>0 then
begin
DictGrid.Cells[4,GRow] := achar;
if achar='F' then DictGrid.Cells[5,GRow] := '3' // set decimal digits
else DictGrid.Cells[5,GRow] := '0';
end;
TypeCombo.Text := 'Type';
DictGrid.SetFocus;
end;
procedure TDictionaryFrm.DelRow(row : integer);
begin
DictGrid.Row := row;
TempVarItm.Clear;
DictGrid.Rows[row].SaveToStream(TempVarItm);
RowDelBtnClick(Self);
end;
//-------------------------------------------------------------------
procedure TDictionaryFrm.NewVar(row : integer);
var
i, j : integer;
begin
DictGrid.RowCount := DictGrid.RowCount + 1; // add new row
NoVariables := NoVariables + 1;
if (row < NoVariables) AND (NoVariables > 1) then // move current rows down 1
begin
for i := NoVariables downto row + 1 do
begin
for j := 1 to 7 do DictGrid.Cells[j,i] := DictGrid.Cells[j,i-1];
VarDefined[i] := VarDefined[i-1];
end;
end;
// put default values in new variable
Defaults(Self,row);
VarDefined[row] := true;
// add to grid if grid column does not exist
if OS3MainFrm.DataGrid.ColCount < row then
begin
OS3MainFrm.DataGrid.ColCount := OS3MainFrm.DataGrid.ColCount + 1;
OS3MainFrm.DataGrid.Cells[row,0] := DictionaryFrm.DictGrid.Cells[1,row];
end;
ReturnBtnClick(Self);
end;
//-------------------------------------------------------------------
procedure TDictionaryFrm.PasteVar(row : integer);
var i : integer;
begin
TempVarItm.Position := 0;
DictGrid.Rows[row].LoadFromStream(TempVarItm);
for i := 1 to DictGrid.RowCount - 1 do DictGrid.Cells[0,i] := IntToStr(i);
// FormShow(Self);
end;
//-------------------------------------------------------------------
procedure TDictionaryFrm.CopyVar(row : integer);
begin
DictGrid.Row := row;
TempVarItm.Clear;
DictGrid.Rows[row].SaveToStream(TempVarItm);
end;
//-------------------------------------------------------------------
initialization
{$I dictionaryunit.lrs}
end.

View File

@ -0,0 +1,513 @@
object DIFFrm: TDIFFrm
Left = 140
Height = 455
Top = 99
Width = 537
Caption = 'DIF Specifications'
ClientHeight = 455
ClientWidth = 537
OnShow = FormShow
LCLVersion = '0.9.28.2'
object Label1: TLabel
Left = 8
Height = 14
Top = 16
Width = 90
Caption = 'Available Variables'
ParentColor = False
end
object Label2: TLabel
Left = 211
Height = 14
Top = 16
Width = 72
Caption = 'Items Selected'
ParentColor = False
end
object Label3: TLabel
Left = 214
Height = 14
Top = 208
Width = 85
Caption = 'Grouping Variable'
ParentColor = False
end
object Label4: TLabel
Left = 207
Height = 14
Top = 288
Width = 116
Caption = 'Reference Group Code?'
ParentColor = False
end
object Label5: TLabel
Left = 207
Height = 14
Top = 320
Width = 91
Caption = 'Focal Group Code?'
ParentColor = False
end
object Label6: TLabel
Left = 207
Height = 14
Top = 352
Width = 99
Caption = 'No. of Score Levels?'
ParentColor = False
end
object Label7: TLabel
Left = 376
Height = 14
Top = 264
Width = 119
Caption = 'Enter Bounds for Levels:'
ParentColor = False
end
object Label8: TLabel
Left = 376
Height = 14
Top = 296
Width = 28
Caption = 'Down'
ParentColor = False
end
object Label9: TLabel
Left = 448
Height = 14
Top = 296
Width = 14
Caption = 'Up'
ParentColor = False
end
object Label10: TLabel
Left = 488
Height = 14
Top = 296
Width = 26
Caption = 'Level'
ParentColor = False
end
object Label11: TLabel
Left = 377
Height = 14
Top = 351
Width = 63
Caption = 'Lower Bound'
ParentColor = False
end
object UpBoundlabel: TLabel
Left = 373
Height = 14
Top = 384
Width = 67
Caption = 'Upper Bound:'
ParentColor = False
end
object VarList: TListBox
Left = 8
Height = 296
Top = 35
Width = 157
ItemHeight = 0
MultiSelect = True
TabOrder = 0
end
object ItemInBtn: TBitBtn
Left = 173
Height = 27
Top = 40
Width = 30
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 = ItemInBtnClick
TabOrder = 1
end
object ItemOutBtn: TBitBtn
Left = 173
Height = 27
Top = 72
Width = 30
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 = ItemOutBtnClick
TabOrder = 2
end
object AllBtn: TBitBtn
Left = 173
Height = 27
Top = 120
Width = 30
Caption = 'ALL'
NumGlyphs = 0
OnClick = AllBtnClick
TabOrder = 3
end
object GrpInBtn: TBitBtn
Left = 173
Height = 27
Top = 208
Width = 30
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 = GrpInBtnClick
TabOrder = 4
end
object GrpOutBtn: TBitBtn
Left = 173
Height = 27
Top = 240
Width = 30
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 = GrpOutBtnClick
TabOrder = 5
end
object ItemsList: TListBox
Left = 211
Height = 149
Top = 35
Width = 148
ItemHeight = 0
TabOrder = 6
end
object GroupVarEdit: TEdit
Left = 211
Height = 21
Top = 224
Width = 147
TabOrder = 7
Text = 'GroupVarEdit'
end
object RefGrpEdit: TEdit
Left = 329
Height = 21
Top = 281
Width = 34
TabOrder = 8
Text = 'RefGrpEdit'
end
object TrgtGrpEdit: TEdit
Left = 329
Height = 21
Top = 310
Width = 34
TabOrder = 9
Text = 'Edit1'
end
object LevelsEdit: TEdit
Left = 329
Height = 21
Top = 344
Width = 34
OnExit = LevelsEditExit
TabOrder = 10
Text = 'Edit1'
end
object GroupBox1: TGroupBox
Left = 368
Height = 233
Top = 16
Width = 160
Caption = 'Options'
ClientHeight = 215
ClientWidth = 156
TabOrder = 11
object ItemStatsChk: TCheckBox
Left = 7
Height = 17
Top = 3
Width = 88
Caption = 'Item Statistics'
TabOrder = 0
end
object TestStatsChk: TCheckBox
Left = 7
Height = 17
Top = 23
Width = 87
Caption = 'Test Statistics'
TabOrder = 1
end
object ItemCorrsChk: TCheckBox
Left = 7
Height = 17
Top = 47
Width = 125
Caption = 'Item Intercorrelations'
TabOrder = 2
end
object ItemTestChk: TCheckBox
Left = 8
Height = 17
Top = 71
Width = 128
Caption = 'Item-Test Correlations'
TabOrder = 3
end
object AlphaChk: TCheckBox
Left = 8
Height = 17
Top = 95
Width = 95
Caption = 'Alpha Reliability'
TabOrder = 4
end
object MHChk: TCheckBox
Left = 7
Height = 17
Top = 119
Width = 99
Caption = 'Mantel-Haenszel'
TabOrder = 5
end
object LogisticChk: TCheckBox
Left = 8
Height = 17
Top = 143
Width = 111
Caption = 'Logistic Regression'
TabOrder = 6
end
object CurvesChk: TCheckBox
Left = 8
Height = 17
Top = 167
Width = 109
Caption = 'Item Char. Curves'
TabOrder = 7
end
object CountsChk: TCheckBox
Left = 7
Height = 17
Top = 191
Width = 82
Caption = 'Level Counts'
TabOrder = 8
end
end
object LevelScroll: TScrollBar
Left = 376
Height = 16
Top = 315
Width = 89
Min = 1
PageSize = 0
Position = 1
TabOrder = 12
OnScroll = LevelScrollScroll
end
object LevelNoEdit: TEdit
Left = 481
Height = 21
Top = 313
Width = 33
TabOrder = 13
Text = 'LevelNoEdit'
end
object LowBoundEdit: TEdit
Left = 480
Height = 21
Top = 344
Width = 33
OnExit = LowBoundEditExit
TabOrder = 14
Text = 'Edit4'
end
object UpBoundEdit: TEdit
Left = 480
Height = 21
Top = 376
Width = 33
OnExit = UpBoundEditExit
TabOrder = 15
Text = 'Edit4'
end
object ResetBtn: TButton
Left = 104
Height = 32
Top = 408
Width = 69
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 16
end
object CancelBtn: TButton
Left = 192
Height = 32
Top = 408
Width = 69
Caption = 'Cancel'
ModalResult = 2
TabOrder = 17
end
object ComputeBtn: TButton
Left = 280
Height = 32
Top = 408
Width = 77
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 18
end
object ReturnBtn: TButton
Left = 373
Height = 32
Top = 408
Width = 72
Caption = 'Return'
ModalResult = 1
OnClick = ReturnBtnClick
TabOrder = 19
end
object HelpBtn: TButton
Tag = 122
Left = 8
Height = 32
Top = 408
Width = 82
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 20
end
end

View File

@ -0,0 +1,285 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TDIFFrm','FORMDATA',[
'TPF0'#7'TDIFFrm'#6'DIFFrm'#4'Left'#3#140#0#6'Height'#3#199#1#3'Top'#2'c'#5'W'
+'idth'#3#25#2#7'Caption'#6#18'DIF Specifications'#12'ClientHeight'#3#199#1#11
+'ClientWidth'#3#25#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#16#5'Width'#2'Z'#7'Ca'
+'ption'#6#19'Available Variables'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4
+'Left'#3#211#0#6'Height'#2#14#3'Top'#2#16#5'Width'#2'H'#7'Caption'#6#14'Item'
+'s Selected'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#214#0#6'Hei'
+'ght'#2#14#3'Top'#3#208#0#5'Width'#2'U'#7'Caption'#6#17'Grouping Variable'#11
+'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#3#207#0#6'Height'#2#14#3'Top'
+#3' '#1#5'Width'#2't'#7'Caption'#6#21'Reference Group Code?'#11'ParentColor'
+#8#0#0#6'TLabel'#6'Label5'#4'Left'#3#207#0#6'Height'#2#14#3'Top'#3'@'#1#5'Wi'
+'dth'#2'['#7'Caption'#6#17'Focal Group Code?'#11'ParentColor'#8#0#0#6'TLabel'
+#6'Label6'#4'Left'#3#207#0#6'Height'#2#14#3'Top'#3'`'#1#5'Width'#2'c'#7'Capt'
+'ion'#6#20'No. of Score Levels?'#11'ParentColor'#8#0#0#6'TLabel'#6'Label7'#4
+'Left'#3'x'#1#6'Height'#2#14#3'Top'#3#8#1#5'Width'#2'w'#7'Caption'#6#24'Ente'
+'r Bounds for Levels:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label8'#4'Left'#3'x'
+#1#6'Height'#2#14#3'Top'#3'('#1#5'Width'#2#28#7'Caption'#6#4'Down'#11'Parent'
+'Color'#8#0#0#6'TLabel'#6'Label9'#4'Left'#3#192#1#6'Height'#2#14#3'Top'#3'('
+#1#5'Width'#2#14#7'Caption'#6#2'Up'#11'ParentColor'#8#0#0#6'TLabel'#7'Label1'
+'0'#4'Left'#3#232#1#6'Height'#2#14#3'Top'#3'('#1#5'Width'#2#26#7'Caption'#6#5
+'Level'#11'ParentColor'#8#0#0#6'TLabel'#7'Label11'#4'Left'#3'y'#1#6'Height'#2
+#14#3'Top'#3'_'#1#5'Width'#2'?'#7'Caption'#6#11'Lower Bound'#11'ParentColor'
+#8#0#0#6'TLabel'#12'UpBoundlabel'#4'Left'#3'u'#1#6'Height'#2#14#3'Top'#3#128
+#1#5'Width'#2'C'#7'Caption'#6#12'Upper Bound:'#11'ParentColor'#8#0#0#8'TList'
+'Box'#7'VarList'#4'Left'#2#8#6'Height'#3'('#1#3'Top'#2'#'#5'Width'#3#157#0#10
+'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#9'ItemInBt'
+'n'#4'Left'#3#173#0#6'Height'#2#27#3'Top'#2'('#5'Width'#2#30#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'ItemInBtnClick'
+#8'TabOrder'#2#1#0#0#7'TBitBtn'#10'ItemOutBtn'#4'Left'#3#173#0#6'Height'#2#27
+#3'Top'#2'H'#5'Width'#2#30#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#15'ItemOutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'
+#6'AllBtn'#4'Left'#3#173#0#6'Height'#2#27#3'Top'#2'x'#5'Width'#2#30#7'Captio'
+'n'#6#3'ALL'#9'NumGlyphs'#2#0#7'OnClick'#7#11'AllBtnClick'#8'TabOrder'#2#3#0
+#0#7'TBitBtn'#8'GrpInBtn'#4'Left'#3#173#0#6'Height'#2#27#3'Top'#3#208#0#5'Wi'
+'dth'#2#30#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
+'GrpInBtnClick'#8'TabOrder'#2#4#0#0#7'TBitBtn'#9'GrpOutBtn'#4'Left'#3#173#0#6
+'Height'#2#27#3'Top'#3#240#0#5'Width'#2#30#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'GrpOutBtnClick'#8'TabO'
+'rder'#2#5#0#0#8'TListBox'#9'ItemsList'#4'Left'#3#211#0#6'Height'#3#149#0#3
+'Top'#2'#'#5'Width'#3#148#0#10'ItemHeight'#2#0#8'TabOrder'#2#6#0#0#5'TEdit'
+#12'GroupVarEdit'#4'Left'#3#211#0#6'Height'#2#21#3'Top'#3#224#0#5'Width'#3
+#147#0#8'TabOrder'#2#7#4'Text'#6#12'GroupVarEdit'#0#0#5'TEdit'#10'RefGrpEdit'
+#4'Left'#3'I'#1#6'Height'#2#21#3'Top'#3#25#1#5'Width'#2'"'#8'TabOrder'#2#8#4
+'Text'#6#10'RefGrpEdit'#0#0#5'TEdit'#11'TrgtGrpEdit'#4'Left'#3'I'#1#6'Height'
+#2#21#3'Top'#3'6'#1#5'Width'#2'"'#8'TabOrder'#2#9#4'Text'#6#5'Edit1'#0#0#5'T'
+'Edit'#10'LevelsEdit'#4'Left'#3'I'#1#6'Height'#2#21#3'Top'#3'X'#1#5'Width'#2
+'"'#6'OnExit'#7#14'LevelsEditExit'#8'TabOrder'#2#10#4'Text'#6#5'Edit1'#0#0#9
+'TGroupBox'#9'GroupBox1'#4'Left'#3'p'#1#6'Height'#3#233#0#3'Top'#2#16#5'Widt'
+'h'#3#160#0#7'Caption'#6#7'Options'#12'ClientHeight'#3#215#0#11'ClientWidth'
+#3#156#0#8'TabOrder'#2#11#0#9'TCheckBox'#12'ItemStatsChk'#4'Left'#2#7#6'Heig'
+'ht'#2#17#3'Top'#2#3#5'Width'#2'X'#7'Caption'#6#15'Item Statistics'#8'TabOrd'
+'er'#2#0#0#0#9'TCheckBox'#12'TestStatsChk'#4'Left'#2#7#6'Height'#2#17#3'Top'
+#2#23#5'Width'#2'W'#7'Caption'#6#15'Test Statistics'#8'TabOrder'#2#1#0#0#9'T'
+'CheckBox'#12'ItemCorrsChk'#4'Left'#2#7#6'Height'#2#17#3'Top'#2'/'#5'Width'#2
+'}'#7'Caption'#6#22'Item Intercorrelations'#8'TabOrder'#2#2#0#0#9'TCheckBox'
+#11'ItemTestChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2'G'#5'Width'#3#128#0#7'C'
+'aption'#6#22'Item-Test Correlations'#8'TabOrder'#2#3#0#0#9'TCheckBox'#8'Alp'
+'haChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2'_'#5'Width'#2'_'#7'Caption'#6#17
+'Alpha Reliability'#8'TabOrder'#2#4#0#0#9'TCheckBox'#5'MHChk'#4'Left'#2#7#6
+'Height'#2#17#3'Top'#2'w'#5'Width'#2'c'#7'Caption'#6#15'Mantel-Haenszel'#8'T'
,'abOrder'#2#5#0#0#9'TCheckBox'#11'LogisticChk'#4'Left'#2#8#6'Height'#2#17#3
+'Top'#3#143#0#5'Width'#2'o'#7'Caption'#6#19'Logistic Regression'#8'TabOrder'
+#2#6#0#0#9'TCheckBox'#9'CurvesChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#3#167#0
+#5'Width'#2'm'#7'Caption'#6#17'Item Char. Curves'#8'TabOrder'#2#7#0#0#9'TChe'
+'ckBox'#9'CountsChk'#4'Left'#2#7#6'Height'#2#17#3'Top'#3#191#0#5'Width'#2'R'
+#7'Caption'#6#12'Level Counts'#8'TabOrder'#2#8#0#0#0#10'TScrollBar'#11'Level'
+'Scroll'#4'Left'#3'x'#1#6'Height'#2#16#3'Top'#3';'#1#5'Width'#2'Y'#3'Min'#2#1
+#8'PageSize'#2#0#8'Position'#2#1#8'TabOrder'#2#12#8'OnScroll'#7#17'LevelScro'
+'llScroll'#0#0#5'TEdit'#11'LevelNoEdit'#4'Left'#3#225#1#6'Height'#2#21#3'Top'
+#3'9'#1#5'Width'#2'!'#8'TabOrder'#2#13#4'Text'#6#11'LevelNoEdit'#0#0#5'TEdit'
+#12'LowBoundEdit'#4'Left'#3#224#1#6'Height'#2#21#3'Top'#3'X'#1#5'Width'#2'!'
+#6'OnExit'#7#16'LowBoundEditExit'#8'TabOrder'#2#14#4'Text'#6#5'Edit4'#0#0#5
+'TEdit'#11'UpBoundEdit'#4'Left'#3#224#1#6'Height'#2#21#3'Top'#3'x'#1#5'Width'
+#2'!'#6'OnExit'#7#15'UpBoundEditExit'#8'TabOrder'#2#15#4'Text'#6#5'Edit4'#0#0
+#7'TButton'#8'ResetBtn'#4'Left'#2'h'#6'Height'#2' '#3'Top'#3#152#1#5'Width'#2
+'E'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#16#0#0
+#7'TButton'#9'CancelBtn'#4'Left'#3#192#0#6'Height'#2' '#3'Top'#3#152#1#5'Wid'
+'th'#2'E'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#17#0#0#7
+'TButton'#10'ComputeBtn'#4'Left'#3#24#1#6'Height'#2' '#3'Top'#3#152#1#5'Widt'
+'h'#2'M'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'
+#2#18#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'u'#1#6'Height'#2' '#3'Top'#3#152
+#1#5'Width'#2'H'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#7'OnClick'#7#14
+'ReturnBtnClick'#8'TabOrder'#2#19#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2'z'#4'Le'
+'ft'#2#8#6'Height'#2' '#3'Top'#3#152#1#5'Width'#2'R'#7'Caption'#6#4'Help'#7
+'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2#20#0#0#0
]);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,596 @@
unit DISTRIBUNIT;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, BlankFrmUnit, OutPutUnit, FunctionsLib, Globals,
Printers, Math;
type
TwoCol = array[1..2,1..100] of double;
type
{ TDistribFrm }
TDistribFrm = class(TForm)
AlphaEdit: TEdit;
DF1Edit: TEdit;
DF2Edit: TEdit;
MeanEdit: TEdit;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
GroupBox2: TGroupBox;
AlphaLabel: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
NDChk: TCheckBox;
ChiChk: TCheckBox;
FChk: TCheckBox;
GroupBox1: TGroupBox;
procedure ChiChkClick(Sender: TObject);
procedure ComputeBtnClick(Sender: TObject);
procedure FChkClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure NDChkClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
procedure NDPlot(Sender : TObject);
procedure ChiPlot(Sender : TObject);
procedure FPlot(Sender : TObject);
procedure Hscale(Xmin, Xmax : double; Nsteps : integer;
acolor : TColor; FontSize : integer;
X, Y, Xlength : integer;
charLabel : string; Sender : TObject);
procedure Vscale(Ymin, Ymax : double; Nsteps : integer;
acolor : TColor; FontSize : integer;
X, Y, Ylength : integer;
charLabel : string; Sender : TObject);
procedure NormPts(zMin, zMax : double; Npts : integer;
VAR realpts : TwoCol;
Sender : TObject);
procedure PltPts(realpts : TwoCol;
Xmax, Xmin, Ymax, Ymin : double;
Npts, XaxisStart, YaxisStart, XaxisRange : integer;
YaxisRange : integer;
acolor : TColor; Sender : TObject);
procedure ChiPts(cMin, cMax : double;
Npts, df : integer;
VAR realpts : TwoCol;
Sender : TObject);
procedure FPts(FMin, FMax : double;
Npts, df1, df2 : integer;
VAR realpts : TwoCol;
Sender : TObject);
function chi2func(chisqr, df : double) : double;
function Ffunc(F : double; df1, df2 : integer) : double;
public
{ public declarations }
end;
var
DistribFrm: TDistribFrm;
implementation
{ TDistribFrm }
procedure TDistribFrm.ResetBtnClick(Sender: TObject);
begin
NDChk.Checked := false;
ChiChk.Checked := false;
FChk.Checked := false;
AlphaEdit.Text := '0.05';
DF1Edit.Text := '';
DF2Edit.Text := '';
MeanEdit.Text := '';
GroupBox2.Visible := false;
end;
procedure TDistribFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TDistribFrm.NDChkClick(Sender: TObject);
begin
if NDChk.Checked then
begin
GroupBox2.Visible := true;
AlphaLabel.Visible := true;
AlphaEdit.Visible := true;
DF1Edit.Visible := false;
Label2.Visible := false;
Label3.Visible := false;
Label4.Visible := false;
DF2Edit.Visible := false;
MeanEdit.Visible := false;
end
else GroupBox2.Visible := false;
end;
procedure TDistribFrm.ComputeBtnClick(Sender: TObject);
begin
if NDChk.Checked then
begin
NDPlot(self);
end;
if ChiChk.Checked then
begin
ChiPlot(self);
end;
if FChk.Checked then
begin
FPlot(self);
end;
end;
procedure TDistribFrm.FChkClick(Sender: TObject);
begin
if FChk.Checked then
begin
GroupBox2.Visible := true;
Label3.Visible := true;
AlphaLabel.Visible := true;
AlphaEdit.Visible := true;
DF1Edit.Visible := true;
DF2Edit.Visible := true;
Label2.Visible := true;
Label4.Visible := false;
MeanEdit.Visible := false;
end
else GroupBox2.Visible := false;
end;
procedure TDistribFrm.ChiChkClick(Sender: TObject);
begin
if ChiChk.Checked then
begin
GroupBox2.Visible := true;
Label2.Visible := true;
DF1Edit.Visible := true;
Label3.Visible := false;
Label4.Visible := false;
AlphaLabel.Visible := true;
AlphaEdit.Visible := true;
DF2Edit.Visible := false;
MeanEdit.Visible := false;
end
else
begin
GroupBox2.Visible := false;
end;
end;
procedure TDistribFrm.NDPlot(Sender: TObject);
var
charLabel : string;
Clwidth, Clheight,X, Y, XaxisStart, XaxisEnd, YaxisStart, YaxisEnd : integer;
i, Xrange, Yrange, t : integer;
alpha, h, z, hprop, zprop : double;
realpts : TwoCol;
begin
for i := 1 to 100 do realpts[1,i] := 0.0;
for i := 1 to 100 do realpts[2,i] := 0.0;
charLabel := 'Normal Distribution. Alpha = ';
BlankFrm.Image1.Canvas.Clear;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
BlankFrm.Image1.Canvas.Clear;
BlankFrm.Image1.Canvas.FloodFill(1,1,clWhite,fsborder);
BlankFrm.Image1.Canvas.Pen.Width := 2;
Clwidth := BlankFrm.Image1.Width;
Clheight := BlankFrm.Image1.Height;
XaxisStart := Clwidth div 8;
XaxisEnd := Clwidth - (Clwidth div 8);
YaxisStart := (Clheight * 7) div 10;
YaxisEnd := Clheight div 10;
Xrange := XaxisEnd - XaxisStart;
Yrange := YaxisStart - YaxisEnd;
alpha := StrToFloat(AlphaEdit.Text);
BlankFrm.Show;
// Create values of normal curve
NormPts(-4.0, 4.0, 100, realpts, self);
PltPts(realpts, 4.0, -4.0, 0.5, 0.0, 100, XaxisStart, YaxisStart, Xrange,
Yrange, clBlack, self);
// Draw line for alpha z := 1.645
charLabel := charLabel + AlphaEdit.Text;
BlankFrm.Caption := charLabel;
z := inversez(1.0 - alpha);
zprop := (4.0 + z) / 8.0;
h := (1.0 / sqrt(2.0 * 3.1415)) * (1.0 / exp(z * z / 2.0));
hprop := (0.5 - h) / 0.5;
X := round( zprop * Xrange)+ XaxisStart;
Y := YaxisEnd + round( hprop * Yrange);
BlankFrm.Image1.Canvas.MoveTo(X,YaxisStart);
BlankFrm.Image1.Canvas.LineTo(X,Y-10); // alpha cutoff
// floodfill rejection section with red
BlankFrm.Image1.Canvas.Brush.Color := clRed;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
// create labeled axis
Hscale(-4.0, 4.0, 11, clWhite, 10, XaxisStart, YaxisStart, Xrange,'z SCALE',self);
Vscale(0.0, 0.5, 11, clWhite, 10, XaxisStart, YaxisStart, Yrange, 'DENSITY',self);
// Print Heading
t := BlankFrm.Image1.Canvas.TextWidth(charLabel);
X := (BlankFrm.Width div 2) - (t div 2);
BlankFrm.Image1.Canvas.TextOut(X,0,charLabel);
charLabel := 'Critical Value = ';
charLabel := charLabel + format('%6.3f',[z]);
t := BlankFrm.Image1.Canvas.TextWidth(charLabel);
X := (BlankFrm.Image1.Width div 2) - (t div 2);
BlankFrm.Image1.Canvas.TextOut(X,BlankFrm.Image1.Canvas.TextHeight(charLabel),charLabel);
end;
procedure TDistribFrm.ChiPlot(Sender: TObject);
var
charLabel : string;
Clwidth, Clheight, X, Y, XaxisStart, XaxisEnd, YaxisStart, YaxisEnd : integer;
i, Xrange, Yrange, df, t : integer;
alpha, h, z, hprop, zprop, MaxChi, MaxProb : double;
realpts : TwoCol;
begin
BlankFrm.Image1.Canvas.Clear;
for i := 1 to 100 do realpts[1,i] := 0.0;
for i := 1 to 100 do realpts[2,i] := 0.0;
charLabel := 'Chi Squared Distribution. Alpha = ';
MaxProb := 0.0;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
BlankFrm.Image1.Canvas.Clear;
BlankFrm.Image1.Canvas.FloodFill(1,1,clWhite,fsborder);
BlankFrm.Image1.Canvas.Pen.Width := 2;
Clwidth := BlankFrm.Image1.Width;
Clheight := BlankFrm.Image1.Height;
XaxisStart := Clwidth div 8;
XaxisEnd := Clwidth - (Clwidth div 8);
YaxisStart := (Clheight * 7) div 10;
YaxisEnd := Clheight div 10;
Xrange := XaxisEnd - XaxisStart;
Yrange := YaxisStart - YaxisEnd;
alpha := StrToFloat(AlphaEdit.Text);
charLabel := charLabel + AlphaEdit.Text;
df := StrToInt(DF1Edit.Text);
if (df < 1) or (df > 100) then exit;
charLabel := charLabel + ' D.F. = ';
charLabel := charLabel + DF1Edit.Text;
BlankFrm.Caption := charLabel;
BlankFrm.Show;
// Create values of chi-squared curve
MaxChi := 125.0;
ChiPts(0.0, MaxChi, 100, df, realpts, self);
for i := 1 to 100 do
begin
if (realpts[2,i] > MaxProb) then MaxProb := realpts[2,i];
end;
PltPts(realpts, MaxChi, 0.0, MaxProb, 0.0, 100, XaxisStart, YaxisStart, Xrange,
Yrange, clBlack, self);
// Draw line for alpha
z := inversechi(1.0-alpha,df);
zprop := z / MaxChi;
h := chi2func(z,df);
hprop := (MaxProb - h) / MaxProb;
X := round( zprop * Xrange)+ XaxisStart;
Y := YaxisEnd + round( hprop * Yrange);
BlankFrm.Image1.Canvas.MoveTo(X,YaxisStart);
BlankFrm.Image1.Canvas.LineTo(X,Y); // alpha cutoff
// floodfill main section with blue
BlankFrm.Image1.Canvas.Brush.Color := clBlue;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
// create charLabeled axis
Hscale(0.0, MaxChi, 11, clWhite, 10, XaxisStart, YaxisStart,
Xrange,'CHI SQUARED SCALE',self);
Vscale(0.0, MaxProb, 11, clWhite, 10, XaxisStart, YaxisStart,
Yrange, 'DENSITY',self);
// Print Heading
t := BlankFrm.Image1.Canvas.TextWidth(charLabel);
X := (BlankFrm.Width div 2) - (t div 2);
BlankFrm.Image1.Canvas.TextOut(X,0,charLabel);
charLabel := 'Critical Value = ';
charLabel := charLabel + format('%6.3f',[z]);
t := BlankFrm.Image1.Canvas.TextWidth(charLabel);
X := (BlankFrm.Image1.Width div 2) - (t div 2);
BlankFrm.Image1.Canvas.TextOut(X,BlankFrm.Image1.Canvas.TextHeight(charLabel),charLabel);
end;
procedure TDistribFrm.FPlot(Sender: TObject);
var
charLabel : string;
Clwidth, Clheight, X, Y, XaxisStart, XaxisEnd, YaxisStart, YaxisEnd : integer;
i, Xrange, Yrange, t, df1, df2 : integer;
realpts : TwoCol;
alpha, h, F, hprop, Fprop, MaxProb, MaxF : double;
done : boolean;
begin
BlankFrm.Image1.Canvas.Clear;
for i := 1 to 100 do realpts[1,i] := 0.0;
for i := 1 to 100 do realpts[2,i] := 0.0;
MaxProb := 0.0;
charLabel := 'F Distribution. Alpha = ';
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
BlankFrm.Image1.Canvas.Clear;
BlankFrm.Image1.Canvas.FloodFill(1,1,clWhite,fsborder);
BlankFrm.Image1.Canvas.Pen.Width := 2;
Clwidth := BlankFrm.Image1.Width;
Clheight := BlankFrm.Image1.Height;
XaxisStart := Clwidth div 8;
XaxisEnd := Clwidth - (Clwidth div 8);
YaxisStart := (Clheight * 7) div 10;
YaxisEnd := Clheight div 10;
Xrange := XaxisEnd - XaxisStart;
Yrange := YaxisStart - YaxisEnd;
alpha := StrToFloat(AlphaEdit.Text);
charLabel := charLabel + AlphaEdit.Text;
df1 := StrToInt(DF1Edit.Text);
charLabel := charLabel + ' D.F.1 = ';
charLabel := charLabel + DF1Edit.Text;
df2 := StrToInt(DF2Edit.Text);
charLabel := charLabel + ' , D.F.2 = ';
charLabel := charLabel + DF2Edit.Text;
BlankFrm.Caption := charLabel;
BlankFrm.Show;
// Create values of F curve
MaxF := 20.0;
done := false;
while not done do
begin
h := Ffunc(MaxF, df1, df2);
if (h < 0.001) then MaxF := MaxF - 1.0
else done := true;
end;
FPts(0.0, MaxF, 100, df1, df2, realpts, self);
for i := 1 to 100 do
begin
if (realpts[2,i] > MaxProb) then MaxProb := realpts[2,i];
end;
PltPts(realpts, MaxF, 0.0, MaxProb, 0.0, 100, XaxisStart, YaxisStart, Xrange,
Yrange, clBlack, self);
// Draw line for alpha
F := fpercentpoint(1.0-alpha,df1,df2);
Fprop := F / MaxF;
h := Ffunc(F,df1,df2);
hprop := (MaxProb - h) / MaxProb;
X := round( Fprop * Xrange)+ XaxisStart;
Y := YaxisEnd + round( hprop * Yrange);
BlankFrm.Image1.Canvas.MoveTo(X,YaxisStart);
BlankFrm.Image1.Canvas.LineTo(X,Y); // alpha cutoff
// floodfill main section with blue
BlankFrm.Canvas.Brush.Color := clBlue;
// create charLabeled axis
Hscale(0.0, MaxF, 11, clWhite, 10, XaxisStart, YaxisStart,
Xrange,'F SCALE',self);
Vscale(0.0, MaxProb, 11, clWhite, 10, XaxisStart, YaxisStart,
Yrange, 'DENSITY',self);
// Print Heading
t := BlankFrm.Image1.Canvas.TextWidth(charLabel);
X := (BlankFrm.Image1.Width div 2) - (t div 2);
BlankFrm.Image1.Canvas.TextOut(X,0,charLabel);
charLabel := 'Critical Value = ';
charLabel := charLabel + format('%6.3f',[F]);
t := BlankFrm.Image1.Canvas.TextWidth(charLabel);
X := (BlankFrm.Image1.Width div 2) - (t div 2);
BlankFrm.Image1.Canvas.TextOut(X,BlankFrm.Image1.Canvas.TextHeight(charLabel),charLabel);
end;
procedure TDistribFrm.Hscale(Xmin, Xmax: double; Nsteps: integer;
acolor: TColor; FontSize: integer; X, Y, Xlength: integer; charLabel: string;
Sender: TObject);
var
i, TickEnd, Xpos, Ypos, TextX : integer;
Xincr, Xval : double;
Svalue, Ast : string;
begin
BlankFrm.Image1.Canvas.MoveTo(X,Y);
BlankFrm.Image1.Canvas.LineTo(X+Xlength,Y);
BlankFrm.Image1.Canvas.Font.Size := FontSize;
BlankFrm.Image1.Canvas.Brush.Color := acolor;
TickEnd := Y + 10;
Xincr := (Xmax - Xmin) / Nsteps;
for i := 0 to Nsteps do
begin
Xpos := round(((Xlength / Nsteps) * i) + X);
BlankFrm.Image1.Canvas.MoveTo(Xpos,Y);
BlankFrm.Image1.Canvas.LineTo(Xpos,TickEnd);
TextX := Xpos - 8;
Xval := Xmin + ( i * Xincr);
Svalue := format('%4.2f',[Xval]);
Ast := Svalue;
BlankFrm.Image1.Canvas.TextOut(TextX, Y+15, Ast);
end;
// print charLabel below X axis
Ypos := Y + 30;
Xpos := round((BlankFrm.Width / 2) - (BlankFrm.Image1.Canvas.TextWidth(charLabel) / 2));
BlankFrm.Image1.Canvas.TextOut(Xpos,Ypos,charLabel);
end;
procedure TDistribFrm.Vscale(Ymin, Ymax: double; Nsteps: integer;
acolor: TColor; FontSize: integer; X, Y, Ylength: integer; charLabel: string;
Sender: TObject);
var
TickEnd, Ypos, Xpos, TextY : integer;
Yincr, Yval : double;
Svalue, symbol, Ast : string;
chpixs, i : integer;
begin
BlankFrm.Image1.Canvas.MoveTo(X,Y);
BlankFrm.Image1.Canvas.LineTo(X,Y-Ylength);
BlankFrm.Image1.Canvas.Font.Size := FontSize;
BlankFrm.Image1.Canvas.Brush.Color := acolor;
TickEnd := X - 10;
Yincr := (Ymax - Ymin) / Nsteps;
TextY := 0;
for i := 0 to Nsteps do
begin
Ypos := round(Y - ((Ylength / Nsteps) * i));
BlankFrm.Image1.Canvas.MoveTo(X,Ypos);
BlankFrm.Image1.Canvas.LineTo(TickEnd,Ypos);
TextY := TickEnd - 30;
Yval := Ymin + ( i * Yincr);
Svalue := format('%4.2f',[Yval]);
Ast := Svalue;
BlankFrm.Image1.Canvas.TextOut(TextY, Ypos-8, Ast);
end;
// print charLabel vertically
Xpos := TextY - 15;
for i := 1 to Length(charLabel) do
begin
chpixs := BlankFrm.Image1.Canvas.TextHeight(charLabel);
Ypos := round(Y - (Ylength / 2) - ( (Length(charLabel) * chpixs) / 2 ) + (chpixs * i));
symbol := charLabel[i];
// symbol[2] := 0;
BlankFrm.Image1.Canvas.TextOut(Xpos,Ypos,symbol);
end;
end;
procedure TDistribFrm.NormPts(zMin, zMax: double; Npts: integer;
var realpts: TwoCol; Sender: TObject);
var
zIncr, z, h : double;
i : integer;
begin
zIncr := (zMax - zMin) / Npts;
for i := 1 to Npts do
begin
z := zMin + (zIncr * i);
h := (1.0 / sqrt(2.0 * 3.14159265358979)) *
( 1.0 / exp(z * z / 2.0));
realpts[1,i] := z;
realpts[2,i] := h;
end;
end;
procedure TDistribFrm.PltPts(realpts: TwoCol; Xmax, Xmin, Ymax, Ymin: double;
Npts, XaxisStart, YaxisStart, XaxisRange: integer; YaxisRange: integer;
acolor: TColor; Sender: TObject);
var
hprop, zprop, z, h : double;
i, X, Y : integer;
intpts : array[1..100] of TPoint;
begin
for i := 1 to Npts do
begin
z := realpts[1,i];
h := realpts[2,i];
zprop := (z - Xmin) / (Xmax - Xmin);
X := round((zprop * XaxisRange) + XaxisStart);
hprop := (h - Ymin) / (Ymax - Ymin);
Y := round(YaxisStart - (hprop * YaxisRange));
intpts[i] := Point(X,Y);
end;
BlankFrm.Image1.Canvas.Pen.Color := acolor;
BlankFrm.Image1.Canvas.Polyline(Slice(intpts,Npts - 1));
end;
procedure TDistribFrm.ChiPts(cMin, cMax: double; Npts, df: integer;
var realpts: TwoCol; Sender: TObject);
var
ratio1, ratio2, ratio3, cIncr, chi, h : double;
i : integer;
begin
ratio1 := df / 2.0;
ratio2 := (df - 2.0) / 2.0;
cIncr := (cMax - cMin) / Npts;
for i := 1 to Npts do
begin
chi := cMin + (cIncr * i);
// h := inversechi(chi, df);
ratio3 := chi / 2.0;
h := (1.0 / (power(2.0,ratio1) * exp(lngamma(ratio1)))) * power(chi,ratio2) * ( 1.0 / exp(ratio3));
realpts[1,i] := chi;
realpts[2,i] := h;
end;
end;
procedure TDistribFrm.FPts(FMin, FMax: double; Npts, df1, df2: integer;
var realpts: TwoCol; Sender: TObject);
var
FIncr, F, h : double;
i : integer;
begin
FIncr := (FMax - FMin) / Npts;
for i := 1 to Npts do
begin
F := FMin + (FIncr * i);
h := Ffunc(F, df1, df2);
realpts[1,i] := F;
realpts[2,i] := h;
end;
end;
function TDistribFrm.chi2func(chisqr, df: double): double;
var
ratio1, ratio2, ratio3, h : double;
begin
// Returns the height of the density curve for the chi-squared statistic
ratio1 := df / 2.0;
ratio2 := (df - 2.0) / 2.0;
ratio3 := chisqr / 2.0;
h := (1.0 / (power(2.0,ratio1) * exp(lngamma(ratio1)))) * power(chisqr,ratio2) * ( 1.0 / exp(ratio3));
Result := h;
end;
function TDistribFrm.Ffunc(F: double; df1, df2: integer): double;
var
ratio1, ratio2, ratio3, ratio4, h : double;
part1, part2, part3, part4, part5, part6, part7, part8, part9 : double;
begin
// Returns the height of the density curve for the F statistic
ratio1 := (df1 + df2) / 2.0;
ratio2 := (df1 - 2.0) / 2.0;
ratio3 := df1 / 2.0;
ratio4 := df2 / 2.0;
part1 := exp(lngamma(ratio1));
part2 := power(df1,ratio3);
part3 := power(df2,ratio4);
part4 := exp(lngamma(ratio3));
part5 := exp(lngamma(ratio4));
part6 := power(F,ratio2);
part7 := power((F*df1+df2),ratio1);
part8 := (part1 * part2 * part3) / (part4 * part5);
if (part7 = 0.0) then part9 := 0.0
else part9 := part6 / part7;
h := part8 * part9;
{
ratio1 := (df1 + df2) / 2.0;
ratio2 := (df1 - 2.0) / 2.0;
ratio3 := df1 / 2.0;
ratio4 := df2 / 2.0;
ffunc := ((gamma(ratio1) * realraise(df1,ratio3) *
realraise(df2,ratio4)) /
(gamma(ratio3) * gamma(ratio4))) *
(realraise(f,ratio2) / realraise((f*df1+df2),ratio1));
}
Result := h;
end;
initialization
{$I distribunit.lrs}
end.