LazStats: Inherit GuttmanUnit from BasicStatsReportFormUnit

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7899 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-11-23 00:09:14 +00:00
parent 128c037e14
commit b98f47bf19
6 changed files with 530 additions and 549 deletions

View File

@ -653,7 +653,7 @@
<Unit68> <Unit68>
<Filename Value="forms\analysis\measurement_programs\guttmanunit.pas"/> <Filename Value="forms\analysis\measurement_programs\guttmanunit.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="GuttmanFrm"/> <ComponentName Value="GuttmanForm"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="GuttmanUnit"/> <UnitName Value="GuttmanUnit"/>

View File

@ -14,7 +14,7 @@ object CompRelFrm: TCompRelFrm
OnResize = FormResize OnResize = FormResize
OnShow = FormShow OnShow = FormShow
Position = poMainFormCenter Position = poMainFormCenter
LCLVersion = '2.1.0.0' LCLVersion = '2.0.10.0'
object Label3: TLabel object Label3: TLabel
AnchorSideLeft.Control = RelList AnchorSideLeft.Control = RelList
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
@ -75,7 +75,7 @@ object CompRelFrm: TCompRelFrm
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = ButtonBevel
Left = 8 Left = 8
Height = 51 Height = 51
Top = 261 Top = 261
@ -183,7 +183,7 @@ object CompRelFrm: TCompRelFrm
OnClick = HelpBtnClick OnClick = HelpBtnClick
TabOrder = 8 TabOrder = 8
end end
object Bevel1: TBevel object ButtonBevel: TBevel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
@ -210,7 +210,7 @@ object CompRelFrm: TCompRelFrm
object Label2: TLabel object Label2: TLabel
AnchorSideLeft.Control = ItemList AnchorSideLeft.Control = ItemList
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
Left = 185 Left = 180
Height = 15 Height = 15
Top = 8 Top = 8
Width = 76 Width = 76
@ -227,11 +227,11 @@ object CompRelFrm: TCompRelFrm
Left = 8 Left = 8
Height = 228 Height = 228
Top = 25 Top = 25
Width = 115 Width = 120
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 8 BorderSpacing.Right = 6
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
Constraints.MinHeight = 200 Constraints.MinHeight = 200
ItemHeight = 0 ItemHeight = 0
@ -243,10 +243,10 @@ object CompRelFrm: TCompRelFrm
AnchorSideLeft.Control = Bevel2 AnchorSideLeft.Control = Bevel2
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VarList AnchorSideTop.Control = VarList
Left = 140 Left = 141
Height = 28 Height = 26
Top = 25 Top = 25
Width = 28 Width = 26
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 1 ImageIndex = 1
OnClick = InBtnClick OnClick = InBtnClick
@ -258,10 +258,10 @@ object CompRelFrm: TCompRelFrm
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = InBtn AnchorSideTop.Control = InBtn
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 140 Left = 141
Height = 28 Height = 26
Top = 57 Top = 55
Width = 28 Width = 26
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 0 ImageIndex = 0
@ -274,12 +274,12 @@ object CompRelFrm: TCompRelFrm
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = VarList AnchorSideTop.Control = VarList
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 131 Left = 134
Height = 25 Height = 25
Top = 127 Top = 127
Width = 46 Width = 40
AutoSize = True AutoSize = True
Caption = 'ALL' Caption = 'All'
OnClick = AllBtnClick OnClick = AllBtnClick
TabOrder = 3 TabOrder = 3
end end
@ -290,12 +290,12 @@ object CompRelFrm: TCompRelFrm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = GroupBox1 AnchorSideBottom.Control = GroupBox1
Left = 185 Left = 180
Height = 228 Height = 228
Top = 25 Top = 25
Width = 115 Width = 120
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 6
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
ItemHeight = 0 ItemHeight = 0

View File

@ -17,7 +17,7 @@ type
{ TCompRelFrm } { TCompRelFrm }
TCompRelFrm = class(TForm) TCompRelFrm = class(TForm)
Bevel1: TBevel; ButtonBevel: TBevel;
Bevel2: TBevel; Bevel2: TBevel;
HelpBtn: TButton; HelpBtn: TButton;
InBtn: TBitBtn; InBtn: TBitBtn;

View File

@ -1,186 +1,156 @@
object GuttmanFrm: TGuttmanFrm inherited GuttmanForm: TGuttmanForm
Left = 608 Left = 608
Height = 307 Height = 307
Top = 322 Top = 322
Width = 382 Width = 719
HelpType = htKeyword HelpType = htKeyword
HelpKeyword = 'html/GuttmanScalogramAnalysis.htm' HelpKeyword = 'html/GuttmanScalogramAnalysis.htm'
AutoSize = True
Caption = 'Guttman Sclaogram Analysis' Caption = 'Guttman Sclaogram Analysis'
ClientHeight = 307 ClientHeight = 307
ClientWidth = 382 ClientWidth = 719
OnActivate = FormActivate inherited ParamsPanel: TPanel
OnCreate = FormCreate Height = 291
OnShow = FormShow ClientHeight = 291
Position = poMainFormCenter inherited CloseBtn: TButton
LCLVersion = '2.1.0.0' Top = 266
object Label1: TLabel TabOrder = 8
AnchorSideLeft.Control = Owner end
AnchorSideTop.Control = Owner inherited ComputeBtn: TButton
Left = 8 Top = 266
TabOrder = 7
end
inherited ResetBtn: TButton
Top = 266
TabOrder = 6
end
inherited HelpBtn: TButton
Top = 266
TabOrder = 5
end
inherited ButtonBevel: TBevel
Top = 250
end
object Label1: TLabel[5]
AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = ParamsPanel
Left = 0
Height = 15 Height = 15
Top = 8 Top = 0
Width = 97 Width = 97
BorderSpacing.Left = 8
BorderSpacing.Top = 8
Caption = 'Variables Available' Caption = 'Variables Available'
ParentColor = False ParentColor = False
end end
object Label2: TLabel object Label2: TLabel[6]
AnchorSideLeft.Control = ItemList AnchorSideLeft.Control = ItemList
AnchorSideTop.Control = Owner AnchorSideTop.Control = ParamsPanel
Left = 222 Left = 171
Height = 15 Height = 15
Top = 8 Top = 0
Width = 76 Width = 76
BorderSpacing.Top = 8
Caption = 'Selected Items' Caption = 'Selected Items'
ParentColor = False ParentColor = False
end end
object VarList: TListBox object VarList: TListBox[7]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideTop.Control = Label1 AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = AllBtn AnchorSideRight.Control = AllBtn
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = ButtonBevel
Left = 8 Left = 0
Height = 233 Height = 233
Top = 25 Top = 17
Width = 152 Width = 119
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 8 BorderSpacing.Right = 6
Constraints.MinHeight = 200 Constraints.MinHeight = 200
ItemHeight = 0 ItemHeight = 0
MultiSelect = True MultiSelect = True
OnDblClick = VarListDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 0 TabOrder = 0
end end
object InBtn: TBitBtn object InBtn: TBitBtn[8]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
Left = 177 Left = 132
Height = 28 Height = 26
Top = 25 Top = 25
Width = 28 Width = 26
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 1 ImageIndex = 1
OnClick = InBtnClick OnClick = InBtnClick
Spacing = 0 Spacing = 0
TabOrder = 1 TabOrder = 1
end end
object OutBtn: TBitBtn object OutBtn: TBitBtn[9]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
Left = 177 Left = 132
Height = 28 Height = 26
Top = 56 Top = 56
Width = 28 Width = 26
Images = MainDataModule.ImageList Images = MainDataModule.ImageList
ImageIndex = 0 ImageIndex = 0
OnClick = OutBtnClick OnClick = OutBtnClick
Spacing = 0 Spacing = 0
TabOrder = 2 TabOrder = 2
end end
object AllBtn: TBitBtn object AllBtn: TBitBtn[10]
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = ParamsPanel
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
Left = 168 Left = 125
Height = 25 Height = 25
Top = 104 Top = 104
Width = 46 Width = 40
AutoSize = True AutoSize = True
Caption = 'ALL' Caption = 'All'
OnClick = AllBtnClick OnClick = AllBtnClick
Spacing = 0 Spacing = 0
TabOrder = 3 TabOrder = 3
end end
object ItemList: TListBox object ItemList: TListBox[11]
AnchorSideLeft.Control = AllBtn AnchorSideLeft.Control = AllBtn
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Label2 AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = ParamsPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = ButtonBevel
Left = 222 Left = 171
Height = 233 Height = 233
Top = 25 Top = 17
Width = 152 Width = 120
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 6
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 8
ItemHeight = 0 ItemHeight = 0
OnDblClick = ItemListDblClick
OnSelectionChange = VarListSelectionChange OnSelectionChange = VarListSelectionChange
TabOrder = 4 TabOrder = 4
end end
object ResetBtn: TButton end
AnchorSideRight.Control = ComputeBtn inherited ParamsSplitter: TSplitter
AnchorSideBottom.Control = Owner Height = 307
AnchorSideBottom.Side = asrBottom end
Left = 169 object PageControl: TPageControl[2]
Height = 25 Left = 312
Top = 274 Height = 291
Width = 54 Top = 8
Anchors = [akRight, akBottom] Width = 399
AutoSize = True ActivePage = GoodenoughPage
BorderSpacing.Left = 12 Align = alClient
BorderSpacing.Left = 4
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Right = 8 BorderSpacing.Right = 8
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
Caption = 'Reset' TabIndex = 1
OnClick = ResetBtnClick TabOrder = 2
TabOrder = 5 object CornellPage: TTabSheet
Caption = 'Cornell method'
end
object GoodenoughPage: TTabSheet
Caption = 'Goodenough method'
end end
object ComputeBtn: TButton
AnchorSideRight.Control = CloseBtn
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 231
Height = 25
Top = 274
Width = 76
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 6
end
object CloseBtn: TButton
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 315
Height = 25
Top = 274
Width = 55
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 12
BorderSpacing.Bottom = 8
Caption = 'Close'
ModalResult = 11
TabOrder = 7
end
object Bevel1: TBevel
AnchorSideLeft.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = CloseBtn
Left = 0
Height = 8
Top = 258
Width = 382
Anchors = [akLeft, akRight, akBottom]
Shape = bsBottomLine
end end
end end

View File

@ -5,98 +5,88 @@ unit GuttmanUnit;
interface interface
uses uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, Forms, Controls, Graphics, StdCtrls, Buttons, ExtCtrls,
StdCtrls, Buttons, ExtCtrls, ComCtrls, MainUnit, Globals, ReportFrameUnit, BasicStatsReportFormUnit;
MainUnit, OutputUnit, Globals, DataProcs;
type type
{ TGuttmanFrm } { TGuttmanForm }
TGuttmanFrm = class(TForm) TGuttmanForm = class(TBasicStatsReportForm)
Bevel1: TBevel;
InBtn: TBitBtn; InBtn: TBitBtn;
OutBtn: TBitBtn; OutBtn: TBitBtn;
AllBtn: TBitBtn; AllBtn: TBitBtn;
ResetBtn: TButton;
ComputeBtn: TButton;
CloseBtn: TButton;
Label1: TLabel; Label1: TLabel;
Label2: TLabel; Label2: TLabel;
ItemList: TListBox; ItemList: TListBox;
PageControl: TPageControl;
CornellPage: TTabSheet;
GoodenoughPage: TTabSheet;
VarList: TListBox; VarList: TListBox;
procedure AllBtnClick(Sender: TObject); procedure AllBtnClick(Sender: TObject);
procedure ComputeBtnClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure InBtnClick(Sender: TObject); procedure InBtnClick(Sender: TObject);
procedure ItemListDblClick(Sender: TObject);
procedure OutBtnClick(Sender: TObject); procedure OutBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject); procedure VarListDblClick(Sender: TObject);
procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean); procedure VarListSelectionChange(Sender: TObject; {%H-}User: boolean);
private private
{ private declarations } FCornellReportFrame: TReportFrame;
FAutoSized: Boolean; FGoodenoughReportFrame: TReportFrame;
procedure UpdateBtnStates;
protected
procedure AdjustConstraints; override;
procedure Compute; override;
procedure UpdateBtnStates; override;
function Validate(out AMsg: String; out AControl: TWinControl): boolean; override;
public public
{ public declarations } constructor Create(AOwner: TComponent); override;
procedure Reset; override;
end; end;
var var
GuttmanFrm: TGuttmanFrm; GuttmanForm: TGuttmanForm;
implementation implementation
{$R *.lfm}
uses uses
Math, Utils; Utils, MatrixUnit, GridProcs;
{ TGuttmanFrm }
procedure TGuttmanFrm.ResetBtnClick(Sender: TObject); { TGuttmanForm }
var
i: integer; constructor TGuttmanForm.Create(AOwner: TComponent);
begin begin
VarList.Clear; inherited;
ItemList.Clear;
for i := 1 to NoVariables do FCornellReportFrame := FReportFrame;
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); InitToolbar(FReportFrame.ReportToolbar, tpTop);
UpdateBtnStates; FReportFrame.ClearBorderSpacings;
FReportFrame.Parent := CornellPage;
FGoodenoughReportFrame := TReportFrame.Create(self);
FGoodenoughReportFrame.Parent := GoodenoughPage;
FGoodenoughReportFrame.Align := alClient;
PageControl.ActivePageIndex := 0;
end; end;
procedure TGuttmanFrm.VarListSelectionChange(Sender: TObject; User: boolean);
procedure TGuttmanForm.AdjustConstraints;
begin begin
UpdateBtnStates; inherited;
ParamsPanel.Constraints.MinWidth := 4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left;
ParamsPanel.Constraints.MinHeight := AllBtn.Top + AllBtn.Height +
ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
end; end;
procedure TGuttmanFrm.FormActivate(Sender: TObject);
var
w: Integer;
begin
if FAutoSized then
exit;
w := MaxValue([ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]); procedure TGuttmanForm.AllBtnClick(Sender: TObject);
ResetBtn.Constraints.MinWidth := w;
ComputeBtn.Constraints.MinWidth := w;
CloseBtn.Constraints.MinWidth := w;
Constraints.MinWidth := Width + w; // make form a bit wider...
Constraints.MinHeight := Height;
FAutoSized := true;
end;
procedure TGuttmanFrm.FormCreate(Sender: TObject);
begin
Assert(OS3MainFrm <> nil);
end;
procedure TGuttmanFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TGuttmanFrm.AllBtnClick(Sender: TObject);
var var
i: integer; i: integer;
begin begin
@ -106,9 +96,10 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TGuttmanFrm.ComputeBtnClick(Sender: TObject);
procedure TGuttmanForm.Compute;
var var
i, j, k, col, X, e0, e1, e2, e3, first, last, errors : integer; i, j, k, X, e0, e1, e2, e3, first, last, errors : integer;
totalerrors, rowno : integer; totalerrors, rowno : integer;
FreqMat0 : IntDyneMat = nil; // Pointer to array of 0 responses for each item by score group FreqMat0 : IntDyneMat = nil; // Pointer to array of 0 responses for each item by score group
FreqMat1 : IntDyneMat = nil; // Pointer to array of 1 responses for each item by score group FreqMat1 : IntDyneMat = nil; // Pointer to array of 1 responses for each item by score group
@ -132,14 +123,7 @@ var
Min_Coeff : double; Min_Coeff : double;
lReport: TStrings; lReport: TStrings;
begin begin
if ItemList.Count = 0 then // Allocate heap space for arrays
begin
MessageDlg('No variable(s) selected.', mtError, [mbOK], 0);
exit;
end;
// allocate heap space for arrays
SetLength(ColNoSelected,NoVariables);
SetLength(FreqMat0,NoCases,NoVariables); SetLength(FreqMat0,NoCases,NoVariables);
SetLength(FreqMat1,NoCases,NoVariables); SetLength(FreqMat1,NoCases,NoVariables);
SetLength(RowTots,NoCases); SetLength(RowTots,NoCases);
@ -151,119 +135,81 @@ begin
SetLength(sequence,NoVariables); SetLength(sequence,NoVariables);
SetLength(CaseNo,NoCases); SetLength(CaseNo,NoCases);
SetLength(ModalArray, NoVariables+1, NoVariables+1); SetLength(ModalArray, NoVariables+1, NoVariables+1);
SetLength(VarLabels,NoVariables);
// get variables used for the analysis // Get variables used for the analysis
NoSelected := ItemList.Items.Count; NoSelected := ItemList.Items.Count;
for i := 1 to NoVariables do SetLength(VarLabels, NoSelected);
SetLength(ColNoSelected, NoSelected);
for j := 0 to NoSelected-1 do
begin begin
for j := 1 to NoSelected do VarLabels[j] := ItemList.Items[j];
begin ColNoSelected[j] := GetVariableIndex(OS3MainFrm.DataGrid, VarLabels[j]);
if OS3MainFrm.DataGrid.Cells[i,0] = ItemList.Items.Strings[j-1] then
begin
ColNoSelected[j-1] := i;
VarLabels[j-1] := OS3MainFrm.DataGrid.Cells[i,0];
end;
end;
end; end;
// Initialize sequence // Initialize sequence
for i := 1 to NoSelected do sequence[i-1] := i; for i := 0 to NoSelected-1 do sequence[i] := i+1;
// Initialize arrays // Initialize arrays
for i := 0 to NoSelected-1 do
begin
ColTots[i,0] := 0;
ColTots[i,1] := 0;
ColProps[i] := 0.0;
ErrorMat[i,0] := 0;
ErrorMat[i,1] := 0;
end;
for i := 0 to NoCases-1 do for i := 0 to NoCases-1 do
begin
RowTots[i] := 0;
CutScore[i] := 0;
CaseNo[i] := i+1; CaseNo[i] := i+1;
for j := 0 to NoSelected-1 do
begin
FreqMat0[i,j] := 0;
FreqMat1[i,j] := 0;
end;
end;
if (NoCases > NoSelected) then
begin
for i := 1 to NoCases do CaseVector[i-1] := 0;
end
else begin
for i := 1 to NoSelected do CaseVector[i-1] := 0;
end;
// Get data into the frequency matrices of 0 and 1 responses // Get data into the frequency matrices of 0 and 1 responses
for i := 1 to NoCases do for i := 1 to NoCases do
begin begin
if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, i, ColNoSelected)) then continue;
TotalScore := 0; TotalScore := 0;
for j := 1 to NoSelected do for j := 0 to NoSelected-1 do
begin begin
col := ColNoSelected[j-1]; X := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[ColNoSelected[j], i])));
X := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col,i]))); CaseVector[j] := X;
CaseVector[j-1] := X;
TotalScore := TotalScore + X; TotalScore := TotalScore + X;
end; end;
for j := 1 to NoSelected do for j := 0 to NoSelected-1 do
begin if (CaseVector[j] = 0) then
if (CaseVector[j-1] = 0) then FreqMat0[i-1,j-1] := 1 FreqMat0[i-1, j] := 1
else FreqMat1[i-1,j-1] := 1; else
end; FreqMat1[i-1, j] := 1;
end; end;
// Get Row Totals for each score group (rows of FreqMat1) // Get Row Totals for each score group (rows of FreqMat1)
for i := 1 to NoCases do for i := 1 to NoCases do
begin begin
if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(oS3MainFrm.DataGrid, i, ColNoSelected)) then continue;
for j := 1 to NoSelected do for j := 0 to NoSelected-1 do
begin RowTots[i-1] := RowTots[i-1] + FreqMat1[i-1, j];
RowTots[i-1] := RowTots[i-1] + FreqMat1[i-1,j-1];
end;
end; end;
// Get Column Totals for item scores of 1 and 0 // Get Column Totals for item scores of 1 and 0
for i := 1 to NoSelected do //columns for i := 0 to NoSelected-1 do //columns
begin begin
for j := 1 to NoCases do // rows for j := 0 to NoCases-1 do // rows
begin begin
if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, j+1, ColNoSelected)) then continue;
ColTots[i-1,0] := ColTots[i-1,0] + FreqMat0[j-1,i-1]; ColTots[i, 0] := ColTots[i, 0] + FreqMat0[j, i];
ColTots[i-1,1] := ColTots[i-1,1] + FreqMat1[j-1,i-1]; ColTots[i, 1] := ColTots[i, 1] + FreqMat1[j, i];
end; end;
end; end;
//Sort frequency matrices into descending order //Sort frequency matrices into descending order
for i := 1 to NoCases - 1 do for i := 1 to NoCases - 1 do
begin begin
if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, i, ColNoSelected)) then continue;
for j := i + 1 to NoCases do for j := i + 1 to NoCases do
begin begin
if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, j, ColNoSelected)) then continue;
if (RowTots[i-1] < RowTots[j-1]) then //swap if (RowTots[i-1] < RowTots[j-1]) then //swap
begin begin
for k := 1 to NoSelected do for k := 1 to NoSelected do
begin // carry all columns in the swap begin // carry all columns in the swap
temp := FreqMat0[i-1,k-1]; Exchange(FreqMat0[i-1, k-1], FreqMat0[j-1, k-1]);
FreqMat0[i-1,k-1] := FreqMat0[j-1,k-1]; Exchange(FreqMat1[i-1, k-1], FreqMat1[j-1, k-1]);
FreqMat0[j-1,k-1] := temp;
temp := FreqMat1[i-1,k-1];
FreqMat1[i-1,k-1] := FreqMat1[j-1,k-1];
FreqMat1[j-1,k-1] := temp;
end; end;
// Also swap row totals // Also swap row totals
temp := RowTots[i-1]; Exchange(RowTots[i-1], RowTots[j-1]);
RowTots[i-1] := RowTots[j-1];
RowTots[j-1] := temp;
// And case number // And case number
temp := CaseNo[i-1]; Exchange(CaseNo[i-1], CaseNo[j-1]);
CaseNo[i-1] := CaseNo[j-1];
CaseNo[j-1] := temp;
end; // end if end; // end if
end; // Next j end; // Next j
end; // next i end; // next i
@ -277,7 +223,7 @@ begin
begin begin
for k := 1 to NoCases do for k := 1 to NoCases do
begin begin
if (not GoodRecord(k,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, k, ColNoSelected)) then continue;
temp := FreqMat0[k-1,i-1]; temp := FreqMat0[k-1,i-1];
FreqMat0[k-1,i-1] := FreqMat0[k-1,j-1]; FreqMat0[k-1,i-1] := FreqMat0[k-1,j-1];
FreqMat0[k-1,j-1] := temp; FreqMat0[k-1,j-1] := temp;
@ -306,19 +252,19 @@ begin
CutScore[i-1] := 0; CutScore[i-1] := 0;
for j := 1 to NoCases do // j is the trial cut point for j := 1 to NoCases do // j is the trial cut point
begin begin
if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, j, ColNoSelected)) then continue;
e0 := 0; e0 := 0;
e1 := 0; e1 := 0;
//Get errors prior to the cut point //Get errors prior to the cut point
for k := 1 to j do for k := 1 to j do
begin begin
if (not GoodRecord(k,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, k, ColNoSelected)) then continue;
if (FreqMat0[k-1,i-1] = 1) then e0 := e0 + 1; if (FreqMat0[k-1,i-1] = 1) then e0 := e0 + 1;
end; end;
//Get errors following the cut point //Get errors following the cut point
for k := j + 1 to NoCases do for k := j + 1 to NoCases do
begin begin
if (not GoodRecord(k,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, k, ColNoSelected)) then continue;
if (FreqMat1[k-1,i-1] = 1) then e1 := e1 + 1; if (FreqMat1[k-1,i-1] = 1) then e1 := e1 + 1;
end; end;
//Save errors for each cut //Save errors for each cut
@ -329,7 +275,7 @@ begin
e3 := 0; e3 := 0;
for j := 1 to NoCases do for j := 1 to NoCases do
begin begin
if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, j, ColNoSelected)) then continue;
if (CaseVector[j-1] < e2) then if (CaseVector[j-1] < e2) then
begin begin
e2 := CaseVector[j-1]; e2 := CaseVector[j-1];
@ -344,13 +290,13 @@ begin
begin begin
for j := 1 to CutScore[i-1] do for j := 1 to CutScore[i-1] do
begin begin
if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, j, ColNoSelected)) then continue;
if ((FreqMat0[j-1,i-1] > 0) or (FreqMat1[j-1,i-1] > 0)) then if ((FreqMat0[j-1,i-1] > 0) or (FreqMat1[j-1,i-1] > 0)) then
ErrorMat[i-1,0] := ErrorMat[i-1,0] + FreqMat0[j-1,i-1]; ErrorMat[i-1,0] := ErrorMat[i-1,0] + FreqMat0[j-1,i-1];
end; end;
for j := CutScore[i-1] + 1 to NoCases do for j := CutScore[i-1] + 1 to NoCases do
begin begin
if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, j, ColNoSelected)) then continue;
if ((FreqMat0[j-1,i-1] > 0) or (FreqMat1[j-1,i-1] > 0)) then if ((FreqMat0[j-1,i-1] > 0) or (FreqMat1[j-1,i-1] > 0)) then
ErrorMat[i-1,1] := ErrorMat[i-1,1] + FreqMat1[j-1,i-1]; ErrorMat[i-1,1] := ErrorMat[i-1,1] + FreqMat1[j-1,i-1];
end; end;
@ -362,8 +308,8 @@ begin
lReport.Add('GUTTMAN SCALOGRAM ANALYSIS'); lReport.Add('GUTTMAN SCALOGRAM ANALYSIS');
lReport.Add('Cornell Method'); lReport.Add('Cornell Method');
lReport.Add(''); lReport.Add('');
lReport.Add('No. of Cases: %5d', [NoCases]); lReport.Add('Number of cases: %5d', [NoCases]);
lReport.Add('No. of items: %5d', [NoSelected]); lReport.Add('Number of items: %5d', [NoSelected]);
lReport.Add(''); lReport.Add('');
lReport.Add('RESPONSE MATRIX'); lReport.Add('RESPONSE MATRIX');
lReport.Add(''); lReport.Add('');
@ -372,22 +318,24 @@ begin
if (last > NoSelected) then last := NoSelected; if (last > NoSelected) then last := NoSelected;
done := false; done := false;
while (not done) do //loop through all of the score groups // Loop through all of the score groups
while (not done) do
begin begin
lReport.Add('Subject Row Item Number'); lReport.Add('Subject Row Item Number');
outline := ' Label Sum '; outline := ' Label Sum ';
for i := first to last do for i := first to last do
outline := outline + Format('%10s', [VarLabels[sequence[i-1]-1]]); outline := outline + ' ' + CenterString(VarLabels[sequence[i-1]-1], 10);
lReport.Add(outline); lReport.Add(outline);
outline := ' '; outline := ' ';
for i := first to last do for i := first to last do
outline := outline + ' 0 1 '; outline := outline + ' ' + ' 0 1 ';
lReport.Add(outline); lReport.Add(outline);
lReport.Add(''); lReport.Add('');
for i := 1 to NoCases do // rows for i := 1 to NoCases do // rows
begin begin
if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, i, ColNoSelected)) then continue;
outline := Format(' %3d %3d ', [CaseNo[i-1], RowTots[i-1]]); outline := Format(' %3d %3d ', [CaseNo[i-1], RowTots[i-1]]);
for j := first to last do for j := first to last do
outline := outline + Format(' %3d %3d ', [FreqMat0[i-1,j-1], FreqMat1[i-1,j-1]]); outline := outline + Format(' %3d %3d ', [FreqMat0[i-1,j-1], FreqMat1[i-1,j-1]]);
@ -419,7 +367,8 @@ begin
last := first + 5; // column (item) index last := first + 5; // column (item) index
if (last > NoSelected) then last := NoSelected; if (last > NoSelected) then last := NoSelected;
end end
else done := true; else
done := true;
lReport.Add(''); lReport.Add('');
end; end;
@ -429,12 +378,13 @@ begin
CoefRepro := CoefRepro + ErrorMat[j-1,0] + ErrorMat[j-1,1]; CoefRepro := CoefRepro + ErrorMat[j-1,0] + ErrorMat[j-1,1];
CoefRepro := 1.0 - (CoefRepro / (NoCases * NoSelected)); CoefRepro := 1.0 - (CoefRepro / (NoCases * NoSelected));
lReport.Add('Coefficient of Reproducibility := %6.3f',[CoefRepro]); lReport.Add('Coefficient of Reproducibility := %6.3f',[CoefRepro]);
lReport.Add('');
FCornellReportFrame.DisplayReport(lReport);
lReport.Clear;
//-----------------------------GOODENOUGH---------------------------------- //-----------------------------GOODENOUGH----------------------------------
// Complete Goodenough method and print results // Complete Goodenough method and print results
lReport.Add('');
lReport.Add('GUTTMAN SCALOGRAM ANALYSIS'); lReport.Add('GUTTMAN SCALOGRAM ANALYSIS');
lReport.Add('Goodenough Modification Using Modal Responses'); lReport.Add('Goodenough Modification Using Modal Responses');
lReport.Add(''); lReport.Add('');
@ -484,8 +434,9 @@ begin
end; end;
lReport.Add(''); lReport.Add('');
lReport.Add('No. of Cases: %3d', [NoCases]); lReport.Add('Number of cases: %3d', [NoCases]);
lReport.Add('No. of items: %3d', [NoSelected]); lReport.Add('Number of items: %3d', [NoSelected]);
lReport.Add('');
lReport.Add(''); lReport.Add('');
lReport.Add('RESPONSE MATRIX'); lReport.Add('RESPONSE MATRIX');
lReport.Add(''); lReport.Add('');
@ -493,22 +444,23 @@ begin
last := first + 5; // column (item) index last := first + 5; // column (item) index
if (last > NoSelected) then last := NoSelected; if (last > NoSelected) then last := NoSelected;
// Loop through all of the score groups
done := false; done := false;
while (not done) do //loop through all of the score groups while (not done) do
begin begin
lReport.Add('Subject Row Error Item Number'); lReport.Add('Subject Row Error Item Number');
outline := ' Label Sum Count'; outline := ' Label Sum Count';
for i := first to last do for i := first to last do
outline := outline + Format('%10s', [VarLabels[sequence[i-1]-1]]); outline := outline + ' ' + CenterString(Varlabels[sequence[i-1]-1], 10);
lReport.Add(outline); lReport.Add(outline);
outline := ' '; outline := ' ';
for i := first to last do for i := first to last do
outline := outline + ' 0 1 '; outline := outline + ' ' + ' 0 1 ';
lReport.Add(outline); lReport.Add(outline);
lReport.Add(''); lReport.Add('');
for i := 1 to NoCases do // rows for i := 1 to NoCases do // rows
begin begin
if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; if (not GoodRecord(OS3MainFrm.DataGrid, i, ColNoSelected)) then continue;
errors := 0; errors := 0;
for j := first to last do for j := first to last do
begin begin
@ -516,10 +468,10 @@ begin
if (FreqMat1[i-1,j-1] <> ModalArray[rowno-1,j-1]) then errors := errors + 1; if (FreqMat1[i-1,j-1] <> ModalArray[rowno-1,j-1]) then errors := errors + 1;
end; end;
outline := format(' %3d %3d %3d ',[CaseNo[i-1],RowTots[i-1],errors]); outline := Format(' %3d %3d %3d ',[CaseNo[i-1],RowTots[i-1],errors]);
for j := first to last do for j := first to last do
begin begin
astring := format(' %3d %3d ',[FreqMat0[i-1,j-1],FreqMat1[i-1,j-1]]); astring := Format(' %3d %3d ',[FreqMat0[i-1,j-1],FreqMat1[i-1,j-1]]);
outline := outline + astring; outline := outline + astring;
end; end;
lReport.Add(outline); lReport.Add(outline);
@ -534,7 +486,7 @@ begin
outline := 'PROPORTIONS '; outline := 'PROPORTIONS ';
for j := first to last do for j := first to last do
outline := outline + Format('%4.2f %4.2f ',[(1.0-ColProps[j-1]), ColProps[j-1]]); outline := outline + Format('%5.2f%5.2f ',[(1.0-ColProps[j-1]), ColProps[j-1]]);
lReport.Add(outline); lReport.Add(outline);
if (last < NoSelected) then if (last < NoSelected) then
@ -560,28 +512,14 @@ begin
lReport.Add('Minimal Marginal Reproducibility: %6.3f', [Min_Coeff]); lReport.Add('Minimal Marginal Reproducibility: %6.3f', [Min_Coeff]);
DisplayReport(lReport); FGoodenoughReportFrame.DisplayReport(lReport);
finally finally
lReport.Free; lReport.Free;
// Clean up the heap
VarLabels := nil;
ModalArray := nil;
CaseNo := nil;
sequence := nil;
ErrorMat := nil;
CutScore := nil;
CaseVector := nil;
ColProps := nil;
ColTots := nil;
RowTots := nil;
FreqMat1 := nil;
FreqMat0 := nil;
ColNoSelected := nil;
end; end;
end; end;
procedure TGuttmanFrm.InBtnClick(Sender: TObject);
procedure TGuttmanForm.InBtnClick(Sender: TObject);
var var
i: integer; i: integer;
begin begin
@ -600,7 +538,22 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TGuttmanFrm.OutBtnClick(Sender: TObject);
procedure TGuttmanForm.ItemListDblClick(Sender: TObject);
var
index: Integer;
begin
index := ItemList.ItemIndex;
if index > -1 then
begin
VarList.Items.Add(ItemList.Items[index]);
ItemList.Items.Delete(index);
UpdateBtnStates;
end;
end;
procedure TGuttmanForm.OutBtnClick(Sender: TObject);
var var
i: integer; i: integer;
begin begin
@ -619,15 +572,67 @@ begin
UpdateBtnStates; UpdateBtnStates;
end; end;
procedure TGuttmanFrm.UpdateBtnStates;
procedure TGuttmanForm.Reset;
begin begin
inherited;
if FGoodenoughReportFrame <> nil then
FGoodenoughReportFrame.Clear;
CollectVariableNames(OS3MainFrm.DataGrid, VarList.Items);
ItemList.Clear;
UpdateBtnStates;
end;
procedure TGuttmanForm.UpdateBtnStates;
begin
inherited;
if FGoodenoughReportFrame <> nil then
FGoodenoughReportFrame.UpdateBtnStates;
InBtn.Enabled := AnySelected(Varlist); InBtn.Enabled := AnySelected(Varlist);
OutBtn.Enabled := AnySelected(Itemlist); OutBtn.Enabled := AnySelected(Itemlist);
AllBtn.Enabled := VarList.Items.Count > 0; AllBtn.Enabled := VarList.Items.Count > 0;
end; end;
initialization
{$I guttmanunit.lrs} function TGuttmanForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
begin
Result := false;
if ItemList.Count = 0 then
begin
AMsg := 'No variable(s) selected.';
AControl := VarList;
exit;
end;
Result := true;
end;
procedure TGuttmanForm.VarListDblClick(Sender: TObject);
var
index: Integer;
begin
index := VarList.ItemIndex;
if index > -1 then
begin
ItemList.Items.Add(VarList.Items[index]);
VarList.Items.Delete(index);
UpdateBtnStates;
end;
end;
procedure TGuttmanForm.VarListSelectionChange(Sender: TObject; User: boolean);
begin
UpdateBtnStates;
end;
end. end.

View File

@ -757,70 +757,6 @@ begin
LogLinScreenFrm.ShowModal; LogLinScreenFrm.ShowModal;
end; end;
// Menu "Analysis" > "Measurement Programs" > "Generate Sample Test Data"
procedure TOS3MainFrm.mnuAnalysisMeas_SampleDataClick(Sender: TObject);
begin
if TestGenFrm = nil then
Application.CreateForm(TTestGenFrm, TestGenFrm);
TestGenFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Classical Test Analysis"
procedure TOS3MainFrm.mnuAnalysisMeas_ClassicalClick(Sender: TObject);
begin
if TestScoreForm = nil then
Application.CreateForm(TTestScoreForm, TestScoreForm);
TestScoreForm.Show;
end;
// Menu "Analysis" > "Measurement Programs" > "Rasch Test Calibration"
procedure TOS3MainFrm.mnuAnalysisMeas_RashClick(Sender: TObject);
begin
if RaschForm = nil then
Application.CreateForm(TRaschForm, RaschForm);
RaschForm.Show;
end;
// Menu "Analysis" > "Measurement Programs" > "Successive Interval Scaling"
procedure TOS3MainFrm.mnuAnalysisMeas_IntervalClick(Sender: TObject);
begin
if SuccIntFrm = nil then
Application.CreateForm(TSuccIntFrm, SuccIntFrm);
SuccIntFrm.Show;
end;
// Menu "Analysis" > "Measurement Programs" > "Guttman Scalogram Analysis
procedure TOS3MainFrm.mnuAnalysisMeas_GuttmanClick(Sender: TObject);
begin
if GuttmanFrm = nil then
Application.CreateForm(TGuttmanFrm, GuttmanFrm);
GuttmanFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Weighted Composite Reliability"
procedure TOS3MainFrm.mnuAnalysisMeas_CompositeClick(Sender: TObject);
begin
if CompRelFrm = nil then
Application.CreateForm(TCompRelFrm, CompRelFrm);
CompRelFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Kuder-Richardson #21 Reliability"
procedure TOS3MainFrm.mnuAnalysisMeas_KR21Click(Sender: TObject);
begin
if KR21Frm = nil then
Application.CreateForm(TKR21Frm, KR21Frm);
KR21Frm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Spearman-Brown Prophecy Reliability"
procedure TOS3MainFrm.mnuAnalysisMeas_SpearmanClick(Sender: TObject);
begin
if SpBrFrm = nil then
Application.CreateForm(TSpBrFrm, SpBrFrm);
SpBrFrm.ShowModal;
end;
// Menu "Analysis" > "One sample tests" // Menu "Analysis" > "One sample tests"
procedure TOS3MainFrm.mnuAnalysisOneSampleTestsClick(Sender: TObject); procedure TOS3MainFrm.mnuAnalysisOneSampleTestsClick(Sender: TObject);
begin begin
@ -1495,13 +1431,6 @@ begin
GLMFrm.ShowModal; GLMFrm.ShowModal;
end; end;
// Menu "Analysis" > "Measurement Programs" > "Grade Book"
procedure TOS3MainFrm.mnuAnalysisMeas_GradeBookClick(Sender: TObject);
begin
if GradeBookFrm = nil then
Application.CreateForm(TGradeBookFrm, GradeBookFrm);
GradebookFrm.ShowModal;
end;
(* replaced by ShowTOC (* replaced by ShowTOC
// Menu "Help" > "General Help" // Menu "Help" > "General Help"
@ -1512,13 +1441,6 @@ begin
HelpFrm.ShowModal; HelpFrm.ShowModal;
end; end;
*) *)
// Menu "Analysis" > "Measurement Programs" > "Item Banking"
procedure TOS3MainFrm.mnuAnalysisMeas_ItemBankingClick(Sender: TObject);
begin
if ItemBankFrm = nil then
Application.CreateForm(TItemBankFrm, ItembankFrm);
ItemBankFrm.ShowModal;
end;
procedure TOS3MainFrm.mnuAnalysisNonPar_KSTestClick(Sender: TObject); procedure TOS3MainFrm.mnuAnalysisNonPar_KSTestClick(Sender: TObject);
begin begin
@ -1542,30 +1464,6 @@ begin
MedianPolishForm.ShowModal; MedianPolishForm.ShowModal;
end; end;
// Menu "Analysis" > "Measurement Programs" > "Reliability Due to Test Variance Change"
procedure TOS3MainFrm.mnuAnalysisMeas_VarChangeClick(Sender: TObject);
begin
if RelChangeFrm = nil then
Application.CreateForm(TRelChangeFrm, RelChangeFrm);
RelChangeFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Differential Item Functioning"
procedure TOS3MainFrm.mnuAnalysisMeas_DifferentialClick(Sender: TObject);
begin
if DIFFrm = nil then
Application.CreateForm(TDIFFrm, DIFFrm);
DIFFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Polytomous DIF Analysis"
procedure TOS3MainFrm.mnuAnalysisMeas_PolytomousClick(Sender: TObject);
begin
if PolyDIFFrm = nil then
Application.CreateForm(TPolyDIFFrm, PolyDIFFrm);
PolyDIFFrm.ShowModal;
end;
// Menu "Analysis" > "Financial" > "Loan Amortization Schedule" // Menu "Analysis" > "Financial" > "Loan Amortization Schedule"
procedure TOS3MainFrm.mnuAnalysisFinancial_LoanAmortClick(Sender: TObject); procedure TOS3MainFrm.mnuAnalysisFinancial_LoanAmortClick(Sender: TObject);
begin begin
@ -1610,6 +1508,114 @@ begin
end; end;
{ "Measurement Programs" commands }
// Menu "Analysis" > "Measurement Programs" > "Generate Sample Test Data"
procedure TOS3MainFrm.mnuAnalysisMeas_SampleDataClick(Sender: TObject);
begin
if TestGenFrm = nil then
Application.CreateForm(TTestGenFrm, TestGenFrm);
TestGenFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Classical Test Analysis"
procedure TOS3MainFrm.mnuAnalysisMeas_ClassicalClick(Sender: TObject);
begin
if TestScoreForm = nil then
Application.CreateForm(TTestScoreForm, TestScoreForm);
TestScoreForm.Show;
end;
// Menu "Analysis" > "Measurement Programs" > "Rasch Test Calibration"
procedure TOS3MainFrm.mnuAnalysisMeas_RashClick(Sender: TObject);
begin
if RaschForm = nil then
Application.CreateForm(TRaschForm, RaschForm);
RaschForm.Show;
end;
// Menu "Analysis" > "Measurement Programs" > "Successive Interval Scaling"
procedure TOS3MainFrm.mnuAnalysisMeas_IntervalClick(Sender: TObject);
begin
if SuccIntFrm = nil then
Application.CreateForm(TSuccIntFrm, SuccIntFrm);
SuccIntFrm.Show;
end;
// Menu "Analysis" > "Measurement Programs" > "Guttman Scalogram Analysis
procedure TOS3MainFrm.mnuAnalysisMeas_GuttmanClick(Sender: TObject);
begin
if GuttmanForm = nil then
Application.CreateForm(TGuttmanForm, GuttmanForm);
GuttmanForm.Show;
end;
// Menu "Analysis" > "Measurement Programs" > "Weighted Composite Reliability"
procedure TOS3MainFrm.mnuAnalysisMeas_CompositeClick(Sender: TObject);
begin
if CompRelFrm = nil then
Application.CreateForm(TCompRelFrm, CompRelFrm);
CompRelFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Kuder-Richardson #21 Reliability"
procedure TOS3MainFrm.mnuAnalysisMeas_KR21Click(Sender: TObject);
begin
if KR21Frm = nil then
Application.CreateForm(TKR21Frm, KR21Frm);
KR21Frm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Spearman-Brown Prophecy Reliability"
procedure TOS3MainFrm.mnuAnalysisMeas_SpearmanClick(Sender: TObject);
begin
if SpBrFrm = nil then
Application.CreateForm(TSpBrFrm, SpBrFrm);
SpBrFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Grade Book"
procedure TOS3MainFrm.mnuAnalysisMeas_GradeBookClick(Sender: TObject);
begin
if GradeBookFrm = nil then
Application.CreateForm(TGradeBookFrm, GradeBookFrm);
GradebookFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Item Banking"
procedure TOS3MainFrm.mnuAnalysisMeas_ItemBankingClick(Sender: TObject);
begin
if ItemBankFrm = nil then
Application.CreateForm(TItemBankFrm, ItembankFrm);
ItemBankFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Reliability Due to Test Variance Change"
procedure TOS3MainFrm.mnuAnalysisMeas_VarChangeClick(Sender: TObject);
begin
if RelChangeFrm = nil then
Application.CreateForm(TRelChangeFrm, RelChangeFrm);
RelChangeFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Differential Item Functioning"
procedure TOS3MainFrm.mnuAnalysisMeas_DifferentialClick(Sender: TObject);
begin
if DIFFrm = nil then
Application.CreateForm(TDIFFrm, DIFFrm);
DIFFrm.ShowModal;
end;
// Menu "Analysis" > "Measurement Programs" > "Polytomous DIF Analysis"
procedure TOS3MainFrm.mnuAnalysisMeas_PolytomousClick(Sender: TObject);
begin
if PolyDIFFrm = nil then
Application.CreateForm(TPolyDIFFrm, PolyDIFFrm);
PolyDIFFrm.ShowModal;
end;
{ "Nonparametric" commands } { "Nonparametric" commands }
// Menu "Analysis" > "Nonparametric" > "Contingency Chi Square" // Menu "Analysis" > "Nonparametric" > "Contingency Chi Square"