From e234aa84cef22880499fadcf7046a4865c7bdd43 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 16 Nov 2020 11:10:28 +0000 Subject: [PATCH] LazStats: Adding original source, part 4. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7883 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../lazstats/source_orig/genkappaunit.lfm | 385 ++ .../lazstats/source_orig/genkappaunit.lrs | 340 ++ .../lazstats/source_orig/genkappaunit.pas | 483 +++ .../lazstats/source_orig/genrndvalsunit.lfm | 272 ++ .../lazstats/source_orig/genrndvalsunit.lrs | 73 + .../lazstats/source_orig/genrndvalsunit.pas | 282 ++ .../lazstats/source_orig/gensequnit.lfm | 128 + .../lazstats/source_orig/gensequnit.lrs | 37 + .../lazstats/source_orig/gensequnit.pas | 150 + applications/lazstats/source_orig/glmunit.lfm | 966 +++++ applications/lazstats/source_orig/glmunit.lrs | 726 ++++ applications/lazstats/source_orig/glmunit.pas | 3297 +++++++++++++++++ applications/lazstats/source_orig/globals.pas | 60 + .../lazstats/source_orig/gradebookunit.lfm | 192 + .../lazstats/source_orig/gradebookunit.lrs | 59 + .../lazstats/source_orig/gradebookunit.pas | 902 +++++ .../lazstats/source_orig/gradingunit.lfm | 241 ++ .../lazstats/source_orig/gradingunit.lrs | 68 + .../lazstats/source_orig/gradingunit.pas | 404 ++ .../lazstats/source_orig/graphlib.lfm | 56 + .../lazstats/source_orig/graphlib.lrs | 17 + .../lazstats/source_orig/graphlib.pas | 1583 ++++++++ .../lazstats/source_orig/gridhelpunit.lfm | 62 + .../lazstats/source_orig/gridhelpunit.lrs | 51 + .../lazstats/source_orig/gridhelpunit.pas | 33 + .../lazstats/source_orig/groupfrequnit.lfm | 213 ++ .../lazstats/source_orig/groupfrequnit.lrs | 142 + .../lazstats/source_orig/groupfrequnit.pas | 173 + .../lazstats/source_orig/guttmanunit.lfm | 178 + .../lazstats/source_orig/guttmanunit.lrs | 127 + .../lazstats/source_orig/guttmanunit.pas | 598 +++ .../lazstats/source_orig/helpunit.lfm | 53 + .../lazstats/source_orig/helpunit.lrs | 19 + .../lazstats/source_orig/helpunit.pas | 56 + .../lazstats/source_orig/hierarchunit.lfm | 242 ++ .../lazstats/source_orig/hierarchunit.lrs | 142 + .../lazstats/source_orig/hierarchunit.pas | 485 +++ .../lazstats/source_orig/hypergeounit.lfm | 182 + .../lazstats/source_orig/hypergeounit.lrs | 45 + .../lazstats/source_orig/hypergeounit.pas | 181 + .../lazstats/source_orig/interruptedunit.lfm | 291 ++ .../lazstats/source_orig/interruptedunit.lrs | 237 ++ .../lazstats/source_orig/interruptedunit.pas | 909 +++++ .../lazstats/source_orig/inversezunit.lfm | 80 + .../lazstats/source_orig/inversezunit.lrs | 23 + .../lazstats/source_orig/inversezunit.pas | 60 + .../lazstats/source_orig/itembankingunit.lfm | 245 ++ .../lazstats/source_orig/itembankingunit.lrs | 65 + .../lazstats/source_orig/itembankingunit.pas | 752 ++++ .../lazstats/source_orig/itemcodesunit.lfm | 134 + .../lazstats/source_orig/itemcodesunit.lrs | 41 + .../lazstats/source_orig/itemcodesunit.pas | 152 + .../lazstats/source_orig/jpegunit.lfm | 66 + .../lazstats/source_orig/jpegunit.lrs | 20 + .../lazstats/source_orig/jpegunit.pas | 83 + 55 files changed, 16861 insertions(+) create mode 100644 applications/lazstats/source_orig/genkappaunit.lfm create mode 100644 applications/lazstats/source_orig/genkappaunit.lrs create mode 100644 applications/lazstats/source_orig/genkappaunit.pas create mode 100644 applications/lazstats/source_orig/genrndvalsunit.lfm create mode 100644 applications/lazstats/source_orig/genrndvalsunit.lrs create mode 100644 applications/lazstats/source_orig/genrndvalsunit.pas create mode 100644 applications/lazstats/source_orig/gensequnit.lfm create mode 100644 applications/lazstats/source_orig/gensequnit.lrs create mode 100644 applications/lazstats/source_orig/gensequnit.pas create mode 100644 applications/lazstats/source_orig/glmunit.lfm create mode 100644 applications/lazstats/source_orig/glmunit.lrs create mode 100644 applications/lazstats/source_orig/glmunit.pas create mode 100644 applications/lazstats/source_orig/globals.pas create mode 100644 applications/lazstats/source_orig/gradebookunit.lfm create mode 100644 applications/lazstats/source_orig/gradebookunit.lrs create mode 100644 applications/lazstats/source_orig/gradebookunit.pas create mode 100644 applications/lazstats/source_orig/gradingunit.lfm create mode 100644 applications/lazstats/source_orig/gradingunit.lrs create mode 100644 applications/lazstats/source_orig/gradingunit.pas create mode 100644 applications/lazstats/source_orig/graphlib.lfm create mode 100644 applications/lazstats/source_orig/graphlib.lrs create mode 100644 applications/lazstats/source_orig/graphlib.pas create mode 100644 applications/lazstats/source_orig/gridhelpunit.lfm create mode 100644 applications/lazstats/source_orig/gridhelpunit.lrs create mode 100644 applications/lazstats/source_orig/gridhelpunit.pas create mode 100644 applications/lazstats/source_orig/groupfrequnit.lfm create mode 100644 applications/lazstats/source_orig/groupfrequnit.lrs create mode 100644 applications/lazstats/source_orig/groupfrequnit.pas create mode 100644 applications/lazstats/source_orig/guttmanunit.lfm create mode 100644 applications/lazstats/source_orig/guttmanunit.lrs create mode 100644 applications/lazstats/source_orig/guttmanunit.pas create mode 100644 applications/lazstats/source_orig/helpunit.lfm create mode 100644 applications/lazstats/source_orig/helpunit.lrs create mode 100644 applications/lazstats/source_orig/helpunit.pas create mode 100644 applications/lazstats/source_orig/hierarchunit.lfm create mode 100644 applications/lazstats/source_orig/hierarchunit.lrs create mode 100644 applications/lazstats/source_orig/hierarchunit.pas create mode 100644 applications/lazstats/source_orig/hypergeounit.lfm create mode 100644 applications/lazstats/source_orig/hypergeounit.lrs create mode 100644 applications/lazstats/source_orig/hypergeounit.pas create mode 100644 applications/lazstats/source_orig/interruptedunit.lfm create mode 100644 applications/lazstats/source_orig/interruptedunit.lrs create mode 100644 applications/lazstats/source_orig/interruptedunit.pas create mode 100644 applications/lazstats/source_orig/inversezunit.lfm create mode 100644 applications/lazstats/source_orig/inversezunit.lrs create mode 100644 applications/lazstats/source_orig/inversezunit.pas create mode 100644 applications/lazstats/source_orig/itembankingunit.lfm create mode 100644 applications/lazstats/source_orig/itembankingunit.lrs create mode 100644 applications/lazstats/source_orig/itembankingunit.pas create mode 100644 applications/lazstats/source_orig/itemcodesunit.lfm create mode 100644 applications/lazstats/source_orig/itemcodesunit.lrs create mode 100644 applications/lazstats/source_orig/itemcodesunit.pas create mode 100644 applications/lazstats/source_orig/jpegunit.lfm create mode 100644 applications/lazstats/source_orig/jpegunit.lrs create mode 100644 applications/lazstats/source_orig/jpegunit.pas diff --git a/applications/lazstats/source_orig/genkappaunit.lfm b/applications/lazstats/source_orig/genkappaunit.lfm new file mode 100644 index 000000000..b7ed8b0be --- /dev/null +++ b/applications/lazstats/source_orig/genkappaunit.lfm @@ -0,0 +1,385 @@ +object GenKappaFrm: TGenKappaFrm + Left = 179 + Height = 358 + Top = 126 + Width = 564 + Caption = 'Generalized Kappa Coefficient' + ClientHeight = 358 + ClientWidth = 564 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 249 + Height = 14 + Top = 24 + Width = 117 + Caption = 'Category Code (1,2,...)' + ParentColor = False + end + object Label2: TLabel + Left = 249 + Height = 14 + Top = 120 + Width = 133 + Caption = 'Object or Subject Classified' + ParentColor = False + end + object Label3: TLabel + Left = 249 + Height = 14 + Top = 216 + Width = 104 + Caption = 'Rater Codes (1,2,...)' + ParentColor = False + end + object Label4: TLabel + Left = 8 + Height = 14 + Top = 9 + Width = 48 + Caption = 'Variables:' + ParentColor = False + end + object VarList: TListBox + Left = 8 + Height = 319 + Top = 24 + Width = 176 + ItemHeight = 0 + TabOrder = 0 + end + object CatIn: TBitBtn + Left = 192 + Height = 33 + Top = 24 + Width = 41 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE + 6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580 + 3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3 + 71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7 + 74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7 + 74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + OnClick = CatInClick + TabOrder = 1 + end + object CatOut: TBitBtn + Left = 192 + Height = 33 + Top = 64 + Width = 41 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580 + 3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3 + 71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7 + 74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF + FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + OnClick = CatOutClick + TabOrder = 2 + end + object ObjIn: TBitBtn + Left = 192 + Height = 33 + Top = 120 + Width = 41 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE + 6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580 + 3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3 + 71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7 + 74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7 + 74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + OnClick = ObjInClick + TabOrder = 3 + end + object ObjOut: TBitBtn + Left = 192 + Height = 33 + Top = 160 + Width = 41 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580 + 3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3 + 71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7 + 74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF + FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + OnClick = ObjOutClick + TabOrder = 4 + end + object RaterIn: TBitBtn + Left = 192 + Height = 33 + Top = 216 + Width = 41 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE + 6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580 + 3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3 + 71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7 + 74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7 + 74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + OnClick = RaterInClick + TabOrder = 5 + end + object RaterOut: TBitBtn + Left = 192 + Height = 33 + Top = 256 + Width = 41 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580 + 3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3 + 71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7 + 74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF + FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + OnClick = RaterOutClick + TabOrder = 6 + end + object CatEdit: TEdit + Left = 249 + Height = 21 + Top = 40 + Width = 170 + TabOrder = 7 + Text = 'CatEdit' + end + object ObjectEdit: TEdit + Left = 248 + Height = 21 + Top = 136 + Width = 170 + TabOrder = 8 + Text = 'Edit1' + end + object RaterEdit: TEdit + Left = 249 + Height = 21 + Top = 232 + Width = 170 + TabOrder = 9 + Text = 'Edit1' + end + object ResetBtn: TButton + Left = 455 + Height = 35 + Top = 120 + Width = 85 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 10 + end + object CancelBtn: TButton + Left = 456 + Height = 35 + Top = 180 + Width = 85 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 11 + end + object ComputeBtn: TButton + Left = 455 + Height = 35 + Top = 240 + Width = 85 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 12 + end + object ReturnBtn: TButton + Left = 456 + Height = 35 + Top = 302 + Width = 85 + Caption = 'Return' + ModalResult = 1 + TabOrder = 13 + end + object HelpBtn: TButton + Tag = 125 + Left = 455 + Height = 33 + Top = 56 + Width = 86 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 14 + end +end diff --git a/applications/lazstats/source_orig/genkappaunit.lrs b/applications/lazstats/source_orig/genkappaunit.lrs new file mode 100644 index 000000000..8eda460cf --- /dev/null +++ b/applications/lazstats/source_orig/genkappaunit.lrs @@ -0,0 +1,340 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGenKappaFrm','FORMDATA',[ + 'TPF0'#12'TGenKappaFrm'#11'GenKappaFrm'#4'Left'#3#179#0#6'Height'#3'f'#1#3'To' + +'p'#2'~'#5'Width'#3'4'#2#7'Caption'#6#29'Generalized Kappa Coefficient'#12'C' + +'lientHeight'#3'f'#1#11'ClientWidth'#3'4'#2#6'OnShow'#7#8'FormShow'#10'LCLVe' + +'rsion'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#3#249#0#6'Height'#2#14#3 + +'Top'#2#24#5'Width'#2'u'#7'Caption'#6#23'Category Code (1,2,...)'#11'ParentC' + +'olor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#3#249#0#6'Height'#2#14#3'Top'#2'x'#5 + +'Width'#3#133#0#7'Caption'#6#28'Object or Subject Classified'#11'ParentColor' + +#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#249#0#6'Height'#2#14#3'Top'#3#216#0#5'W' + +'idth'#2'h'#7'Caption'#6#21'Rater Codes (1,2,...)'#11'ParentColor'#8#0#0#6'T' + +'Label'#6'Label4'#4'Left'#2#8#6'Height'#2#14#3'Top'#2#9#5'Width'#2'0'#7'Capt' + +'ion'#6#10'Variables:'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2 + +#8#6'Height'#3'?'#1#3'Top'#2#24#5'Width'#3#176#0#10'ItemHeight'#2#0#8'TabOrd' + +'er'#2#0#0#0#7'TBitBtn'#5'CatIn'#4'Left'#3#192#0#6'Height'#2'!'#3'Top'#2#24#5 + +'Width'#2')'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0 + +'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0 + +#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)' + +#247'!c$'#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190 + +'m'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255 + +'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139 + +'I'#255'!c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160 + +#215#169#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255 + +#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128 + +#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199 + +'t'#255#165#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255#150 + +#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255 + +#129#197#135#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255 + +#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255 + +'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163 + +'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247 + +';'#136'B'#219#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187 + +'A'#145'I'#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#10'CatInCl' + +'ick'#8'TabOrder'#2#1#0#0#7'TBitBtn'#6'CatOut'#4'Left'#3#192#0#6'Height'#2'!' + ,#3'Top'#2'@'#5'Width'#2')'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0 + +#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd' + +#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G' + +#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161 + +'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131 + +#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/' + +'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e' + +#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255 + +#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132 + +#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255 + +#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154 + +#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255 + +#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201 + +#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O' + +#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnC' + +'lick'#7#11'CatOutClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#5'ObjIn'#4'Left'#3 + +#192#0#6'Height'#2'!'#3'Top'#2'x'#5'Width'#2')'#10'Glyph.Data'#10':'#4#0#0'6' + +#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0 + +#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + ,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169 + +'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255 + +'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255#255 + +#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211#161 + +#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198 + +#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'#196 + +#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171#255 + +#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149 + +#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'#145'P' + +#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255'e'#195 + +'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255 + +'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#7'OnClick'#7#10'ObjInClick'#8'TabOrder'#2#3#0#0#7'TBitBtn'#6 + +'ObjOut'#4'Left'#3#192#0#6'Height'#2'!'#3'Top'#3#160#0#5'Width'#2')'#10'Glyp' + +'h.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0 + +#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8'#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['#170'd'#255'G' + +#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%i)' + +#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'#196'{'#200#134 + +#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203 + +#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190 + ,'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0'h'#199't'#201#127 + +#204#138#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255 + +#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135 + +#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0#255 + +#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X'#177 + +'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255 + +'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick'#7#11'ObjOutClick'#8'Ta' + +'bOrder'#2#4#0#0#7'TBitBtn'#7'RaterIn'#4'Left'#3#192#0#6'Height'#2'!'#3'Top' + +#3#216#0#5'Width'#2')'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0 + +'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0 + +#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G' + +#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^' + +#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195 + +'q'#255#160#215#169#255#156#213#165#255#152#211#161#255#148#208#157#255#144 + +#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255 + +'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255 + +#255#0'h'#199't'#255#165#218#174#255#162#216#171#255#158#214#167#255#154#212 + +#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133 + +#199#139#255#129#197#135#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255 + +#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255 + +']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145 + +'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +'A'#145'I'#247';'#136'B'#219#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + ,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#7'OnClick' + +#7#12'RaterInClick'#8'TabOrder'#2#5#0#0#7'TBitBtn'#8'RaterOut'#4'Left'#3#192 + +#0#6'Height'#2'!'#3'Top'#3#0#1#5'Width'#2')'#10'Glyph.Data'#10':'#4#0#0'6'#4 + +#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0 + +#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255#255#0#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207 + +'q'#190'{'#255'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';' + +#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255 + +#255#255#0#255#255#255#0'e'#195'q'#196'{'#200#134#255#156#213#165#255#152#211 + +#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130 + +#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$' + +#255#255#255#255#0#255#255#255#0'h'#199't'#201#127#204#138#255#162#216#171 + +#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204 + +#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'x' + +#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209 + +#128#205#139#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M' + +#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255 + +'*p/'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't' + +#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't' + +#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#7'OnClick'#7#13'RaterOutClick'#8'TabOrder'#2#6#0#0#5'TE' + ,'dit'#7'CatEdit'#4'Left'#3#249#0#6'Height'#2#21#3'Top'#2'('#5'Width'#3#170#0 + +#8'TabOrder'#2#7#4'Text'#6#7'CatEdit'#0#0#5'TEdit'#10'ObjectEdit'#4'Left'#3 + +#248#0#6'Height'#2#21#3'Top'#3#136#0#5'Width'#3#170#0#8'TabOrder'#2#8#4'Text' + +#6#5'Edit1'#0#0#5'TEdit'#9'RaterEdit'#4'Left'#3#249#0#6'Height'#2#21#3'Top'#3 + +#232#0#5'Width'#3#170#0#8'TabOrder'#2#9#4'Text'#6#5'Edit1'#0#0#7'TButton'#8 + +'ResetBtn'#4'Left'#3#199#1#6'Height'#2'#'#3'Top'#2'x'#5'Width'#2'U'#7'Captio' + +'n'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#10#0#0#7'TButton' + +#9'CancelBtn'#4'Left'#3#200#1#6'Height'#2'#'#3'Top'#3#180#0#5'Width'#2'U'#7 + +'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#11#0#0#7'TButton'#10 + +'ComputeBtn'#4'Left'#3#199#1#6'Height'#2'#'#3'Top'#3#240#0#5'Width'#2'U'#7'C' + +'aption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#12#0#0#7 + +'TButton'#9'ReturnBtn'#4'Left'#3#200#1#6'Height'#2'#'#3'Top'#3'.'#1#5'Width' + +#2'U'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#13#0#0#7'TBut' + +'ton'#7'HelpBtn'#3'Tag'#2'}'#4'Left'#3#199#1#6'Height'#2'!'#3'Top'#2'8'#5'Wi' + +'dth'#2'V'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2 + +#14#0#0#0 +]); diff --git a/applications/lazstats/source_orig/genkappaunit.pas b/applications/lazstats/source_orig/genkappaunit.pas new file mode 100644 index 000000000..5ea5f8ed3 --- /dev/null +++ b/applications/lazstats/source_orig/genkappaunit.pas @@ -0,0 +1,483 @@ +unit GenKappaUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, ExtCtrls, Buttons, MainUnit, Globals, OutPutUnit, FunctionsLib, + Math, DictionaryUnit, DataProcs, MatrixLib, contexthelpunit; +type + + { TGenKappaFrm } + + TGenKappaFrm = class(TForm) + HelpBtn: TButton; + Label4: TLabel; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + CatIn: TBitBtn; + CatOut: TBitBtn; + CatEdit: TEdit; + ObjectEdit: TEdit; + RaterEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + ObjIn: TBitBtn; + ObjOut: TBitBtn; + RaterIn: TBitBtn; + RaterOut: TBitBtn; + VarList: TListBox; + procedure CatInClick(Sender: TObject); + procedure CatOutClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure ObjInClick(Sender: TObject); + procedure ObjOutClick(Sender: TObject); + procedure RaterInClick(Sender: TObject); + procedure RaterOutClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + NoCats : integer; + NoObjects : integer; + NoRaters : integer; + function compute_term1(R : IntDyneCube; i, j, k : integer) : double; + function compute_term2(R : IntDyneCube; i, j, l : integer) : double; + function compute_denom(R : IntDyneCube) : double; + function compute_partial_pchance(R : IntDyneCube; i, j : integer; + denom : double) : double; + function compute_partial_pobs(R : IntDyneCube; k, l : integer) : double; + function KappaVariance(R : IntDyneCube; n, m, K1 : integer) : double; + + public + { public declarations } + end; + +var + GenKappaFrm: TGenKappaFrm; + +implementation + +{ TGenKappaFrm } + +procedure TGenKappaFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + CatIn.Visible := true; + CatOut.Visible := false; + ObjIn.Visible := true; + ObjOut.Visible := false; + RaterIn.Visible := true; + RaterOut.Visible := false; + CatEdit.Text := ''; + ObjectEdit.Text := ''; + RaterEdit.Text := ''; + VarList.Clear; + for i := 0 to NoVariables - 1 do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i+1,0]); +end; + +procedure TGenKappaFrm.CatInClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + CatEdit.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + CatIn.Visible := false; + CatOut.Visible := true; +end; + +procedure TGenKappaFrm.CatOutClick(Sender: TObject); +begin + VarList.Items.Add(CatEdit.Text); + CatEdit.Text := ''; + CatIn.Visible := true; + CatOut.Visible := false; +end; + +procedure TGenKappaFrm.ComputeBtnClick(Sender: TObject); +VAR + CatCol, ObjCol, RaterCol, frequency, aresult, intvalue, i, j, k, l : integer; + value, rater, category, anobject, theresult : integer; +// int CatCol:=0, ObjCol:=0, RaterCol:=0; +// int value, rater, category, object; + R : IntDyneCube; +// int ***R; + pobs, pchance, kappa, num, denom, partial_pchance, a_priori : double; + average_frequency : DblDyneVec; + outline : array[0..131] of char; + astring : array[0..21] of char; +// char outline[131], astring[21]; + dblvalue, z : double; + strvalue : string; + +begin + CatCol:=0; + ObjCol:=0; + RaterCol:=0; + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Generalized Kappa Coefficient Procedure'); + OutPutFrm.RichEdit.Lines.Add('adapted from the program written by Giovanni Flammia'); + OutPutFrm.RichEdit.Lines.Add('copywritten 1995, M.I.T. Lab. for Computer Science'); + OutPutFrm.RichEdit.Lines.Add(''); + + // get columns for the variables + for i := 0 to NoVariables - 1 do + begin + if (OS3MainFrm.DataGrid.Cells[i+1,0] = CatEdit.Text) then CatCol := i+1; + if (OS3MainFrm.DataGrid.Cells[i+1,0] = RaterEdit.Text) then RaterCol := i+1; + if (OS3MainFrm.DataGrid.Cells[i+1,0] = ObjectEdit.Text) then ObjCol := i+1; + end; + if ((CatCol = 0) or (RaterCol = 0) or (ObjCol = 0)) then + begin + ShowMessage('ERROR! One or more variables not defined.'); + exit; + end; + // get max no of codes for objects, raters, categories + NoCats := 0; + NoObjects := 0; + NoRaters := 0; + for i := 0 to NoCases - 1 do + begin + value := StrToInt(Trim(OS3MainFrm.DataGrid.Cells[CatCol,i+1])); +// result := GetValue(i+1,CatCol,intvalue,dblvalue,strvalue); +// if (result :=:= 1) value := 0; +// else value := intvalue; + if (value > NoCats) then NoCats := value; + value := StrToInt(Trim(OS3MainFrm.DataGrid.Cells[ObjCol,i+1])); +// result := GetValue(i+1,ObjCol,intvalue,dblvalue,strvalue); +// if (result :=:= 1) value := 0; +// else value := intvalue; + if (value > NoObjects) then NoObjects := value; + value := StrToInt(Trim(OS3MainFrm.DataGrid.Cells[RaterCol,i+1])); +// result := GetValue(i+1,RaterCol,intvalue,dblvalue,strvalue); +// if (result :=:= 1) value := 0; +// else value := intvalue; + if (value > NoRaters) then NoRaters := value; + end; + + outline := format('%d Raters using %d Categories to rate %d Objects', + [NoRaters, NoCats, NoObjects]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + // get memory for R and set to zero + SetLength(R,NoRaters+1,NoCats+1,NoObjects+1); + for i := 0 to NoRaters - 1 do + begin + for k := 0 to NoCats - 1 do + begin + for l := 0 to NoObjects - 1 do + begin + R[i,k,l] := 0; + end; + end; + end; + + // get memory for average_frequency + SetLength(average_frequency,NoCats+1); + for k := 0 to NoCats - 1 do average_frequency[k] := 0.0; + + // read data and store in R + for i := 0 to NoCases - 1 do + begin + rater := StrToInt(Trim(OS3MainFrm.DataGrid.Cells[RaterCol,i+1])); + anobject := StrToInt(Trim(OS3MainFrm.DataGrid.Cells[ObjCol,i+1])); + category := StrToInt(Trim(OS3MainFrm.DataGrid.Cells[CatCol,i+1])); + R[rater-1,category-1,anobject-1] := 1; + end; + + //compute chance probability of agreement pchance for all raters + pchance := 0.0; + denom := compute_denom(R); + for i := 0 to NoRaters - 1 do + begin + for j := 0 to NoRaters - 1 do + begin + if (i <> j) then + begin + partial_pchance := compute_partial_pchance(R,i,j,denom); + pchance := pchance + partial_pchance; + end; + end; + for k := 0 to NoCats - 1 do + begin + frequency := 0; + for l := 0 to NoObjects - 1 do + begin + frequency := frequency + R[i,k,l]; + end; + a_priori := frequency / NoObjects; + outline := format('Frequency[%d,%d] := %f',[i+1,k+1,a_priori]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + end; + + for k := 0 to NoCats - 1 do + begin + for l := 0 to NoObjects - 1 do + begin + for i := 0 to NoRaters - 1 do + begin + average_frequency[k] := average_frequency[k] + R[i,k,l]; + end; + end; + end; + + for k := 0 to NoCats - 1 do + begin + average_frequency[k] := average_frequency[k] / (NoObjects * NoRaters); + outline := format('Average_Frequency[%d] := %f',[k+1,average_frequency[k]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := format('PChance := %f',[pchance]); + OutPutFrm.RichEdit.Lines.Add(outline); + + // compute observed probability of agreement among all raters + num := 0.0; + for k := 0 to NoCats - 1 do + begin + for l := 0 to NoObjects - 1 do + begin + num := num + compute_partial_pobs(R,k,l); + end; + end; + if (denom > 0.0) then pobs := num / denom + else pobs := 0.0; + outline := format('PObs := %f',[pobs]); + OutPutFrm.RichEdit.Lines.Add(outline); + + kappa := (pobs - pchance) / (1.0 - pchance); + outline := format('Kappa := %f',[kappa]); + OutPutFrm.RichEdit.Lines.Add(outline); + z := KappaVariance(R,NoObjects,NoRaters,NoCats); + if (z > 0.0) then z := kappa / sqrt(z); + outline := format('z for Kappa := %8.3f with probability > %8.3f',[z,1.0-probz(z)]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + + // clean up space allocated + average_frequency := nil; + R := nil; +end; + +procedure TGenKappaFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TGenKappaFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +function TGenKappaFrm.compute_term1(R : IntDyneCube; i, j, k : integer) : double; +VAR + ii,jj : integer; // range over 0 .. num_coders-1 */ + kk : integer; // range over 0 .. num_categories-1 */ + l,ll : integer; // range over 0 .. num_points-1 */ + denom_i : integer; //:=0; + denom_j : integer; //:=0; + num_i : integer; //:=0; + num_j : integer; //:=0; + +begin + denom_i := 0; + denom_j := 0; + num_i := 0; + num_j := 0; + for kk := 0 to NoCats - 1 do + begin + for ll := 0 to NoObjects - 1 do + begin + denom_i := denom_i + R[i,kk,ll]; + denom_j := denom_j + R[j,kk,ll]; + end; + end; + + for l := 0 to NoObjects - 1 do + begin + num_i := num_i + R[i,k,l]; + num_j := num_j + R[j,k,l]; + end; + + result := ((num_i / denom_i) * (num_j / denom_j)); +end; + +function TGenKappaFrm.compute_term2(R : IntDyneCube; i, j, l : integer) : double; +VAR + sum_i, sum_j, k : integer; +begin + sum_i:=0; + sum_j:=0; + + for k := 0 to NoCats - 1 do + begin + sum_i := sum_i + R[i,k,l]; + sum_j := sum_j + R[j,k,l]; + end; + + result := (sum_i * sum_j ); +end; +//--------------------------------------------------------------------------- + +function TGenKappaFrm.compute_denom(R : IntDyneCube) : double; +VAR + sum : IntDyneVec; + aresult : double; + i, j, k, l : integer; +begin + aresult := 0; + + SetLength(sum,NoObjects); // sum := (int *)calloc(num_points,sizeof(int)); + for l := 0 to NoObjects - 1 do + begin + sum[l] := 0; + for i := 0 to NoRaters - 1 do + begin + for k := 0 to NoCats - 1 do + begin + sum[l] := sum[l] + R[i,k,l]; + end; + end; + end; + for l := 0 to NoObjects - 1 do + begin + aresult := aresult + sum[l] * ( sum[l] - 1); + end; + sum := nil; + result := aresult; +end; + +function TGenKappaFrm.compute_partial_pchance(R : IntDyneCube; i, j : integer; + denom : double) : double; +VAR + term1, term2 : double; + k, l : integer; +begin + term1 := 0; + term2 := 0; + + for k := 0 to NoCats - 1 do + begin + term1 := term1 + compute_term1(R,i,j,k); + end; + + for l := 0 to NoObjects - 1 do + begin + term2 := term2 + compute_term2(R,i,j,l); + end; + if (denom > 0.0) then result := ( term1 * ( term2 / denom ) ) + else result := 0.0; +end; +//--------------------------------------------------------------------------- + +function TGenKappaFrm.compute_partial_pobs(R : IntDyneCube; k, l : integer) : double; +VAR + sum, i : integer; +begin + sum := 0; + + for i := 0 to NoRaters - 1 do + begin + sum := sum + R[i,k,l]; + end; + + result := (sum * (sum - 1)); +end; + +function TGenKappaFrm.KappaVariance(R : IntDyneCube; n, m, K1 : integer) : double; +VAR + xij, variance, term1, term2 : double; + i, j, k : integer; + pj : DblDyneVec; + +begin + // calculates the variance of Kappa + // R contains 1's or 0's for raters, categories and objects (row, col, slice) + // m is number of raters + // n is number of subjects + // K1 is the number of categories + + term1 := 0.0; + term2 := 0.0; + SetLength(pj,K1); + for j := 0 to K1 - 1 do pj[j] := 0.0; + + // get proportion of values in each category + for j := 0 to K1 - 1 do // accross categories + begin + xij := 0.0; + for i := 0 to m - 1 do // accross raters + begin + for k := 0 to n - 1 do // accross objects + begin + xij := xij + R[i,j,k]; + end; + end; + pj[j] := pj[j] + xij; + end; + for j := 0 to K1 - 1 do pj[j] := pj[j] / (n * m); + for j := 0 to K1 - 1 do + begin + term1 := term1 +(pj[j] * (1.0 - pj[j])); + term2 := term2 + (pj[j] * (1.0 - pj[j]) * (1.0 - 2.0 * pj[j])); + end; + term1 := term1 * term1; + if ((term1 > 0) and (term2 > 0)) then + variance := (2.0 / (n * m * (m-1) * term1)) * (term1 - term2) + else variance := 0.0; + pj := nil; + result := variance; +end; + +procedure TGenKappaFrm.ObjInClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + + ObjectEdit.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + ObjIn.Visible := false; + ObjOut.Visible := true; +end; + +procedure TGenKappaFrm.ObjOutClick(Sender: TObject); +begin + VarList.Items.Add(ObjectEdit.Text); + ObjectEdit.Text := ''; + ObjIn.Visible := true; + ObjOut.Visible := false; +end; + +procedure TGenKappaFrm.RaterInClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + + RaterEdit.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + RaterIn.Visible := false; + RaterOut.Visible := true; + +end; + +procedure TGenKappaFrm.RaterOutClick(Sender: TObject); +begin + VarList.Items.Add(RaterEdit.Text); + RaterEdit.Text := ''; + RaterIn.Visible := true; + RaterOut.Visible := false; +end; + +initialization + {$I genkappaunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/genrndvalsunit.lfm b/applications/lazstats/source_orig/genrndvalsunit.lfm new file mode 100644 index 000000000..a3cafc317 --- /dev/null +++ b/applications/lazstats/source_orig/genrndvalsunit.lfm @@ -0,0 +1,272 @@ +object GenRndValsFrm: TGenRndValsFrm + Left = 194 + Height = 393 + Top = 111 + Width = 380 + Caption = 'Generate Random Values' + ClientHeight = 393 + ClientWidth = 380 + OnShow = FormShow + LCLVersion = '0.9.30' + object Label1: TLabel + Left = 8 + Height = 16 + Top = 112 + Width = 80 + Caption = 'Variable Label: ' + ParentColor = False + end + object Label2: TLabel + Left = 161 + Height = 16 + Top = 168 + Width = 49 + Caption = 'Between ' + ParentColor = False + end + object Label3: TLabel + Left = 263 + Height = 16 + Top = 168 + Width = 24 + Caption = 'and ' + ParentColor = False + end + object Label4: TLabel + Left = 162 + Height = 16 + Top = 200 + Width = 49 + Caption = 'Between ' + ParentColor = False + end + object Label5: TLabel + Left = 263 + Height = 16 + Top = 200 + Width = 21 + Caption = 'and' + ParentColor = False + end + object Label6: TLabel + Left = 161 + Height = 16 + Top = 233 + Width = 45 + Caption = 'Mean = ' + ParentColor = False + end + object Label7: TLabel + Left = 264 + Height = 16 + Top = 234 + Width = 35 + Caption = 'S.D. = ' + ParentColor = False + end + object Label8: TLabel + Left = 161 + Height = 16 + Top = 270 + Width = 41 + Caption = 'D.F. 1 =' + ParentColor = False + end + object Label9: TLabel + Left = 160 + Height = 16 + Top = 304 + Width = 41 + Caption = 'D.F. 1 =' + ParentColor = False + end + object Label10: TLabel + Left = 264 + Height = 16 + Top = 301 + Width = 41 + Caption = 'D.F. 2 =' + ParentColor = False + end + object RadioGroup1: TRadioGroup + Left = 7 + Height = 91 + Top = 2 + Width = 241 + AutoFill = True + Caption = 'Generate Cases For:' + 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 = 73 + ClientWidth = 237 + Items.Strings = ( + 'All Current Cases' + 'A Specific Number of Cases' + ) + OnClick = RadioGroup1Click + TabOrder = 0 + end + object NoCasesEdit: TEdit + Left = 184 + Height = 23 + Top = 56 + Width = 44 + OnExit = NoCasesEditExit + TabOrder = 1 + Text = 'NoCasesEdit' + end + object LabelEdit: TEdit + Left = 89 + Height = 23 + Top = 101 + Width = 159 + TabOrder = 2 + Text = 'LabelEdit' + end + object RadioGroup2: TRadioGroup + Left = 8 + Height = 200 + Top = 136 + Width = 143 + AutoFill = True + Caption = 'Distribution Shape:' + 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 = 182 + ClientWidth = 139 + Items.Strings = ( + 'Flat - Integer' + 'Flat - Floating Point' + 'Normal z Values' + 'Chi-Squared Values' + 'F Distribution Values' + ) + OnClick = RadioGroup2Click + TabOrder = 3 + end + object LowIntEdit: TEdit + Left = 210 + Height = 23 + Top = 160 + Width = 43 + OnKeyPress = LowIntEditKeyPress + TabOrder = 4 + Text = 'LowIntEdit' + end + object HiIntEdit: TEdit + Left = 307 + Height = 23 + Top = 161 + Width = 47 + TabOrder = 5 + Text = 'HiIntEdit' + end + object LowRealEdit: TEdit + Left = 210 + Height = 23 + Top = 193 + Width = 43 + OnKeyPress = LowRealEditKeyPress + TabOrder = 6 + Text = 'LowRealEdit' + end + object HiRealEdit: TEdit + Left = 306 + Height = 23 + Top = 194 + Width = 46 + TabOrder = 7 + Text = 'HiRealEdit' + end + object zMeanEdit: TEdit + Left = 210 + Height = 23 + Top = 227 + Width = 45 + OnKeyPress = zMeanEditKeyPress + TabOrder = 8 + Text = 'zMeanEdit' + end + object zSDEdit: TEdit + Left = 306 + Height = 23 + Top = 227 + Width = 48 + TabOrder = 9 + Text = 'zSDEdit' + end + object ChiDFEdit: TEdit + Left = 210 + Height = 23 + Top = 262 + Width = 43 + TabOrder = 10 + Text = 'ChiDFEdit' + end + object FDF1Edit: TEdit + Left = 208 + Height = 23 + Top = 294 + Width = 46 + OnKeyPress = FDF1EditKeyPress + TabOrder = 11 + Text = 'FDF1Edit' + end + object FDF2Edit: TEdit + Left = 312 + Height = 23 + Top = 289 + Width = 47 + TabOrder = 12 + Text = 'FDF2Edit' + end + object ResetBtn: TButton + Left = 8 + Height = 31 + Top = 344 + Width = 74 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 13 + end + object CancelBtn: TButton + Left = 104 + Height = 31 + Top = 344 + Width = 74 + Cancel = True + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 14 + end + object ComputeBtn: TButton + Left = 200 + Height = 31 + Top = 344 + Width = 74 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 15 + end + object Return: TButton + Left = 296 + Height = 31 + Top = 344 + Width = 74 + Caption = 'Return' + ModalResult = 1 + TabOrder = 16 + end +end diff --git a/applications/lazstats/source_orig/genrndvalsunit.lrs b/applications/lazstats/source_orig/genrndvalsunit.lrs new file mode 100644 index 000000000..434d789c4 --- /dev/null +++ b/applications/lazstats/source_orig/genrndvalsunit.lrs @@ -0,0 +1,73 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGenRndValsFrm','FORMDATA',[ + 'TPF0'#14'TGenRndValsFrm'#13'GenRndValsFrm'#4'Left'#3#194#0#6'Height'#3#137#1 + +#3'Top'#2'o'#5'Width'#3'|'#1#7'Caption'#6#22'Generate Random Values'#12'Clie' + +'ntHeight'#3#137#1#11'ClientWidth'#3'|'#1#6'OnShow'#7#8'FormShow'#10'LCLVers' + +'ion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#16#3'Top'#2 + +'p'#5'Width'#2'P'#7'Caption'#6#16'Variable Label: '#11'ParentColor'#8#0#0#6 + +'TLabel'#6'Label2'#4'Left'#3#161#0#6'Height'#2#16#3'Top'#3#168#0#5'Width'#2 + +'1'#7'Caption'#6#8'Between '#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Lef' + +'t'#3#7#1#6'Height'#2#16#3'Top'#3#168#0#5'Width'#2#24#7'Caption'#6#4'and '#11 + +'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#3#162#0#6'Height'#2#16#3'Top' + +#3#200#0#5'Width'#2'1'#7'Caption'#6#8'Between '#11'ParentColor'#8#0#0#6'TLab' + +'el'#6'Label5'#4'Left'#3#7#1#6'Height'#2#16#3'Top'#3#200#0#5'Width'#2#21#7'C' + +'aption'#6#3'and'#11'ParentColor'#8#0#0#6'TLabel'#6'Label6'#4'Left'#3#161#0#6 + +'Height'#2#16#3'Top'#3#233#0#5'Width'#2'-'#7'Caption'#6#7'Mean = '#11'Parent' + +'Color'#8#0#0#6'TLabel'#6'Label7'#4'Left'#3#8#1#6'Height'#2#16#3'Top'#3#234#0 + +#5'Width'#2'#'#7'Caption'#6#7'S.D. = '#11'ParentColor'#8#0#0#6'TLabel'#6'Lab' + +'el8'#4'Left'#3#161#0#6'Height'#2#16#3'Top'#3#14#1#5'Width'#2')'#7'Caption'#6 + +#8'D.F. 1 ='#11'ParentColor'#8#0#0#6'TLabel'#6'Label9'#4'Left'#3#160#0#6'Hei' + +'ght'#2#16#3'Top'#3'0'#1#5'Width'#2')'#7'Caption'#6#8'D.F. 1 ='#11'ParentCol' + +'or'#8#0#0#6'TLabel'#7'Label10'#4'Left'#3#8#1#6'Height'#2#16#3'Top'#3'-'#1#5 + +'Width'#2')'#7'Caption'#6#8'D.F. 2 ='#11'ParentColor'#8#0#0#11'TRadioGroup' + +#11'RadioGroup1'#4'Left'#2#7#6'Height'#2'['#3'Top'#2#2#5'Width'#3#241#0#8'Au' + +'toFill'#9#7'Caption'#6#19'Generate Cases For:'#28'ChildSizing.LeftRightSpac' + +'ing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizon' + +'tal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'cr' + +'sHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChild' + +'s'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layou' + +'t'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1 + +#12'ClientHeight'#2'I'#11'ClientWidth'#3#237#0#13'Items.Strings'#1#6#17'All ' + +'Current Cases'#6#26'A Specific Number of Cases'#0#7'OnClick'#7#16'RadioGrou' + +'p1Click'#8'TabOrder'#2#0#0#0#5'TEdit'#11'NoCasesEdit'#4'Left'#3#184#0#6'Hei' + +'ght'#2#23#3'Top'#2'8'#5'Width'#2','#6'OnExit'#7#15'NoCasesEditExit'#8'TabOr' + +'der'#2#1#4'Text'#6#11'NoCasesEdit'#0#0#5'TEdit'#9'LabelEdit'#4'Left'#2'Y'#6 + +'Height'#2#23#3'Top'#2'e'#5'Width'#3#159#0#8'TabOrder'#2#2#4'Text'#6#9'Label' + +'Edit'#0#0#11'TRadioGroup'#11'RadioGroup2'#4'Left'#2#8#6'Height'#3#200#0#3'T' + +'op'#3#136#0#5'Width'#3#143#0#8'AutoFill'#9#7'Caption'#6#19'Distribution Sha' + +'pe:'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2 + +#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'Child' + +'Sizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.Shrin' + +'kHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsSc' + +'aleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'Ch' + +'ildSizing.ControlsPerLine'#2#1#12'ClientHeight'#3#182#0#11'ClientWidth'#3 + +#139#0#13'Items.Strings'#1#6#14'Flat - Integer'#6#21'Flat - Floating Point'#6 + +#15'Normal z Values'#6#18'Chi-Squared Values'#6#21'F Distribution Values'#0#7 + +'OnClick'#7#16'RadioGroup2Click'#8'TabOrder'#2#3#0#0#5'TEdit'#10'LowIntEdit' + +#4'Left'#3#210#0#6'Height'#2#23#3'Top'#3#160#0#5'Width'#2'+'#10'OnKeyPress'#7 + +#18'LowIntEditKeyPress'#8'TabOrder'#2#4#4'Text'#6#10'LowIntEdit'#0#0#5'TEdit' + +#9'HiIntEdit'#4'Left'#3'3'#1#6'Height'#2#23#3'Top'#3#161#0#5'Width'#2'/'#8'T' + +'abOrder'#2#5#4'Text'#6#9'HiIntEdit'#0#0#5'TEdit'#11'LowRealEdit'#4'Left'#3 + +#210#0#6'Height'#2#23#3'Top'#3#193#0#5'Width'#2'+'#10'OnKeyPress'#7#19'LowRe' + +'alEditKeyPress'#8'TabOrder'#2#6#4'Text'#6#11'LowRealEdit'#0#0#5'TEdit'#10'H' + +'iRealEdit'#4'Left'#3'2'#1#6'Height'#2#23#3'Top'#3#194#0#5'Width'#2'.'#8'Tab' + +'Order'#2#7#4'Text'#6#10'HiRealEdit'#0#0#5'TEdit'#9'zMeanEdit'#4'Left'#3#210 + +#0#6'Height'#2#23#3'Top'#3#227#0#5'Width'#2'-'#10'OnKeyPress'#7#17'zMeanEdit' + +'KeyPress'#8'TabOrder'#2#8#4'Text'#6#9'zMeanEdit'#0#0#5'TEdit'#7'zSDEdit'#4 + +'Left'#3'2'#1#6'Height'#2#23#3'Top'#3#227#0#5'Width'#2'0'#8'TabOrder'#2#9#4 + +'Text'#6#7'zSDEdit'#0#0#5'TEdit'#9'ChiDFEdit'#4'Left'#3#210#0#6'Height'#2#23 + +#3'Top'#3#6#1#5'Width'#2'+'#8'TabOrder'#2#10#4'Text'#6#9'ChiDFEdit'#0#0#5'TE' + +'dit'#8'FDF1Edit'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#3'&'#1#5'Width'#2'.' + +#10'OnKeyPress'#7#16'FDF1EditKeyPress'#8'TabOrder'#2#11#4'Text'#6#8'FDF1Edit' + +#0#0#5'TEdit'#8'FDF2Edit'#4'Left'#3'8'#1#6'Height'#2#23#3'Top'#3'!'#1#5'Widt' + +'h'#2'/'#8'TabOrder'#2#12#4'Text'#6#8'FDF2Edit'#0#0#7'TButton'#8'ResetBtn'#4 + +'Left'#2#8#6'Height'#2#31#3'Top'#3'X'#1#5'Width'#2'J'#7'Caption'#6#5'Reset'#7 + +'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#13#0#0#7'TButton'#9'CancelBtn'#4 + +'Left'#2'h'#6'Height'#2#31#3'Top'#3'X'#1#5'Width'#2'J'#6'Cancel'#9#7'Caption' + ,#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#14#0#0#7'TButton'#10'ComputeB' + +'tn'#4'Left'#3#200#0#6'Height'#2#31#3'Top'#3'X'#1#5'Width'#2'J'#7'Caption'#6 + +#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#15#0#0#7'TButton' + +#6'Return'#4'Left'#3'('#1#6'Height'#2#31#3'Top'#3'X'#1#5'Width'#2'J'#7'Capti' + +'on'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#16#0#0#0 +]); diff --git a/applications/lazstats/source_orig/genrndvalsunit.pas b/applications/lazstats/source_orig/genrndvalsunit.pas new file mode 100644 index 000000000..d858afa23 --- /dev/null +++ b/applications/lazstats/source_orig/genrndvalsunit.pas @@ -0,0 +1,282 @@ +unit GenRndValsUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + ExtCtrls, StdCtrls, Globals, MainUnit, OutPutUnit, FunctionsLib, + DataProcs, DictionaryUnit, Math; + +type + + { TGenRndValsFrm } + + TGenRndValsFrm = class(TForm) + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + Return: TButton; + ChiDFEdit: TEdit; + FDF2Edit: TEdit; + FDF1Edit: TEdit; + Label10: TLabel; + Label8: TLabel; + Label9: TLabel; + zSDEdit: TEdit; + zMeanEdit: TEdit; + HiRealEdit: TEdit; + Label5: TLabel; + Label6: TLabel; + Label7: TLabel; + LowRealEdit: TEdit; + Label4: TLabel; + LowIntEdit: TEdit; + HiIntEdit: TEdit; + Label2: TLabel; + Label3: TLabel; + LabelEdit: TEdit; + Label1: TLabel; + NoCasesEdit: TEdit; + RadioGroup1: TRadioGroup; + RadioGroup2: TRadioGroup; + procedure ComputeBtnClick(Sender: TObject); + procedure FDF1EditKeyPress(Sender: TObject; var Key: char); + procedure FormShow(Sender: TObject); + procedure LowIntEditKeyPress(Sender: TObject; var Key: char); + procedure LowRealEditKeyPress(Sender: TObject; var Key: char); + procedure NoCasesEditExit(Sender: TObject); + procedure RadioGroup1Click(Sender: TObject); + procedure RadioGroup2Click(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure zMeanEditKeyPress(Sender: TObject; var Key: char); + private + { private declarations } + Ncases : integer; + DistType : integer; + public + { public declarations } + end; + +var + GenRndValsFrm: TGenRndValsFrm; + +implementation + +{ TGenRndValsFrm } + +procedure TGenRndValsFrm.RadioGroup1Click(Sender: TObject); +begin + if RadioGroup1.ItemIndex = 1 then + begin + if NoCases <= 0 then + begin + ShowMessage('Error! There are currently no cases!'); + exit; + end + else Ncases := NoCases + end + else NoCasesEdit.SetFocus; +end; + +procedure TGenRndValsFrm.LowIntEditKeyPress(Sender: TObject; var Key: char); +begin + if Ord(Key) = 13 then HiIntEdit.SetFocus; +end; + +procedure TGenRndValsFrm.FDF1EditKeyPress(Sender: TObject; var Key: char); +begin + if Ord(Key) = 13 then FDF2Edit.SetFocus; +end; + +procedure TGenRndValsFrm.ComputeBtnClick(Sender: TObject); +var + i, j : integer; + col : integer; + RndNo : integer; + RealRnd : double; + Range : integer; + MinReal, MaxReal : double; + Mean, StdDev : double; + SumX1, SumX2 : double; + df1, df2 : integer; +begin + if LabelEdit.Text = '' then + begin + ShowMessage('Error. Enter a label for the variable.'); + exit; + end; + if DistType <= 0 then + begin + ShowMessage('First, select a distribution type.'); + exit; + end; + if RadioGroup1.ItemIndex < 0 then + begin + ShowMessage('Select an option for the number of values to generate.'); + exit; + end; + if (RadioGroup1.ItemIndex = 1) and (NoCasesEdit.Text = '') then + begin + ShowMessage('Error! Number of cases not specified.'); + exit; + end + else Ncases := StrToInt(NoCasesEdit.Text); + if NoCases < Ncases then + begin + OS3MainFrm.DataGrid.RowCount := NCases + 1; + OS3MainFrm.NoCasesEdit.Text := IntToStr(NCases); + NoCases := Ncases; + end; + DictionaryFrm.DictGrid.ColCount := 8; + if NoVariables <= 0 then // a new data file + begin + OS3MainFrm.DataGrid.ColCount := 2; + for i := 1 to Ncases do + OS3MainFrm.DataGrid.Cells[0,i] := format('Case %d',[i]); + col := 1; + DictionaryFrm.DictGrid.RowCount := 1; + DictionaryFrm.NewVar(col); + DictionaryFrm.DictGrid.Cells[1,col] := LabelEdit.Text; + OS3MainFrm.DataGrid.Cells[col,0] := LabelEdit.Text; + end + else // existing data file + begin + col := NoVariables + 1; + DictionaryFrm.NewVar(col); + DictionaryFrm.DictGrid.Cells[1,col] := LabelEdit.Text; + OS3MainFrm.DataGrid.Cells[col,0] := LabelEdit.Text; + end; + randomize; + case DistType of + 1 : begin // range of integers + Range := StrToInt(HiIntEdit.Text) - StrToInt(LowIntEdit.Text); + for i := 1 to Ncases do + begin + RndNo := random(Range); + RndNo := RndNo + StrToInt(LowIntEdit.Text); + OS3MainFrm.DataGrid.Cells[col,i] := IntToStr(RndNo); + end; + end; + 2 : begin // range of real random numbers + MinReal := StrToFloat(LowRealEdit.Text); + MaxReal := StrToFloat(HiRealEdit.Text); + Range := round(MaxReal - MinReal); + for i := 1 to Ncases do + begin + RealRnd := random; + RndNo := random(Range); + RealRnd := RndNo + RealRnd + MinReal; + OS3MainFrm.DataGrid.Cells[col,i] := format('%8.3f',[RealRnd]); + end; + end; + 3 : begin // normally distributed z score + Mean := StrToFloat(zMeanEdit.Text); + StdDev := StrToFloat(zSDEdit.Text); + for i := 1 to Ncases do + begin + RealRnd := RandG(Mean,StdDev); + OS3MainFrm.DataGrid.Cells[col,i] := format('%8.3f',[RealRnd]); + end; + end; + 4 : begin // Chi square is a sum of df squared normally distributed z scores + df1 := StrToInt(ChiDFEdit.Text); + for i := 1 to Ncases do + begin + SumX1 := 0.0; + for j := 1 to df1 do + begin + RealRnd := RandG(0.0,1.0); + SumX1 := SumX1 + (RealRnd * RealRnd); + end; + OS3MainFrm.DataGrid.Cells[col,i] := format('%8.3f',[SumX1]); + end; + end; + 5 : begin // F ratio is a ratio of two independent chi-squares + df1 := StrToInt(FDF1Edit.Text); + df2 := StrToInt(FDF2Edit.Text); + for i := 1 to Ncases do + begin + SumX1 := 0.0; + SumX2 := 0.0; + for j := 1 to df1 do + begin + RealRnd := RandG(0.0,1.0); + SumX1 := SumX1 + (RealRnd * RealRnd); + end; + for j := 1 to df2 do + begin + RealRnd := RandG(0.0,1.0); + SumX2 := SumX2 + (RealRnd * RealRnd); + end; + RealRnd := SumX1 / SumX2; + OS3MainFrm.DataGrid.Cells[col,i] := format('%8.3f',[RealRnd]); + end; + end; + end; + NoVariables := col; + OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables); + OS3MainFrm.NoCasesEdit.Text := IntToStr(NoCases); +end; + +procedure TGenRndValsFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TGenRndValsFrm.LowRealEditKeyPress(Sender: TObject; var Key: char); +begin + if Ord(Key) = 13 then HiRealEdit.SetFocus; +end; + +procedure TGenRndValsFrm.NoCasesEditExit(Sender: TObject); +begin + if RadioGroup1.ItemIndex = 1 then Ncases := StrToInt(NoCasesEdit.Text); +end; + +procedure TGenRndValsFrm.RadioGroup2Click(Sender: TObject); +begin + DistType := RadioGroup2.ItemIndex + 1; + case DistType of + 1 : LowIntEdit.SetFocus; + 2 : LowRealEdit.SetFocus; + 3 : zMeanEdit.SetFocus; + 4 : ChiDFEdit.SetFocus; + 5 : FDF1Edit.SetFocus; + else + begin + ShowMessage('Please select a distribution type before pressing Compute.'); + exit; + end; + end; +end; + +procedure TGenRndValsFrm.ResetBtnClick(Sender: TObject); +begin + NoCasesEdit.Text := ''; + RadioGroup1.ItemIndex := -1; + RadioGroup2.ItemIndex := -1; + LabelEdit.Text := ''; + LowIntEdit.Text := ''; + HiIntEdit.Text := ''; + LowRealEdit.Text := ''; + HiRealEdit.Text := ''; + zMeanEdit.Text := ''; + zSDEdit.Text := ''; + ChiDFEdit.Text := ''; + FDF1Edit.Text := ''; + FDF2Edit.Text := ''; + DistType := 0; +end; + +procedure TGenRndValsFrm.zMeanEditKeyPress(Sender: TObject; var Key: char); +begin + if Ord(Key) = 13 then zSDEdit.SetFocus; +end; + +initialization + {$I genrndvalsunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/gensequnit.lfm b/applications/lazstats/source_orig/gensequnit.lfm new file mode 100644 index 000000000..780ffcfdf --- /dev/null +++ b/applications/lazstats/source_orig/gensequnit.lfm @@ -0,0 +1,128 @@ +object GenSeqFrm: TGenSeqFrm + Left = 174 + Height = 192 + Top = 110 + Width = 301 + Caption = 'Generation of Sequential Values' + ClientHeight = 192 + ClientWidth = 301 + OnShow = FormShow + LCLVersion = '0.9.30' + object Label1: TLabel + Left = 9 + Height = 16 + Top = 96 + Width = 100 + Caption = 'Start Sequence At: ' + ParentColor = False + end + object Label2: TLabel + Left = 10 + Height = 16 + Top = 127 + Width = 114 + Caption = 'Increment Values By: ' + ParentColor = False + end + object Label3: TLabel + Left = 8 + Height = 16 + Top = 160 + Width = 107 + Caption = 'New Variable Label: ' + ParentColor = False + end + object RadioGroup1: TRadioGroup + Left = 10 + Height = 71 + Top = 6 + Width = 188 + AutoFill = True + Caption = 'Generate for:' + ChildSizing.LeftRightSpacing = 6 + ChildSizing.TopBottomSpacing = 6 + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize + ChildSizing.EnlargeVertical = crsHomogenousChildResize + ChildSizing.ShrinkHorizontal = crsScaleChilds + ChildSizing.ShrinkVertical = crsScaleChilds + ChildSizing.Layout = cclLeftToRightThenTopToBottom + ChildSizing.ControlsPerLine = 1 + ClientHeight = 53 + ClientWidth = 184 + Items.Strings = ( + 'All Current Cases' + 'Number of Cases = ' + ) + OnClick = RadioGroup1Click + TabOrder = 0 + end + object NoCasesEdit: TEdit + Left = 144 + Height = 23 + Top = 40 + Width = 42 + OnExit = NoCasesEditExit + TabOrder = 1 + Text = 'NoCasesEdit' + end + object StartAtEdit: TEdit + Left = 150 + Height = 23 + Top = 86 + Width = 41 + TabOrder = 2 + Text = 'StartAtEdit' + end + object IncrEdit: TEdit + Left = 149 + Height = 23 + Top = 120 + Width = 42 + TabOrder = 3 + Text = 'IncrEdit' + end + object LabelEdit: TEdit + Left = 113 + Height = 23 + Top = 153 + Width = 78 + TabOrder = 4 + Text = 'LabelEdit' + end + object ResetBtn: TButton + Left = 209 + Height = 30 + Top = 7 + Width = 80 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 5 + end + object CancelBtn: TButton + Left = 209 + Height = 30 + Top = 48 + Width = 80 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 6 + end + object ComputeBtn: TButton + Left = 209 + Height = 30 + Top = 104 + Width = 80 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 7 + end + object ReturnBtn: TButton + Left = 209 + Height = 30 + Top = 144 + Width = 80 + Caption = 'Return' + ModalResult = 1 + TabOrder = 8 + end +end diff --git a/applications/lazstats/source_orig/gensequnit.lrs b/applications/lazstats/source_orig/gensequnit.lrs new file mode 100644 index 000000000..44cfc6559 --- /dev/null +++ b/applications/lazstats/source_orig/gensequnit.lrs @@ -0,0 +1,37 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGenSeqFrm','FORMDATA',[ + 'TPF0'#10'TGenSeqFrm'#9'GenSeqFrm'#4'Left'#3#174#0#6'Height'#3#192#0#3'Top'#2 + +'n'#5'Width'#3'-'#1#7'Caption'#6#31'Generation of Sequential Values'#12'Clie' + +'ntHeight'#3#192#0#11'ClientWidth'#3'-'#1#6'OnShow'#7#8'FormShow'#10'LCLVers' + +'ion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2#16#3'Top'#2 + +'`'#5'Width'#2'd'#7'Caption'#6#19'Start Sequence At: '#11'ParentColor'#8#0#0 + +#6'TLabel'#6'Label2'#4'Left'#2#10#6'Height'#2#16#3'Top'#2#127#5'Width'#2'r'#7 + +'Caption'#6#21'Increment Values By: '#11'ParentColor'#8#0#0#6'TLabel'#6'Labe' + +'l3'#4'Left'#2#8#6'Height'#2#16#3'Top'#3#160#0#5'Width'#2'k'#7'Caption'#6#20 + +'New Variable Label: '#11'ParentColor'#8#0#0#11'TRadioGroup'#11'RadioGroup1' + +#4'Left'#2#10#6'Height'#2'G'#3'Top'#2#6#5'Width'#3#188#0#8'AutoFill'#9#7'Cap' + +'tion'#6#13'Generate for:'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizi' + +'ng.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogeno' + +'usChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResiz' + +'e'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Shr' + +'inkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRigh' + +'tThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'5' + +#11'ClientWidth'#3#184#0#13'Items.Strings'#1#6#17'All Current Cases'#6#18'Nu' + +'mber of Cases = '#0#7'OnClick'#7#16'RadioGroup1Click'#8'TabOrder'#2#0#0#0#5 + +'TEdit'#11'NoCasesEdit'#4'Left'#3#144#0#6'Height'#2#23#3'Top'#2'('#5'Width'#2 + +'*'#6'OnExit'#7#15'NoCasesEditExit'#8'TabOrder'#2#1#4'Text'#6#11'NoCasesEdit' + +#0#0#5'TEdit'#11'StartAtEdit'#4'Left'#3#150#0#6'Height'#2#23#3'Top'#2'V'#5'W' + +'idth'#2')'#8'TabOrder'#2#2#4'Text'#6#11'StartAtEdit'#0#0#5'TEdit'#8'IncrEdi' + +'t'#4'Left'#3#149#0#6'Height'#2#23#3'Top'#2'x'#5'Width'#2'*'#8'TabOrder'#2#3 + +#4'Text'#6#8'IncrEdit'#0#0#5'TEdit'#9'LabelEdit'#4'Left'#2'q'#6'Height'#2#23 + +#3'Top'#3#153#0#5'Width'#2'N'#8'TabOrder'#2#4#4'Text'#6#9'LabelEdit'#0#0#7'T' + +'Button'#8'ResetBtn'#4'Left'#3#209#0#6'Height'#2#30#3'Top'#2#7#5'Width'#2'P' + +#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#5#0#0#7 + +'TButton'#9'CancelBtn'#4'Left'#3#209#0#6'Height'#2#30#3'Top'#2'0'#5'Width'#2 + +'P'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#6#0#0#7'TButton' + +#10'ComputeBtn'#4'Left'#3#209#0#6'Height'#2#30#3'Top'#2'h'#5'Width'#2'P'#7'C' + +'aption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#7#0#0#7 + +'TButton'#9'ReturnBtn'#4'Left'#3#209#0#6'Height'#2#30#3'Top'#3#144#0#5'Width' + +#2'P'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#8#0#0#0 +]); diff --git a/applications/lazstats/source_orig/gensequnit.pas b/applications/lazstats/source_orig/gensequnit.pas new file mode 100644 index 000000000..06e9ad896 --- /dev/null +++ b/applications/lazstats/source_orig/gensequnit.pas @@ -0,0 +1,150 @@ +unit GenSeqUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + ExtCtrls, StdCtrls, Globals, MainUnit, OutPutUnit, + DictionaryUnit; + + +type + + { TGenSeqFrm } + + TGenSeqFrm = class(TForm) + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + LabelEdit: TEdit; + Label3: TLabel; + StartAtEdit: TEdit; + IncrEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + NoCasesEdit: TEdit; + RadioGroup1: TRadioGroup; + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure NoCasesEditExit(Sender: TObject); + procedure RadioGroup1Click(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + Ncases : integer; + public + { public declarations } + end; + +var + GenSeqFrm: TGenSeqFrm; + +implementation + +{ TGenSeqFrm } + +procedure TGenSeqFrm.ResetBtnClick(Sender: TObject); +begin + RadioGroup1.ItemIndex := 1; + NoCasesEdit.Text := ''; + StartAtEdit.Text := ''; + IncrEdit.Text := ''; + LabelEdit.Text := ''; +end; + +procedure TGenSeqFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TGenSeqFrm.ComputeBtnClick(Sender: TObject); +var + i, col : integer; + First, Increment : double; +begin + if StartAtEdit.Text = '' then + begin + ShowMessage('Error! No starting value provided.'); + exit; + end; + if IncrEdit.Text = '' then + begin + ShowMessage('Error! No increment value provided.'); + exit; + end; + if LabelEdit.Text = '' then + begin + ShowMessage('Error! No variable label provided.'); + exit; + end; + if NoCases < Ncases then + begin + OS3MainFrm.DataGrid.RowCount := NCases + 1; + OS3MainFrm.NoCasesEdit.Text := IntToStr(NCases); + NoCases := Ncases; + end; + if NoVariables <= 0 then // a new data file + begin + OS3MainFrm.DataGrid.ColCount := 2; + OS3MainFrm.DataGrid.RowCount := Ncases + 1; + for i := 1 to Ncases do + OS3MainFrm.DataGrid.Cells[0,i] := format('Case %d',[i]); + col := 1; + DictionaryFrm.DictGrid.RowCount := 1; + DictionaryFrm.DictGrid.ColCount := 8; + DictionaryFrm.NewVar(col); + DictionaryFrm.DictGrid.Cells[1,col] := LabelEdit.Text; + OS3MainFrm.DataGrid.Cells[1,0] := LabelEdit.Text; + DictionaryFrm.DictGrid.RowCount := 2; + NoVariables := 1; + + end + else // existing data file + begin + col := NoVariables + 1; + DictionaryFrm.NewVar(col); + DictionaryFrm.DictGrid.Cells[1,col] := LabelEdit.Text; + end; + + First := StrToFloat(StartAtEdit.Text); + Increment := StrToFloat(IncrEdit.Text); + for i := 1 to Ncases do + begin + OS3MainFrm.DataGrid.Cells[col,i] := format('%8.3f',[First]); + First := First + Increment; + end; + OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables); +end; + +procedure TGenSeqFrm.NoCasesEditExit(Sender: TObject); +begin + if RadioGroup1.ItemIndex = 1 then Ncases := StrToInt(NoCasesEdit.Text); + if (Ncases <= 0) and (RadioGroup1.ItemIndex = 1) then + begin + ShowMessage('Error! No. of cases to generate not specified.'); + exit; + end; +end; + +procedure TGenSeqFrm.RadioGroup1Click(Sender: TObject); +begin + if RadioGroup1.ItemIndex = 0 then + begin + if NoCases <= 0 then + begin + ShowMessage('Error! There are currently no cases!'); + exit; + end + else Ncases := NoCases; + end + else NoCasesEdit.SetFocus; +end; + +initialization + {$I gensequnit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/glmunit.lfm b/applications/lazstats/source_orig/glmunit.lfm new file mode 100644 index 000000000..0fc2b1f01 --- /dev/null +++ b/applications/lazstats/source_orig/glmunit.lfm @@ -0,0 +1,966 @@ +object GLMFrm: TGLMFrm + Left = 53 + Height = 589 + Top = 97 + Width = 857 + Caption = 'General Linear Model' + ClientHeight = 589 + ClientWidth = 857 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 6 + Height = 14 + Top = 66 + Width = 26 + Caption = 'Code' + ParentColor = False + end + object Label2: TLabel + Left = 54 + Height = 14 + Top = 66 + Width = 109 + Caption = 'Continuous Dep. Vars.' + ParentColor = False + end + object Label3: TLabel + Left = 230 + Height = 14 + Top = 68 + Width = 90 + Caption = 'Available Variables' + ParentColor = False + end + object Label4: TLabel + Left = 391 + Height = 14 + Top = 69 + Width = 122 + Caption = 'Fixed Effect Indep. Vars.' + ParentColor = False + end + object Label5: TLabel + Left = 535 + Height = 14 + Top = 67 + Width = 26 + Caption = 'Code' + ParentColor = False + end + object Label6: TLabel + Left = 57 + Height = 14 + Top = 186 + Width = 109 + Caption = 'Categorical Dep. Vars.' + ParentColor = False + end + object Label7: TLabel + Left = 56 + Height = 14 + Top = 288 + Width = 128 + Caption = 'Repeatd Meas. Dep. Vars.' + ParentColor = False + end + object Label8: TLabel + Left = 391 + Height = 14 + Top = 179 + Width = 135 + Caption = 'Random Effect Indep. Vars.' + ParentColor = False + end + object Label9: TLabel + Left = 392 + Height = 14 + Top = 290 + Width = 118 + Caption = 'Covariates (Continuous)' + ParentColor = False + end + object Label10: TLabel + Left = 393 + Height = 14 + Top = 392 + Width = 117 + Caption = 'Repeated Meas. Effects' + ParentColor = False + end + object Label11: TLabel + Left = 601 + Height = 14 + Top = 210 + Width = 131 + Caption = 'List of Defined Interactions' + ParentColor = False + end + object Label12: TLabel + Left = 312 + Height = 14 + Top = 499 + Width = 129 + Caption = 'Order of Indep. Var. Entry' + ParentColor = False + end + object StartInterBtn: TButton + Left = 598 + Height = 19 + Top = 66 + Width = 207 + Caption = 'Begin Definition of an Interaction' + OnClick = StartInterBtnClick + TabOrder = 0 + end + object VarList: TListBox + Left = 216 + Height = 297 + Top = 87 + Width = 128 + ItemHeight = 0 + MultiSelect = True + TabOrder = 1 + end + object DepContList: TListBox + Left = 58 + Height = 81 + Top = 88 + Width = 111 + ItemHeight = 0 + TabOrder = 2 + end + object FixedList: TListBox + Left = 389 + Height = 77 + Top = 86 + Width = 130 + ItemHeight = 0 + OnClick = FixedListClick + TabOrder = 3 + end + object ContDepInBtn: TBitBtn + Left = 175 + Height = 28 + Top = 90 + Width = 32 + 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 = ContDepInBtnClick + TabOrder = 4 + end + object ContDepOutBtn: TBitBtn + Left = 176 + Height = 28 + Top = 128 + Width = 32 + 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 = ContDepOutBtnClick + TabOrder = 5 + end + object CatDepInBtn: TBitBtn + Left = 175 + Height = 28 + Top = 192 + Width = 32 + 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 = CatDepInBtnClick + TabOrder = 6 + end + object CatDepOutBtn: TBitBtn + Left = 175 + Height = 28 + Top = 232 + Width = 32 + 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 = CatDepOutBtnClick + TabOrder = 7 + end + object RepDepInBtn: TBitBtn + Left = 175 + Height = 28 + Top = 304 + Width = 32 + 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 = RepDepInBtnClick + TabOrder = 8 + end + object ReptDepOutBtn: TBitBtn + Left = 176 + Height = 28 + Top = 344 + Width = 32 + 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 = ReptDepOutBtnClick + TabOrder = 9 + end + object FixedIndepInBtn: TBitBtn + Left = 352 + Height = 28 + Top = 90 + Width = 32 + 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 = FixedIndepInBtnClick + TabOrder = 10 + end + object FixedIndepOutBtn: TBitBtn + Left = 352 + Height = 28 + Top = 128 + Width = 32 + 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 = FixedIndepOutBtnClick + TabOrder = 11 + end + object RndIndepInBtn: TBitBtn + Left = 352 + Height = 28 + Top = 192 + Width = 32 + 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 = RndIndepInBtnClick + TabOrder = 12 + end + object RndIndepOutBtn: TBitBtn + Left = 352 + Height = 28 + Top = 232 + Width = 32 + 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 = RndIndepOutBtnClick + TabOrder = 13 + end + object CovInBtn: TBitBtn + Left = 352 + Height = 28 + Top = 304 + Width = 32 + 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 = CovInBtnClick + TabOrder = 14 + end + object CovOutBtn: TBitBtn + Left = 352 + Height = 28 + Top = 344 + Width = 32 + 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 = CovOutBtnClick + TabOrder = 15 + end + object DepCatList: TListBox + Left = 58 + Height = 74 + Top = 201 + Width = 104 + ItemHeight = 0 + TabOrder = 16 + end + object RepeatList: TListBox + Left = 57 + Height = 80 + Top = 303 + Width = 104 + ItemHeight = 0 + TabOrder = 17 + end + object RandomList: TListBox + Left = 392 + Height = 80 + Top = 197 + Width = 127 + ItemHeight = 0 + OnClick = RandomListClick + TabOrder = 18 + end + object CovariateList: TListBox + Left = 393 + Height = 77 + Top = 304 + Width = 125 + ItemHeight = 0 + OnClick = CovariateListClick + TabOrder = 19 + end + object Memo2: TMemo + Left = 5 + Height = 55 + Top = 408 + Width = 338 + Lines.Strings = ( + 'NOTE! Be sure to enter the dependent variable(s) first, then the' + 'independent variables. When defining interactions, enter' + 'two-way interactions first, then three-way, etc.' + ) + TabOrder = 20 + end + object RepTrtList: TListBox + Left = 392 + Height = 54 + Top = 411 + Width = 129 + ItemHeight = 0 + OnClick = RepTrtListClick + TabOrder = 21 + end + object ShowModelBtn: TButton + Left = 6 + Height = 20 + Top = 472 + Width = 66 + Caption = 'Show Model' + OnClick = ShowModelBtnClick + TabOrder = 22 + end + object ModelEdit: TEdit + Left = 79 + Height = 21 + Top = 471 + Width = 764 + TabOrder = 23 + Text = 'ModelEdit' + end + object InterDefList: TListBox + Left = 598 + Height = 70 + Top = 93 + Width = 246 + ItemHeight = 0 + TabOrder = 24 + end + object EndDefBtn: TButton + Left = 598 + Height = 20 + Top = 175 + Width = 211 + Caption = 'End Definititon of an Interaction' + OnClick = EndDefBtnClick + TabOrder = 25 + end + object InteractList: TListBox + Left = 599 + Height = 228 + Top = 232 + Width = 245 + ItemHeight = 0 + TabOrder = 26 + end + object GroupBox1: TGroupBox + Left = 8 + Height = 83 + Top = 499 + Width = 144 + Caption = 'Statistics' + ClientHeight = 65 + ClientWidth = 140 + TabOrder = 27 + object DescChk: TCheckBox + Left = 3 + Height = 17 + Top = 0 + Width = 120 + Caption = 'Means, Var.''s, S.D.''s' + TabOrder = 0 + end + object CorsChk: TCheckBox + Left = 3 + Height = 17 + Top = 21 + Width = 78 + Caption = 'Correlations' + TabOrder = 1 + end + object ResidChk: TCheckBox + Left = 3 + Height = 17 + Top = 44 + Width = 65 + Caption = 'Residuals' + TabOrder = 2 + end + end + object TypeGroup: TRadioGroup + Left = 160 + Height = 81 + Top = 499 + Width = 131 + AutoFill = True + Caption = 'Type of Coding' + 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 = 63 + ClientWidth = 127 + ItemIndex = 1 + Items.Strings = ( + 'Dummy' + 'Effect' + 'Orthogonal' + ) + TabOrder = 28 + end + object IndOrderBox: TListBox + Left = 312 + Height = 67 + Top = 513 + Width = 149 + ItemHeight = 0 + TabOrder = 29 + end + object ResetBtn: TButton + Left = 224 + Height = 33 + Top = 16 + Width = 88 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 30 + end + object CancelBtn: TButton + Left = 112 + Height = 33 + Top = 16 + Width = 88 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 31 + end + object ComputeBtn: TButton + Left = 336 + Height = 33 + Top = 16 + Width = 84 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 32 + end + object ReturnBtn: TButton + Left = 444 + Height = 33 + Top = 16 + Width = 82 + Caption = 'Return' + ModalResult = 1 + TabOrder = 33 + end + object ContDepCode: TListBox + Left = 6 + Height = 76 + Top = 89 + Width = 43 + ItemHeight = 0 + TabOrder = 34 + end + object CatDepCode: TListBox + Left = 6 + Height = 72 + Top = 199 + Width = 44 + ItemHeight = 0 + TabOrder = 35 + end + object ReptDepCode: TListBox + Left = 6 + Height = 78 + Top = 302 + Width = 44 + ItemHeight = 0 + TabOrder = 36 + end + object FixedIndepCode: TListBox + Left = 529 + Height = 74 + Top = 87 + Width = 51 + ItemHeight = 0 + TabOrder = 37 + end + object RndIndepCode: TListBox + Left = 529 + Height = 76 + Top = 200 + Width = 53 + ItemHeight = 0 + TabOrder = 38 + end + object CovariateCode: TListBox + Left = 529 + Height = 75 + Top = 306 + Width = 54 + ItemHeight = 0 + TabOrder = 39 + end + object RepTrtCode: TListBox + Left = 528 + Height = 53 + Top = 409 + Width = 56 + ItemHeight = 0 + TabOrder = 40 + end + object GroupBox2: TGroupBox + Left = 512 + Height = 78 + Top = 499 + Width = 133 + Caption = 'Options' + ClientHeight = 60 + ClientWidth = 129 + TabOrder = 41 + object ShowDesignChk: TCheckBox + Left = 4 + Height = 17 + Top = 8 + Width = 114 + Caption = 'Show Design in Grid' + TabOrder = 0 + end + end + object HelpBtn: TButton + Tag = 126 + Left = 8 + Height = 33 + Top = 16 + Width = 86 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 42 + end +end diff --git a/applications/lazstats/source_orig/glmunit.lrs b/applications/lazstats/source_orig/glmunit.lrs new file mode 100644 index 000000000..65ac68ce1 --- /dev/null +++ b/applications/lazstats/source_orig/glmunit.lrs @@ -0,0 +1,726 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGLMFrm','FORMDATA',[ + 'TPF0'#7'TGLMFrm'#6'GLMFrm'#4'Left'#2'5'#6'Height'#3'M'#2#3'Top'#2'a'#5'Width' + +#3'Y'#3#7'Caption'#6#20'General Linear Model'#12'ClientHeight'#3'M'#2#11'Cli' + +'entWidth'#3'Y'#3#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2'#0#6'T' + +'Label'#6'Label1'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'B'#5'Width'#2#26#7'Cap' + +'tion'#6#4'Code'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2'6'#6'He' + +'ight'#2#14#3'Top'#2'B'#5'Width'#2'm'#7'Caption'#6#21'Continuous Dep. Vars.' + +#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#230#0#6'Height'#2#14#3 + +'Top'#2'D'#5'Width'#2'Z'#7'Caption'#6#19'Available Variables'#11'ParentColor' + +#8#0#0#6'TLabel'#6'Label4'#4'Left'#3#135#1#6'Height'#2#14#3'Top'#2'E'#5'Widt' + +'h'#2'z'#7'Caption'#6#25'Fixed Effect Indep. Vars.'#11'ParentColor'#8#0#0#6 + +'TLabel'#6'Label5'#4'Left'#3#23#2#6'Height'#2#14#3'Top'#2'C'#5'Width'#2#26#7 + +'Caption'#6#4'Code'#11'ParentColor'#8#0#0#6'TLabel'#6'Label6'#4'Left'#2'9'#6 + +'Height'#2#14#3'Top'#3#186#0#5'Width'#2'm'#7'Caption'#6#22'Categorical Dep. ' + +'Vars.'#11'ParentColor'#8#0#0#6'TLabel'#6'Label7'#4'Left'#2'8'#6'Height'#2#14 + +#3'Top'#3' '#1#5'Width'#3#128#0#7'Caption'#6#24'Repeatd Meas. Dep. Vars.'#11 + +'ParentColor'#8#0#0#6'TLabel'#6'Label8'#4'Left'#3#135#1#6'Height'#2#14#3'Top' + +#3#179#0#5'Width'#3#135#0#7'Caption'#6#26'Random Effect Indep. Vars.'#11'Par' + +'entColor'#8#0#0#6'TLabel'#6'Label9'#4'Left'#3#136#1#6'Height'#2#14#3'Top'#3 + +'"'#1#5'Width'#2'v'#7'Caption'#6#23'Covariates (Continuous)'#11'ParentColor' + +#8#0#0#6'TLabel'#7'Label10'#4'Left'#3#137#1#6'Height'#2#14#3'Top'#3#136#1#5 + +'Width'#2'u'#7'Caption'#6#22'Repeated Meas. Effects'#11'ParentColor'#8#0#0#6 + +'TLabel'#7'Label11'#4'Left'#3'Y'#2#6'Height'#2#14#3'Top'#3#210#0#5'Width'#3 + +#131#0#7'Caption'#6#28'List of Defined Interactions'#11'ParentColor'#8#0#0#6 + +'TLabel'#7'Label12'#4'Left'#3'8'#1#6'Height'#2#14#3'Top'#3#243#1#5'Width'#3 + +#129#0#7'Caption'#6#26'Order of Indep. Var. Entry'#11'ParentColor'#8#0#0#7'T' + +'Button'#13'StartInterBtn'#4'Left'#3'V'#2#6'Height'#2#19#3'Top'#2'B'#5'Width' + +#3#207#0#7'Caption'#6'"Begin Definition of an Interaction'#7'OnClick'#7#18'S' + +'tartInterBtnClick'#8'TabOrder'#2#0#0#0#8'TListBox'#7'VarList'#4'Left'#3#216 + +#0#6'Height'#3')'#1#3'Top'#2'W'#5'Width'#3#128#0#10'ItemHeight'#2#0#11'Multi' + +'Select'#9#8'TabOrder'#2#1#0#0#8'TListBox'#11'DepContList'#4'Left'#2':'#6'He' + +'ight'#2'Q'#3'Top'#2'X'#5'Width'#2'o'#10'ItemHeight'#2#0#8'TabOrder'#2#2#0#0 + +#8'TListBox'#9'FixedList'#4'Left'#3#133#1#6'Height'#2'M'#3'Top'#2'V'#5'Width' + +#3#130#0#10'ItemHeight'#2#0#7'OnClick'#7#14'FixedListClick'#8'TabOrder'#2#3#0 + +#0#7'TBitBtn'#12'ContDepInBtn'#4'Left'#3#175#0#6'Height'#2#28#3'Top'#2'Z'#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#17'ContDepInBtnClick'#8'TabOrder'#2#4#0#0#7'TBitBtn'#13 + +'ContDepOutBtn'#4'Left'#3#176#0#6'Height'#2#28#3'Top'#3#128#0#5'Width'#2' ' + +#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16 + +#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$' + +#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']' + +#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I' + +#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!' + +'c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169 + +#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203 + +#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190 + +'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165 + +#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255 + +#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135 + +#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199 + +'t'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255 + +'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157 + +'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + ,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#18 + +'ContDepOutBtnClick'#8'TabOrder'#2#5#0#0#7'TBitBtn'#11'CatDepInBtn'#4'Left'#3 + +#175#0#6'Height'#2#28#3'Top'#3#192#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#16'CatDepInBtnClick'#8'Ta' + +'bOrder'#2#6#0#0#7'TBitBtn'#12'CatDepOutBtn'#4'Left'#3#175#0#6'Height'#2#28#3 + +'Top'#3#232#0#5'Width'#2' '#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0 + +#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0 + +'d'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + ,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#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#17'CatDepOutBtnClick'#8'TabOrder'#2#7#0#0#7'T' + +'BitBtn'#11'RepDepInBtn'#4'Left'#3#175#0#6'Height'#2#28#3'Top'#3'0'#1#5'Widt' + +'h'#2' '#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0 + +#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0 + +#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184 + ,#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247 + +'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255'[' + +#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255 + +'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q' + +#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206 + +#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z' + +#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0 + +'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212#163 + +#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199 + +#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0 + +#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135#255']' + +#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I' + +#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7 + +'OnClick'#7#16'RepDepInBtnClick'#8'TabOrder'#2#8#0#0#7'TBitBtn'#13'ReptDepOu' + +'tBtn'#4'Left'#3#176#0#6'Height'#2#28#3'Top'#3'X'#1#5'Width'#2' '#10'Glyph.D' + +'ata'#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#18'ReptDepOutBtnC' + +'lick'#8'TabOrder'#2#9#0#0#7'TBitBtn'#15'FixedIndepInBtn'#4'Left'#3'`'#1#6'H' + +'eight'#2#28#3'Top'#2'Z'#5'Width'#2' '#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'B' + +'M6'#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#20'FixedIndepInBtnClick'#8'TabOrder'#2#10#0#0 + +#7'TBitBtn'#16'FixedIndepOutBtn'#4'Left'#3'`'#1#6'Height'#2#28#3'Top'#3#128#0 + +#5'Width'#2' '#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0 + +#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0 + +#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O' + +#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V' + +#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255 + +'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5' + +#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195 + +'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144 + +#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255 + +'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255 + +#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212 + +#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133 + +#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255 + +#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135 + +#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A' + +#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyp' + +'hs'#2#0#7'OnClick'#7#21'FixedIndepOutBtnClick'#8'TabOrder'#2#11#0#0#7'TBitB' + +'tn'#13'RndIndepInBtn'#4'Left'#3'`'#1#6'Height'#2#28#3'Top'#3#192#0#5'Width' + ,#2' '#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0 + +#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$' + +#217#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']' + +#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I' + +#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!' + +'c$'#207#255#255#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169 + +#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203 + +#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190 + +'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165 + +#218#174#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255 + +#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135 + +#255'}'#194#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199 + +'t'#255'h'#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255 + +'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157 + +'\'#255'/x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#18 + +'RndIndepInBtnClick'#8'TabOrder'#2#12#0#0#7'TBitBtn'#14'RndIndepOutBtn'#4'Le' + +'ft'#3'`'#1#6'Height'#2#28#3'Top'#3#232#0#5'Width'#2' '#10'Glyph.Data'#10':' + +#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' ' + +#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + ,#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A' + +#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255 + +#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'#196'{'#200#134#255#156#213 + +#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135 + +#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r' + +#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0'h'#199't'#201#127#204#138 + +#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207 + +#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}' + +#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0 + +'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S' + +#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';' + +#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#19'RndIndepOutBtn' + +'Click'#8'TabOrder'#2#13#0#0#7'TBitBtn'#8'CovInBtn'#4'Left'#3'`'#1#6'Height' + +#2#28#3'Top'#3'0'#1#5'Width'#2' '#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4 + +#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd' + +#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161 + +'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255 + +'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255#255#0#255#255#255 + +#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211#161#255#148#208#157 + +#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195 + ,#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0 + +#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171#255#158#214#167#255 + +#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144 + +#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'#145'P'#255'%i)'#201 + +#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'#255'a'#190 + +'m'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255 + +'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#9'NumGlyphs'#2#0#7'OnClick'#7#13'CovInBtnClick'#8'TabOrder'#2#14#0#0#7'TBit' + +'Btn'#9'CovOutBtn'#4'Left'#3'`'#1#6'Height'#2#28#3'Top'#3'X'#1#5'Width'#2' ' + +#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16 + +#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8' + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['#170'd'#255 + +'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%' + +'i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'#196'{'#200 + +#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139 + +#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v' + +#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0'h'#199't'#201 + +#127#204#138#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159 + +#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197 + +#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0 + +#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X' + +#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B' + +#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255 + +#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + ,#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#14 + +'CovOutBtnClick'#8'TabOrder'#2#15#0#0#8'TListBox'#10'DepCatList'#4'Left'#2':' + +#6'Height'#2'J'#3'Top'#3#201#0#5'Width'#2'h'#10'ItemHeight'#2#0#8'TabOrder'#2 + +#16#0#0#8'TListBox'#10'RepeatList'#4'Left'#2'9'#6'Height'#2'P'#3'Top'#3'/'#1 + +#5'Width'#2'h'#10'ItemHeight'#2#0#8'TabOrder'#2#17#0#0#8'TListBox'#10'Random' + +'List'#4'Left'#3#136#1#6'Height'#2'P'#3'Top'#3#197#0#5'Width'#2#127#10'ItemH' + +'eight'#2#0#7'OnClick'#7#15'RandomListClick'#8'TabOrder'#2#18#0#0#8'TListBox' + +#13'CovariateList'#4'Left'#3#137#1#6'Height'#2'M'#3'Top'#3'0'#1#5'Width'#2'}' + +#10'ItemHeight'#2#0#7'OnClick'#7#18'CovariateListClick'#8'TabOrder'#2#19#0#0 + +#5'TMemo'#5'Memo2'#4'Left'#2#5#6'Height'#2'7'#3'Top'#3#152#1#5'Width'#3'R'#1 + +#13'Lines.Strings'#1#6'ANOTE! Be sure to enter the dependent variable(s) fi' + +'rst, then the'#6'9independent variables. When defining interactions, enter' + +#6'0two-way interactions first, then three-way, etc.'#0#8'TabOrder'#2#20#0#0 + +#8'TListBox'#10'RepTrtList'#4'Left'#3#136#1#6'Height'#2'6'#3'Top'#3#155#1#5 + +'Width'#3#129#0#10'ItemHeight'#2#0#7'OnClick'#7#15'RepTrtListClick'#8'TabOrd' + +'er'#2#21#0#0#7'TButton'#12'ShowModelBtn'#4'Left'#2#6#6'Height'#2#20#3'Top'#3 + +#216#1#5'Width'#2'B'#7'Caption'#6#10'Show Model'#7'OnClick'#7#17'ShowModelBt' + +'nClick'#8'TabOrder'#2#22#0#0#5'TEdit'#9'ModelEdit'#4'Left'#2'O'#6'Height'#2 + +#21#3'Top'#3#215#1#5'Width'#3#252#2#8'TabOrder'#2#23#4'Text'#6#9'ModelEdit'#0 + +#0#8'TListBox'#12'InterDefList'#4'Left'#3'V'#2#6'Height'#2'F'#3'Top'#2']'#5 + +'Width'#3#246#0#10'ItemHeight'#2#0#8'TabOrder'#2#24#0#0#7'TButton'#9'EndDefB' + +'tn'#4'Left'#3'V'#2#6'Height'#2#20#3'Top'#3#175#0#5'Width'#3#211#0#7'Caption' + +#6'!End Definititon of an Interaction'#7'OnClick'#7#14'EndDefBtnClick'#8'Tab' + +'Order'#2#25#0#0#8'TListBox'#12'InteractList'#4'Left'#3'W'#2#6'Height'#3#228 + +#0#3'Top'#3#232#0#5'Width'#3#245#0#10'ItemHeight'#2#0#8'TabOrder'#2#26#0#0#9 + +'TGroupBox'#9'GroupBox1'#4'Left'#2#8#6'Height'#2'S'#3'Top'#3#243#1#5'Width'#3 + +#144#0#7'Caption'#6#10'Statistics'#12'ClientHeight'#2'A'#11'ClientWidth'#3 + +#140#0#8'TabOrder'#2#27#0#9'TCheckBox'#7'DescChk'#4'Left'#2#3#6'Height'#2#17 + +#3'Top'#2#0#5'Width'#2'x'#7'Caption'#6#21'Means, Var.''s, S.D.''s'#8'TabOrde' + +'r'#2#0#0#0#9'TCheckBox'#7'CorsChk'#4'Left'#2#3#6'Height'#2#17#3'Top'#2#21#5 + +'Width'#2'N'#7'Caption'#6#12'Correlations'#8'TabOrder'#2#1#0#0#9'TCheckBox'#8 + +'ResidChk'#4'Left'#2#3#6'Height'#2#17#3'Top'#2','#5'Width'#2'A'#7'Caption'#6 + +#9'Residuals'#8'TabOrder'#2#2#0#0#0#11'TRadioGroup'#9'TypeGroup'#4'Left'#3 + +#160#0#6'Height'#2'Q'#3'Top'#3#243#1#5'Width'#3#131#0#8'AutoFill'#9#7'Captio' + +'n'#6#14'Type of Coding'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing' + +'.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenous' + +'ChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize' + +#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Shrink' + +'Vertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightTh' + +'enTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'?'#11 + +'ClientWidth'#2#127#9'ItemIndex'#2#1#13'Items.Strings'#1#6#5'Dummy'#6#6'Effe' + +'ct'#6#10'Orthogonal'#0#8'TabOrder'#2#28#0#0#8'TListBox'#11'IndOrderBox'#4'L' + +'eft'#3'8'#1#6'Height'#2'C'#3'Top'#3#1#2#5'Width'#3#149#0#10'ItemHeight'#2#0 + +#8'TabOrder'#2#29#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#224#0#6'Height'#2'!'#3 + +'Top'#2#16#5'Width'#2'X'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick' + +#8'TabOrder'#2#30#0#0#7'TButton'#9'CancelBtn'#4'Left'#2'p'#6'Height'#2'!'#3 + +'Top'#2#16#5'Width'#2'X'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrd' + +'er'#2#31#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3'P'#1#6'Height'#2'!'#3'Top' + +#2#16#5'Width'#2'T'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick' + +#8'TabOrder'#2' '#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#188#1#6'Height'#2'!' + +#3'Top'#2#16#5'Width'#2'R'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabO' + +'rder'#2'!'#0#0#8'TListBox'#11'ContDepCode'#4'Left'#2#6#6'Height'#2'L'#3'Top' + ,#2'Y'#5'Width'#2'+'#10'ItemHeight'#2#0#8'TabOrder'#2'"'#0#0#8'TListBox'#10'C' + +'atDepCode'#4'Left'#2#6#6'Height'#2'H'#3'Top'#3#199#0#5'Width'#2','#10'ItemH' + +'eight'#2#0#8'TabOrder'#2'#'#0#0#8'TListBox'#11'ReptDepCode'#4'Left'#2#6#6'H' + +'eight'#2'N'#3'Top'#3'.'#1#5'Width'#2','#10'ItemHeight'#2#0#8'TabOrder'#2'$' + +#0#0#8'TListBox'#14'FixedIndepCode'#4'Left'#3#17#2#6'Height'#2'J'#3'Top'#2'W' + +#5'Width'#2'3'#10'ItemHeight'#2#0#8'TabOrder'#2'%'#0#0#8'TListBox'#12'RndInd' + +'epCode'#4'Left'#3#17#2#6'Height'#2'L'#3'Top'#3#200#0#5'Width'#2'5'#10'ItemH' + +'eight'#2#0#8'TabOrder'#2'&'#0#0#8'TListBox'#13'CovariateCode'#4'Left'#3#17#2 + +#6'Height'#2'K'#3'Top'#3'2'#1#5'Width'#2'6'#10'ItemHeight'#2#0#8'TabOrder'#2 + +''''#0#0#8'TListBox'#10'RepTrtCode'#4'Left'#3#16#2#6'Height'#2'5'#3'Top'#3 + +#153#1#5'Width'#2'8'#10'ItemHeight'#2#0#8'TabOrder'#2'('#0#0#9'TGroupBox'#9 + +'GroupBox2'#4'Left'#3#0#2#6'Height'#2'N'#3'Top'#3#243#1#5'Width'#3#133#0#7'C' + +'aption'#6#7'Options'#12'ClientHeight'#2'<'#11'ClientWidth'#3#129#0#8'TabOrd' + +'er'#2')'#0#9'TCheckBox'#13'ShowDesignChk'#4'Left'#2#4#6'Height'#2#17#3'Top' + +#2#8#5'Width'#2'r'#7'Caption'#6#19'Show Design in Grid'#8'TabOrder'#2#0#0#0#0 + +#7'TButton'#7'HelpBtn'#3'Tag'#2'~'#4'Left'#2#8#6'Height'#2'!'#3'Top'#2#16#5 + +'Width'#2'V'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2 + +'*'#0#0#0 +]); diff --git a/applications/lazstats/source_orig/glmunit.pas b/applications/lazstats/source_orig/glmunit.pas new file mode 100644 index 000000000..da89e8e14 --- /dev/null +++ b/applications/lazstats/source_orig/glmunit.pas @@ -0,0 +1,3297 @@ +unit GLMUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + MainUnit, MatrixLib, Globals, OutPutUnit, + Math, DataProcs, FunctionsLib, DictionaryUnit, StdCtrls, Buttons, ExtCtrls, + contexthelpunit; + +type + + { TGLMFrm } + + TGLMFrm = class(TForm) + HelpBtn: TButton; + ShowDesignChk: TCheckBox; + ContDepInBtn: TBitBtn; + GroupBox2: TGroupBox; + RndIndepOutBtn: TBitBtn; + CovInBtn: TBitBtn; + CovOutBtn: TBitBtn; + ContDepOutBtn: TBitBtn; + CatDepInBtn: TBitBtn; + CatDepOutBtn: TBitBtn; + RepDepInBtn: TBitBtn; + ReptDepOutBtn: TBitBtn; + FixedIndepInBtn: TBitBtn; + FixedIndepOutBtn: TBitBtn; + RndIndepInBtn: TBitBtn; + ContDepCode: TListBox; + CatDepCode: TListBox; + ReptDepCode: TListBox; + FixedIndepCode: TListBox; + RndIndepCode: TListBox; + CovariateCode: TListBox; + RepTrtCode: TListBox; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + DescChk: TCheckBox; + CorsChk: TCheckBox; + Label12: TLabel; + IndOrderBox: TListBox; + TypeGroup: TRadioGroup; + ResidChk: TCheckBox; + EndDefBtn: TButton; + GroupBox1: TGroupBox; + InterDefList: TListBox; + Label11: TLabel; + InteractList: TListBox; + ShowModelBtn: TButton; + DepContList: TListBox; + ModelEdit: TEdit; + FixedList: TListBox; + Label10: TLabel; + Label6: TLabel; + DepCatList: TListBox; + Label7: TLabel; + Label8: TLabel; + Label9: TLabel; + CovariateList: TListBox; + RepTrtList: TListBox; + Memo2: TMemo; + RandomList: TListBox; + RepeatList: TListBox; + VarList: TListBox; + StartInterBtn: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + procedure CatDepInBtnClick(Sender: TObject); + procedure CatDepOutBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure ContDepInBtnClick(Sender: TObject); + procedure ContDepOutBtnClick(Sender: TObject); + procedure CovariateListClick(Sender: TObject); + procedure CovInBtnClick(Sender: TObject); + procedure CovOutBtnClick(Sender: TObject); + procedure EndDefBtnClick(Sender: TObject); + procedure FixedIndepInBtnClick(Sender: TObject); + procedure FixedIndepOutBtnClick(Sender: TObject); + procedure FixedListClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure RandomListClick(Sender: TObject); + procedure RepDepInBtnClick(Sender: TObject); + procedure ReptDepOutBtnClick(Sender: TObject); + procedure RepTrtListClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure RndIndepInBtnClick(Sender: TObject); + procedure RndIndepOutBtnClick(Sender: TObject); + procedure ShowModelBtnClick(Sender: TObject); + procedure StartInterBtnClick(Sender: TObject); + private + { private declarations } + IntDef : boolean; + DefLine : integer; // number of interaction terms - 1 + NoInterDefs : integer; // number of interactions in the model + NContDep : integer; // no. of continuous dependent variables + NCatDep : integer; // no. of categorical dependent variables + NReptDep : integer; // no. of repeated dependent variables + NFixedIndep : integer; // no. of fixed effect independent variables + NRndIndep : integer; // no. of random effect independent variables + NCovIndep : integer; // no. of covariate independent variables + model : integer; // 1 if multreg, 2 if canonical + novars : integer; // total no. of vectors in analysis grid + totalobs : integer; // total no. of data grid observations + gencount, oldcount : integer; // no. columns generated in datagrid + ContDepID : IntDyneVec; // grid col. no.s of continuous dependent var.s + CatDepID : IntDyneVec; // grid col. no.s of categorical dependent var.s + ReptDepID : IntDyneVec; // grid col. no.s of repeated dep. variables + FixedIndepID : IntDyneVec; // grid col. no.s of fixed independent var.s + RndIndepID : IntDyneVec; // grid col. no.s of random independent var.s + CovIndepID : IntDyneVec; // grid col. no.s of covariates + DataGrid : DblDyneMat; // array for generated vectors and values + GenLabels : StrDyneVec; // array of labels for data matrix + ContDepPos : IntDyneVec; // datagrid position of continuous variables + CatDepPos : IntDyneVec; // beginning datagrid position of categorical var. vectors + ReptDepPos : IntDyneVec; // datagrid position of repeated variable + ReptIndepPos : IntDyneVec; // datagrid pos. of subject vectors + ReptTrtPos : IntDyneVec; // datagrid pos. of repeated treatment vectors + FixedIndepPos : IntDyneVec; // datagrid position of first vector for cat indep. var. + RndIndepPos : IntDyneVec; // datagrid position of first vector for rnd. indep. var. + CovIndepPos : IntDyneVec; // datagrid positions of covariates + InteractPos : IntDyneVec; // datagrid positions of interactions + Labels : StrDyneVec; // labels for the analyses + ColSelected : IntDyneVec; // datagrid columns of variables in the analysis + NFixVecIndep : IntDyneVec; // no. of vectors for fixed independent vars. + NRndVecIndep : IntDyneVec; // no. of vectors for random indep. vars. + NFixVecDep : IntDyneVec; // no. of vectors for fixed dependent vars. + NInteractVecs : IntDyneVec; // no. of vectors for each interaction + OldR2 : double; // Previously obtained R^2 for stepwise addition + R2 : double; // Squared mult. R obtained from RegAnal + rmatrix : DblDyneMat; // correlation matrix + indmatrix : DblDyneMat; // correlations among independent variable + rxy : DblDyneVec; // correlations between dependent and independent var.s + invmatrix : DblDyneMat; // inverse of independent correlations + means : DblDyneVec; // means of variables + Vars : DblDyneVec; // variances of variables + StdDevs : DblDyneVec; // standard deviations of variables + B : DblDyneVec; // raw regression coefficients + Beta : DblDyneVec; // standardized regression coefficients + workmat : DblDyneMat; // work matrix for inverse referenced at 1 (not zero) + TypeISS : DblDyneVec; // Incremental SS + TypeIISS : DblDyneVec; // Unique SS + TypeIMS : DblDyneVec; // Incremental SS + TypeIIMS : DblDyneVec; // Unique MS + TypeIDF1 : DblDyneVec; // numerator d.f. for incremental ms + TypeIIDF1 : DblDyneVec; // numerator d.f. for unique ms + TypeIDF2 : DblDyneVec; // denominator d.f. for incremental ms + TypeIIDF2 : DblDyneVec; // denominator d.f. for unique ms + TypeIF : DblDyneVec; // F for incremental ms + TypeIProb : DblDyneVec; // Probability of F for incremental ms + TypeIIF : DblDyneVec; // F for unique MS + TypeIIProb : DblDyneVec; // Probability for unique ms + + procedure AllocateIDMem; + procedure GetIDs; + function GetVarCount : integer; + procedure AllocateGridMem; + procedure DeallocateGridMem; + procedure DeallocateIDMem; + procedure DummyCodes(min : integer; max : integer; VAR CodePattern : IntDyneMat); + procedure EffectCodes(min : integer; max : integer; VAR CodePattern : IntDyneMat); + procedure OrthogCodes(min : integer; max : integer; VAR CodePattern : IntDyneMat); + procedure RegAnal(Nentered : integer); + procedure PartIEntry; + procedure PartIIEntry; + procedure ModelIAnalysis; + procedure ModelIIAnalysis; + procedure ModelIIIAnalysis; + function CntIntActVecs(linestr : string) : integer; + procedure GenInterVecs(linestr : string); + procedure CanCor(NLeft : integer; NRight : integer; + GridPlace : IntDyneVec); + + public + { public declarations } + end; + +var + GLMFrm: TGLMFrm; + +implementation + +{ TGLMFrm } + +procedure TGLMFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Items.Clear; + DepCatList.Items.Clear; + DepContList.Items.Clear; + RepeatList.Items.Clear; + RepTrtList.Items.Clear; + RepTrtCode.Items.Clear; + FixedList.Items.Clear; + RandomList.Items.Clear; + CovariateList.Items.Clear; + InterDefList.Items.Clear; + InteractList.Items.Clear; + ContDepCode.Items.Clear; + CatDepCode.Items.Clear; + ReptDepCode.Items.Clear; + FixedIndepCode.Items.Clear; + RndIndepCode.Items.Clear; + CovariateCode.Items.Clear; + IndOrderBox.Items.Clear; + ModelEdit.Text := ''; + NContDep := 0; + NCatDep := 0; + NReptDep := 0; + NFixedIndep := 0; + NRndIndep := 0; + NCovIndep := 0; + DescChk.Checked := false; + CorsChk.Checked := false; + ResidChk.Checked := false; + TypeGroup.ItemIndex := 0; + ContDepOutBtn.Visible := false; + CatDepOutBtn.Visible := false; + ReptDepOutBtn.Visible := false; + FixedIndepOutBtn.Visible := false; + RndIndepOutBtn.Visible := false; + CovOutBtn.Visible := false; + IntDef := false; + DefLine := 0; + NoInterDefs := 0; + for i := 1 to NoVariables do VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TGLMFrm.RndIndepInBtnClick(Sender: TObject); +var + index : integer; + codestr : string; + +begin + index := VarList.ItemIndex; + if index >= 0 then + begin + RandomList.Items.Add(VarList.Items.Strings[index]); + VarList.Items.Delete(index); + NRndIndep := NRndIndep + 1; + codestr := format('IR%d',[NRndIndep]); + RndIndepCode.Items.Add(codestr); + IndOrderBox.Items.Add(codestr); + RndIndepOutBtn.Visible := true; + end; +end; + +procedure TGLMFrm.RndIndepOutBtnClick(Sender: TObject); +var + i, index : integer; + cellstring : string; + +begin + index := RandomList.ItemIndex; + if index >= 0 then + begin + VarList.Items.Add(RandomList.Items.Strings[index]); + RandomList.Items.Delete(index); + cellstring := RndIndepCode.Items.Strings[index]; + RndIndepCode.Items.Delete(index); + for i := 0 to IndOrderBox.Items.Count - 1 do + if cellstring = IndOrderBox.Items.Strings[i] then + IndOrderBox.Items.Delete(i); + NRndIndep := NRndIndep - 1; + if RandomList.ItemIndex < 0 then RndIndepOutBtn.Visible := false; + end; +end; + +procedure TGLMFrm.ShowModelBtnClick(Sender: TObject); +var + i : integer; + codestr : string; + +begin + // add all dependent variable codes + if NContDep > 0 then + begin + for i := 0 to NContDep - 1 do + begin + ModelEdit.Text := ModelEdit.Text + ContDepCode.Items.Strings[i]; + if i < NContDep - 1 then ModelEdit.Text := ModelEdit.Text + ' + '; + end; + end; + if NCatDep > 0 then + begin + if ModelEdit.Text <> '' then ModelEdit.Text := ModelEdit.Text + ' + '; + for i := 0 to NCatDep - 1 do + begin + ModelEdit.Text := ModelEdit.Text + CatDepCode.Items.Strings[i]; + if i < NCatDep - 1 then ModelEdit.Text := ModelEdit.Text + ' + '; + end; + end; + if NReptDep > 0 then + begin + if ModelEdit.Text <> '' then ModelEdit.Text := ModelEdit.Text + ' + '; + ModelEdit.Text := ModelEdit.Text + 'Rep'; + end; + + // now add the independent variable codes + ModelEdit.Text := ModelEdit.Text + ' = '; + if NFixedIndep > 0 then + begin + for i := 0 to NFixedIndep - 1 do + begin + ModelEdit.Text := ModelEdit.Text + FixedIndepCode.Items.Strings[i]; + if i < NFixedIndep - 1 then + ModelEdit.Text := ModelEdit.Text + ' + '; + end; + end; + if NRndIndep > 0 then + begin + if NFixedIndep > 0 then ModelEdit.Text := ModelEdit.Text + ' + '; + for i := 0 to NRndIndep - 1 do + begin + ModelEdit.Text := ModelEdit.Text + RndIndepCode.Items.Strings[i]; + if i < NRndIndep - 1 then + ModelEdit.Text := ModelEdit.Text + ' + '; + end; + end; + if NCovIndep > 0 then + begin + if (NFixedIndep > 0) or (NRndIndep > 0) then + ModelEdit.Text := ModelEdit.Text + ' + '; + for i := 0 to NCovIndep - 1 do + begin + ModelEdit.Text := ModelEdit.Text + CovariateCode.Items.Strings[i]; + if i < NCovIndep - 1 then + ModelEdit.Text := ModelEdit.Text + ' + '; + end; + end; + + // now add interactions + if NoInterDefs > 0 then + begin + ModelEdit.Text := ModelEdit.Text + ' + '; + for i := 0 to NoInterDefs - 1 do + begin + ModelEdit.Text := ModelEdit.Text + InterActList.Items.Strings[i]; + if i < NoInterDefs - 1 then + ModelEdit.Text := ModelEdit.Text + ' + '; + end; + end; + + // Now add person vectors + if NReptDep > 0 then + begin + ModelEdit.Text := ModelEdit.Text + ' + '; + for i := 0 to NReptDep - 1 do + begin + codestr := format('IP%d',[i+1]); + ModelEdit.Text := ModelEdit.Text + codestr; + if i < NReptDep - 1 then + ModelEdit.Text := ModelEdit.Text + ' + '; + end; + end; + // Now add repeated treatments + if NReptDep > 0 then + begin + ModelEdit.Text := ModelEdit.Text + ' + '; + for i := 0 to NReptDep - 1 do + begin + codestr := format('IR%d',[i+1]); + ModelEdit.Text := ModelEdit.Text + codestr; + if i < NReptDep - 1 then + ModelEdit.Text := ModelEdit.Text + ' + '; + end; + end; +end; + +procedure TGLMFrm.StartInterBtnClick(Sender: TObject); +begin + IntDef := true; +end; + +procedure TGLMFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TGLMFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +procedure TGLMFrm.RandomListClick(Sender: TObject); +VAR index : integer; +begin + if IntDef then + begin + index := RandomList.ItemIndex; + InterDefList.Items.Add(RndIndepCode.Items.Strings[index]); + DefLine := DefLine + 1; // counter for number of terms - 1 + end; +end; + +procedure TGLMFrm.RepDepInBtnClick(Sender: TObject); +var + index, i : integer; + codestr : string; + +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + RepeatList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + NReptDep := NReptDep + 1; + codestr := format('DR%d',[NReptDep]); + if NReptDep = 1 then + begin + ReptDepCode.Items.Add(codestr); + codestr := format('IP%d',[NReptDep]); + IndOrderBox.Items.Add(codestr); + codestr := format('IR%d',[NReptDep]); + IndOrderBox.Items.Add(codestr); + RepTrtCode.Items.Add(codestr); + codestr := format('Rep.Trt.%d',[NReptDep]); + RepTrtList.Items.Add(codestr); + end; + index := index - 1; + i := 0; + end + else i := i + 1; + end; + ReptDepOutBtn.Visible := true; +end; + +procedure TGLMFrm.ReptDepOutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := RepeatList.ItemIndex; + if index >= 0 then + begin + VarList.Items.Add(RepeatList.Items.Strings[index]); + RepeatList.Items.Delete(index); + ReptDepCode.Items.Delete(index); + NReptDep := NReptDep - 1; + if RepeatList.ItemIndex < 0 then ReptDepOutBtn.Visible := false; + end; +end; + +procedure TGLMFrm.RepTrtListClick(Sender: TObject); +VAR index : integer; +begin + if IntDef then + begin + index := RepTrtList.ItemIndex; + InterDefList.Items.Add(RepTrtCode.Items.Strings[index]); + DefLine := DefLine + 1; // counter for number of terms + end; +end; + +procedure TGLMFrm.ContDepInBtnClick(Sender: TObject); +var + index : integer; + codestr : string; + +begin + index := VarList.ItemIndex; + if index >= 0 then + begin + DepContList.Items.Add(VarList.Items.Strings[index]); + VarList.Items.Delete(index); + ContDepOutBtn.Visible := true; + NContDep := NContDep + 1; + codestr := format('DC%d',[NContDep]); + ContDepCode.Items.Add(codestr); + end; +end; + +procedure TGLMFrm.CatDepInBtnClick(Sender: TObject); +var + index : integer; + codestr : string; + +begin + index := VarList.ItemIndex; + if index >= 0 then + begin + DepCatList.Items.Add(VarList.Items.Strings[index]); + VarList.Items.Delete(index); + NCatDep := NCatDep + 1; + codestr := format('DF%d',[NCatDep]); + CatDepCode.Items.Add(codestr); + CatDepOutBtn.Visible := true; + end; +end; + +procedure TGLMFrm.CatDepOutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := DepCatList.ItemIndex; + if index >= 0 then + begin + VarList.Items.Add(DepCatList.Items.Strings[index]); + DepCatList.Items.Delete(index); + CatDepCode.Items.Delete(index); + NCatDep := NCatDep - 1; + if DepCatList.ItemIndex < 0 then CatDepOutBtn.Visible := false; + end; +end; + +procedure TGLMFrm.ComputeBtnClick(Sender: TObject); +var + i, j : integer; // no. of variables in the analysis + cellstring : string; + +begin + if (NContDep > 0) and (NReptDep > 0) then + begin + ShowMessage('ERROR! One cannot have both continuous and repeated dependent variables!'); + exit; + end; + gencount := 0; // counter for generated variables + totalobs := 0; // initialize total no. of observations in data grid + AllocateIDMem; // get heap space for arrays + GetIDs; // get var. no.s of dependent and independent variables + novars := GetVarCount; // get total no. of variables to generate + AllocateGridMem; // create data array for values and codes + // Note, the Data Grid first subscript is row (subject) and second the var. + if (NCatDep > 0) or (NContDep > 1) then model := 2 + else model := 1; // use mult.reg for model 1, canonical reg. for model 2 + if NReptDep > 0 then model := 3; + + // This procedure first creates the vectors of dependent variables then the + // vectors for independent variables. A case no. is placed in the first + // column of a data grid followed by the dependent variables and then the + // independent variables. If multiple dependent variables are created, the + // type of analysis is a canonical correlation analysis, otherwise a + // multiple regression analysis. Analyses are performed to obtain both + // Type I SS's and Type II SS's (stepwise addition and unique contribution) + + // PART I. ENTRY OF DEPENDENT VARIABLES (AND OBSERVATION NO.) + // Place case labels in data grid and for repeated measures, spread out + // the repeated measures over NoCases * No. repeated measures + PartIEntry; + + // PART II. CREATION OF INDEPENDENT VARIABLE VECTORS + // First, if there are repeated measures, generate (n - 1) person vectors + PartIIEntry; + + // Now, do the analyses + if model = 1 then ModelIAnalysis; // models with 1 dependent variable + if model = 2 then ModelIIAnalysis; // models with 2 or more dependent var.s + if model = 3 then ModelIIIAnalysis; // Repeated measures designs + + // Place generated data into the main form's grid + if ShowDesignChk.Checked then + begin + if NoVariables < gencount then + begin + j := NoVariables; + for i := j+1 to gencount do + begin + DictionaryFrm.NewVar(j); + end; + end; + OS3MainFrm.DataGrid.RowCount := totalobs+1; + for i := 1 to totalobs do + for j := 1 to gencount do + OS3MainFrm.DataGrid.Cells[j,i] := FloatToStr(DataGrid[i-1,j-1]); + for i := 1 to gencount do + begin + OS3MainFrm.DataGrid.Cells[i,0] := GenLabels[i-1]; + DictionaryFrm.Defaults(Self,i); + DictionaryFrm.DictGrid.Cells[1,i] := GenLabels[i-1]; + end; + for i := 1 to totalobs do + begin + cellstring := format('CASE%d',[i]); + OS3MainFrm.DataGrid.Cells[0,i] := cellstring; + end; + OS3MainFrm.NoCasesEdit.Text := IntToStr(totalobs); + OS3MainFrm.NoVarsEdit.Text := IntToStr(gencount); + NoVariables := gencount; + NoCases := totalobs; + OS3MainFrm.FileNameEdit.Text := ''; + end; + + DeallocateGridMem; // free up heap allocated to data array + DeallocateIDMem; // free up heap space +end; + +procedure TGLMFrm.ContDepOutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := DepContList.ItemIndex; + if index >= 0 then + begin + VarList.Items.Add(DepContList.Items.Strings[index]); + DepContList.Items.Delete(index); + ContDepCode.Items.Delete(index); + NContDep := NContDep - 1; + if DepContList.ItemIndex < 0 then ContDepOutBtn.Visible := false; + end; +end; + +procedure TGLMFrm.CovariateListClick(Sender: TObject); +VAR index : integer; +begin + if IntDef then + begin + index := CovariateList.ItemIndex; + InterDefList.Items.Add(CovariateCode.Items.Strings[index]); + DefLine := DefLine + 1; // counter for number of terms - 1 + end; +end; + +procedure TGLMFrm.CovInBtnClick(Sender: TObject); +var + index : integer; + codestr : string; + +begin + index := VarList.ItemIndex; + if index >= 0 then + begin + CovariateList.Items.Add(VarList.Items.Strings[index]); + VarList.Items.Delete(index); + NCovIndep := NCovIndep + 1; + codestr := format('IC%d',[NCovIndep]); + CovariateCode.Items.Add(codestr); + IndOrderBox.Items.Add(codestr); + CovOutBtn.Visible := true; + end; +end; + +procedure TGLMFrm.CovOutBtnClick(Sender: TObject); +var + i, index : integer; + cellstring : string; + +begin + index := CovariateList.ItemIndex; + if index >= 0 then + begin + VarList.Items.Add(CovariateList.Items.Strings[index]); + CovariateList.Items.Delete(index); + cellstring := CovariateCode.Items.Strings[index]; + CovariateCode.Items.Delete(index); + for i := 0 to IndOrderBox.Items.Count - 1 do + if cellstring = IndOrderBox.Items.Strings[i] then + IndOrderBox.Items.Delete(i); + NCovIndep := NCovIndep - 1; + if CovariateList.ItemIndex < 0 then CovOutBtn.Visible := false; + end; +end; + +procedure TGLMFrm.EndDefBtnClick(Sender: TObject); +var + index : integer; + nolines : integer; + LineStr : string; + +begin + LineStr := ''; + nolines := InterDefList.Items.Count; + if nolines > 0 then + begin + for index := 0 to nolines - 1 do + begin + LineStr := LineStr + InterDefList.Items.Strings[index]; + if index < nolines - 1 then LineStr := LineStr + ' * '; + end; + InteractList.Items.Add(LineStr); + IndOrderBox.Items.Add(LineStr); + NoInterDefs := NoInterDefs + 1; + end; + InterDefList.Clear; +end; + +procedure TGLMFrm.FixedIndepInBtnClick(Sender: TObject); +var + index, i : integer; + codestr : string; + +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + FixedList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + NFixedIndep := NFixedIndep + 1; + codestr := format('IF%d',[NFixedIndep]); + FixedIndepCode.Items.Add(codestr); + IndOrderBox.Items.Add(codestr); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + FixedIndepOutBtn.Visible := true; +end; + +procedure TGLMFrm.FixedIndepOutBtnClick(Sender: TObject); +var + i, index : integer; + cellstring : string; + +begin + index := FixedList.ItemIndex; + if index >= 0 then + begin + VarList.Items.Add(FixedList.Items.Strings[index]); + FixedList.Items.Delete(index); + cellstring := FixedIndepCode.Items.Strings[index]; + FixedIndepCode.Items.Delete(index); + NFixedIndep := NFixedIndep - 1; + for i := 0 to IndOrderBox.Items.Count - 1 do + if IndOrderBox.Items.Strings[i] = cellstring then + IndOrderBox.Items.Delete(i); + if FixedList.ItemIndex < 0 then FixedIndepOutBtn.Visible := false; + end; +end; + +procedure TGLMFrm.FixedListClick(Sender: TObject); +VAR index : integer; +begin + if IntDef then + begin + index := FixedList.ItemIndex; + InterDefList.Items.Add(FixedIndepCode.Items.Strings[index]); + DefLine := DefLine + 1; // counter for number of terms + end; +end; + +procedure TGLMFrm.AllocateIDMem; +begin + if NContDep > 0 then + begin + SetLength(ContDepID,NContDep); + SetLength(ContDepPos,NContDep); + end; + if NCatDep > 0 then + begin + SetLength(CatDepID,NCatDep); + SetLength(CatDepPos,NCatDep); + SetLength(NFixVecDep,NCatDep); + end; + if NReptDep > 0 then + begin + SetLength(ReptDepID,NReptDep); + SetLength(ReptDepPos,NReptDep); + SetLength(ReptIndepPos,NoCases); + SetLength(ReptTrtPos,NReptDep); + end; + if NFixedIndep > 0 then + begin + SetLength(FixedIndepID,NFixedIndep); + SetLength(FixedIndepPos,NFixedIndep); + SetLength(NFixVecIndep,NFixedIndep); + end; + if NRndIndep > 0 then + begin + SetLength(RndIndepID,NRndIndep); + SetLength(RndIndepPos,NRndIndep); + SetLength(NRndVecIndep,NRndIndep); + end; + if NCovIndep > 0 then + begin + SetLength(CovIndepID,NCovIndep); + SetLength(CovIndepPos,NCovIndep); + end; + if NoInterDefs > 0 then + begin + SetLength(NInteractVecs,NoInterDefs); + SetLength(InteractPos,NoInterDefs); + end; +end; + +procedure TGLMFrm.GetIDs; +var + cellstring : string; + i, j : integer; + +begin + if NContDep > 0 then + begin + for i := 0 to NContDep - 1 do + begin + cellstring := DepContList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then + ContDepID[i] := j; + end; + end; + end; + if NCatDep > 0 then + begin + for i := 0 to NCatDep - 1 do + begin + cellstring := DepCatList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then + CatDepID[i] := j; + end; + end; + end; + if NReptDep > 0 then + begin + for i := 0 to NReptDep - 1 do + begin + cellstring := RepeatList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then + ReptDepID[i] := j; + end; + end; + end; + if NFixedIndep > 0 then + begin + for i := 0 to NFixedIndep - 1 do + begin + cellstring := FixedList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then + FixedIndepID[i] := j; + end; + end; + end; + if NRndIndep > 0 then + begin + for i := 0 to NRndIndep - 1 do + begin + cellstring := RandomList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then + RndIndepID[i] := j; + end; + end; + end; + if NCovIndep > 0 then + begin + for i := 0 to NCovIndep - 1 do + begin + cellstring := CovariateList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then + CovIndepID[i] := j; + end; + end; + end; +end; + +function TGLMFrm.GetVarCount: integer; +var + count, i, j, col, nvectors : integer; + min, max : integer; // use to get no. of coding vectors for categorical var.s + group : integer; + linestr : string; + +begin + count := 1; // one column for case id's + count := count + NContDep + NCovIndep; // sum of continuous variables + if NReptDep > 0 then count := count + 1; // one col. for repeated dep. measure + // plus person vectors for repeated measures (independent predictors) + if NReptDep > 0 then count := count + (NoCases - 1); // person vectors + if NReptDep > 0 then count := count + (NreptDep - 1); // repeated treatment vectors + if NCatDep > 0 then // calculate min and max for each var. to get no. of vectors + begin + for i := 0 to NCatDep - 1 do + begin + col := CatDepID[i]; + min := round(StrToFloat(OS3MainFrm.DataGrid.Cells[col,1])); + max := min; + for j := 1 to NoCases do + begin + group := round(StrToFLoat(OS3MainFrm.DataGrid.Cells[col,j])); + if group < min then min := group; + if group > max then max := group; + end; + count := count + (max - min); // 1 less than the no. of groups + NFixVecDep[i] := count; + end; + end; + + if NFixedIndep > 0 then // add no. of vectors to count + begin + for i := 0 to NFixedIndep - 1 do + begin + col := FixedIndepID[i]; + min := round(StrToFloat(OS3MainFrm.DataGrid.Cells[col,1])); + max := min; + for j := 1 to NoCases do + begin + group := round(StrToFloat(OS3MainFrm.DataGrid.Cells[col,j])); + if group < min then min := group; + if group > max then max := group; + end; + count := count + (max - min); // 1 less than the no. of groups + NFixVecIndep[i] := max - min; + end; + end; + + if NRndIndep > 0 then // add no. of vectors to count + begin + for i := 0 to NRndIndep - 1 do + begin + col := RndIndepID[i]; + min := round(StrToFloat(OS3MainFrm.DataGrid.Cells[col,1])); + max := min; + for j := 1 to NoCases do + begin + group := round(StrToFloat(OS3MainFrm.DataGrid.Cells[col,j])); + if group < min then min := group; + if group > max then max := group; + end; + count := count + (max - min); // 1 less than the no. of groups + NRndVecIndep[i] := max - min; + end; + end; + + if NoInterDefs > 0 then // get no. of vectors for each interaction + begin + for i := 0 to NoInterDefs - 1 do + begin + linestr := InterActList.Items.Strings[i]; + // parse the line for variable definitions and get no. of columns + // and vectors for the products of these variables + nvectors := CntIntActVecs(linestr); + NInteractVecs[i] := nvectors; + count := count + nvectors; + end; + end; + Result := count; +end; + +procedure TGLMFrm.AllocateGridMem; +var + norows : integer; + +begin + if NReptDep > 0 then norows := NoCases * NReptDep + else norows := NoCases; + SetLength(DataGrid,norows+1,novars+4); // grid data for generated data + SetLength(GenLabels,novars+4); // column labels of new data grid + SetLength(Labels,novars+4); // labels of variables entered into analysis + SetLength(ColSelected,novars+4); // datagrid columns selected for analysis +end; + +procedure TGLMFrm.DeallocateGridMem; +begin + ColSelected := nil; + Labels := nil; + GenLabels := nil; + DataGrid := nil; +end; + +procedure TGLMFrm.DeallocateIDMem; +begin + InteractPos := nil; + NInteractVecs := nil; + CovIndepPos := nil; + CovIndepID := nil; + NRndVecIndep := nil; + RndIndepPos := nil; + RndIndepID := nil; + NFixVecIndep := nil; + FixedIndepPos := nil; + FixedIndepID := nil; + ReptTrtPos := nil; + ReptIndepPos := nil; + ReptDepPos := nil; + ReptDepID := nil; + NFixVecDep := nil; + CatDepPos := nil; + CatDepID := nil; + ContDepPos := nil; + ContDepID := nil; +end; + +procedure TGLMFrm.DummyCodes(min: integer; max: integer; + var CodePattern: IntDyneMat); +var + ngrps : integer; + vects : integer; + i, j : integer; + +begin + ngrps := max - min + 1; + vects := ngrps - 1; + for j := 1 to vects do + begin + for i := 1 to ngrps do + begin + if i = j then CodePattern[i,j] := 1 else CodePattern[i,j] := 0; + end; + end; +end; + +procedure TGLMFrm.EffectCodes(min: integer; max: integer; + var CodePattern: IntDyneMat); +var + ngrps : integer; + vects : integer; + i, j : integer; + +begin + ngrps := max - min + 1; + vects := ngrps - 1; + for i := 1 to ngrps do + begin + for j := 1 to vects do + begin + if i = j then CodePattern[i,j] := 1; + if i = ngrps then CodePattern[i,j] := -1; + if (i <> j) and (i <> ngrps) then CodePattern[i,j] := 0; + end; + end; +end; + +procedure TGLMFrm.OrthogCodes(min: integer; max: integer; + var CodePattern: IntDyneMat); +var + ngrps : integer; + vects : integer; + i, j : integer; + +begin + ngrps := max - min + 1; + vects := ngrps - 1; + for i := 1 to ngrps do + begin + for j := 1 to vects do + begin + if i <= j then CodePattern[i,j] := 1; + if i-1 = j then CodePattern[i,j] := -j; + if i > j+1 then CodePattern[i,j] := 0; + end; + end; +end; + +procedure TGLMFrm.RegAnal(Nentered: integer); +var + i, j, nvars, ncases : integer; + title : string; + +begin + nvars := Nentered; + ncases := totalobs; + SetLength(rmatrix,nvars+1,nvars+1); + SetLength(indmatrix,nvars-1,nvars-1); + SetLength(rxy,nvars); + SetLength(invmatrix,nvars,nvars); + SetLength(B,nvars); + SetLength(Beta,nvars); + SetLength(means,nvars); + SetLength(Vars,nvars); + SetLength(StdDevs,nvars); + SetLength(workmat,nvars,nvars); + + DynCorrelations(nvars,ColSelected,DataGrid,rmatrix,means,vars,StdDevs,ncases,3); + OutPutFrm.RichEdit.Clear; + title := 'Means'; + if DescChk.Checked then DynVectorPrint(means,Nentered,title,Labels,ncases); + title := 'Correlations'; + if CorsChk.Checked then + MAT_PRINT(rmatrix,Nentered,Nentered,title,Labels,Labels,ncases); + for i := 1 to nvars - 1 do + begin + rxy[i-1] := rmatrix[i,0]; // r's with dependent var + for j := 1 to nvars - 1 do + begin + indmatrix[i-1,j-1] := rmatrix[i,j]; // intercorr.s of indep. var.s + workmat[i-1,j-1] := rmatrix[i,j]; // used to get inverse + end; + end; + SVDinverse(workmat,nvars-1); + // Copy inverse to zero indexed matrix + for i := 1 to nvars-1 do + for j := 1 to nvars-1 do invmatrix[i-1,j-1] := workmat[i-1,j-1]; + title := 'inverse of indep. matrix'; + // get betas and squared multiple correlation + R2 := 0.0; + for i := 1 to nvars-1 do + begin + Beta[i-1] := 0.0; + for j := 1 to nvars-1 do Beta[i-1] := Beta[i-1] + invmatrix[i-1,j-1] * rxy[j-1]; + R2 := R2 + Beta[i-1] * rxy[i-1]; + end; +// outline := format('Squared Multiple Correlation = %6.4f',[R2]); +// OutPutFrm.RichEdit.Lines.Add(outline); +// title := 'Standardized regression coefficients'; +// DynVectorPrint(Beta,Nentered-1,title,Labels,ncases); + // get raw coefficients + for i := 1 to nvars - 1 do + begin + if StdDevs[i] > 0.0 then + B[i-1] := Beta[i-1] * (StdDevs[0] / StdDevs[i]) + else B[i-1] := 0.0; + end; +// title := 'Raw regression coefficients'; +// DynVectorPrint(B,Nentered-1,title,Labels,ncases); +// OutPutFrm.ShowModal; +end; + +procedure TGLMFrm.PartIEntry; +var + i, j, k, vect : integer; + min, max, group, ngrps : integer; + CodePattern : IntDyneMat; + cellstring: string; + +begin + if NReptDep > 0 then // create observations for each replication of the N cases + begin + for i := 1 to NreptDep do + begin + ReptDepPos[i-1] := i; // datagrid pos. of a repeated measure + for j := 1 to NoCases do + begin + DataGrid[totalobs,gencount] := j; // case no. in col. 0 + k := ReptDepID[i-1]; + DataGrid[totalobs,gencount+1] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,j])); + totalobs := totalobs + 1; + end; + end; // next i repeated measure + gencount := gencount + 2; + end + else + begin // no repeated measures - just need case numbers in data grid pos 0 + for i := 1 to NoCases do DataGrid[i-1,gencount] := i; + totalobs := NoCases; + gencount := gencount + 1; + end; + GenLabels[0] := 'Obs.'; + if NReptDep > 0 then GenLabels[1] := 'Repeated'; + + // Enter the continuous dependent variables into the data grid + if NContDep > 0 then + begin + for j := 1 to NContDep do + begin + ContDepPos[j-1] := gencount; + for i := 1 to NoCases do + begin + k := ContDepID[j-1]; + DataGrid[i-1,gencount] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i])); + end; + GenLabels[gencount] := ContDepCode.Items.Strings[j-1]; + gencount := gencount + 1; + end; + end; // end if NContDep > 0 + + // Enter categorical dependent variables in the data grid + if NCatDep > 0 then + begin + // get no. of categories - 1 for no of vectors to generate for each + // categorical variable + for j := 1 to NCatDep do + begin + CatDepPos[j-1] := gencount; + k := CatDepID[j-1]; + min := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,1]))); + max := min; + for i := 1 to NoCases do + begin + group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i]))); + if group > max then max := group; + if group < min then min := group; + end; + ngrps := max-min+1; + SetLength(CodePattern,ngrps+1,ngrps+1); + if TypeGroup.ItemIndex = 0 then // dummy coding + DummyCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 1 then // effect coding + EffectCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 2 then // orthogonal coding + OrthogCodes(min,max,CodePattern); + // Now, generate vectors for the categorical variable j + for vect := 1 to (max - min) do // vector no. + begin + for i := 1 to NoCases do + begin + group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i]))); + DataGrid[i-1,gencount + vect - 1] := CodePattern[group,vect]; + end; + cellstring := format('%s_%d',[CatDepCode.Items.Strings[j-1],vect]); + GenLabels[gencount + vect - 1] := cellstring; + end; + gencount := gencount + (max - min); // new no. of variables + end; // next categorical variable j + end; // if no. of dependent categorical variables greater than zero + codepattern := nil; +end; + +procedure TGLMFrm.PartIIEntry; +var + i, j, k, vect, lastdep, row : integer; + min, max, group, ngrps : integer; + CodePattern : IntDyneMat; + cellstring : string; + value : double; + +begin + lastdep := gencount; // datagrid position of last dependent variable + // This section develops vectors for the independent variables. If there + // are repeated measures, generate person vectors first. + if NReptDep > 0 then + begin + min := 1; + max := NoCases; + ngrps := max-min+1; + SetLength(CodePattern,ngrps+1,ngrps+1); + if TypeGroup.ItemIndex = 0 then // dummy coding + DummyCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 1 then // effect coding + EffectCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 2 then // orthogonal coding + OrthogCodes(min,max,CodePattern); + for vect := 1 to (max - min) do // vector no. + begin + for i := 1 to totalobs do // NoCases + begin + group := round(DataGrid[i-1,0]); + DataGrid[i-1,gencount + vect - 1] := CodePattern[group,vect]; + end; + ReptIndepPos[vect-1] := gencount + vect - 1; + cellstring := format('p%d',[vect]); + GenLabels[gencount + vect - 1] := cellstring; + end; + gencount := gencount + (max - min); // new no. of variables + end; // end generation of person codes + + // generate vectors for the repeated treatments if replications used + if NReptDep > 0 then + begin + min := 1; + max := NReptDep; + ngrps := max-min+1; + SetLength(CodePattern,ngrps+1,ngrps+1); + if TypeGroup.ItemIndex = 0 then // dummy coding + DummyCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 1 then // effect coding + EffectCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 2 then // orthogonal coding + OrthogCodes(min,max,CodePattern); + for vect := 1 to (max - min) do // vector no. + begin + for i := 1 to totalobs do // NoCases + begin + group := ((i - 1) div NoCases) + 1; + DataGrid[i-1,gencount + vect - 1] := CodePattern[group,vect]; + end; + ReptTrtPos[vect-1] := gencount + vect - 1; + cellstring := format('IR_%d',[vect]); + GenLabels[gencount + vect - 1] := cellstring; + end; + gencount := gencount + (max - min); // new no. of variables + end; + + oldcount := gencount; + // Next, add vectors for independent fixed categorical variables + if NFixedIndep > 0 then + begin + // get no. of categories - 1 for no of vectors to generate for each + // categorical variable + for j := 1 to NFixedIndep do + begin + FixedIndepPos[j-1] := gencount; // first vector position in datagrid + k := FixedIndepID[j-1]; + min := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,1]))); + max := min; + for i := 1 to NoCases do + begin + group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i]))); + if group > max then max := group; + if group < min then min := group; + end; + ngrps := max-min+1; + SetLength(CodePattern,ngrps+1,ngrps+1); + if TypeGroup.ItemIndex = 0 then // dummy coding + DummyCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 1 then // effect coding + EffectCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 2 then // orthogonal coding + OrthogCodes(min,max,CodePattern); + // Now, generate vectors for the categorical variable j + for vect := 1 to (max - min) do // vector no. + begin + for i := 1 to NoCases do + begin + group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i]))); + DataGrid[i-1,gencount + vect - 1] := CodePattern[group,vect]; + end; + cellstring := format('%s_%d',[FixedIndepCode.Items.Strings[j-1],vect]); + GenLabels[gencount + vect - 1] := cellstring; + end; + gencount := gencount + (max - min); // new no. of variables + end; // next categorical variable j + end; // end generation of fixed effect codes + + // Next, add vectors for independent random categorical variables + oldcount := gencount; + if NRndIndep > 0 then + begin + // get no. of categories - 1 for no of vectors to generate for each + // categorical variable + for j := 1 to NRndIndep do + begin + RndIndepPos[j-1] := gencount; // pos. of first vector in datagrid + k := RndIndepID[j-1]; + min := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,1]))); + max := min; + for i := 1 to NoCases do + begin + group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i]))); + if group > max then max := group; + if group < min then min := group; + end; + ngrps := max-min+1; + SetLength(CodePattern,ngrps+1,ngrps+1); + if TypeGroup.ItemIndex = 0 then // dummy coding + DummyCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 1 then // effect coding + EffectCodes(min,max,CodePattern); + if TypeGroup.ItemIndex = 2 then // orthogonal coding + OrthogCodes(min,max,CodePattern); + // Now, generate vectors for the categorical variable j + for vect := 1 to (max - min) do // vector no. + begin + for i := 1 to NoCases do + begin + group := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i]))); + DataGrid[i-1,gencount + vect - 1] := CodePattern[group,vect]; + end; + cellstring := format('%s_%d',[RndIndepCode.Items.Strings[j-1],vect]); + GenLabels[gencount + vect - 1] := cellstring; + end; + gencount := gencount + (max - min); // new no. of variables + end; // next categorical variable j + end; // end generation of random effect codes + + + // Next, add covariates + if NCovIndep > 0 then + begin + for j := 1 to NCovIndep do + begin + CovIndepPos[j-1] := gencount; + for i := 1 to NoCases do + begin + k := CovIndepID[j-1]; + DataGrid[i-1,gencount] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i])); + end; + GenLabels[gencount] := CovariateCode.Items.Strings[j-1]; + gencount := gencount + 1; + end; + end; // end generation of covariate codes + + // if repeated measures used, copy generated vectors for each replication + if NReptDep > 0 then + begin + for j := 1 to NReptDep - 1 do + begin + for i := 1 to NoCases do + begin + for k := lastdep + (NoCases-1) +(NReptDep-1) + 1 to gencount do + begin + value := DataGrid[i-1,k-1]; + row := (j * NoCases) + i - 1; + DataGrid[row,k-1] := value; + end; // next k column in data grid + end; // next case + end; // next repeated measure + end; // if repeated measures used + + // Now generate product vectors for the interactions + if NoInterDefs > 0 then + begin + for j := 0 to NoInterDefs - 1 do + begin + // parse an interaction line into components (abbreviations) and + // get product of vectors corresponding to each + InteractPos[j] := gencount; + cellstring := InteractList.Items.Strings[j]; + GenInterVecs(cellstring); + gencount := gencount + NInteractVecs[j]; + end; + end; // end generation of interaction codes + codepattern := nil; +end; + +procedure TGLMFrm.ModelIAnalysis; +var + block, i, j, k, NEntered, index, noblocks, priorentered : integer; + cellstring : string; + labelstr : string; + outline : string; + R, R2Increment, SSx, sum, constant, FullR2 : double; + df1, df2, F, FProbF, StdErrB,OldDF1, PredSS, PredMS : double; + SSt, VarEst, SSres, StdErrEst, AdjR2 : double; + +begin + NEntered := 0; + OldDF1 := 0.0; + priorentered := 0; + OldR2 := 0; + // enter the dependent variable first + if NContDep > 0 then + begin + ColSelected[0] := ContDepPos[0]; + Labels[0] := GenLabels[1]; + end + else begin + ColSelected[0] := ReptDepPos[0]; + Labels[0] := GenLabels[1]; + end; + NEntered := NEntered + 1; + + // Enter independent variables as indicated in indorderbox then interactions + // until the total model is analyzed. Then delete each term to get a + // restricted model and compare to the full model. + noblocks := IndOrderBox.Items.Count; + SetLength(TypeISS,noblocks); + SetLength(TypeIISS,noblocks); + SetLength(TypeIMS,noblocks); + SetLength(TypeIIMS,noblocks); + SetLength(TypeIDF1,noblocks); + SetLength(TypeIDF2,noblocks); + SetLength(TypeIIDF1,noblocks); + SetLength(TypeIIDF2,noblocks); + SetLength(TypeIF,noblocks); + SetLength(TypeIProb,noblocks); + SetLength(TypeIIF,noblocks); + SetLength(TypeIIProb,noblocks); + + for block := 0 to noblocks - 1 do + begin + // get index of the abbreviation of term to enter and find corresponding + // vector(s) to place in the equation + cellstring := IndOrderBox.Items.Strings[block]; + // check for covariates first + if NCovIndep > 0 then + begin + for i := 0 to NCovIndep-1 do + begin + if cellstring = CovariateCode.Items.Strings[i] then // matched! + begin + index := i; // index of covariate code + ColSelected[NEntered] := CovIndepPos[index]; + labelstr := format('%s',[CovariateCode.Items.Strings[index]]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + break; + end; + end; + end; + // check for fixed effect variables next + if NFixedIndep > 0 then + begin + for i := 0 to NFixedIndep-1 do + begin + if cellstring = FixedIndepCode.Items.Strings[i] then + begin + index := i; + for j := 0 to NFixVecIndep[index]-1 do + begin + ColSelected[NEntered] := FixedIndepPos[index] + j; + labelstr := format('%s_%d',[FixedIndepCode.Items.Strings[index],j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; + // Check for random effects variables next + if NRndIndep > 0 then + begin + for i := 0 to NRndIndep-1 do + begin + if cellstring = RndIndepCode.Items.Strings[i] then + begin + index := i; + for j := 0 to NRndVecIndep[index]-1 do + begin + ColSelected[NEntered] := RndIndepPos[index] + j; + labelstr := format('%s_%d',[RndIndepCode.Items.Strings[index],j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; + // check for interactions next + if NoInterDefs > 0 then + begin + for i := 0 to NoInterDefs-1 do + begin + if cellstring = InteractList.Items.Strings[i] then + begin + for j := 0 to NInteractVecs[i]-1 do + begin + ColSelected[NEntered] := InteractPos[i] + j; + labelstr := format('%s%d_%d',['IA',i+1,j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; // check for interaction variables + + // check for repeated measures variables (person codes) + if NReptDep > 0 then + begin // look for 'IP' in cellstring + labelstr := copy(cellstring,0,2); + if labelstr = 'IP' then // person vectors were generated + begin + for i := 0 to NoCases - 2 do + begin + ColSelected[NEntered] := ReptIndepPos[i]; + Labels[NEntered] := GenLabels[ReptIndepPos[i]]; + NEntered := NEntered + 1; + end; + end; + end; + + // check for repeated treatments + if NReptDep > 0 then + begin // look for 'IR' in cellstring + labelstr := copy(cellstring,0,2); + if labelstr = 'IR' then // repeated treatment vectors were generated + begin + for i := 0 to NReptDep - 2 do + begin + ColSelected[NEntered] := ReptTrtPos[i]; + Labels[NEntered] := GenLabels[ReptTrtPos[i]]; + NEntered := NEntered + 1; + end; + end; + end; + + RegAnal(NEntered); + R := sqrt(R2); + df1 := Nentered - 1; // no. of independent variables + df2 := totalobs - df1 - 1; // N - no. independent - 1 + SSt := (totalobs-1) * Vars[0]; + SSres := SSt * (1.0 - R2); + VarEst := SSres / df2; + if (VarEst > 0.0) then StdErrEst := sqrt(VarEst) + else + begin + ShowMessage('ERROR! Error in computing variance estimate.'); + StdErrEst := 0.0; + end; + if (R2 < 1.0) and (df2 > 0.0) then F := (R2 / df1) / ((1.0-R2)/ df2) + else F := 0.0; + FProbF := probf(F,df1,df2); + AdjR2 := 1.0 - (1.0 - R2) * (totalobs - 1) / df2; +// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify; + outline := format('%8s%10s%10s%12s%5s%5s',['R','R2','F','Prob.>F','DF1','DF2']); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('%8.3f%10.3f%10.3f%10.3f%5.0f%5.0f', + [R,R2,F,FProbF,df1,df2]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Adjusted R Squared = %5.3f',[AdjR2]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Std. Error of Estimate = %10.3f',[StdErrEst]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Variable Beta B Std.Error t Prob.>t'); + df1 := 1.0; + sum := 0.0; + for i := 0 to Nentered - 2 do + begin + SSx := (totalobs-1) * Vars[i+1]; + sum := sum + B[i] * means[i+1]; + if invmatrix[i,i] > 1.0e-15 then + begin + StdErrB := VarEst / (SSx * (1.0 / invmatrix[i,i])); + StdErrB := sqrt(StdErrB); + if StdErrB > 0.0 then F := B[i] / StdErrB else F := 0.0; + FProbF := probf(F*F,df1,df2); + end + else begin + StdErrB := 0.0; + F := 0.0; + FProbF := 0.0; + end; + cellstring := format('%10s',[Labels[i+1]]); + outline := format('%10s%10.3f%10.3f%10.3f%10.3f%10.3f', + [cellstring, Beta[i] ,B[i], StdErrB, F, FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + constant := means[0] - sum; + outline := format('Constant = %10.3f',[constant]); + OutPutFrm.RichEdit.Lines.Add(outline); + + // test increment in R2 for this block + R2Increment := R2 - OldR2; + if priorentered > 0 then + df1 := (NEntered-1) - (priorentered-1) + else df1 := NEntered - 1; + df2 := totalobs - NEntered; + TypeIDF1[block] := df1; + TypeIDF2[block] := df2; + TypeISS[block] := (R2 - OldR2) * SSt; + TypeIMS[block] := TypeISS[block] / df1; + F := ((R2 - OldR2)/ df1) / ((1.0 - R2) / df2); + TypeIF[block] := F; + FProbF := probf(F,df1,df2); + TypeIProb[block] := FProbF; + outline := format('Increment in Squared R = %10.3f',[R2Increment]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('F with degrees freedom %4.0f and %4.0f = %10.3f, Prob.>F = %10.3f', + [df1,df2,F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + OldR2 := R2; + priorentered := NEntered; + // setup for next block analysis + WorkMat := nil; + StdDevs := nil; + Vars := nil; + means := nil; + Beta := nil; + B := nil; + invmatrix := nil; + rxy := nil; + indmatrix := nil; + rmatrix := nil; + end; // next variable block + + // Next, obtain the unique (Type II values) by elimination of each block + // from the full model and testing the decrement in R2 + FullR2 := R2; // save previously obtained full model R2 + for i := 0 to NoBlocks - 1 do + begin + NEntered := 0; + // enter the dependent variable first + if NContDep > 0 then + begin + ColSelected[0] := ContDepPos[0]; + Labels[0] := GenLabels[1]; + end + else begin + ColSelected[0] := ReptDepPos[0]; + Labels[0] := GenLabels[1]; + end; + NEntered := NEntered + 1; + for block := 0 to NoBlocks - 1 do + begin + if i = block then continue // delete this block + else + begin // enter the remaining blocks + cellstring := IndOrderBox.Items.Strings[block]; + // if a covariate, include it + if NCovIndep > 0 then + begin + for j := 0 to NCovIndep-1 do + begin + if cellstring = CovariateCode.Items.Strings[j] then // matched! + begin + index := j; // index of covariate code + ColSelected[NEntered] := CovIndepPos[index]; + labelstr := format('%s',[CovariateCode.Items.Strings[index]]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + break; + end; + end; + end; + // check for fixed effect variables next + if NFixedIndep > 0 then + begin + for j := 0 to NFixedIndep-1 do + begin + if cellstring = FixedIndepCode.Items.Strings[j] then + begin + index := j; + for k := 0 to NFixVecIndep[index]-1 do + begin + ColSelected[NEntered] := FixedIndepPos[index] + k; + labelstr := format('%s_%d',[FixedIndepCode.Items.Strings[index],k+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; + // Check for random effects variables next + if NRndIndep > 0 then + begin + for j := 0 to NRndIndep-1 do + begin + if cellstring = RndIndepCode.Items.Strings[j] then + begin + index := j; + for k := 0 to NRndVecIndep[index]-1 do + begin + ColSelected[NEntered] := RndIndepPos[index] + k; + labelstr := format('%s_%d',[RndIndepCode.Items.Strings[index],k+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + end; + break; + end; + end; + // check for interactions next + if NoInterDefs > 0 then + begin + for j := 0 to NoInterDefs-1 do + begin + if cellstring = InteractList.Items.Strings[j] then + begin + for k := 0 to NInteractVecs[j]-1 do + begin + ColSelected[NEntered] := InteractPos[j] + k; + labelstr := format('%s%d_%d',['IA',j+1,k+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; // end if + end; // next j + end; // end if interdefs > 0 + end; // entry of remaining blocks + end; // enter next block not equal to block i + + RegAnal(NEntered); // compute restricted model + if R2 > 0.0 then R := sqrt(R2) else R := 0.0; + df1 := Nentered; // no. of independent variables + df2 := totalobs - df1 - 1; // N - no. independent - 1 + SSt := (totalobs-1) * Vars[0]; + SSres := SSt * (1.0 - R2); + VarEst := SSres / df2; + if (VarEst > 0.0) then StdErrEst := sqrt(VarEst) + else + begin + ShowMessage('ERROR! Error in computing variance estimate.'); + StdErrEst := 0.0; + end; + if (R2 < 1.0) and (df2 > 0.0) then F := (R2 / df1) / ((1.0-R2)/ df2) + else F := 0.0; + FProbF := probf(F,df1,df2); + AdjR2 := 1.0 - (1.0 - R2) * (totalobs - 1) / df2; +// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify; + outline := format('%8s%10s%10s%12s%5s%5s',['R','R2','F','Prob.>F','DF1','DF2']); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('%8.3f%10.3f%10.3f%10.3f%5.0f%5.0f', + [R,R2,F,FProbF,df1,df2]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Adjusted R Squared = %5.3f',[AdjR2]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Std. Error of Estimate = %10.3f',[StdErrEst]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Variable Beta B Std.Error t Prob.>t'); + df1 := 1.0; + sum := 0.0; + for j := 0 to Nentered - 2 do + begin + SSx := (totalobs-1) * Vars[j+1]; + sum := sum + B[j] * means[j+1]; + if invmatrix[j,j] > 1.0e-18 then + StdErrB := VarEst / (SSx * (1.0 / invmatrix[j,j])) + else StdErrB := 0.0; + if StdErrB > 0.0 then StdErrB := sqrt(StdErrB); + if StdErrB > 0.0 then F := B[j] / StdErrB else F := 0.0; + FProbF := probf(F*F,df1,df2); + cellstring := format('%10s',[Labels[j+1]]); + outline := format('%10s%10.3f%10.3f%10.3f%10.3f%10.3f', + [cellstring, Beta[j] ,B[j], StdErrB, F, FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + constant := means[0] - sum; + outline := format('Constant = %10.3f',[constant]); + OutPutFrm.RichEdit.Lines.Add(outline); + + // Now compute unique contribution of block left out (Type II) + R2Increment := FullR2 - R2; + df1 := (novars - 2) - (NEntered - 1); // k1 - k2 + df2 := totalobs - (novars - 2) - 1; + TypeIIDF1[i] := df1; + TypeIIDF2[i] := df2; + TypeIISS[i] := (FullR2 - R2) * SSt; + TypeIIMS[i] := TypeIISS[i] / df1; + F := ((FullR2 - R2)/ df1) / ((1.0 - FullR2) / df2); + TypeIIF[i] := F; + FProbF := probf(F,df1,df2); + TypeIIProb[i] := FProbF; + outline := format('Decrement in Squared R = %10.3f',[R2Increment]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('F with degrees freedom %4.0f and %4.0f = %10.3f, Prob.>F = %10.3f', + [df1,df2,F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + // setup for next block analysis + WorkMat := nil; + StdDevs := nil; + Vars := nil; + means := nil; + Beta := nil; + B := nil; + invmatrix := nil; + rxy := nil; + indmatrix := nil; + rmatrix := nil; + end; // next i block selected for elimination + + // Show summary table of Type I and Type II tests + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Summary Table for GLM Effects'); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Incremental Effects.'); + OutPutFrm.RichEdit.Lines.Add('SOURCE DF1 DF2 SS MS F PROB>F'); + for i := 0 to NoBlocks - 1 do + begin + cellstring := IndOrderBox.Items.Strings[i]; + outline := format('%10s %3.0f %3.0f %10.3f %10.3f %10.3f %6.3f', + [cellstring,TypeIDF1[i],TypeIDF2[i],TypeISS[i],TypeIMS[i],TypeIF[i],TypeIProb[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Unique Effects.'); + OutPutFrm.RichEdit.Lines.Add('SOURCE DF1 DF2 SS MS F PROB>F'); + for i := 0 to NoBlocks - 1 do + begin + cellstring := IndOrderBox.Items.Strings[i]; + outline := format('%10s %3.0f %3.0f %10.3f %10.3f %10.3f %6.3f', + [cellstring,TypeIIDF1[i],TypeIIDF2[i],TypeIISS[i],TypeIIMS[i],TypeIIF[i],TypeIIProb[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.ShowModal; + + // Show Anova Results for fixed and/or covariates + OutPutFrm.RichEdit.Clear; + if (NRndIndep = 0) and (NReptDep = 0) then // must be fixed and/or covariate only design + begin + if (NFixedIndep > 0) or (NCovIndep > 0) then // fixed effects + begin + df1 := novars - 2; // k1 (note: novars contains ID variable, dep, independents) + PredSS := SSt * FullR2; + PredMS := PredSS / df1; + df2 := totalobs - df1 - 1; // residual df + SSres := SSt * (1.0 - FullR2); + VarEst := SSres / df2; // ms residual + F := PredMS / VarEst; + FProbF := probf(F,df1,df2); + OutPutFrm.RichEdit.Lines.Add('SOURCE DF SS MS F PROB>F'); + outline := format('%20s %3.0f %10.3f %10.3f %10.3f %6.3f', + ['Full Model',df1,PredSS,PredMS,F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to NoBlocks - 1 do + begin + F := TypeIMS[i] / VarEst; + FProbF := probf(F,TypeIDF1[i],df2); + cellstring := IndOrderBox.Items.Strings[i]; + outline := format('%20s %3.0f %10.3f %10.3f %10.3f %6.3f', + [cellstring,TypeIDF1[i],TypeISS[i],TypeIMS[i],F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := format('%20s %3.0f %10.3f %10.3f', + ['Residual',df2,SSres,VarEst]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('%20s %3d %10.3f', + ['Total',totalobs-1,SSt]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + end; + end; + + // Show Anova Results for random effects and/or covariates + OutPutFrm.RichEdit.Clear; + if (NFixedIndep = 0) and (NReptDep = 0) then // must be random only or covariate only design + begin + if (NRndIndep > 0) or (NCovIndep > 0) then // random and/or covariate effects + begin + df1 := novars - 2; // k1 (note: novars contains ID variable, dep, independents) + PredSS := SSt * FullR2; + PredMS := PredSS / df1; + df2 := totalobs - df1 - 1; // residual df + SSres := SSt * (1.0 - FullR2); + VarEst := SSres / df2; // ms residual + F := PredMS / VarEst; + FProbF := probf(F,df1,df2); + OutPutFrm.RichEdit.Lines.Add('SOURCE DF SS MS F PROB>F'); + outline := format('%20s %3.0f %10.3f %10.3f %10.3f %6.3f', + ['Full Model',df1,PredSS,PredMS,F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to NoBlocks - 1 do + begin + F := TypeIMS[i] / VarEst; + FProbF := probf(F,TypeIDF1[i],df2); + outline := format('%20s %3.0f %10.3f %10.3f %10.3f %6.3f', + [Labels[i+1],TypeIDF1[i],TypeISS[i],TypeIMS[i],F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := format('%20s %3.0f %10.3f %10.3f', + ['Residual',df2,SSres,VarEst]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('%20s %3d %10.3f', + ['Total',totalobs-1,SSt]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + end; + end; + + // show effects for repeated measures ANOVA (and covariates) + OutPutFrm.RichEdit.Clear; + if NReptDep > 0 then + begin + df1 := novars - 2; // k1 (note: novars contains ID variable, dep, independents) + PredSS := SSt * FullR2; + PredMS := PredSS / df1; + df2 := totalobs - df1 - 1; // residual df + SSres := SSt * (1.0 - FullR2); + VarEst := SSres / df2; // ms residual + F := PredMS / VarEst; + FProbF := probf(F,df1,df2); + OutPutFrm.RichEdit.Lines.Add('SOURCE DF SS MS F PROB>F'); + outline := format('%20s %3.0f %10.3f %10.3f %10.3f %6.3f', + ['Full Model',df1,PredSS,PredMS,F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to NoBlocks - 1 do + begin + F := TypeIMS[i] / VarEst; + FProbF := probf(F,TypeIDF1[i],df2); + outline := format('%20s %3.0f %10.3f %10.3f %10.3f %6.3f', + [Labels[i+1],TypeIDF1[i],TypeISS[i],TypeIMS[i],F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := format('%20s %3.0f %10.3f %10.3f', + ['Residual',df2,SSres,VarEst]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('%20s %3d %10.3f', + ['Total',totalobs-1,SSt]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + end; + + // clean up the heap + TypeIIProb := nil; + TypeIIF := nil; + TypeIProb := nil; + TypeIF := nil; + TypeIIDF2 := nil; + TypeIIDF1 := nil; + TypeIDF2 := nil; + TypeIDF1 := nil; + TypeIIMS := nil; + TypeIMS := nil; + TypeIISS := nil; + TypeISS := nil; +end; + +procedure TGLMFrm.ModelIIAnalysis; +var + block, i, j, NEntered, index, noblocks : integer; + NLeft, NRight : integer; + cellstring : string; + labelstr : string; + +begin + NEntered := 0; + OldR2 := 0; + // enter the dependent variables first + if NContDep > 0 then + begin + for i := 0 to NContDep - 1 do + begin + ColSelected[i] := ContDepPos[i]; + Labels[i] := GenLabels[i+1]; + NEntered := NEntered + 1; + end; + end; + if NReptDep > 0 then + begin + for i := 0 to NReptDep - 1 do + begin + ColSelected[NEntered+i] := ReptDepPos[i]; + Labels[NEntered+i] := GenLabels[NEntered+i+1]; + NEntered := NEntered + 1; + end; + end; + if NCatDep > 0 then + begin + for i := 0 to NCatDep - 1 do + begin + for j := 0 to NFixVecDep[i]-1 do + begin + ColSelected[NEntered+j] := CatDepPos[j]; + Labels[NEntered+j] := GenLabels[NEntered+j+1]; + NEntered := NEntered + 1; + end; + end; + end; + + // Enter the no. of dependent variables in the left list box of canonical + NLeft := NEntered; + + // Enter independent variables as indicated in indorderbox then interactions + // until the total model is analyzed. Then delete each term to get a + // restricted model and compare to the full model. + noblocks := IndOrderBox.Items.Count; + SetLength(TypeISS,noblocks); + SetLength(TypeIISS,noblocks); + SetLength(TypeIMS,noblocks); + SetLength(TypeIIMS,noblocks); + SetLength(TypeIDF1,noblocks); + SetLength(TypeIDF2,noblocks); + SetLength(TypeIIDF1,noblocks); + SetLength(TypeIIDF2,noblocks); + SetLength(TypeIF,noblocks); + SetLength(TypeIProb,noblocks); + SetLength(TypeIIF,noblocks); + SetLength(TypeIIProb,noblocks); + + for block := 0 to noblocks - 1 do + begin + // get index of the abbreviation of term to enter and find corresponding + // vector(s) to place in the equation + cellstring := IndOrderBox.Items.Strings[block]; + // check for covariates first + if NCovIndep > 0 then + begin + for i := 0 to NCovIndep-1 do + begin + if cellstring = CovariateCode.Items.Strings[i] then // matched! + begin + index := i; // index of covariate code + ColSelected[NEntered] := CovIndepPos[index]; + labelstr := format('%s',[CovariateCode.Items.Strings[index]]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + break; + end; + end; + end; + // check for fixed effect variables next + if NFixedIndep > 0 then + begin + for i := 0 to NFixedIndep-1 do + begin + if cellstring = FixedIndepCode.Items.Strings[i] then + begin + index := i; + for j := 0 to NFixVecIndep[index]-1 do + begin + ColSelected[NEntered] := FixedIndepPos[index] + j; + labelstr := format('%s_%d',[FixedIndepCode.Items.Strings[index],j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; + // Check for random effects variables next + if NRndIndep > 0 then + begin + for i := 0 to NRndIndep-1 do + begin + if cellstring = RndIndepCode.Items.Strings[i] then + begin + index := i; + for j := 0 to NRndVecIndep[index]-1 do + begin + ColSelected[NEntered] := RndIndepPos[index] + j; + labelstr := format('%s_%d',[RndIndepCode.Items.Strings[index],j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + end; + break; + end; + end; + // check for interactions next + if NoInterDefs > 0 then + begin + for i := 0 to NoInterDefs-1 do + begin + if cellstring = InteractList.Items.Strings[i] then + begin + for j := 0 to NInteractVecs[i]-1 do + begin + ColSelected[NEntered] := InteractPos[i] + j; + labelstr := format('%s%d_%d',['IA',i+1,j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + end; + break; + end; + end; // check for interaction variables + + // check for repeated measures variables (person codes) + if NReptDep > 0 then + begin // look for 'IP' in cellstring + labelstr := copy(cellstring,0,2); + if labelstr = 'IP' then // person vectors were generated + begin + for i := 0 to NoCases - 2 do + begin + ColSelected[NEntered] := ReptIndepPos[i]; + Labels[NEntered] := GenLabels[ReptIndepPos[i]]; + NEntered := NEntered + 1; + end; + end; + end; + + // Enter the independent variables in the right list of canonical. + NRight := NEntered - NLeft; + + // call cancor routine for this block + cancor(NLeft,NRight,ColSelected); + end; // next block + + TypeIIProb := nil; + TypeIIF := nil; + TypeIProb := nil; + TypeIIDF2 := nil; + TypeIIDF1 := nil; + TypeIDF2 := nil; + TypeIDF1 := nil; + TypeIIMS := nil; + TYPEIMS := nil; + TypeIISS := nil; + TypeISS := nil; +end; + +procedure TGLMFrm.ModelIIIAnalysis; +var + block, i, j, k, NEntered, index, noblocks, priorentered : integer; + cellstring : string; + labelstr : string; + outline, effstr : string; + R, R2Increment, SSx, sum, constant, FullR2 : double; + df1, df2, F, FProbF, StdErrB,OldDF1, PredSS, PredMS : double; + SSt, VarEst, SSres, StdErrEst, AdjR2 : double; + dfbetween, dferrbetween, dfwithin, dferrwithin : double; + ssbetween, sserrbetween, mserrbetween, sswithin, sserrwithin, mserrwithin : double; + betweenblock : integer; + totalss, totaldf : double; + +begin + OldDF1 := 0.0; + priorentered := 0; + OldR2 := 0; + ColSelected[0] := ReptDepPos[0]; + Labels[0] := GenLabels[1]; + // Complete an individual regression analysis for each between subjects var. + // Enter each block containing between subjects variance including: + // (1) covariates + // (2) person vectors + // (3) fixed or random factors + // (4) the interactions among only fixed or random effects + noblocks := IndOrderBox.Items.Count; + SetLength(TypeISS,noblocks); // use for between subject effects + SetLength(TypeIISS,noblocks);// use for within subject effects + SetLength(TypeIMS,noblocks); + SetLength(TypeIIMS,noblocks); + SetLength(TypeIDF1,noblocks); + SetLength(TypeIDF2,noblocks); + SetLength(TypeIIDF1,noblocks); + SetLength(TypeIIDF2,noblocks); + SetLength(TypeIF,noblocks); + SetLength(TypeIProb,noblocks); + SetLength(TypeIIF,noblocks); + SetLength(TypeIIProb,noblocks); + + for i := 0 to noblocks - 1 do + begin + TypeISS[i] := -1.0; // store indicator for block (-1 indicates no use) + TypeIISS[i] := -1.0; + end; + + for block := 0 to noblocks - 1 do + begin + ColSelected[0] := ReptDepPos[0]; + Labels[0] := GenLabels[1]; + NEntered := 1; + cellstring := IndOrderBox.Items.Strings[block]; + effstr := cellstring; + j := Pos('IR',cellstring); + if j <> 0 then continue; + // check for repeated measures variables (person codes) + if NReptDep > 0 then + begin // look for 'IP' in cellstring + labelstr := copy(cellstring,0,2); + if labelstr = 'IP' then // person vectors were generated + begin + betweenblock := block; // save block no. of between subject vectors + for i := 0 to NoCases - 2 do + begin + ColSelected[NEntered] := ReptIndepPos[i]; + Labels[NEntered] := GenLabels[ReptIndepPos[i]]; + NEntered := NEntered + 1; + end; + end; + end; + // check for fixed effect variables next + if NFixedIndep > 0 then + begin + for i := 0 to NFixedIndep-1 do + begin + if cellstring = FixedIndepCode.Items.Strings[i] then + begin + index := i; + for j := 0 to NFixVecIndep[index]-1 do + begin + ColSelected[NEntered] := FixedIndepPos[index] + j; + labelstr := format('%s_%d',[FixedIndepCode.Items.Strings[index],j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; + // Check for random effects variables next + if NRndIndep > 0 then + begin + for i := 0 to NRndIndep-1 do + begin + if cellstring = RndIndepCode.Items.Strings[i] then + begin + index := i; + for j := 0 to NRndVecIndep[index]-1 do + begin + ColSelected[NEntered] := RndIndepPos[index] + j; + labelstr := format('%s_%d',[RndIndepCode.Items.Strings[index],j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; + // check for interactions next + if NoInterDefs > 0 then + begin + for i := 0 to NoInterDefs-1 do + begin + if cellstring = InteractList.Items.Strings[i] then + begin + // eliminate any interactions containing 'IR' + j := Pos('IR',cellstring); + if j <> 0 then continue; + for j := 0 to NInteractVecs[i]-1 do + begin + ColSelected[NEntered] := InteractPos[i] + j; + labelstr := format('%s%d_%d',['IA',i+1,j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; // check for interaction variables + // check for covariates + if NCovIndep > 0 then + begin + for i := 0 to NCovIndep-1 do + begin + if cellstring = CovariateCode.Items.Strings[i] then // matched! + begin + index := i; // index of covariate code + ColSelected[NEntered] := CovIndepPos[index]; + labelstr := format('%s',[CovariateCode.Items.Strings[index]]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + break; + end; + end; + end; + + // do reg analysis and save sum of squares + RegAnal(NEntered); + R := sqrt(R2); + df1 := Nentered - 1; // no. of independent variables + TypeIDF1[block] := df1; + df2 := totalobs - df1 - 1; // N - no. independent - 1 + SSt := (totalobs-1) * Vars[0]; + SSres := SSt * (1.0 - R2); + VarEst := SSres / df2; + if (VarEst > 0.0) then StdErrEst := sqrt(VarEst) + else + begin + ShowMessage('ERROR! Error in computing variance estimate.'); + StdErrEst := 0.0; + end; + if (R2 < 1.0) and (df2 > 0.0) then F := (R2 / df1) / ((1.0-R2)/ df2) + else F := 0.0; + FProbF := probf(F,df1,df2); + AdjR2 := 1.0 - (1.0 - R2) * (totalobs - 1) / df2; +// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify; + outline := format('%8s%10s%10s%12s%5s%5s',['R','R2','F','Prob.>F','DF1','DF2']); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('%8.3f%10.3f%10.3f%10.3f%5.0f%5.0f', + [R,R2,F,FProbF,df1,df2]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Adjusted R Squared = %5.3f',[AdjR2]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Std. Error of Estimate = %10.3f',[StdErrEst]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Variable Beta B Std.Error t Prob.>t'); + df1 := 1.0; + sum := 0.0; + for i := 0 to Nentered - 2 do + begin + SSx := (totalobs-1) * Vars[i+1]; + sum := sum + B[i] * means[i+1]; + if invmatrix[i,i] > 1.0e-15 then + begin + StdErrB := VarEst / (SSx * (1.0 / invmatrix[i,i])); + StdErrB := sqrt(StdErrB); + if StdErrB > 0.0 then F := B[i] / StdErrB else F := 0.0; + FProbF := probf(F*F,df1,df2); + end + else begin + StdErrB := 0.0; + F := 0.0; + FProbF := 0.0; + end; + cellstring := format('%10s',[Labels[i+1]]); + outline := format('%10s%10.3f%10.3f%10.3f%10.3f%10.3f', + [cellstring, Beta[i] ,B[i], StdErrB, F, FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + constant := means[0] - sum; + outline := format('Constant = %10.3f',[constant]); + OutPutFrm.RichEdit.Lines.Add(outline); + TypeISS[block] := R2 * SST; + OutPutFrm.RichEdit.Lines.Add('BETWEEN SUBJECT EFFECT:'); + outline := format('SS for %-10s = %10.3f',[effstr,TypeISS[block]]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('SS TOTAL = %10.3f',[SST]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + end; + + // Summarize between subject effects + totalss := 0.0; + totaldf := 0.0; + for i := 0 to noblocks - 1 do + begin + if TypeISS[i] < 0.0 then continue; + if betweenblock = i then + begin + ssbetween := TypeISS[i]; + dfbetween := TypeIDF1[i]; + end + else + begin + totalss := totalss + TypeISS[i]; + totaldf := totaldf + TypeIDF1[i]; + end; + end; + sserrbetween := ssbetween - totalss; + dferrbetween := dfbetween - totaldf; + mserrbetween := sserrbetween / dferrbetween; + + OutPutFrm.RichEdit.Lines.Clear; + OutPutFrm.RichEdit.Lines.Add(' SUMMARY OF BETWEEN SUBJECT EFFECTS'); + outline := 'SOURCE DF SS MS F PROB.>F'; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('%-19s %3.0f %9.3f',['Between Subjects',dfbetween, ssbetween]); + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to noblocks - 1 do + begin + if TypeISS[i] < 0.0 then continue; + if betweenblock = i then continue; // already done above + TypeIMS[i] := TypeISS[i] / TypeIDF1[i]; + TypeIF[i] := TypeIMS[i] / mserrbetween; + TypeIDF2[i] := dferrbetween; + TypeIProb[i] := probf(TypeIF[i],TypeIDF1[i],TypeIDF2[i]); + outline := format('%19s %3.0f %9.3f %9.3f %9.3f %9.3f', + [IndOrderBox.Items.Strings[i],TypeIDF1[i],TypeISS[i],TypeIMS[i], + TypeIF[i],TypeIProb[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := format('%19s %3.0f %9.3f %9.3f',['Error Between', dferrbetween, + sserrbetween, mserrbetween]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + + // Now, get within subject effects + sswithin := SST - SSbetween; + dfwithin := totalobs - dfbetween - 1; + for block := 0 to noblocks - 1 do + begin + ColSelected[0] := ReptDepPos[0]; + Labels[0] := GenLabels[1]; + NEntered := 1; + cellstring := IndOrderBox.Items.Strings[block]; + effstr := cellstring; + j := Pos('IR',cellstring); + if j = 0 then continue; // only select those for rep. treatments or interactions + + // check for treatments + if NReptDep > 0 then + begin // look for 'IR' in cellstring + labelstr := copy(cellstring,0,2); + if labelstr = 'IR' then // repeated treatment vectors were generated + begin + for i := 0 to NReptDep - 2 do + begin + ColSelected[NEntered] := ReptTrtPos[i]; + Labels[NEntered] := GenLabels[ReptTrtPos[i]]; + NEntered := NEntered + 1; + end; + end; + end; + // check for interactions next + if NoInterDefs > 0 then + begin + for i := 0 to NoInterDefs-1 do + begin + if cellstring = InteractList.Items.Strings[i] then + begin + for j := 0 to NInteractVecs[i]-1 do + begin + ColSelected[NEntered] := InteractPos[i] + j; + labelstr := format('%s%d_%d',['IA',i+1,j+1]); + Labels[NEntered] := labelstr; + NEntered := NEntered + 1; + end; + break; + end; + end; + end; // check for interaction variables + // do reg analysis and save sum of squares + if NEntered < 2 then continue; + RegAnal(NEntered); + R := sqrt(R2); + df1 := Nentered - 1; // no. of independent variables + TypeIIDF1[block] := df1; + df2 := totalobs - df1 - 1; // N - no. independent - 1 + SSt := (totalobs-1) * Vars[0]; + SSres := SSt * (1.0 - R2); + VarEst := SSres / df2; + if (VarEst > 0.0) then StdErrEst := sqrt(VarEst) + else + begin + ShowMessage('ERROR! Error in computing variance estimate.'); + StdErrEst := 0.0; + end; + if (R2 < 1.0) and (df2 > 0.0) then F := (R2 / df1) / ((1.0-R2)/ df2) + else F := 0.0; + FProbF := probf(F,df1,df2); + AdjR2 := 1.0 - (1.0 - R2) * (totalobs - 1) / df2; +// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify; + outline := format('%8s%10s%10s%12s%5s%5s',['R','R2','F','Prob.>F','DF1','DF2']); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('%8.3f%10.3f%10.3f%10.3f%5.0f%5.0f', + [R,R2,F,FProbF,df1,df2]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Adjusted R Squared = %5.3f',[AdjR2]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Std. Error of Estimate = %10.3f',[StdErrEst]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Variable Beta B Std.Error t Prob.>t'); + df1 := 1.0; + sum := 0.0; + for i := 0 to Nentered - 2 do + begin + SSx := (totalobs-1) * Vars[i+1]; + sum := sum + B[i] * means[i+1]; + if invmatrix[i,i] > 1.0e-15 then + begin + StdErrB := VarEst / (SSx * (1.0 / invmatrix[i,i])); + StdErrB := sqrt(StdErrB); + if StdErrB > 0.0 then F := B[i] / StdErrB else F := 0.0; + FProbF := probf(F*F,df1,df2); + end + else begin + StdErrB := 0.0; + F := 0.0; + FProbF := 0.0; + end; + cellstring := format('%10s',[Labels[i+1]]); + outline := format('%10s%10.3f%10.3f%10.3f%10.3f%10.3f', + [cellstring, Beta[i] ,B[i], StdErrB, F, FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + constant := means[0] - sum; + outline := format('Constant = %10.3f',[constant]); + OutPutFrm.RichEdit.Lines.Add(outline); + TypeIISS[block] := R2 * SST; + OutPutFrm.RichEdit.Lines.Add('WITHIN SUBJECT EFFECT:'); + outline := format('SS for %-10s = %10.3f',[effstr,TypeIISS[block]]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('SS TOTAL = %10.3f',[SST]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + end; + totalss := 0.0; + totaldf := 0.0; + for i := 0 to noblocks - 1 do // add sums of squares for within effects + begin + if TypeIISS[i] < 0.0 then continue; + totalss := totalss + TypeIISS[i]; + totaldf := totaldf + TypeIIDF1[i]; + end; + sserrwithin := sswithin - totalss; + dferrwithin := dfwithin - totaldf; + mserrwithin := sserrwithin / dferrwithin; + + OutPutFrm.RichEdit.Lines.Clear; + OutPutFrm.RichEdit.Lines.Add(' SUMMARY OF WITHIN SUBJECT EFFECTS'); + outline := 'SOURCE DF SS MS F PROB.>F'; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('%-19s %3.0f %9.3f',['Within Subjects',dfwithin, sswithin]); + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to noblocks - 1 do + begin + if TypeIISS[i] < 0.0 then continue; + TypeIIMS[i] := TypeIISS[i] / TypeIIDF1[i]; + TypeIIF[i] := TypeIIMS[i] / mserrwithin; + TypeIIDF2[i] := dferrwithin; + TypeIIProb[i] := probf(TypeIIF[i],TypeIIDF1[i],TypeIIDF2[i]); + outline := format('%19s %3.0f %9.3f %9.3f %9.3f %9.3f', + [IndOrderBox.Items.Strings[i],TypeIIDF1[i],TypeIISS[i],TypeIIMS[i], + TypeIIF[i],TypeIIProb[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := format('%19s %3.0f %9.3f %9.3f',['Error Within', dferrwithin, + sserrwithin, mserrwithin]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('%19s %3d %9.3f',['TOTAL',totalobs-1,SST]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + + // clean up the heap + TypeIIProb := nil; + TypeIIF := nil; + TypeIProb := nil; + TypeIF := nil; + TypeIIDF2 := nil; + TypeIIDF1 := nil; + TypeIDF2 := nil; + TypeIDF1 := nil; + TypeIIMS := nil; + TypeIMS := nil; + TypeIISS := nil; + TypeISS := nil; +end; + +function TGLMFrm.CntIntActVecs(linestr: string): integer; +var + i, j, listcnt, varcount : integer; + cellstring : string; + asterisk : string; + blank : string; + abbrevList : array[1..5] of string; + vectcnt : array[1..5] of integer; + newline : string; + +begin + asterisk := '*'; + blank := ' '; + listcnt := 0; + cellstring := ''; + newline := ''; + for i := 1 to 5 do vectcnt[i] := 0; + // first, delete imbedded blanks that were there for readability + for i := 1 to length(linestr) do + begin + if linestr[i] <> blank then newline := newline + linestr[i]; + end; + // Now, strip out substrings to each asterisk or end of string + while length(newline) > 0 do + begin + i := pos(asterisk,newline); + if i > 0 then // an asterisk found + begin + cellstring := copy(newline,0,i-1); // get abbreviation + delete(newline,1,i); // delete abbreviation and asterisk + listcnt := listcnt + 1; + AbbrevList[listcnt] := cellstring; + end + else begin // must be last abbreviation + cellstring := newline; + listcnt := listcnt + 1; + AbbrevList[listcnt] := cellstring; + newline := ''; + end; + end; + // now get the associated number of columns for each abbreviation in the list + for i := 1 to listcnt do + begin + cellstring := AbbrevList[i]; + // check for covariates + if NCovIndep > 0 then + begin + for j := 0 to NCovIndep - 1 do + begin + if cellstring = CovariateCode.Items.Strings[j] then + vectcnt[i] := 1; + end; + end; + // check for fixed effect vectors + if NFixedIndep > 0 then + begin + for j := 0 to NFixedIndep - 1 do + begin + if cellstring = FixedIndepCode.Items.Strings[j] then + vectcnt[i] := NFixVecIndep[j]; + end; + end; + // check for random effect vectors + if NRndIndep > 0 then + begin + for j := 0 to NRndIndep - 1 do + begin + if cellstring = RndIndepCode.Items.Strings[j] then + vectcnt[i] := NRndVecIndep[j]; + end; + end; + // check for repeated measures effect vectors + if NReptDep > 0 then + begin + if cellstring = RepTrtCode.Items.Strings[0] then + vectcnt[i] := NReptDep - 1; + end; + end; // next i in listcnt + // get total interaction vector count + varcount := 1; + for i := 1 to listcnt do varcount := varcount * vectcnt[i]; + Result := varcount; +end; + +procedure TGLMFrm.GenInterVecs(linestr: string); +var + i, j, k, l, m, n, col, listcnt, pos1, pos2, pos3, pos4, pos5, novectors : integer; + cellstring : string; + asterisk : string; + blank : string; + abbrevList : array[1..5] of string; + vectcnt : array[1..5] of integer; + fromcol : array[1..5] of integer; + newline : string; + product : double; + +begin + asterisk := '*'; + blank := ' '; + listcnt := 0; + cellstring := ''; + newline := ''; + // first, delete imbedded blanks that were there for readability + for i := 1 to length(linestr) do + begin + if linestr[i] <> blank then newline := newline + linestr[i]; + end; + // Now, strip out substrings to each asterisk or end of string + while length(newline) > 0 do + begin + i := pos(asterisk,newline); + if i > 0 then // an asterisk found + begin + cellstring := copy(newline,0,i-1); // get abbreviation + delete(newline,1,i); // delete abbreviation and asterisk + listcnt := listcnt + 1; + AbbrevList[listcnt] := cellstring; + end + else begin // must be last abbreviation + cellstring := newline; + listcnt := listcnt + 1; + AbbrevList[listcnt] := cellstring; + newline := ''; + end; + end; + // now generate the associated number of columns for each abbreviation in the list + for i := 1 to listcnt do + begin + cellstring := AbbrevList[i]; + // check for covariates + if NCovIndep > 0 then + begin + for j := 0 to NCovIndep - 1 do + begin + if cellstring = CovariateCode.Items.Strings[j] then + begin + vectcnt[i] := 1; + fromcol[i] := CovIndepPos[j]; + break; + end; + end; + end; + // check for fixed effect vectors + if NFixedIndep > 0 then + begin + for j := 0 to NFixedIndep - 1 do + begin + if cellstring = FixedIndepCode.Items.Strings[j] then + begin + vectcnt[i] := NFixVecIndep[j]; + fromcol[i] := FixedIndepPos[j]; + break; + end; + end; + end; + // check for random effect vectors + if NRndIndep > 0 then + begin + for j := 0 to NRndIndep - 1 do + begin + if cellstring = RndIndepCode.Items.Strings[j] then + begin + vectcnt[i] := NRndVecIndep[j]; + fromcol[i] := RndIndepPos[j]; + break; + end; + end; + end; + // check for repeated measures + if NReptDep > 0 then + begin + if cellstring = RepTrtCode.Items.Strings[0] then + begin + vectcnt[i] := NReptDep - 1; + fromcol[i] := ReptTrtPos[0]; + end; + end; + end; // next i in listcnt + + // now generate the product vectors for 2-way interactions + col := gencount; + for i := 1 to vectcnt[1] do + begin + pos1 := fromcol[1] + i - 1; + for j := 1 to vectcnt[2] do + begin + pos2 := fromcol[2] + j - 1; + for m := 0 to totalobs - 1 do + datagrid[m,col] := datagrid[m,pos1] * datagrid[m,pos2]; + cellstring := format('%s_%d*%s_%d',[AbbrevList[1],i,AbbrevList[2],j]); + GenLabels[col] := cellstring; + col := col + 1; + end; + end; + + if listcnt = 3 then // Do 3-way interactions + begin + col := gencount; + for i := 1 to vectcnt[1] do + begin + pos1 := fromcol[1] + i - 1; + for j := 1 to vectcnt[2] do + begin + pos2 := fromcol[2] + j - 1; + for k := 1 to vectcnt[3] do + begin + pos3 := fromcol[3] + k - 1; + for m := 0 to totalobs - 1 do + datagrid[m,col] := datagrid[m,pos1] * datagrid[m,pos2] * datagrid[m,pos3]; + cellstring := format('%s*%s*%s',[GenLabels[pos1],GenLabels[pos2],GenLabels[pos3]]); + GenLabels[col] := cellstring; + col := col + 1; + end; // next k + end; // next j + end; // next i + end; // if listcnt = 3 + + if listcnt = 4 then // Do 4-way interactions + begin + col := gencount; + for i := 1 to vectcnt[1] do + begin + pos1 := fromcol[1] + i - 1; + for j := 1 to vectcnt[2] do + begin + pos2 := fromcol[2] + j - 1; + for k := 1 to vectcnt[3] do + begin + pos3 := fromcol[3] + k - 1; + for l := 1 to vectcnt[4] do + begin + pos4 := fromcol[4] + l - 1; + for m := 0 to totalobs - 1 do + datagrid[m,col] := datagrid[m,pos1] * + datagrid[m,pos2] * datagrid[m,pos3] * datagrid[m,pos4]; + cellstring := format('%s*%s*%s*%s',[GenLabels[pos1], + GenLabels[pos2],GenLabels[pos3],GenLabels[pos4]]); + GenLabels[col] := cellstring; + col := col + 1; + end; // next l + end; // next k + end; // next j + end; // next i + end; // if listcnt = 3 + + if listcnt = 5 then // Do 5-way interactions + begin + col := gencount; + for i := 1 to vectcnt[1] do + begin + pos1 := fromcol[1] + i - 1; + for j := 1 to vectcnt[2] do + begin + pos2 := fromcol[2] + j - 1; + for k := 1 to vectcnt[3] do + begin + pos3 := fromcol[3] + k - 1; + for l := 1 to vectcnt[4] do + begin + pos4 := fromcol[4] + l - 1; + for n := 1 to vectcnt[5] do + begin + pos5 := fromcol[5] + n - 1; + for m := 0 to totalobs - 1 do + datagrid[m,col] := datagrid[m,pos1] * + datagrid[m,pos2] * datagrid[m,pos3] * + datagrid[m,pos4] * datagrid[m,pos5]; + cellstring := format('%s*%s*%s*%s*%s',[GenLabels[pos1], + GenLabels[pos2],GenLabels[pos3],GenLabels[pos4], + GenLabels[pos5]]); + GenLabels[col] := cellstring; + col := col + 1; + end; // next n + end; // next l + end; // next k + end; // next j + end; // next i + end; // if listcnt = 3 +end; + +procedure TGLMFrm.CanCor(NLeft: integer; NRight: integer; GridPlace: IntDyneVec); +label cleanup; +var + i, j, k, count, a_size, b_size, no_factors, prtopts, IER: integer; + outline, cellstring, gridstring, SNo : string; + s, m, n, df1, df2, q, w, pcnt_extracted, trace : double; + minroot, critical_prob, Lambda, Pillia : double; + chisqr, HLTrace, chiprob, ftestprob, Roys, f, Hroot : double; + raa, rbb, rab, rba, bigmat, prod, first_prod, second_prod : DblDyneMat; + char_equation, raainv, rbbinv, eigenvectors, norm_a, norm_b : DblDyneMat; + raw_a, raw_b, a_cors, b_cors, eigentrans, theta, tempmat : DblDyneMat; + mean, variance, stddev, roots, root_chi, chi_prob, pv_a, pv_b : DblDyneVec; + rd_a, rd_b, pcnt_trace : DblDyneVec; + root_df : IntDyneVec; + a_vars, b_vars : StrDyneVec; + selected : IntDyneVec; + RowLabels, ColLabels : StrDyneVec; + CanLabels : StrDyneVec; + NCases : integer; + title : string; + errorcode : boolean; + +begin + count := 0; + k := 0; + no_factors := 0; + pcnt_extracted := 0.0; + trace := 0.0; + minroot := 0.0; + critical_prob := 0.0; + Pillia := 0.0; + chisqr := 0.0; + HLTrace := 0.0; + chiprob := 0.0; + + // Get size of the Left and Right matrices (predictors and dependents) + a_size := NLeft; + b_size:= NRight; + novars:= a_size + b_size; + + // allocate memory for matrices and vectors + SetLength(raa,NLeft+1,NLeft+1); + SetLength(rbb,NRight+1,NRight+1); + SetLength(rab,NLeft+1,NRight+1); + SetLength(rba,NRight+1,NLeft+1); + SetLength(bigmat,novars+1,novars+1); + SetLength(prod,novars+1,novars+1); + SetLength(first_prod,novars+1,novars+1); + SetLength(second_prod,novars+1,novars+1); + SetLength(char_equation,novars+1,novars+1); + SetLength(raainv,NLeft,NLeft); + SetLength(rbbinv,NRight,NRight); + SetLength(eigenvectors,novars,novars); + SetLength(norm_a,novars,novars); + SetLength(norm_b,novars,novars); + SetLength(raw_a,novars,novars); + SetLength(raw_b,novars,novars); + SetLength(a_cors,NLeft+1,NLeft+1); + SetLength(b_cors,NRight+1,NRight+1); + SetLength(eigentrans,novars,novars); + SetLength(theta,novars,novars); + SetLength(tempmat,novars,novars); + + SetLength(mean,novars); + SetLength(variance,novars); + SetLength(stddev,novars); + SetLength(roots,novars); + SetLength(root_chi,novars); + SetLength(chi_prob,novars); + SetLength(pv_a,novars); + SetLength(pv_b,novars); + SetLength(rd_a,novars); + SetLength(rd_b,novars); + SetLength(pcnt_trace,novars); + + SetLength(root_df,novars); + SetLength(a_vars,NLeft); + SetLength(b_vars,NRight); + SetLength(CanLabels,novars); + SetLength(RowLabels,novars); + SetLength(ColLabels,novars); + SetLength(selected,novars); + + //------------ WORK STARTS HERE! ------------------------------------- + + // Build labels for canonical functions 1 to novars + if b_size < a_size then + for i := 0 to b_size-1 do CanLabels[i] := 'CanVar' + IntToStr(i+1) + else for i := 0 to a_size-1 do CanLabels[i] := 'CanVar' + IntToStr(i+1); + + for i := 0 to a_size - 1 do // identify left variables + begin + a_vars[i] := Labels[i]; + selected[i] := GridPlace[i]; + end; + + for i := 0 to b_size - 1 do // identify right variables + begin + b_vars[i] := Labels[NLeft+i]; + selected[NLeft+i] := GridPlace[NLeft+i]; + end; + + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('CANONICAL CORRELATION ANALYSIS'); + OutPutFrm.RichEdit.Lines.Add(''); + count := NoCases; + // Get means, standard deviations, etc. for total matrix + IER := Dyncorrelations(novars,selected,datagrid,bigmat,mean,variance,stddev,totalobs,3); + if (IER = 1)then + begin + ShowMessage('ERROR! Zero variance found for a variable-terminating'); + goto cleanup; + end; + + //partition matrix into quadrants + for i := 0 to a_size - 1 do + for j := 0 to a_size - 1 do raa[i,j]:= bigmat[i,j]; + + for i := a_size to novars - 1 do + for j := a_size to novars - 1 do + rbb[i-a_size,j-a_size] := bigmat[i,j]; + + for i := 0 to a_size - 1 do + for j := a_size to novars - 1 do + rab[i,j-a_size] := bigmat[i,j]; + + for i := a_size to novars - 1 do + for j := 0 to a_size - 1 do + rba[i-a_size,j] := bigmat[i,j]; + + if CorsChk.Checked then + begin + title := 'Left Correlation Matrix'; + MAT_PRINT(raa,NLeft,NLeft,title,a_vars,a_vars,totalobs); + title := 'Right Correlation Matrix'; + MAT_PRINT(rbb,NRight,NRight,title,b_vars,b_vars,totalobs); + title := 'Left-Right Correlation Matrix'; + MAT_PRINT(rab,NLeft,NRight,title,a_vars,b_vars,totalobs); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; + + // get inverses of left and right hand matrices raa and rbb + for i := 0 to a_size-1 do + for j := 0 to a_size-1 do + tempmat[i,j] := raa[i,j]; + SVDInverse(tempmat,a_size); + for i := 0 to a_size-1 do + for j := 0 to a_size-1 do raainv[i,j] := tempmat[i,j]; + if CorsChk.Checked then + begin + title := 'Inverse of Left Matrix'; + MAT_PRINT(raainv,a_size,a_size,title,a_vars,a_vars,totalobs); + end; + + for i := 0 to b_size-1 do + for j := 0 to b_size-1 do + tempmat[i,j] := rbb[i,j]; // inverse uses 1 offset + SVDInverse(tempmat,b_size); + for i := 0 to b_size-1 do // reset to 0 offset + for j := 0 to b_size - 1 do rbbinv[i,j] := tempmat[i,j]; + if CorsChk.Checked then + begin + title := 'Inverse of Right Matrix'; + MAT_PRINT(rbbinv,b_size,b_size,title,b_vars,b_vars,totalobs); + end; + + // get products of raainv x rab and the rbbinv x rba matrix + for i := 0 to b_size-1 do + for j := 0 to a_size-1 do first_prod[i,j] := 0.0; + MatAxB(first_prod,rbbinv,rba,b_size,b_size,b_size,a_size,errorcode); + for i := 0 to a_size-1 do + for j := 0 to b_size-1 do second_prod[i,j] := 0.0; + MatAxB(second_prod,raainv,rab,a_size,a_size,a_size,b_size,errorcode); + title := 'Right Inverse x Right-Left Matrix'; + MAT_PRINT(first_prod,b_size,a_size,title,b_vars,a_vars,totalobs); + title := 'Left Inverse x Left-Right Matrix'; + MAT_PRINT(second_prod,a_size,b_size,title,a_vars,b_vars,totalobs); + + //get characteristic equations matrix (product of last two product matrices + //The product should yeild rows and cols representing the smaller of the two sets + for i := 0 to b_size-1 do + for j := 0 to b_size - 1 do char_equation[i,j] := 0.0; + MatAxB(char_equation,first_prod,second_prod,b_size,a_size,a_size,b_size,errorcode); + title := 'Canonical Function'; + MAT_PRINT(char_equation,b_size,b_size,title,CanLabels,CanLabels,totalobs); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + // now get roots and vectors of the characteristic equation using + // NonSymRoots routine + minroot := 0.0; + for i := 0 to b_size - 1 do + begin + roots[i] := 0.0; + pcnt_trace[i] := 0.0; + for j := 0 to b_size - 1 do eigenvectors[i,j] := 0.0; + end; + trace := 0.0; + no_factors := b_size; + Dynnonsymroots(char_equation, b_size, no_factors, minroot, eigenvectors, roots, + pcnt_trace, trace, pcnt_extracted); + + + outline := format('Trace of the matrix:=%10.4f',[trace]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Percent of trace extracted: %10.4f',[pcnt_extracted]); + OutPutFrm.RichEdit.Lines.Add(outline); + + // Normalize smaller set weights and coumpute larger set weights + for i := 0 to b_size - 1 do // transpose eigenvectors + for j := 0 to b_size - 1 do eigentrans[j,i] := eigenvectors[i,j]; + for i := 0 to b_size - 1 do + for j := 0 to b_size-1 do tempmat[i,j] := 0.0; + MatAxB(tempmat,eigentrans,rbb,b_size,b_size,b_size,b_size,errorcode); + for i := 0 to b_size-1 do + for j := 0 to b_size-1 do theta[i,j] := 0.0; + MatAxB(theta,tempmat,eigenvectors,b_size,b_size,b_size,b_size,errorcode); + for j := 0 to b_size - 1 do + begin + q := 1.0 / sqrt(theta[j,j]); + for i := 0 to b_size - 1 do + begin + norm_b[i,j] := eigenvectors[i,j] * q; + raw_b[i,j] := norm_b[i,j] / stddev[a_size+i]; + end; + end; + for i := 0 to a_size - 1 do + for j := 0 to b_size - 1 do norm_a[i,j] := 0.0; + MatAxB(norm_a,second_prod,norm_b,a_size,b_size,b_size,b_size,errorcode); + for j := 0 to b_size-1 do + begin + for i := 0 to a_size-1 do + begin + norm_a[i,j] := norm_a[i,j] * (1.0 / sqrt(roots[j])); + raw_a[i,j] := norm_a[i,j] / stddev[i]; + end; + end; + + // Compute the correlations between variables and canonical variables + for i := 0 to a_size-1 do + for j := 0 to b_size-1 do a_cors[i,j] := 0.0; + MatAxB(a_cors,raa,norm_a,a_size,a_size,a_size,b_size,errorcode); + for j := 0 to b_size-1 do + begin + q := 0.0; + for i := 0 to a_size-1 do q := q + norm_a[i,j] * a_cors[i,j]; + q := 1.0 / sqrt(q); + for i := 0 to a_size-1 do a_cors[i,j] := a_cors[i,j] * q; + end; + for i := 0 to b_size-1 do + for j := 0 to b_size-1 do b_cors[i,j] := 0.0; + MatAxB(b_cors,rbb,norm_b,b_size,b_size,b_size,b_size,errorcode); + for j := 0 to b_size-1 do + begin + q := 0.0; + for i := 0 to b_size-1 do q := q + norm_b[i,j] * b_cors[i,j]; + q := 1.0 / sqrt(q); + for i := 0 to b_size-1 do b_cors[i,j] := b_cors[i,j] * q; + end; + + // Compute the Proportions of Variance (PVs) and Redundancy Coefficients + for j := 0 to b_size-1 do + begin + pv_a[j] := 0.0; + for i := 0 to a_size-1 do pv_a[j] := pv_a[j] + (a_cors[i,j] * a_cors[i,j]); + pv_a[j] := pv_a[j] / a_size; + rd_a[j] := pv_a[j] * roots[j]; + end; + for j := 0 to b_size-1 do + begin + pv_b[j] := 0.0; + for i := 0 to b_size-1 do pv_b[j] := pv_b[j] + (b_cors[i,j] * b_cors[i,j]); + pv_b[j] := pv_b[j] / b_size; + rd_b[j] := pv_b[j] * roots[j]; + end; + + // Compute tests of the roots + q := a_size + b_size + 1; + q := -(count - 1.0 - (q / 2.0)); + k := 0; + for i := 0 to b_size-1 do + begin + w := 1.0; + for j := i to b_size-1 do w := w * (1.0 - roots[j]); + root_chi[i] := q * ln(w); + root_df[i] := (a_size - i) * (b_size - i); + chi_prob[i] := 1.0 - chisquaredprob(root_chi[i],root_df[i]); + if (chi_prob[i] < critical_prob) then k := k + 1; + end; + Roys := roots[1] / (1.0 - roots[1]); + Lambda := 1.0; + for i := 0 to b_size-1 do + begin + Hroot := roots[i] / (1.0 - roots[i]); + Lambda := Lambda * (1.0 / (1.0 + Hroot)); + Pillia := Pillia + (Hroot / (1.0 + Hroot)); + HLTrace := HLTrace + Hroot; + end; + + // Print remaining results + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(''); + outline := ' Canonical R Root % Trace Chi-Sqr D.F. Prob.'; + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to b_size-1 do + begin + outline := format('%2d %10.6f %8.3f %7.3f %8.3f %2d %8.3f', + [i+1, sqrt(roots[i]), roots[i], pcnt_trace[i], root_chi[i], root_df[i], chi_prob[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + chisqr := -ln(Lambda) * (count - 1.0 - 0.5 * (a_size + b_size - 1.0)); + chiprob := 1.0 - chisquaredprob(chisqr,a_size * b_size); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Overall Tests of Significance:'); + OutPutFrm.RichEdit.Lines.Add(' Statistic Approx. Stat. Value D.F. Prob.>Value'); + outline := format('Wilk''s Lambda Chi-Squared %10.4f %3d %6.4f', + [chisqr,a_size * b_size,chiprob]); + OutPutFrm.RichEdit.Lines.Add(outline); + s := b_size; + m := 0.5 * (a_size - b_size - 1); + n := 0.5 * (count - b_size - a_size - 2); + f := (HLTrace * 2.0 * (s * n + 1)) / (s * s * (2.0 * m + s + 1.0)); + df1 := s * (2.0 * m + s + 1.0); + df2 := 2.0 * ( s * n + 1.0); + ftestprob := probf(f,df1,df2); + outline := format('Hotelling-Lawley Trace F-Test %10.4f %2.0f %2.0f %6.4f', + [f, df1,df2, ftestprob]); + OutPutFrm.RichEdit.Lines.Add(outline); + df2 := s * (2.0 * n + s + 1.0); + f := (Pillia / (s - Pillia)) * ( (2.0 * n + s +1.0) / (2.0 * m + s + 1.0) ); + ftestprob := probf(f,df1,df2); + outline := format('Pillai Trace F-Test %10.4f %2.0f %2.0f %6.4f', + [f, df1,df2, ftestprob]); + OutPutFrm.RichEdit.Lines.Add(outline); + Roys := Roys * (count - 1 - a_size + b_size)/ a_size ; + df1 := a_size; + df2 := count - 1 - a_size + b_size; + ftestprob := probf(Roys,df1,df2); + outline := format('Roys Largest Root F-Test %10.4f %2.0f %2.0f %6.4f', + [Roys, df1, df2, ftestprob]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + if CorsChk.Checked then + begin + title := 'Eigenvectors'; + MAT_PRINT(eigenvectors,b_size,b_size,title,CanLabels,CanLabels,totalobs); + OutPutFrm.ShowModal(); + OutPutFrm.RichEdit.Clear; + end; + + title := 'Standardized Right Side Weights'; + MAT_PRINT(norm_a,a_size,b_size,title,RowLabels,CanLabels,totalobs); + title := 'Standardized Left Side Weights'; + MAT_PRINT(norm_b,b_size,b_size,title,ColLabels,CanLabels,totalobs); + OutPutFrm.ShowModal; + title := 'Raw Right Side Weights'; + MAT_PRINT(raw_a,a_size,b_size,title,RowLabels,CanLabels,totalobs); + title := 'Raw Left Side Weights'; + MAT_PRINT(raw_b,b_size,b_size,title,ColLabels,CanLabels,totalobs); + OutPutFrm.ShowModal; + title := 'Right Side Correlations with Function'; + MAT_PRINT(a_cors,a_size,b_size,title,RowLabels,CanLabels,totalobs); + title := 'Left Side Correlations with Function'; + MAT_PRINT(b_cors,b_size,b_size,title,ColLabels,CanLabels,totalobs); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + if CorsChk.Checked then + begin + outline := 'Redundancy Analysis for Right Side Variables'; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + outline := ' Variance Prop. Redundancy'; + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to b_size-1 do + begin + outline := format('%10d %10.5f %10.5f',[i,pv_a[i],rd_a[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.RichEdit.Lines.Add(''); + outline := 'Redundancy Analysis for Left Side Variables'; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' Variance Prop. Redundancy'; + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to b_size-1 do + begin + outline := format('%10d %10.5f %10.5f',[i,pv_b[i],rd_b[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; + + //------------- Now, clean up memory mess ---------------------------- +cleanup: + selected := nil; + ColLabels := nil; + RowLabels := nil; + CanLabels := nil; + b_vars := nil; + a_vars := nil; + root_df := nil; + pcnt_trace := nil; + rd_b := nil; + rd_a := nil; + pv_b := nil; + pv_a := nil; + chi_prob := nil; + root_chi := nil; + roots := nil; + stddev := nil; + variance := nil; + mean := nil; + tempmat := nil; + theta := nil; + eigentrans := nil; + b_cors := nil; + a_cors := nil; + raw_b := nil; + raw_a := nil; + norm_b := nil; + norm_a := nil; + eigenvectors := nil; + rbbinv := nil; + raainv := nil; + char_equation := nil; + second_prod := nil; + first_prod := nil; + prod := nil; + bigmat := nil; + rba := nil; + rab := nil; + rbb := nil; + raa := nil; +end; + +initialization + {$I glmunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/globals.pas b/applications/lazstats/source_orig/globals.pas new file mode 100644 index 000000000..0e3388d9d --- /dev/null +++ b/applications/lazstats/source_orig/globals.pas @@ -0,0 +1,60 @@ +unit Globals; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils; +const TOL = 0.0005; + +Type IntDyneVec = array of integer; + +Type DblDyneVec = array of double; + +Type BoolDyneVec = array of boolean; + +Type DblDyneMat = array of array of double; + +Type IntDyneMat = array of array of integer; + +Type DblDyneCube = array of array of array of double; + +Type IntDyneCube = array of array of array of integer; + +Type DblDyneQuad = array of array of array of array of double; + +Type IntDyneQuad = array of array of array of array of integer; + +Type StrDyneVec = array of string; + +Type StrDyneMat = array of array of string; + +Type CharDyneVec = array of char; + + type POINT3D = record + x, y, z : double; + end; + + type POINTint = record + x, y : integer; + end; + +var + NoCases : integer; + NoVariables : integer; + VarDefined : array[0..500] of boolean; + TempStream : TMemoryStream; + TempVarItm : TMemoryStream; + DictLoaded : boolean; + FilterOn : boolean; + FilterCol : integer; + OpenStatPath : string; + AItems : array[0..8] of string; + LoggedOn : boolean = false; + + +implementation + +end. + diff --git a/applications/lazstats/source_orig/gradebookunit.lfm b/applications/lazstats/source_orig/gradebookunit.lfm new file mode 100644 index 000000000..942347054 --- /dev/null +++ b/applications/lazstats/source_orig/gradebookunit.lfm @@ -0,0 +1,192 @@ +object GradebookFrm: TGradebookFrm + Left = 22 + Height = 541 + Top = 86 + Width = 956 + Caption = 'Gradebook' + ClientHeight = 522 + ClientWidth = 956 + Menu = MainMenu1 + OnCreate = FormCreate + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 46 + Height = 25 + Top = 13 + Width = 247 + Caption = 'YOUR GRADEBOOK FOR:' + Font.CharSet = ANSI_CHARSET + Font.Color = clBlack + Font.Height = -21 + Font.Name = 'Times New Roman' + Font.Pitch = fpVariable + Font.Quality = fqDraft + Font.Style = [fsBold, fsItalic] + ParentColor = False + ParentFont = False + end + object Label2: TLabel + Left = 8 + Height = 14 + Top = 48 + Width = 21 + Caption = 'File:' + ParentColor = False + end + object Label3: TLabel + Left = 56 + Height = 14 + Top = 80 + Width = 179 + Caption = 'Directory (click folder icon to change)' + ParentColor = False + end + object FileNameEdit: TEdit + Left = 40 + Height = 21 + Top = 46 + Width = 252 + TabOrder = 0 + Text = 'FileNameEdit' + end + object DirectoryEdit1: TDirectoryEdit + Left = 8 + Height = 21 + Top = 104 + Width = 284 + Directory = 'C:' + ShowHidden = False + ButtonWidth = 23 + NumGlyphs = 0 + TabOrder = 1 + OnChange = DirectoryEdit1Change + end + object FileListBox1: TFileListBox + Left = 7 + Height = 293 + Top = 145 + Width = 287 + Directory = 'C:\Windows\system32' + ItemHeight = 13 + TabOrder = 2 + end + object ResetBtn: TButton + Left = 8 + Height = 29 + Top = 447 + Width = 98 + Caption = 'Start New' + TabOrder = 3 + end + object ExitBtn: TButton + Left = 9 + Height = 29 + Top = 480 + Width = 97 + Caption = 'Exit' + ModalResult = 1 + OnClick = ExitBtnClick + TabOrder = 4 + end + object Grid: TStringGrid + Left = 320 + Height = 504 + Top = 0 + Width = 628 + ColCount = 58 + FixedCols = 0 + Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goTabs, goSmoothScroll] + RowCount = 41 + TabOrder = 5 + OnExit = GridExit + end + object RadioGroup1: TRadioGroup + Left = 129 + Height = 61 + Top = 447 + Width = 163 + AutoFill = True + Caption = 'Name Protection:' + 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 = 43 + ClientWidth = 159 + ItemIndex = 1 + Items.Strings = ( + 'Turn ON' + 'Turn OFF' + ) + OnClick = RadioGroup1Click + TabOrder = 6 + end + object MainMenu1: TMainMenu + left = 304 + object FilesMenu: TMenuItem + Caption = 'Files' + object NewGBMnu: TMenuItem + Caption = 'New Grade Book' + OnClick = NewGBMnuClick + end + object OpenGBMnu: TMenuItem + Caption = 'Open Existing Grade Book' + OnClick = OpenGBMnuClick + end + object SaveGBMnu: TMenuItem + Caption = 'Save Grade Book' + OnClick = SaveGBMnuClick + end + object ExitMnu: TMenuItem + Caption = 'Exit' + OnClick = ExitMnuClick + end + end + object EditMnu: TMenuItem + Caption = 'Edit' + object DelRowMnu: TMenuItem + Caption = 'Delete Current Row' + OnClick = DelRowMnuClick + end + end + object ComputeMenu: TMenuItem + Caption = 'Compute' + object TestAnalMnu: TMenuItem + Caption = 'Analyze a Test' + OnClick = TestAnalMnuClick + end + object CompScrMnu: TMenuItem + Caption = 'Calc. Composite Score' + OnClick = CompScrMnuClick + end + end + object ReportsMenu: TMenuItem + Caption = 'Reports' + object StudRptsMnu: TMenuItem + Caption = 'Individual Student Reports' + OnClick = StudRptsMnuClick + end + object ClassRptMnu: TMenuItem + Caption = 'Class Report' + OnClick = ClassRptMnuClick + end + end + object HelpMenu: TMenuItem + Caption = 'Help' + Visible = False + end + end + object SaveDialog1: TSaveDialog + left = 189 + top = 1 + end + object OpenDialog1: TOpenDialog + left = 258 + top = 1 + end +end diff --git a/applications/lazstats/source_orig/gradebookunit.lrs b/applications/lazstats/source_orig/gradebookunit.lrs new file mode 100644 index 000000000..04a983210 --- /dev/null +++ b/applications/lazstats/source_orig/gradebookunit.lrs @@ -0,0 +1,59 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGradebookFrm','FORMDATA',[ + 'TPF0'#13'TGradebookFrm'#12'GradebookFrm'#4'Left'#2#22#6'Height'#3#29#2#3'Top' + +#2'V'#5'Width'#3#188#3#7'Caption'#6#9'Gradebook'#12'ClientHeight'#3#10#2#11 + +'ClientWidth'#3#188#3#4'Menu'#7#9'MainMenu1'#8'OnCreate'#7#10'FormCreate'#6 + +'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4 + +'Left'#2'.'#6'Height'#2#25#3'Top'#2#13#5'Width'#3#247#0#7'Caption'#6#19'YOUR' + +' GRADEBOOK FOR:'#12'Font.CharSet'#7#12'ANSI_CHARSET'#10'Font.Color'#7#7'clB' + +'lack'#11'Font.Height'#2#235#9'Font.Name'#6#15'Times New Roman'#10'Font.Pitc' + +'h'#7#10'fpVariable'#12'Font.Quality'#7#7'fqDraft'#10'Font.Style'#11#6'fsBol' + +'d'#8'fsItalic'#0#11'ParentColor'#8#10'ParentFont'#8#0#0#6'TLabel'#6'Label2' + +#4'Left'#2#8#6'Height'#2#14#3'Top'#2'0'#5'Width'#2#21#7'Caption'#6#5'File:' + +#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#2'8'#6'Height'#2#14#3'Top' + +#2'P'#5'Width'#3#179#0#7'Caption'#6'''Directory (click folder icon to change' + +')'#11'ParentColor'#8#0#0#5'TEdit'#12'FileNameEdit'#4'Left'#2'('#6'Height'#2 + +#21#3'Top'#2'.'#5'Width'#3#252#0#8'TabOrder'#2#0#4'Text'#6#12'FileNameEdit'#0 + +#0#14'TDirectoryEdit'#14'DirectoryEdit1'#4'Left'#2#8#6'Height'#2#21#3'Top'#2 + +'h'#5'Width'#3#28#1#9'Directory'#6#2'C:'#10'ShowHidden'#8#11'ButtonWidth'#2 + +#23#9'NumGlyphs'#2#0#8'TabOrder'#2#1#8'OnChange'#7#20'DirectoryEdit1Change'#0 + +#0#12'TFileListBox'#12'FileListBox1'#4'Left'#2#7#6'Height'#3'%'#1#3'Top'#3 + +#145#0#5'Width'#3#31#1#9'Directory'#6#19'C:\Windows\system32'#10'ItemHeight' + +#2#13#8'TabOrder'#2#2#0#0#7'TButton'#8'ResetBtn'#4'Left'#2#8#6'Height'#2#29#3 + +'Top'#3#191#1#5'Width'#2'b'#7'Caption'#6#9'Start New'#8'TabOrder'#2#3#0#0#7 + +'TButton'#7'ExitBtn'#4'Left'#2#9#6'Height'#2#29#3'Top'#3#224#1#5'Width'#2'a' + +#7'Caption'#6#4'Exit'#11'ModalResult'#2#1#7'OnClick'#7#12'ExitBtnClick'#8'Ta' + +'bOrder'#2#4#0#0#11'TStringGrid'#4'Grid'#4'Left'#3'@'#1#6'Height'#3#248#1#3 + +'Top'#2#0#5'Width'#3't'#2#8'ColCount'#2':'#9'FixedCols'#2#0#7'Options'#11#15 + +'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13'goRan' + +'geSelect'#9'goEditing'#6'goTabs'#14'goSmoothScroll'#0#8'RowCount'#2')'#8'Ta' + +'bOrder'#2#5#6'OnExit'#7#8'GridExit'#0#0#11'TRadioGroup'#11'RadioGroup1'#4'L' + +'eft'#3#129#0#6'Height'#2'='#3'Top'#3#191#1#5'Width'#3#163#0#8'AutoFill'#9#7 + +'Caption'#6#16'Name Protection:'#28'ChildSizing.LeftRightSpacing'#2#6#28'Chi' + +'ldSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHo' + +'mogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChil' + +'dResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizi' + +'ng.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeft' + +'ToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight' + +#2'+'#11'ClientWidth'#3#159#0#9'ItemIndex'#2#1#13'Items.Strings'#1#6#7'Turn ' + +'ON'#6#8'Turn OFF'#0#7'OnClick'#7#16'RadioGroup1Click'#8'TabOrder'#2#6#0#0#9 + +'TMainMenu'#9'MainMenu1'#4'left'#3'0'#1#0#9'TMenuItem'#9'FilesMenu'#7'Captio' + +'n'#6#5'Files'#0#9'TMenuItem'#8'NewGBMnu'#7'Caption'#6#14'New Grade Book'#7 + +'OnClick'#7#13'NewGBMnuClick'#0#0#9'TMenuItem'#9'OpenGBMnu'#7'Caption'#6#24 + +'Open Existing Grade Book'#7'OnClick'#7#14'OpenGBMnuClick'#0#0#9'TMenuItem'#9 + +'SaveGBMnu'#7'Caption'#6#15'Save Grade Book'#7'OnClick'#7#14'SaveGBMnuClick' + +#0#0#9'TMenuItem'#7'ExitMnu'#7'Caption'#6#4'Exit'#7'OnClick'#7#12'ExitMnuCli' + +'ck'#0#0#0#9'TMenuItem'#7'EditMnu'#7'Caption'#6#4'Edit'#0#9'TMenuItem'#9'Del' + +'RowMnu'#7'Caption'#6#18'Delete Current Row'#7'OnClick'#7#14'DelRowMnuClick' + +#0#0#0#9'TMenuItem'#11'ComputeMenu'#7'Caption'#6#7'Compute'#0#9'TMenuItem'#11 + +'TestAnalMnu'#7'Caption'#6#14'Analyze a Test'#7'OnClick'#7#16'TestAnalMnuCli' + +'ck'#0#0#9'TMenuItem'#10'CompScrMnu'#7'Caption'#6#21'Calc. Composite Score'#7 + +'OnClick'#7#15'CompScrMnuClick'#0#0#0#9'TMenuItem'#11'ReportsMenu'#7'Caption' + +#6#7'Reports'#0#9'TMenuItem'#11'StudRptsMnu'#7'Caption'#6#26'Individual Stud' + +'ent Reports'#7'OnClick'#7#16'StudRptsMnuClick'#0#0#9'TMenuItem'#11'ClassRpt' + +'Mnu'#7'Caption'#6#12'Class Report'#7'OnClick'#7#16'ClassRptMnuClick'#0#0#0#9 + +'TMenuItem'#8'HelpMenu'#7'Caption'#6#4'Help'#7'Visible'#8#0#0#0#11'TSaveDial' + +'og'#11'SaveDialog1'#4'left'#3#189#0#3'top'#2#1#0#0#11'TOpenDialog'#11'OpenD' + +'ialog1'#4'left'#3#2#1#3'top'#2#1#0#0#0 +]); diff --git a/applications/lazstats/source_orig/gradebookunit.pas b/applications/lazstats/source_orig/gradebookunit.pas new file mode 100644 index 000000000..7e8e125c4 --- /dev/null +++ b/applications/lazstats/source_orig/gradebookunit.pas @@ -0,0 +1,902 @@ +unit gradebookunit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + Menus, StdCtrls, EditBtn, FileCtrl, ComCtrls, Grids, ExtCtrls, MainUnit, + Globals, DataProcs, FunctionsLib, DictionaryUnit, outputunit, graphlib, + gradingunit; + + Type + TestRcd = Record + TestNo : integer; + NoItems : integer; + Mean, Variance, StdDev : double; + KR21Rel : double; + Weight : double; + end; + + Type DblDyneMat = array of array of double; + Type DblDyneVec = array of double; + +type + + { TGradebookFrm } + + TGradebookFrm = class(TForm) + ExitBtn: TButton; + Label3: TLabel; + ExitMnu: TMenuItem; + CompScrMnu: TMenuItem; + ClassRptMnu: TMenuItem; + EditMnu: TMenuItem; + DelRowMnu: TMenuItem; + OpenDialog1: TOpenDialog; + SaveDialog1: TSaveDialog; + StudRptsMnu: TMenuItem; + TestAnalMnu: TMenuItem; + SaveGBMnu: TMenuItem; + OpenGBMnu: TMenuItem; + NewGBMnu: TMenuItem; + RadioGroup1: TRadioGroup; + ResetBtn: TButton; + DirectoryEdit1: TDirectoryEdit; + FileListBox1: TFileListBox; + FileNameEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + MainMenu1: TMainMenu; + FilesMenu: TMenuItem; + ComputeMenu: TMenuItem; + HelpMenu: TMenuItem; + ReportsMenu: TMenuItem; + Grid: TStringGrid; + procedure ClassRptMnuClick(Sender: TObject); + procedure CompScrMnuClick(Sender: TObject); + procedure DelRowMnuClick(Sender: TObject); + procedure DirectoryEdit1Change(Sender: TObject); + procedure ExitBtnClick(Sender: TObject); + procedure ExitMnuClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure GridExit(Sender: TObject); + procedure NewGBMnuClick(Sender: TObject); + procedure OpenGBMnuClick(Sender: TObject); + procedure RadioGroup1Click(Sender: TObject); + procedure SaveGBMnuClick(Sender: TObject); + procedure StudRptsMnuClick(Sender: TObject); + procedure TestAnalMnuClick(Sender: TObject); + + private + { private declarations } + Test : TestRcd; + TestNo, GridCol, GridRow, NoTests : integer; + + public + { public declarations } + nints, tno, NoStudents, nitems : integer; + freq : array[0..50] of double; + scores : array[0..50] of double; + sortedraw : DblDyneVec; + pcntiles : DblDyneMat; + tscores : DblDyneVec; + zscores : DblDyneVec; + pcntilerank : array[0..50] of double; + + end; + +var + GradebookFrm: TGradebookFrm; + +implementation + +{ TGradebookFrm } + +procedure TGradebookFrm.ExitBtnClick(Sender: TObject); +var response : string ; +begin + response := InputBox('SAVE','Save gradebook (Y or N)?','N'); + if response = 'Y' then SaveGBMnuClick(Self); + Close; +end; + +procedure TGradebookFrm.ExitMnuClick(Sender: TObject); +var response : string ; +begin + response := InputBox('SAVE','Save gradebook (Y or N)?','N'); + if response = 'Y' then SaveGBMnuClick(Self); + Close; +end; + +procedure TGradebookFrm.DirectoryEdit1Change(Sender: TObject); +begin + DirectoryEdit1.Directory := GetCurrentDir; + FileListBox1.Directory := DirectoryEdit1.Directory; +end; + +procedure TGradebookFrm.DelRowMnuClick(Sender: TObject); +VAR + row, i, j : integer; +begin + row := Grid.Row; + for i := 0 to 57 do Grid.Cells[i,row] := ''; + if Grid.Cells[0,row+1] <> '' then + begin + for i := row + 1 to NoStudents do + begin + for j := 0 to 57 do Grid.Cells[j,i-1] := Grid.Cells[j,i]; + end; + for j := 0 to 57 do Grid.Cells[j,NoStudents] := ''; + NoStudents := NoStudents - 1; + end; +end; + +procedure TGradebookFrm.CompScrMnuClick(Sender: TObject); +var + ncats, i, j, k, NoVars, count, IER, col : integer; + DataMat : array[1..50,1..10] of double; + Rmat, RelMat : array[1..10,1..10] of double; + Weights, Reliabilities, VectProd, means, variances, stddevs : array[1..10] of double; + X, Y, CompRel, numerator, denominator, compscore : double; + outline, cellstring : string; + title : string; + RowLabels : array[1..10] of string; + response : string; + nomiss : integer; + found : boolean; + +begin + OutPutFrm.RichEdit.Clear; + NoVars := 0; + // get number of tests + for i := 1 to 10 do + begin + tno := i * 5 - 5; + col := tno + 3; // column of raw scores for test number + found := false; + for j := 1 to NoStudents do + begin + if Grid.Cells[col,j] <> '' then found := true; + end; + if found then + begin + NoVars := NoVars + 1; + RowLabels[NoVars] := 'Test ' + IntToStr(NoVars); + end; + end; + count := NoStudents; + + // get data + for i := 1 to NoVars do + begin + nomiss := 0; + tno := i * 5 - 5; + col := tno + 3; // column of raw scores for test number + for j := 1 to NoStudents do + begin + if Grid.Cells[col,j] <> '' then + DataMat[j,i] := StrToFloat(Grid.Cells[col,j]) + else nomiss := nomiss + 1; + end; + if nomiss >= NoStudents then NoVars := NoVars - 1; + end; + + OutPutFrm.RichEdit.Lines.Add('Composite Test Reliability'); + OutPutFrm.RichEdit.Lines.Add(''); + outline := 'File Analyzed: ' + FileNameEdit.Text; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + // get correlation matrix + for i := 1 to NoVars do + begin + means[i] := 0.0; + variances[i] := 0.0; + for j := 1 to NoVars do Rmat[i,j] := 0.0; + end; + + for i := 1 to NoStudents do // get cross-products matrix + begin + for j := 1 to NoVars do + begin + X := DataMat[i,j]; + means[j] := means[j] + X; + variances[j] := variances[j] + (X * X); + for k := 1 to NoVars do + begin + Y := DataMat[i,k]; + Rmat[j,k] := Rmat[j,k] + (X * Y); + end; + end; + end; + + for j := 1 to NoVars do // calculate variances and standard dev.s + begin + variances[j] := variances[j] - (means[j] * means[j] / NoStudents); + variances[j] := variances[j] / (NoStudents - 1.0); + if variances[j] <= 0.0 then + begin + ShowMessage('No variance found in test '+ IntToStr(j)); + exit; + end + else stddevs[j] := sqrt(variances[j]); + end; + + for j := 1 to NoVars do // get variance-covariance matrix + begin + for k := 1 to NoVars do + begin + Rmat[j,k] := Rmat[j,k] - (means[j] * means[k] / NoStudents); + Rmat[j,k] := Rmat[j,k] / (NoStudents - 1.0); + end; + end; + + for j := 1 to NoVars do // get correlation matrix + for k := 1 to NoVars do Rmat[j,k] := Rmat[j,k] / (stddevs[j] * stddevs[k]); + + for j := 1 to NoVars do means[j] := means[j] / NoStudents; + + OutPutFrm.RichEdit.Lines.Add(''); + title := 'Correlations Among Tests'; + OutPutFrm.RichEdit.Lines.Add(title); + outline := 'Test No.'; + for j := 1 to NoVars do + outline := outline + format('%7s',[rowlabels[j]]); + OutPutFrm.RichEdit.Lines.Add(outline); + for j := 1 to NoVars do + begin + outline := format('%8s',[rowlabels[j]]); + for k := 1 to NoVars do + begin + outline := outline + format('%7.3f',[Rmat[j,k]]); + end; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := 'Means '; + for j := 1 to NoVars do outline := outline + format('%7.2f',[means[j]]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := 'Std.Devs'; + for j := 1 to NoVars do outline := outline + format('%7.2f',[stddevs[j]]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + for i := 1 to NoVars do + for j := 1 to NoVars do + RelMat[i,j] := Rmat[i,j]; + for i := 1 to NoVars do + begin + response := InputBox('No. of items in Test ' + IntToStr(i),'Number:','0'); + nitems := StrToInt(response); + Reliabilities[i] := (nitems / (nitems-1) * + (1.0 - (means[i] * (nitems - means[i]))/(nitems * variances[i]))); + RelMat[i,i] := Reliabilities[i]; + cellstring := 'Weight for Test ' + IntToStr(i); + response := InputBox(cellstring,'Weight:','1'); + Weights[i] := StrToFloat(response); + end; + // get numerator and denominator of composite reliability + for i := 1 to NoVars do VectProd[i] := 0.0; + numerator := 0.0; + denominator := 0.0; + for i := 1 to NoVars do + for j := 1 to NoVars do + VectProd[i] := VectProd[i] + (Weights[i] * RelMat[j,i]); + for i := 1 to NoVars do numerator := numerator + (VectProd[i] * Weights[i]); + + for i := 1 to NoVars do VectProd[i] := 0.0; + for i := 1 to NoVars do + for j := 1 to NoVars do + VectProd[i] := VectProd[i] + (Weights[i] * Rmat[j,i]); + for i := 1 to NoVars do denominator := denominator + + (VectProd[i] * Weights[i]); + CompRel := numerator / denominator; + OutPutFrm.RichEdit.Lines.Add(''); + outline := 'Test No. Weight Reliability'; + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 1 to NoVars do + begin + outline := format(' %3d %6.2f %6.2f',[i,Weights[i],Reliabilities[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := format('Composite reliability = %6.3f',[CompRel]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + response := InputBox('COMPOSITE','Save the composit score?','Yes'); + if response = 'Yes' then + begin + col := 53; + for i := 1 to NoStudents do + begin + X := 0.0; + for j := 1 to NoVars do + X := X + (DataMat[i,j] * Weights[j]); + Grid.Cells[col,i] := FloatToStr(X); + end; + end; +end; + +procedure TGradebookFrm.ClassRptMnuClick(Sender: TObject); +VAR + i, j, pos : integer; + outline : string; + valstr : string; + raw, z, t, p : double; + +begin + // confirm no. of students + NoStudents := 0; + for i := 1 to 40 do + begin + if Grid.Cells[0,i] <> '' then NoStudents := NoStudents + 1; + end; + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Class Report'); + for i := 1 to NoStudents do + begin + outline := Grid.Cells[1,i] + ' '; + if Grid.Cells[2,i] <> '' then outline := outline + Grid.Cells[2,i] + ' '; + outline := outline + Grid.Cells[0,i]; + outline := 'Report for: ' + outline; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('TEST RAW Z T PERCENTILE GRADE'); + OutPutFrm.RichEdit.Lines.Add(' NO. SCORE SCORE SCORE RANK'); + for j := 0 to 10 do + begin + pos := j * 5 + 3; + valstr := format('%3d ',[j+1]); + outline := valstr; + if Grid.Cells[pos,i] <> '' then + begin + raw := StrToFloat(Grid.Cells[pos,i]); + z := StrToFloat(Grid.Cells[pos+1,i]); + t := strToFloat(Grid.Cells[pos+2,i]); + p := StrToFloat(Grid.Cells[pos+3,i]); + valstr := format('%10.0f',[raw]); + outline := outline + valstr; + valstr := format('%9.3f %9.3f %9.3f %3s',[z, t, p, Grid.Cells[pos+4,i]]); + outline := outline + valstr; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + end; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(''); + end; + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; +end; + +procedure TGradebookFrm.FormCreate(Sender: TObject); +begin + FileListBox1.Directory := DirectoryEdit1.Directory; +end; + +procedure TGradebookFrm.FormShow(Sender: TObject); +begin + Grid.ColWidths[0] := 100; + Grid.Cells[0,0] := 'Last Name'; + Grid.ColWidths[1] := 100; + Grid.Cells[1,0] := 'First Name'; + Grid.ColWidths[2] := 40; + Grid.Cells[2,0] := 'M.I.'; + Grid.ColWidths[3] := 60; + Grid.Cells[3,0] := 'Test 1 Raw'; + Grid.ColWidths[4] := 50; + Grid.Cells[4,0] := 'Test 1 z'; + Grid.ColWidths[5] := 50; + Grid.Cells[5,0] := 'Test 1 T'; + Grid.ColWidths[6] := 55; + Grid.Cells[6,0] := '%ile Rank'; + Grid.ColWidths[7] := 50; + Grid.Cells[7,0] := 'Grade 1'; + Grid.ColWidths[8] := 60; + Grid.Cells[8,0] := 'Test 2 Raw'; + Grid.ColWidths[9] := 50; + Grid.Cells[9,0] := 'Test 2 z'; + Grid.ColWidths[10] := 50; + Grid.Cells[10,0] := 'Test 2 T'; + Grid.ColWidths[11] := 55; + Grid.Cells[11,0] := '%ile Rank'; + Grid.ColWidths[12] := 50; + Grid.Cells[12,0] := 'Grade 2'; + Grid.ColWidths[13] := 60; + Grid.Cells[13,0] := 'Test 3 Raw'; + Grid.ColWidths[14] := 50; + Grid.Cells[14,0] := 'Test 3 z'; + Grid.ColWidths[15] := 50; + Grid.Cells[15,0] := 'Test 3 T'; + Grid.ColWidths[16] := 55; + Grid.Cells[16,0] := '%ile Rank'; + Grid.ColWidths[17] := 50; + Grid.Cells[17,0] := 'Grade 3'; + Grid.ColWidths[18] := 60; + Grid.Cells[18,0] := 'Test 4 Raw'; + Grid.ColWidths[19] := 50; + Grid.Cells[19,0] := 'Test 4 z'; + Grid.ColWidths[20] := 50; + Grid.Cells[20,0] := 'Test 4 T'; + Grid.ColWidths[21] := 55; + Grid.Cells[21,0] := '%ile Rank'; + Grid.ColWidths[22] := 50; + Grid.Cells[22,0] := 'Grade 4'; + Grid.ColWidths[23] := 60; + Grid.Cells[23,0] := 'Test 5 Raw'; + Grid.ColWidths[24] := 50; + Grid.Cells[24,0] := 'Test 5 z'; + Grid.ColWidths[25] := 50; + Grid.Cells[25,0] := 'Test 5 T'; + Grid.ColWidths[26] := 55; + Grid.Cells[26,0] := '%ile Rank'; + Grid.ColWidths[27] := 50; + Grid.Cells[27,0] := 'Grade 5'; + Grid.ColWidths[28] := 60; + Grid.Cells[28,0] := 'Test 6 Raw'; + Grid.ColWidths[29] := 50; + Grid.Cells[29,0] := 'Test 6 z'; + Grid.ColWidths[30] := 50; + Grid.Cells[30,0] := 'Test 6 T'; + Grid.ColWidths[31] := 55; + Grid.Cells[31,0] := '%ile Rank'; + Grid.ColWidths[32] := 50; + Grid.Cells[32,0] := 'Grade 6'; + Grid.ColWidths[33] := 60; + Grid.Cells[33,0] := 'Test 7 Raw'; + Grid.ColWidths[34] := 50; + Grid.Cells[34,0] := 'Test 7 z'; + Grid.ColWidths[35] := 50; + Grid.Cells[35,0] := 'Test 7 T'; + Grid.ColWidths[36] := 55; + Grid.Cells[36,0] := '%ile Rank'; + Grid.ColWidths[37] := 50; + Grid.Cells[37,0] := 'Grade 7'; + Grid.ColWidths[38] := 60; + Grid.Cells[38,0] := 'Test 8 Raw'; + Grid.ColWidths[39] := 50; + Grid.Cells[39,0] := 'Test 8 z'; + Grid.ColWidths[40] := 50; + Grid.Cells[40,0] := 'Test 8 T'; + Grid.ColWidths[41] := 55; + Grid.Cells[41,0] := '%ile Rank'; + Grid.ColWidths[42] := 50; + Grid.Cells[42,0] := 'Grade 8'; + Grid.ColWidths[43] := 60; + Grid.Cells[43,0] := 'Test 9 Raw'; + Grid.ColWidths[44] := 50; + Grid.Cells[44,0] := 'Test 9 z'; + Grid.ColWidths[45] := 50; + Grid.Cells[45,0] := 'Test 9 T'; + Grid.ColWidths[46] := 55; + Grid.Cells[46,0] := '%ile Rank'; + Grid.ColWidths[47] := 50; + Grid.Cells[47,0] := 'Grade 9'; + Grid.ColWidths[48] := 60; + Grid.Cells[48,0] := 'Test 10 Raw'; + Grid.ColWidths[49] := 50; + Grid.Cells[49,0] := 'Test 10 z'; + Grid.ColWidths[50] := 50; + Grid.Cells[50,0] := 'Test 10 T'; + Grid.ColWidths[51] := 55; + Grid.Cells[51,0] := '%ile Rank'; + Grid.ColWidths[52] := 50; + Grid.Cells[52,0] := 'Grade 10'; + Grid.ColWidths[53] := 60; + Grid.Cells[53,0] := 'Total Raw'; + Grid.ColWidths[54] := 50; + Grid.Cells[54,0] := 'Total z'; + Grid.ColWidths[55] := 50; + Grid.Cells[55,0] := 'Total T'; + Grid.ColWidths[56] := 55; + Grid.Cells[56,0] := '%ile Rank'; + Grid.ColWidths[57] := 60; + Grid.Cells[57,0] := 'Final Grade'; +end; + +procedure TGradebookFrm.GridExit(Sender: TObject); +begin + GridCol := Grid.Col; + GridRow := Grid.Row; + if (Grid.Cells[GridCol,GridRow] = ' ') then exit else + begin + NoStudents := GridRow; + if GridCol > 3 then + begin + GridCol := GridCol - 3; + if (GridCol >= 1) and (GridCol <= 5) then + begin + TestNo := 1; + exit; + end; + if (GridCol >= 6) and (GridCol <= 10) then + begin + TestNo := 2; + exit; + end; + if (GridCol >= 11) and (GridCol <= 15) then + begin + TestNo := 3; + exit; + end; + if (GridCol >= 16) and (GridCol <= 20) then + begin + TestNo := 4; + exit; + end; + if (GridCol >= 21) and (GridCol <= 25) then + begin + TestNo := 5; + exit; + end; + if (GridCol >= 26) and (GridCol <= 30) then + begin + TestNo := 6; + exit; + end; + if (GridCol >= 31) and (GridCol <= 35) then + begin + TestNo := 7; + exit; + end; + if (GridCol >= 36) and (GridCol <= 40) then + begin + TestNo := 8; + exit; + end; + if (GridCol >= 41) and (GridCol <= 45) then + begin + TestNo := 9; + exit; + end; + if (GridCol >= 46) and (GridCol <= 50) then + begin + TestNo := 10; + exit; + end; + if (GridCol >= 51) and (GridCol <= 55) then + begin + TestNo := 11; + exit; + end; + end; + end; + if TestNo > NoTests then NoTests := TestNo; +end; + +procedure TGradebookFrm.NewGBMnuClick(Sender: TObject); +VAR + i, j : integer; +begin + for i := 1 to 40 do + begin + for j := 0 to 57 do Grid.Cells[j,i] := ''; + end; + GradebookFrm.FileNameEdit.text := ''; +end; + +procedure TGradebookFrm.OpenGBMnuClick(Sender: TObject); +var + FName : string; + Book : textfile; + row : integer; + i, j, k : integer; + cellstr : string; +begin + OpenDialog1.DefaultExt := '.GBK'; + OpenDialog1.Filter := 'ALL (*.*)|*.*|Grade Book (*.GBK)|*.GBK'; + OpenDialog1.FilterIndex := 2; + if OpenDialog1.Execute then + begin + FName := OpenDialog1.FileName; + GradebookFrm.FileNameEdit.text := FName; + AssignFile(Book,FName); + Reset(Book); + readln(Book,NoStudents); + for i := 1 to 40 do + begin + for j := 0 to 57 do + begin + readln(Book,cellstr); + Grid.Cells[j,i] := cellstr; + end; + end; + CloseFile(Book); + end; +end; + +procedure TGradebookFrm.RadioGroup1Click(Sender: TObject); +begin + if RadioGroup1.ItemIndex = 1 then Grid.FixedCols := 0 else Grid.FixedCols := 3; +end; + +procedure TGradebookFrm.SaveGBMnuClick(Sender: TObject); +var + FName : string; + Book : textfile; + row : integer; + i, j, k : integer; + cellstr : string; +begin + // confirm no. of students + NoStudents := 0; + for i := 1 to 40 do + begin + if Grid.Cells[0,i] <> '' then NoStudents := NoStudents + 1; + end; + SaveDialog1.DefaultExt := '.GBK'; + SaveDialog1.Filter := 'ALL (*.*)|*.*|Grade Book (*.GBK)|*.GBK'; + SaveDialog1.FilterIndex := 2; + if SaveDialog1.Execute then + begin +// GetNoRecords; + FName := SaveDialog1.FileName; + AssignFile(Book,FName); + Rewrite(Book); + writeln(Book,NoStudents); + for i := 1 to 40 do + begin + for j := 0 to 57 do + begin + cellstr := Grid.Cells[j,i]; + writeln(Book,cellstr); + end; + end; + CloseFile(Book); + end; + GradebookFrm.FileNameEdit.text := ''; +end; + +procedure TGradebookFrm.StudRptsMnuClick(Sender: TObject); +VAR + i, j, pos : integer; + outline : string; + valstr : string; + raw, z, t, p : double; +begin + // confirm no. of students + NoStudents := 0; + for i := 1 to 40 do + begin + if Grid.Cells[0,i] <> '' then NoStudents := NoStudents + 1; + end; + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Individual Student Report'); + for i := 1 to NoStudents do + begin + outline := Grid.Cells[1,i] + ' '; + if Grid.Cells[2,i] <> '' then outline := outline + Grid.Cells[2,i] + ' '; + outline := outline + Grid.Cells[0,i]; + outline := 'Report for: ' + outline; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('TEST RAW Z T PERCENTILE GRADE'); + OutPutFrm.RichEdit.Lines.Add(' NO. SCORE SCORE SCORE RANK'); + for j := 0 to 10 do + begin + pos := j * 5 + 3; + valstr := format('%3d ',[j+1]); + outline := valstr; + if Grid.Cells[pos,i] <> '' then + begin + raw := StrToFloat(Grid.Cells[pos,i]); + z := StrToFloat(Grid.Cells[pos+1,i]); + t := strToFloat(Grid.Cells[pos+2,i]); + p := StrToFloat(Grid.Cells[pos+3,i]); + valstr := format('%10.0f',[raw]); + outline := outline + valstr; + valstr := format('%9.3f %9.3f %9.3f %3s',[z, t, p, Grid.Cells[pos+4,i]]); + outline := outline + valstr; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + end; + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; +end; + +procedure TGradebookFrm.TestAnalMnuClick(Sender: TObject); +label again; +VAR + i, j, k, col : integer; + X, mean, variance, stddev, Xtemp : double; + z, t, pcntile : double; + response : string; + grades : array [0..40] of string; + cumfreq : array[0..50] of double; + cumfreqmid : array[0..50] of double; + pcnt : array[0..50] of double; + cumpcnt : array[0..50] of double; + ncnt : integer; + outline : string; + KR21 : double; + minf, maxf : double; + +begin + response := InputBox('Which test (number)','TEST:','0'); + if StrToInt(response) = 0 then + begin + ShowMessage('You must select a test no. between 1 and 11'); + exit; + end; + tno := StrToInt(response); + tno := tno * 5 - 5; + col := tno + 3; // column of raw scores for test number tno + // get no. of students + NoStudents := 0; + for i := 1 to 40 do + begin + if Grid.Cells[col,i] = '' then continue else NoStudents := NoStudents + 1; + end; + SetLength(sortedraw,41); + SetLength(pcntiles,41,41); + SetLength(tscores,41); + SetLength(zscores,41); + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Test Analysis Results'); + mean := 0.0; + variance := 0.0; + for i := 1 to NoStudents do + begin + X := StrToFloat(Grid.Cells[col,i]); + sortedraw[i-1] := X; + mean := mean + X; + variance := variance + (X * X); + end; + variance := variance - (mean * mean / NoStudents); + Variance := Variance / (NoStudents - 1.0); + stddev := sqrt(variance); + mean := mean / NoStudents; + outline := format('Mean = %8.2f, Variance = %8.3f, Std.Dev. = %8.3f', + [mean,variance,stddev]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + response := InputBox('No. of Test Items or maximum score possible','Number:','0'); + nitems := StrToInt(response); + if nitems = 0 then + begin + ShowMessage('Enter the maximum score or no. of items!'); + exit; + end; + KR21 := (nitems / (nitems-1) * + (1.0 - (mean * (nitems - mean))/(nitems * variance))); + outline := format('Kuder-Richardson Formula 21 Reliability Estimate = %6.4f',[KR21]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + // get z scores and T scores + for i := 1 to NoStudents do + begin + z := (sortedraw[i-1] - mean) / stddev; + outline := format('%5.3f',[z]); + Grid.Cells[col+1,i] := outline; + t := z * 10 + 50; + outline := format('%5.1f',[t]); + Grid.Cells[col+2,i] := outline; + end; + // sort raw scores in ascending order + for i := 1 to NoStudents-1 do + begin + for j := i + 1 to NoStudents do + begin + if sortedraw[i-1] > sortedraw[j-1] then // switch + begin + Xtemp := sortedraw[i-1]; + sortedraw[i-1] := sortedraw[j-1]; + sortedraw[j-1] := Xtemp; + end; + end; + end; + // get percentile rank + ncnt := NoStudents; + nints := 1; + for i := 1 to ncnt do freq[i-1] := 0; + X := sortedraw[0]; + Scores[0] := X; + for i := 1 to ncnt do + begin + if (X = sortedraw[i-1])then freq[nints-1] := freq[nints-1] + 1 + else // new value + begin + nints := nints + 1; + freq[nints-1] := freq[nints-1] + 1; + X := sortedraw[i-1]; + Scores[nints-1] := X; + end; + end; + // get min and max frequencies + minf := NoStudents; + maxf := 0; + for i := 0 to nints - 1 do + begin + if freq[i] > maxf then maxf := freq[i]; + if freq[i] < minf then minf := freq[i]; + end; + // now get cumulative frequencies + cumfreq[0] := freq[0]; + for i := 1 to nints-1 do cumfreq[i] := freq[i] + cumfreq[i-1]; + + // get cumulative frequences to midpoints and percentile ranks + cumfreqmid[0] := freq[0] / 2.0; + pcntilerank[0] := (cumfreq[0] / 2.0) / ncnt; + for i := 1 to nints-1 do + begin + cumfreqmid[i] := (freq[i] / 2.0) + cumfreq[i-1]; + pcntilerank[i] := cumfreqmid[i] / ncnt; + end; + + OutPutFrm.RichEdit.Lines.Add('PERCENTILE RANKS'); + OutPutFrm.RichEdit.Lines.Add('Score Value Frequency Cum.Freq. Percentile Rank'); + OutPutFrm.RichEdit.Lines.Add('___________ __________ __________ ______________'); + for i := 1 to nints do + begin + outline := format(' %8.3f %6.2f %6.2f %6.2f', + [Scores[i-1], freq[i-1],cumfreq[i-1],pcntilerank[i-1]*100.0]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.RichEdit.Lines.Add(''); + + // get grades + gradingfrm.ShowModal; + + // Now place results in testgrid + for i := 1 to ncnt do + begin + X := StrToFloat(Grid.Cells[col,i]); + for j := 0 to nints do + begin + if X = scores[j] then + Gradebookfrm.Grid.Cells[col+3,i] := format('%5.2f',[pcntilerank[j]*100.0]); + end; + end; + OutPutFrm.ShowModal; + + // graph raw scores + if maxf = minf then exit; + GraphFrm.Heading := 'Frequency of Raw Scores'; + GraphFrm.XTitle := 'Category'; + GraphFrm.YTitle := 'Frequency'; + SetLength(GraphFrm.Ypoints,1,nints); + SetLength(GraphFrm.Xpoints,1,nints); + for k := 1 to nints do + begin +// GraphFrm.PointLabels[k-1] := GradingSpecs[p].GridData[k,1]; + GraphFrm.Ypoints[0,k-1] := freq[k]; + GraphFrm.Xpoints[0,k-1] := Scores[k]; +// GraphFrm.Ypoints[0,k-1] := freq[k]; +// GraphFrm.Xpoints[0,k-1] := k; + end; + // enter parameters for 2 dimension bars in graph package + GraphFrm.barwideprop := 0.5; + GraphFrm.nosets := 1; + GraphFrm.miny := minf; + GraphFrm.maxy := maxf; + GraphFrm.nbars := nints-1; + GraphFrm.GraphType := 2; // 3d bars + GraphFrm.AutoScale := false; // use min and max + GraphFrm.ShowLeftWall := true; + GraphFrm.ShowRightWall := true; + GraphFrm.ShowBottomWall := true; + GraphFrm.ShowBackWall := true; + GraphFrm.BackColor := clYellow; + GraphFrm.WallColor := clBlack; + GraphFrm.PtLabels := true; + GraphFrm.ShowModal; + + GraphFrm.Ypoints := nil; + GraphFrm.Xpoints := nil; + +// cleanup + sortedraw := nil; +// grades := nil; + zscores := nil; + tscores := nil; + pcntiles := nil; +end; + + +initialization + {$I gradebookunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/gradingunit.lfm b/applications/lazstats/source_orig/gradingunit.lfm new file mode 100644 index 000000000..937fe7aef --- /dev/null +++ b/applications/lazstats/source_orig/gradingunit.lfm @@ -0,0 +1,241 @@ +object gradingfrm: Tgradingfrm + Left = 102 + Height = 494 + Top = 109 + Width = 706 + Caption = 'Specification for Grades' + ClientHeight = 494 + ClientWidth = 706 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 16 + Height = 14 + Top = 122 + Width = 28 + Caption = 'Score' + ParentColor = False + end + object Label2: TLabel + Left = 80 + Height = 14 + Top = 122 + Width = 52 + Caption = 'Frequency' + ParentColor = False + end + object Label3: TLabel + Left = 160 + Height = 14 + Top = 122 + Width = 60 + Caption = 'Grade Given' + ParentColor = False + end + object TopScoreLabel: TLabel + Left = 344 + Height = 14 + Top = 122 + Width = 49 + Caption = 'Top Score' + ParentColor = False + end + object DownThroughLabel: TLabel + Left = 432 + Height = 14 + Top = 122 + Width = 71 + Caption = 'Down Through' + ParentColor = False + end + object Label4: TLabel + Left = 520 + Height = 14 + Top = 122 + Width = 64 + Caption = 'No. Assigned' + ParentColor = False + end + object Label5: TLabel + Left = 256 + Height = 14 + Top = 122 + Width = 35 + Caption = 'Grades' + ParentColor = False + end + object DistUseGroup: TRadioGroup + Left = 8 + Height = 111 + Top = 3 + Width = 212 + AutoFill = True + Caption = 'To Assign Grades Use:' + 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 = 93 + ClientWidth = 208 + Items.Strings = ( + 'Raw Test Scores' + 'z Scores' + 'T Scores' + 'Percentile Rank Scores' + ) + OnClick = DistUseGroupClick + TabOrder = 0 + end + object CategoriesGroup: TRadioGroup + Left = 233 + Height = 112 + Top = 2 + Width = 279 + AutoFill = True + Caption = 'Use the following Grade Categories:' + 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 = 94 + ClientWidth = 275 + Items.Strings = ( + 'A, B, C, D, F' + 'A, A-, B+, B, B-, C+, C, C-, D+, D, D-, F' + ) + OnClick = CategoriesGroupClick + TabOrder = 1 + end + object ScoresGrid: TStringGrid + Left = 8 + Height = 294 + Top = 137 + Width = 136 + ColCount = 2 + FixedCols = 0 + FixedRows = 0 + TabOrder = 2 + end + object GradesGrid: TStringGrid + Left = 159 + Height = 294 + Top = 137 + Width = 74 + ColCount = 1 + FixedCols = 0 + FixedRows = 0 + TabOrder = 3 + end + object TopScoreGrid: TStringGrid + Left = 344 + Height = 298 + Top = 138 + Width = 71 + ColCount = 1 + FixedCols = 0 + FixedRows = 0 + TabOrder = 4 + end + object LowScoreGrid: TStringGrid + Left = 432 + Height = 298 + Top = 138 + Width = 67 + ColCount = 1 + FixedCols = 0 + FixedRows = 0 + Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll] + TabOrder = 5 + OnKeyDown = LowScoreGridKeyDown + end + object SaveBtn: TButton + Left = 608 + Height = 32 + Top = 122 + Width = 77 + Caption = 'Save Specs.' + OnClick = SaveBtnClick + TabOrder = 6 + end + object LoadBtn: TButton + Left = 608 + Height = 32 + Top = 176 + Width = 77 + Caption = 'Load Specs.' + OnClick = LoadBtnClick + TabOrder = 7 + end + object ResetBtn: TButton + Left = 608 + Height = 32 + Top = 232 + Width = 77 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 8 + end + object Cancelbtn: TButton + Left = 608 + Height = 32 + Top = 288 + Width = 77 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 9 + end + object ReturnBtn: TButton + Left = 608 + Height = 32 + Top = 399 + Width = 77 + Caption = 'Return' + ModalResult = 1 + TabOrder = 10 + end + object AssignedGrid: TStringGrid + Left = 520 + Height = 299 + Top = 138 + Width = 68 + ColCount = 1 + FixedCols = 0 + FixedRows = 0 + TabOrder = 11 + end + object Grades: TStringGrid + Left = 256 + Height = 296 + Top = 138 + Width = 72 + ColCount = 1 + FixedCols = 0 + FixedRows = 0 + TabOrder = 12 + end + object ComputeBtn: TButton + Left = 608 + Height = 29 + Top = 344 + Width = 77 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 13 + end + object OpenDialog1: TOpenDialog + left = 552 + top = 448 + end + object SaveDialog1: TSaveDialog + left = 640 + top = 448 + end +end diff --git a/applications/lazstats/source_orig/gradingunit.lrs b/applications/lazstats/source_orig/gradingunit.lrs new file mode 100644 index 000000000..549c2ff22 --- /dev/null +++ b/applications/lazstats/source_orig/gradingunit.lrs @@ -0,0 +1,68 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('Tgradingfrm','FORMDATA',[ + 'TPF0'#11'Tgradingfrm'#10'gradingfrm'#4'Left'#2'f'#6'Height'#3#238#1#3'Top'#2 + +'m'#5'Width'#3#194#2#7'Caption'#6#24'Specification for Grades'#12'ClientHeig' + +'ht'#3#238#1#11'ClientWidth'#3#194#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6 + +#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#16#6'Height'#2#14#3'Top'#2'z'#5 + +'Width'#2#28#7'Caption'#6#5'Score'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2' + +#4'Left'#2'P'#6'Height'#2#14#3'Top'#2'z'#5'Width'#2'4'#7'Caption'#6#9'Freque' + +'ncy'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#160#0#6'Height'#2 + +#14#3'Top'#2'z'#5'Width'#2'<'#7'Caption'#6#11'Grade Given'#11'ParentColor'#8 + +#0#0#6'TLabel'#13'TopScoreLabel'#4'Left'#3'X'#1#6'Height'#2#14#3'Top'#2'z'#5 + +'Width'#2'1'#7'Caption'#6#9'Top Score'#11'ParentColor'#8#0#0#6'TLabel'#16'Do' + +'wnThroughLabel'#4'Left'#3#176#1#6'Height'#2#14#3'Top'#2'z'#5'Width'#2'G'#7 + +'Caption'#6#12'Down Through'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Lef' + +'t'#3#8#2#6'Height'#2#14#3'Top'#2'z'#5'Width'#2'@'#7'Caption'#6#12'No. Assig' + +'ned'#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#3#0#1#6'Height'#2#14 + +#3'Top'#2'z'#5'Width'#2'#'#7'Caption'#6#6'Grades'#11'ParentColor'#8#0#0#11'T' + +'RadioGroup'#12'DistUseGroup'#4'Left'#2#8#6'Height'#2'o'#3'Top'#2#3#5'Width' + +#3#212#0#8'AutoFill'#9#7'Caption'#6#21'To Assign Grades Use:'#28'ChildSizing' + +'.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.' + +'EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVer' + +'tical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14 + +'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'Chil' + +'dSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Controls' + +'PerLine'#2#1#12'ClientHeight'#2']'#11'ClientWidth'#3#208#0#13'Items.Strings' + +#1#6#15'Raw Test Scores'#6#8'z Scores'#6#8'T Scores'#6#22'Percentile Rank Sc' + +'ores'#0#7'OnClick'#7#17'DistUseGroupClick'#8'TabOrder'#2#0#0#0#11'TRadioGro' + +'up'#15'CategoriesGroup'#4'Left'#3#233#0#6'Height'#2'p'#3'Top'#2#2#5'Width'#3 + +#23#1#8'AutoFill'#9#7'Caption'#6'#Use the following Grade Categories:'#28'Ch' + +'ildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'Chi' + +'ldSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.E' + +'nlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizon' + +'tal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChild' + +'s'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizin' + +'g.ControlsPerLine'#2#1#12'ClientHeight'#2'^'#11'ClientWidth'#3#19#1#13'Item' + +'s.Strings'#1#6#13'A, B, C, D, F'#6')A, A-, B+, B, B-, C+, C, C-, D+, D, D-,' + +' F'#0#7'OnClick'#7#20'CategoriesGroupClick'#8'TabOrder'#2#1#0#0#11'TStringG' + +'rid'#10'ScoresGrid'#4'Left'#2#8#6'Height'#3'&'#1#3'Top'#3#137#0#5'Width'#3 + +#136#0#8'ColCount'#2#2#9'FixedCols'#2#0#9'FixedRows'#2#0#8'TabOrder'#2#2#0#0 + +#11'TStringGrid'#10'GradesGrid'#4'Left'#3#159#0#6'Height'#3'&'#1#3'Top'#3#137 + +#0#5'Width'#2'J'#8'ColCount'#2#1#9'FixedCols'#2#0#9'FixedRows'#2#0#8'TabOrde' + +'r'#2#3#0#0#11'TStringGrid'#12'TopScoreGrid'#4'Left'#3'X'#1#6'Height'#3'*'#1 + +#3'Top'#3#138#0#5'Width'#2'G'#8'ColCount'#2#1#9'FixedCols'#2#0#9'FixedRows'#2 + +#0#8'TabOrder'#2#4#0#0#11'TStringGrid'#12'LowScoreGrid'#4'Left'#3#176#1#6'He' + +'ight'#3'*'#1#3'Top'#3#138#0#5'Width'#2'C'#8'ColCount'#2#1#9'FixedCols'#2#0#9 + +'FixedRows'#2#0#7'Options'#11#15'goFixedVertLine'#15'goFixedHorzLine'#10'goV' + +'ertLine'#10'goHorzLine'#13'goRangeSelect'#9'goEditing'#14'goSmoothScroll'#0 + +#8'TabOrder'#2#5#9'OnKeyDown'#7#19'LowScoreGridKeyDown'#0#0#7'TButton'#7'Sav' + +'eBtn'#4'Left'#3'`'#2#6'Height'#2' '#3'Top'#2'z'#5'Width'#2'M'#7'Caption'#6 + +#11'Save Specs.'#7'OnClick'#7#12'SaveBtnClick'#8'TabOrder'#2#6#0#0#7'TButton' + +#7'LoadBtn'#4'Left'#3'`'#2#6'Height'#2' '#3'Top'#3#176#0#5'Width'#2'M'#7'Cap' + +'tion'#6#11'Load Specs.'#7'OnClick'#7#12'LoadBtnClick'#8'TabOrder'#2#7#0#0#7 + +'TButton'#8'ResetBtn'#4'Left'#3'`'#2#6'Height'#2' '#3'Top'#3#232#0#5'Width'#2 + +'M'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#8#0#0 + +#7'TButton'#9'Cancelbtn'#4'Left'#3'`'#2#6'Height'#2' '#3'Top'#3' '#1#5'Width' + +#2'M'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#9#0#0#7'TButt' + +'on'#9'ReturnBtn'#4'Left'#3'`'#2#6'Height'#2' '#3'Top'#3#143#1#5'Width'#2'M' + +#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#10#0#0#11'TStringG' + +'rid'#12'AssignedGrid'#4'Left'#3#8#2#6'Height'#3'+'#1#3'Top'#3#138#0#5'Width' + +#2'D'#8'ColCount'#2#1#9'FixedCols'#2#0#9'FixedRows'#2#0#8'TabOrder'#2#11#0#0 + +#11'TStringGrid'#6'Grades'#4'Left'#3#0#1#6'Height'#3'('#1#3'Top'#3#138#0#5'W' + +'idth'#2'H'#8'ColCount'#2#1#9'FixedCols'#2#0#9'FixedRows'#2#0#8'TabOrder'#2 + +#12#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3'`'#2#6'Height'#2#29#3'Top'#3'X'#1 + +#5'Width'#2'M'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'Ta' + +'bOrder'#2#13#0#0#11'TOpenDialog'#11'OpenDialog1'#4'left'#3'('#2#3'top'#3#192 + +#1#0#0#11'TSaveDialog'#11'SaveDialog1'#4'left'#3#128#2#3'top'#3#192#1#0#0#0 +]); diff --git a/applications/lazstats/source_orig/gradingunit.pas b/applications/lazstats/source_orig/gradingunit.pas new file mode 100644 index 000000000..64b40cac7 --- /dev/null +++ b/applications/lazstats/source_orig/gradingunit.pas @@ -0,0 +1,404 @@ +unit gradingunit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + ExtCtrls, StdCtrls, Grids, outputunit; + +type + + { Tgradingfrm } + + Tgradingfrm = class(TForm) + ComputeBtn: TButton; + Label4: TLabel; + AssignedGrid: TStringGrid; + Label5: TLabel; + Grades: TStringGrid; + OpenDialog1: TOpenDialog; + SaveBtn: TButton; + LoadBtn: TButton; + ResetBtn: TButton; + Cancelbtn: TButton; + ReturnBtn: TButton; + DistUseGroup: TRadioGroup; + CategoriesGroup: TRadioGroup; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + DownThroughLabel: TLabel; + SaveDialog1: TSaveDialog; + ScoresGrid: TStringGrid; + GradesGrid: TStringGrid; + TopScoreGrid: TStringGrid; + LowScoreGrid: TStringGrid; + TopScoreLabel: TLabel; + procedure CategoriesGroupClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure DistUseGroupClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure LoadBtnClick(Sender: TObject); + procedure LowScoreGridExit(Sender: TObject); + procedure LowScoreGridKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure ResetBtnClick(Sender: TObject); + procedure SaveBtnClick(Sender: TObject); + private + { private declarations } + nints : integer; + ncases : integer; + col : integer; + ncats : integer; + sorted : array[0..50] of double; + public + { public declarations } + end; + +var + gradingfrm: Tgradingfrm; + +implementation +uses gradebookunit; + +{ Tgradingfrm } + +procedure Tgradingfrm.DistUseGroupClick(Sender: TObject); +VAR + i, j, btn, nscores : integer; + RawScores : array[0..50] of double; + RawFreq : array[0..50] of double; + temp, X, Y : double; +begin + if DistUseGroup.ItemIndex < 0 then exit; + col := gradebookfrm.tno + 3; // column of raw scores for test number tno + btn := DistUseGroup.ItemIndex; + nscores := gradebookfrm.nints; + ScoresGrid.RowCount := nscores; + ncases := gradebookfrm.NoStudents; + case btn of + 0 : TopScoreGrid.Cells[0,0] := IntToStr(gradebookfrm.nitems); + 1 : TopScoreGrid.Cells[0,0] := FloatToStr(3.0); + 2 : TopScoreGrid.Cells[0,0] := FloatToStr(90.0); + 3 : TopScoreGrid.Cells[0,0] := FloatToStr(100.0); + end; + + case btn of + 0 : for i := 1 to ncases do RawScores[i-1] := StrToFloat(gradebookfrm.Grid.Cells[col,i]); + 1 : for i := 1 to ncases do RawScores[i-1] := StrToFloat(gradebookfrm.Grid.Cells[col+1,i]); + 2 : for i := 1 to ncases do RawScores[i-1] := StrToFloat(gradebookfrm.Grid.Cells[col+2,i]); + 3 : for i := 1 to ncases do RawScores[i-1] := StrToFloat(gradebookfrm.Grid.Cells[col+3,i]); + end; + + // sort RawScores into ascending order + for i := 1 to ncases - 1 do + begin + for j := i+1 to ncases do + begin + X := RawScores[i-1]; + Y := RawScores[j-1]; + if RawScores[i-1] < RawScores[j-1] then // switch + begin + temp := RawScores[i-1]; + RawScores[i-1] := RawScores[j-1]; + RawScores[j-1] := temp; + end; + end; + end; + + // get frequency of each score + nints := 1; + for i := 1 to ncases do RawFreq[i-1] := 0; + X := RawScores[0]; + Sorted[0] := X; + for i := 1 to ncases do + begin + if (X = RawScores[i-1])then RawFreq[nints-1] := RawFreq[nints-1] + 1 + else // new value + begin + nints := nints + 1; + RawFreq[nints-1] := RawFreq[nints-1] + 1; + X := RawScores[i-1]; + Sorted[nints-1] := X; + end; + end; + + // put data in grid +// AssignedGrid.RowCount := nints + 1; + ScoresGrid.RowCount := nints+1; + GradesGrid.RowCount := nints + 1; + for i := 0 to nints-1 do + begin + ScoresGrid.Cells[0,i] := FloatToStr(Sorted[i]); + ScoresGrid.Cells[1,i] := FloatToStr(RawFreq[i]); + end; +end; + +procedure Tgradingfrm.FormShow(Sender: TObject); +VAR + i, j : integer; +begin + DistUseGroup.ItemIndex := -1; + CategoriesGroup.ItemIndex := -1; + for i := 0 to ScoresGrid.RowCount-1 do + for j := 0 to 1 do ScoresGrid.Cells[j,i] := ''; + ScoresGrid.RowCount := 5; + for i := 0 to Grades.RowCount-1 do Grades.Cells[0,i] := ''; + Grades.RowCount := 5; + for i := 0 to GradesGrid.RowCount-1 do GradesGrid.Cells[0,i] := ''; + GradesGrid.RowCount := 5; + for i := 0 to TopScoreGrid.RowCount-1 do TopScoreGrid.Cells[0,i] := ''; + TopScoreGrid.RowCount := 5; + for i := 0 to LowScoreGrid.RowCount-1 do LowScoreGrid.Cells[0,i] := ''; + LowScoreGrid.RowCount := 5; + for i := 0 to AssignedGrid.RowCount-1 do AssignedGrid.Cells[0,i] := ''; + AssignedGrid.RowCount := 5; +end; + +procedure Tgradingfrm.LoadBtnClick(Sender: TObject); +var + FName : string; + Grading : textfile; + i, j, choice : integer; + cellstring, outline, valstr : string; +begin + OutPutFrm.RichEdit.Clear; + OpenDialog1.DefaultExt := '.GRD'; + OpenDialog1.Filter := 'ALL (*.*)|*.*|Test Grading (*.GRD)|*.GRD'; + OpenDialog1.FilterIndex := 2; + if OpenDialog1.Execute then + begin +// GetNoRecords; + FName := OpenDialog1.FileName; + AssignFile(Grading,FName); + Reset(Grading); + readln(Grading,ncases); + readln(Grading,nints); + readln(Grading,col); + readln(Grading,choice); + cellstring := format('Distribution used index = %2d',[choice]); + OutPutFrm.RichEdit.Lines.Add(cellstring); +// DistUseGroup.ItemIndex := choice; + readln(Grading,choice); + cellstring := format('Category index = %2d',[choice]); + OutPutFrm.RichEdit.Lines.Add(cellstring); +// CategoriesGroup.ItemIndex := choice; + readln(Grading,choice); + OutPutFrm.RichEdit.Lines.Add('Top Score Low Score'); + if choice = 0 then + begin + for i := 0 to 4 do + begin + readln(Grading,cellstring); + outline := format('%10s ',[cellstring]); +// TopScoreGrid.Cells[0,i] := cellstring; + readln(Grading,cellstring); + valstr := format('%10s',[cellstring]); + outline := outline + valstr; +// LowScoreGrid.Cells[0,i] := cellstring; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + end else + begin + for i := 0 to 11 do + begin + readln(Grading,cellstring); + outline := format('%10s',[cellstring]); +// TopScoreGrid.Cells[0,i] := cellstring; + readln(Grading,cellstring); + valstr := format('%10s',[cellstring]); + outline := outline + valstr; +// LowScoreGrid.Cells[0,i] := cellstring; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + end; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Assigned Grid'); + for i := 0 to nints-1 do + begin + readln(Grading,cellstring); + outline := cellstring; + OutPutFrm.RichEdit.Lines.Add(outline); +// AssignedGrid.Cells[0,i] := cellstring; + end; +// readln(Grading,cellstring); + OutPutFrm.RichEdit.Lines.Add('Score Frequency'); + for i := 0 to nints - 1 do + begin + outline := ''; + for j := 0 to 1 do + begin + readln(Grading,cellstring); + valstr := format('%10s ',[cellstring]); + outline := outline + valstr; +// ScoresGrid.Cells[j,i] := cellstring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + end; + OutPutFrm.ShowModal; + CloseFile(Grading); +end; + +procedure Tgradingfrm.LowScoreGridExit(Sender: TObject); + +begin + +end; + +procedure Tgradingfrm.LowScoreGridKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +VAR + i, row, naffected, freq, intervals, sum : integer; + lowval, hival, score1 : double; + +begin + if Key = 13 then // enter key + begin + intervals := ScoresGrid.RowCount-1; + row := LowScoreGrid.Row; + freq := 0; + lowval := StrToFloat(LowScoreGrid.Cells[0,row]); + hival := StrToFloat(TopScoreGrid.Cells[0,row]); + for i := 0 to intervals-1 do + begin + score1 := StrToFloat(ScoresGrid.Cells[0,i]); + if (score1 >= lowval) and (score1 <= hival) then + freq := freq + StrToInt(ScoresGrid.Cells[1,i]); + end; + AssignedGrid.Cells[0,row] := IntToStr(freq); + if row < ncats-1 then + begin + if DistUseGroup.ItemIndex = 1 then // z score + TopScoreGrid.Cells[0,row+1] := FloatToStr(lowval-0.001); + if DistUseGroup.ItemIndex = 0 then // raw score + TopScoreGrid.Cells[0,row+1] := FloatToStr(lowval-1); + if DistUseGroup.ItemIndex = 2 then // T score + TopScoreGrid.Cells[0,row+1] := FloatToStr(lowval-0.1); + if DistUseGroup.ItemIndex = 3 then // Percentile rank + TopScoreGrid.Cells[0,row+1] := FloatToStr(lowval-0.01); + end; + end; +end; + +procedure Tgradingfrm.ResetBtnClick(Sender: TObject); +begin + FormShow(self); +end; + +procedure Tgradingfrm.SaveBtnClick(Sender: TObject); +var + FName : string; + Grading : textfile; + i, j : integer; +begin + SaveDialog1.DefaultExt := '.GRD'; + SaveDialog1.Filter := 'ALL (*.*)|*.*|Test Grading (*.GRD)|*.GRD'; + SaveDialog1.FilterIndex := 2; + if SaveDialog1.Execute then + begin + FName := SaveDialog1.FileName; + AssignFile(Grading,FName); + Rewrite(Grading); + writeln(Grading,ncases); + writeln(Grading,nints); + writeln(Grading,col); + writeln(Grading,DistUseGroup.ItemIndex); + writeln(Grading,CategoriesGroup.ItemIndex); + if CategoriesGroup.ItemIndex = 0 then + begin + for i := 0 to 4 do + begin + writeln(Grading,TopScoreGrid.Cells[0,i]); + writeln(Grading,LowScoreGrid.Cells[0,i]); + end; + end else + begin + for i := 0 to 11 do + begin + writeln(Grading,TopScoreGrid.Cells[0,i]); + writeln(Grading,LowScoreGrid.Cells[0,i]); + end; + end; + for i := 0 to AssignedGrid.RowCount-1 do + writeln(Grading,AssignedGrid.Cells[0,i]); + for i := 0 to ScoresGrid.RowCount - 1 do + begin + for j := 0 to 1 do writeln(Grading,ScoresGrid.Cells[j,i]); + end; + end; + CloseFile(Grading); +end; + + +procedure Tgradingfrm.CategoriesGroupClick(Sender: TObject); +VAR + btn : integer; +begin + btn := CategoriesGroup.ItemIndex; + if btn = 0 then ncats := 5 else ncats := 12; + if btn = 0 then Grades.RowCount := 5 else Grades.RowCount := 12; + if btn = 0 then TopScoreGrid.RowCount := 5 else TopScoreGrid.RowCount := 12; + if btn = 0 then LowScoreGrid.RowCount := 5 else LowScoreGrid.RowCount := 12; + if btn = 0 then AssignedGrid.RowCount := 5 else AssignedGrid.RowCount := 12; + if btn = 0 then + begin + Grades.Cells[0,0] := 'A'; + Grades.Cells[0,1] := 'B'; + Grades.Cells[0,2] := 'C'; + Grades.Cells[0,3] := 'D'; + Grades.Cells[0,4] := 'F'; + end; + if btn = 1 then + begin + Grades.Cells[0,0] := 'A'; + Grades.Cells[0,1] := 'A-'; + Grades.Cells[0,2] := 'B+'; + Grades.Cells[0,3] := 'B'; + Grades.Cells[0,4] := 'B-'; + Grades.Cells[0,5] := 'C+'; + Grades.Cells[0,6] := 'C'; + Grades.Cells[0,7] := 'C-'; + Grades.Cells[0,8] := 'D+'; + Grades.Cells[0,9] := 'D'; + Grades.Cells[0,10] := 'D-'; + Grades.Cells[0,11] := 'F'; + end; +end; + +procedure Tgradingfrm.ComputeBtnClick(Sender: TObject); +VAR + i, j, rows : integer; + X, Y, low, hi : double; +begin + // build AssignedGrid of grades for each Score in the ScoresGrid + for i := 0 to ncats - 1 do + begin + hi := StrToFloat(TopScoreGrid.Cells[0,i]); + low := StrToFloat(LowScoreGrid.Cells[0,i]); + for j := 0 to nints-1 do + begin + X := StrToFloat(ScoresGrid.Cells[0,j]); + if (X >= low) and (X <= hi) then GradesGrid.cells[0,j] := Grades.cells[0,i]; + end; + end; + + // Now assign grades in the gradebook + for i := 1 to ncases do // gradebook grade cells + begin + Y := StrToFloat(gradebookfrm.grid.Cells[col,i]); + for j := 0 to nints - 1 do // Grade of values in the ScoreGrid + begin + X := StrToFloat(ScoresGrid.Cells[0,j]); + if X = Y then gradebookfrm.Grid.Cells[col+4,i] := gradesGrid.Cells[0,j]; + end; + end; +end; + +initialization + {$I gradingunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/graphlib.lfm b/applications/lazstats/source_orig/graphlib.lfm new file mode 100644 index 000000000..cddc35355 --- /dev/null +++ b/applications/lazstats/source_orig/graphlib.lfm @@ -0,0 +1,56 @@ +object GraphFrm: TGraphFrm + Left = 76 + Height = 494 + Top = 112 + Width = 721 + Caption = 'Graphic Display' + ClientHeight = 494 + ClientWidth = 721 + OnShow = FormShow + LCLVersion = '0.9.30' + object Image1: TImage + Left = 0 + Height = 454 + Top = 0 + Width = 721 + Align = alClient + end + object Panel1: TPanel + Left = 0 + Height = 40 + Top = 454 + Width = 721 + Align = alBottom + ClientHeight = 40 + ClientWidth = 721 + TabOrder = 0 + object PrintBtn: TButton + Left = 391 + Height = 21 + Top = 9 + Width = 79 + Caption = 'Print' + OnClick = PrintBtnClick + TabOrder = 0 + end + object ReturnBtn: TButton + Left = 497 + Height = 20 + Top = 9 + Width = 75 + Caption = 'Return' + ModalResult = 1 + OnClick = ReturnBtnClick + TabOrder = 1 + end + object SaveBtn: TButton + Left = 288 + Height = 21 + Top = 9 + Width = 75 + Caption = 'Save Image' + OnClick = SaveBtnClick + TabOrder = 2 + end + end +end diff --git a/applications/lazstats/source_orig/graphlib.lrs b/applications/lazstats/source_orig/graphlib.lrs new file mode 100644 index 000000000..6eaf8c813 --- /dev/null +++ b/applications/lazstats/source_orig/graphlib.lrs @@ -0,0 +1,17 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGraphFrm','FORMDATA',[ + 'TPF0'#9'TGraphFrm'#8'GraphFrm'#4'Left'#2'L'#6'Height'#3#238#1#3'Top'#2'p'#5 + +'Width'#3#209#2#7'Caption'#6#15'Graphic Display'#12'ClientHeight'#3#238#1#11 + +'ClientWidth'#3#209#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#6'0.9.30'#0#6 + +'TImage'#6'Image1'#4'Left'#2#0#6'Height'#3#198#1#3'Top'#2#0#5'Width'#3#209#2 + +#5'Align'#7#8'alClient'#0#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6'Height'#2'('#3 + +'Top'#3#198#1#5'Width'#3#209#2#5'Align'#7#8'alBottom'#12'ClientHeight'#2'(' + +#11'ClientWidth'#3#209#2#8'TabOrder'#2#0#0#7'TButton'#8'PrintBtn'#4'Left'#3 + +#135#1#6'Height'#2#21#3'Top'#2#9#5'Width'#2'O'#7'Caption'#6#5'Print'#7'OnCli' + +'ck'#7#13'PrintBtnClick'#8'TabOrder'#2#0#0#0#7'TButton'#9'ReturnBtn'#4'Left' + +#3#241#1#6'Height'#2#20#3'Top'#2#9#5'Width'#2'K'#7'Caption'#6#6'Return'#11'M' + +'odalResult'#2#1#7'OnClick'#7#14'ReturnBtnClick'#8'TabOrder'#2#1#0#0#7'TButt' + +'on'#7'SaveBtn'#4'Left'#3' '#1#6'Height'#2#21#3'Top'#2#9#5'Width'#2'K'#7'Cap' + +'tion'#6#10'Save Image'#7'OnClick'#7#12'SaveBtnClick'#8'TabOrder'#2#2#0#0#0#0 +]); diff --git a/applications/lazstats/source_orig/graphlib.pas b/applications/lazstats/source_orig/graphlib.pas new file mode 100644 index 000000000..f6c7db675 --- /dev/null +++ b/applications/lazstats/source_orig/graphlib.pas @@ -0,0 +1,1583 @@ +unit GraphLib; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + ExtCtrls, StdCtrls, Globals, Printers, Math, OutPutUnit; + + +type + + { TGraphFrm } + + TGraphFrm = class(TForm) + SaveBtn: TButton; + Image1: TImage; + PrintBtn: TButton; + ReturnBtn: TButton; + Panel1: TPanel; + procedure FormShow(Sender: TObject); + procedure PrintBtnClick(Sender: TObject); + procedure ReturnBtnClick(Sender: TObject); + procedure SaveBtnClick(Sender: TObject); + private + { private declarations } + ImageWidth : integer; + ImageHeight : integer; + XOffset : integer; + YOffset : integer; + XAxisLength : integer; + YAxisLength : integer; + DegAngle : real; + RadAngle : real; + TanAngle : real; + BarWidth : integer; + XStart : integer; + XEnd : integer; + YStart : integer; + YEnd : integer; + Gtype : integer; + NoBars : integer; + NSets : integer; + YMax : real; + YMin : real; + XProp : real; + Colors : Array[0..11] of integer; + + procedure Bar2D(Sender: TObject); + procedure Bar3D(Sender: TObject); + procedure Pie2D(Sender: TObject); + procedure Pie3D(Sender: TObject); + procedure Line2D(Sender: TObject); + procedure Line3D(Sender: TObject); + procedure Plot2D(Sender: TObject); + procedure Plot3D(Sender: TObject); + procedure MakeXAxis(Sender: TObject); + procedure MakeYAxis(Sender: TObject); + procedure MakeHXaxis(Sender: TObject); + procedure MakeHYaxis(Sender: TObject); + function DegToRad(Deg : real; Sender: TObject): real; + procedure HBar2D(Sender: TObject); + procedure HBar3D(Sender: TObject); + procedure Walls(Sender: TObject); + procedure pBar2D(Sender: TObject); + procedure pBar3D(Sender: TObject); + procedure pPie2D(Sender: TObject); + procedure pExPie(Sender: TObject); + procedure pLine2D(Sender: TObject); + procedure pLine3D(Sender: TObject); + procedure pPlot2D(Sender: TObject); + procedure pPlot3D(Sender: TObject); + procedure pMakeXAxis(Sender: TObject); + procedure pMakeYaxis(Sender: TObject); + procedure pMakeHXaxis(Sender: TObject); + procedure pMakeHYaxis(Sender: TObject); + procedure pHBar2D(Sender: TObject); + procedure pHBar3D(Sender: TObject); + procedure pWalls(Sender: TObject); + + public + { public declarations } + nosets : integer; //number of data sets to plot + nbars : integer; // maximum number of bars to plot in any set + Heading : String; // Major Heading for graph + XTitle : string; // title for x-axis + YTitle : string; // title for vertical axis + barwideprop : real; // proportional width of bar (0 to 1.0) + GraphType : integer; //1=2dbar,2=3dbar,3=2dpie,4=3dpie,5=2dline,6=3dline + //7=2dpoints,8=3dpoints + Ypoints, Xpoints : DblDyneMat; + SetLabels : array[1..20] of string[21]; // labels for multiple sets + PointLabels : array[1..1000] of string[3]; // individual point labels + PtLabels : boolean; // true to print point labels (for 2D Plot only) + AutoScale : boolean; // if true, program uses computed min and max values + ShowLeftWall : boolean; + ShowRightWall : boolean; + ShowBottomWall : boolean; + ShowBackWall : boolean; + BackColor : integer; + WallColor : integer; + FloorColor : integer; + miny : double; // specified by user if autoscale is false + maxy : double; // specified by user if autoscale is false + + end; + +var + GraphFrm: TGraphFrm; + +implementation + +{ TGraphFrm } + +procedure TGraphFrm.PrintBtnClick(Sender: TObject); +begin + Printer.Orientation := poLandscape; + ImageWidth := Printer.PageWidth - 100; + ImageHeight := Printer.PageHeight - 100; + XOffset := ImageWidth div 10; + YOffset := ImageHeight div 10; + XStart := Xoffset; + XEnd := ImageWidth - XOffset; + XAxisLength := XEnd - XStart; + YStart := ImageHeight - YOffset; + YEnd := YOffset; + YAxisLength := YStart - YEnd; + DegAngle := 45.0; + RadAngle := DegToRad(DegAngle,Self); + TanAngle := Tan(RadAngle); + NoBars := nbars; + NSets := nosets; + XProp := barwideprop; + BarWidth := XAxisLength div NoBars; + // draw border around graph + Printer.BeginDoc; + BackColor := clWhite; + Printer.Canvas.Brush.Color := BackColor; + Printer.Canvas.Rectangle(100,100,ImageWidth,ImageHeight); + Printer.Canvas.TextOut(ImageWidth div 2,YEnd - 100,Heading); + GraphFrm.Caption := Heading; + if (GType < 1) or (GType > 10) then + begin +// Application.MessageBox('No graph type defined.','ERROR!',MB_OK); + Printer.Enddoc; + exit; + end + else case GType of + 1 : pBar2D(self); // two dimension vertical bars + 2 : pBar3D(self); // three dimension vertical bars + 3 : pPie2D(self); // two dimension pie chart + 4 : pExPie(self); // exploded pie chart + 5 : pLine2D(self); // Two dimension lines + 6 : pLine3D(self); // three dimension lines + 7 : pPlot2D(self); // two dimension points + 8 : pPlot3D(self); // three dimension points + 9 : pHBar2D(self); // Two dimension horizontal bars + 10: pHBar3D(self); // Three dimension horizontal bars + end; + Printer.EndDoc; { finish printing } + Printer.Orientation := poPortrait; + +end; + +procedure TGraphFrm.FormShow(Sender: TObject); +var + i, j : integer; + +begin + Gtype := 1; // default type is a 2 dimension bar graph + ImageWidth := Image1.Width; + ImageHeight := Image1.Height; + XOffset := ImageWidth div 10; + YOffset := ImageHeight div 10; + XStart := Xoffset; + XEnd := ImageWidth - XOffset; + XAxisLength := XEnd - XStart; + YStart := ImageHeight - YOffset; + YEnd := YOffset; + YAxisLength := YStart - YEnd; + DegAngle := 45.0; + RadAngle := DegToRad(DegAngle,Self); + TanAngle := Tan(RadAngle); + NoBars := nbars; + NSets := nosets; + XProp := barwideprop; + BarWidth := XAxisLength div NoBars; + GType := GraphType; + Colors[1] := clRed; + Colors[2] := clBlue; + Colors[3] := clGreen; + Colors[4] := clNavy; + Colors[5] := clTeal; + Colors[6] := clAqua; + Colors[7] := clLime; + Colors[8] := clFuchsia; + Colors[9] := clGray; + Colors[10] := clPurple; + Colors[11] := clOlive; + Colors[0] := clMaroon; + // draw border around graph + Image1.Canvas.Brush.Color := BackColor; + Image1.Canvas.Rectangle(0,0,ImageWidth,ImageHeight); + Image1.Canvas.TextOut(ImageWidth div 2,0,Heading); + GraphFrm.Caption := Heading; + if AutoScale = true then + begin + YMin := YPoints[0,0]; + YMax := YMin; + for i := 1 to NSets do + begin + for j := 2 to NoBars do + begin + if YPoints[i-1,j-1] > YMax then YMax := YPoints[i-1,j-1]; + if YPoints[i-1,j-1] < YMin then YMin := YPoints[i-1,j-1]; + end; + end; + end + else + begin + YMin := miny; + YMax := maxy; + end; + if (GType < 1) or (GType > 10) then + begin +// Application.MessageBox('No graph type defined.','ERROR!',MB_OK); + exit; + end + else case GType of + 1 : Bar2D(self); + 2 : Bar3D(self); + 3 : Pie2D(self); + 4 : Pie3D(self); + 5 : Line2D(self); + 6 : Line3D(self); + 7 : Plot2D(self); + 8 : Plot3D(self); + 9 : HBar2D(self); + 10: HBar3D(self); + end; +end; + +procedure TGraphFrm.ReturnBtnClick(Sender: TObject); +begin + GraphFrm.Hide; +end; + +procedure TGraphFrm.SaveBtnClick(Sender: TObject); +VAR + response : string; +begin + response := InputBox('NAME?','Name of bitmap file:','image.bmp'); + Image1.Picture.SaveToFile(response); +end; + +procedure TGraphFrm.Bar2D(Sender: TObject); +var + j : integer; + x1, y1, x2, y2 : integer; + bwidth : integer; + xpos : integer; + yprop : real; + ydist : real; +begin + MakeXAxis(self); + MakeYAxis(self); + { Make bar for each y data point } + for j := 1 to NoBars do + begin + Image1.Canvas.Brush.Color := Colors[j mod 12]; + bwidth := round(XProp * BarWidth); + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos - (bwidth div 2); + x2 := x1 + bwidth; + y1 := YStart; +// yprop := (YPoints[1]^[j]- YMin) / (YMax - YMin); + yprop := (YPoints[0,j-1] - YMin) / (YMax - YMin); + ydist := yprop * YAxisLength; + y2 := YStart - round(ydist); + Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x2,y2),Point(x1,y2)]); + end; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.HBar2D(Sender: TObject); +var + j : integer; + x1, y1, x2, y2 : integer; + bwidth : integer; + ypos : integer; + xdist : real; + yprop : real; +begin + BarWidth := YAxisLength div NoBars; + MakeHXAxis(self); + MakeHYAxis(self); + { Make bar for each y data point } + for j := 1 to NoBars do + begin + Image1.Canvas.Brush.Color := Colors[j mod 12]; + bwidth := round(XProp * BarWidth); + ypos := YStart - (BarWidth * j) + (BarWidth div 2); // bar center + y1 := ypos - (bwidth div 2); + y2 := y1 + bwidth; + x1 := XStart; + yprop := (YPoints[0,j-1] - YMin) / (YMax - YMin); + xdist := yprop * XAxisLength; + x2 := XStart + round(xdist); + Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x2,y2),Point(x1,y2)]); + end; +end; +//---------------------------------------------------------------------- + +procedure TGraphFrm.HBar3D(Sender: TObject); +var + i, j : integer; + x1, x2, x3, x4, y1, y2, y3, y4 : integer; + triheight : integer; + bwidth : integer; + ypos : integer; + xdist : real; + yprop : real; +// yoffset : integer; +// xoffset : integer; + triwidth : integer; + +begin + Walls(self); // create left and bottom wall and axes + BarWidth := YAxisLength div NoBars; + Image1.Canvas.Brush.Color := BackColor; + MakeHXAxis(self); + MakeHYAxis(self); + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + for i := 1 to NSets do + begin + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + { Make bar for each y data point } + for j := 1 to NoBars do + begin + // do face + Image1.Canvas.Brush.Color := Colors[j mod 12]; + ypos := YStart - (BarWidth * j) + (BarWidth div 2); // bar center + y1 := ypos - (bwidth div 2) - yoffset; + y2 := y1 + bwidth; + x1 := XStart + xoffset; + yprop := (YPoints[0,j-1] - YMin) / (YMax - YMin); + xdist := yprop * XAxisLength; + x2 := XStart + round(xdist) + xoffset; + Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x2,y2),Point(x1,y2)]); + // do side (end of bar ) + x1 := x2; + x2 := x1 + triwidth; + y1 := y2; + y2 := y1 - triheight; + y3 := y2 - bwidth; + y4 := y1 - bwidth; + Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y2),Point(x2,y3),Point(x1,y4)]); + // do top of bar + x3 := XStart + xoffset; + x4 := x3 + triwidth; + Image1.Canvas.Polygon([Point(x3,y4),Point(x1,y4),Point(x2,y3),Point(x4,y3)]); + end; + end; +end; +//---------------------------------------------------------------------- + +procedure TGraphFrm.Bar3D(Sender: TObject); +var + i, j : integer; + x1, x2, x3, x4, y1, y2, y3, y4 : integer; + triheight : integer; + bwidth : integer; + yprop : real; +// yoffset : integer; +// xoffset : integer; + xpos : integer; + ydist : integer; + triwidth : integer; + +begin + Walls(self); // create left and bottom wall and axes + Image1.Canvas.Brush.Color := BackColor; + MakeXAxis(self); + MakeYAxis(self); + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + for i := NSets downto 1 do + begin + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + for j := 1 to NoBars do + begin + Image1.Canvas.Brush.Color := Colors[j mod 12]; + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos - (bwidth div 2); + x2 := x1 + bwidth; + y1 := YStart; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y2 := YStart - round(ydist); + x1 := x1 + xoffset; + x2 := x2 + xoffset; + y1 := y1 - yoffset; + y2 := y2 - yoffset; + // draw face + Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x2,y2),Point(x1,y2)]); + // draw side + x1 := x2; + x2 := x1 + triwidth; + y2 := y1 - triheight; + y3 := y1 - round(ydist); + y4 := y2 - round(ydist); + Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y2),Point(x2,y4),Point(x1,y3)]); + // draw top + x1 := xpos - (bwidth div 2) + xoffset; + x2 := x1 + bwidth; + x3 := x2 + triwidth; + x4 := x1 + triwidth; + y1 := YStart - yoffset - round(ydist); + y2 := y1 - triheight; + Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x3,y2),Point(x4,y2)]); + end; + x1 := XStart + XAxisLength + xoffset; + y1 := YStart - triheight * i; + Image1.Canvas.Brush.Color := clWhite; + Image1.Canvas.TextOut(x1,y1,SetLabels[i]); + end; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.Pie2D(Sender: TObject); +var + i : integer; + x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6 : integer; + yprop : real; + xcenter, ycenter : double; + Total : double; + radians : double; + radius : integer; + cum : double; + value : string; + +begin + xcenter := ImageWidth div 2; + ycenter := ImageHeight div 2; + + // get the total for obtaining proportions that each y point is of the total + Total := 0.0; + cum := 0.0; + radius := round(ycenter) - YOffset; + x1 := ImageWidth div 2 - Image1.Canvas.TextWidth(XTitle) div 2; + Image1.Canvas.TextOut(x1,YStart + 25,XTitle); + x1 := round(xcenter-radius); // left of rectangle + y1 := round(ycenter-radius); // top of rectangle + x2 := round(xcenter + radius); // right of rectangle + y2 := round(ycenter + radius); // bottom of rectangle + x3 := x2; + y3 := round(ycenter); + for i := 1 to NoBars do Total := Total + YPoints[0,i-1]; + // plot an arc corresponding to each proportion starting at radian 0 + for i := 1 to NoBars do + begin + yprop := YPoints[0,i-1] / Total; + cum := cum + yprop; + radians := cum * 2.0 * Pi; + x4 := round(xcenter + radius * cos(radians)); + y4 := round(ycenter - (radius * sin(radians))); + Image1.Canvas.Brush.Color := Colors[i mod 12]; + if yprop > 0.0 then + begin + Image1.Canvas.Pie(x1,y1,x2,y2,x3,y3,x4,y4); + radians := (cum - (yprop / 2.0)) * 2.0 * Pi; + x5 := round(xcenter + radius * cos(radians)); + y5 := round(ycenter - radius * sin(radians)); + Image1.Canvas.MoveTo(x5,y5); + if x5 >= round(xcenter) then x6 := x5 + 20 + else x6 := x5 - 20; + if y5 >= round(ycenter) then y6 := y5 + 20 + else y6 := y5 - 20; + Image1.Canvas.LineTo(x6,y6); + Image1.Canvas.Brush.Color := BackColor; + value := format('%8.5g',[XPoints[0,i-1]]); + Image1.Canvas.TextOut(x6,y6,value); + if x5 >= round(xcenter) then x6 := x5 - 20 + else x6 := x5 + 20; + if y5 >= round(ycenter) then y6 := y5 - 20 + else y6 := y5 + 20; + value := format('%4.2f',[yprop*100.0]); + value := value + '%'; + Image1.Canvas.TextOut(x6,y6,value); + x3 := x4; + y3 := y4; + end; + end; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.Pie3D(Sender: TObject); +var + i : integer; + x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6 : integer; + yprop : real; + xcenter, ycenter : double; + Total : double; + radians : double; + midradians : double; + radius : integer; + cum : double; + value : string; + +begin + ycenter := ImageHeight div 2; + // get the total for obtaining proportions that each y point is of the total + Total := 0.0; + cum := 0.0; + radius := round(ycenter) - YOffset; + x1 := ImageWidth div 2 - Image1.Canvas.TextWidth(XTitle) div 2; + Image1.Canvas.TextOut(x1,YStart + 25,XTitle); + for i := 1 to NoBars do Total := Total + YPoints[0,i-1]; + // plot an arc corresponding to each proportion starting at radian 0 + for i := 1 to NoBars do + begin + xcenter := ImageWidth div 2; + ycenter := ImageHeight div 2; + yprop := YPoints[0,i-1] / Total; + cum := cum + yprop; + radians := cum * 2.0 * Pi; + midradians := (cum - (yprop / 2.0)) * 2.0 * Pi; + x5 := round(xcenter + radius * cos(midradians)); + y5 := round(ycenter - radius * sin(midradians)); + // explode pie by shifting slices away from center + if x5 >= round(xcenter) then xcenter := xcenter + 10 + else xcenter := xcenter - 10; + if y5 >= round(ycenter) then ycenter := ycenter + 10 + else ycenter := ycenter - 10; + x1 := round(xcenter-radius); // left of rectangle + y1 := round(ycenter-radius); // top of rectangle + x2 := round(xcenter + radius); // right of rectangle + y2 := round(ycenter + radius); // bottom of rectangle + midradians := (cum - yprop ) * 2.0 * Pi; + x3 := round(xcenter + radius * cos(midradians)); + y3 := round(ycenter - radius * sin(midradians)); + x4 := round(xcenter + radius * cos(radians)); + y4 := round(ycenter - (radius * sin(radians))); + Image1.Canvas.Brush.Color := Colors[i mod 12]; + if yprop > 0.0 then + begin + Image1.Canvas.Pie(x1,y1,x2,y2,x3,y3,x4,y4); + radians := (cum - (yprop / 2.0)) * 2.0 * Pi; + x5 := round(xcenter + radius * cos(radians)); + y5 := round(ycenter - radius * sin(radians)); + Image1.Canvas.MoveTo(x5,y5); + if x5 >= round(xcenter) then x6 := x5 + 20 + else x6 := x5 - 20; + if y5 >= round(ycenter) then y6 := y5 + 20 + else y6 := y5 - 20; + Image1.Canvas.LineTo(x6,y6); + Image1.Canvas.Brush.Color := BackColor; + value := format('%8.5g',[XPoints[0,i-1]]); + Image1.Canvas.TextOut(x6,y6,value); + if x5 >= round(xcenter) then x6 := x5 - 20 + else x6 := x5 + 20; + if y5 >= round(ycenter) then y6 := y5 - 20 + else y6 := y5 + 20; + value := format('%4.2f',[yprop*100.0]); + value := value + '%'; + Image1.Canvas.TextOut(x6,y6,value); + end; + end; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.Line2D(Sender: TObject); +{ This procedure draws lines for 1 or more sets (on top of each other if + multiple sets) } +var + i, j : integer; + x1, y1, x2, y2 : integer; + xpos : integer; + yprop : real; + ydist : real; +begin + MakeXAxis(self); + MakeYAxis(self); + { Make lines for each set of y data point } + For i := NSets downto 1 do + begin + Image1.Canvas.Pen.Color := Colors[i mod 12]; + x1 := XStart + BarWidth div 2; + x2 := x1; + yprop := (YPoints[i-1,0] - YMin) / (YMax - YMin); + ydist := yprop * YAxisLength; + y1 := YStart - round(ydist); + y2 := y1; + Image1.Canvas.MoveTo(x1,y1); + for j := 2 to NoBars do + begin + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x2 := xpos; + yprop := (YPoints[i-1,j-1] - YMin) / (Ymax - YMin); + ydist := yprop * YAxisLength; + y2 := YStart - round(ydist); + Image1.Canvas.LineTo(x2,y2); + end; + Image1.Canvas.Pen.Color := clBlack; + x1 := x2; + y1 := y2; + Image1.Canvas.Brush.Color := clWhite; + Image1.Canvas.TextOut(x1,y1,SetLabels[i]); + end; + Image1.Canvas.Pen.Color := clBlack; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.Line3D(Sender: TObject); +{ This procedure draws lines for multiple sets but staggers each set back and + to the right } +var + i, j : integer; + x1, x2, x3, x4, y1, y2, y3, y4 : integer; + triheight : integer; + bwidth : integer; + yprop : double; + points : array[0..4] of TPoint; + xpos : integer; + ydist : integer; + triwidth : integer; +begin + + Walls(self); // create left and bottom wall and axes + Image1.Canvas.Brush.Color := BackColor; + MakeXAxis(self); + MakeYAxis(self); + bwidth := BarWidth; + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + for i := NSets downto 1 do + begin + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + Image1.Canvas.Brush.Color := Colors[i mod 12]; + for j := 1 to NoBars-1 do + begin + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos - (bwidth div 2) + xoffset; + x2 := x1 + bwidth; + x3 := x2 + triwidth; + x4 := x1 + triwidth; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y1 := YStart - yoffset - round(ydist); + y2 := y1 - triheight; + yprop := (YPoints[i-1,j] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y3 := ystart - yoffset - round(ydist); + y4 := y3 - triheight; + points[0] := Point(x1,y1); + points[1] := Point(x2,y2); + points[2] := Point(x3,y4); + points[3] := Point(x4,y3); + Image1.Canvas.Polygon(points,4); + end; + x1 := XStart + XAxisLength + xoffset; + y1 := YStart - triheight * i; + Image1.Canvas.Brush.Color := clWhite; + Image1.Canvas.TextOut(x1,y1,SetLabels[i]); + end; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.Plot2D(Sender: TObject); +var + i, j : integer; + x1, y1 : integer; + triheight : integer; + bwidth : integer; + yprop : real; +// yoffset : integer; +// xoffset : integer; + xpos : integer; + ydist : integer; + triwidth : integer; +begin + Walls(self); // create left and bottom wall and axes + Image1.Canvas.Brush.Color := BackColor; + MakeXAxis(self); + MakeYAxis(self); + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + { Make points for each set of y data point } + for i := NSets downto 1 do + begin + Image1.Canvas.Brush.Color := Colors[i mod 12]; + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + for j := 1 to NoBars do + begin + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y1 := YStart - round(ydist); + x1 := x1 + xoffset; + y1 := y1 - yoffset; + if PtLabels then + begin + Image1.Canvas.Brush.Color := BackColor; + Image1.Canvas.TextOut(x1,y1,PointLabels[j]); + end + else + Image1.Canvas.Ellipse(x1-5,y1-5,x1+5,y1+5); + end; + Image1.Canvas.Pen.Color := clBlack; + x1 := XStart + XAxisLength + xoffset; + y1 := YStart - triheight * i; + Image1.Canvas.Brush.Color := clWhite; + Image1.Canvas.TextOut(x1,y1,SetLabels[i]); + end; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.Plot3D(Sender: TObject); +var + i, j : integer; + x1, y1 : integer; + yprop : real; + triheight : integer; + bwidth : integer; +// yoffset : integer; +// xoffset : integer; + xpos : integer; + ydist : integer; + triwidth : integer; +begin + Walls(self); // create left and bottom wall and axes + Image1.Canvas.Brush.Color := BackColor; + MakeXAxis(self); + MakeYAxis(self); + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + { Make points for each set of y data point } + for i := NSets downto 1 do + begin + Image1.Canvas.Brush.Color := Colors[i mod 12]; + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + for j := 1 to NoBars do + begin + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y1 := YStart - round(ydist); + x1 := x1 + xoffset; + y1 := y1 - yoffset; + // change next to a ball by drawing multiple Ellipses around + // vertical axis ? + Image1.Canvas.Ellipse(x1-5,y1-5,x1+5,y1+5); + Image1.Canvas.Ellipse(x1-4,y1-5,x1+4,y1+5); + Image1.Canvas.Ellipse(x1-3,y1-5,x1+3,y1+5); + Image1.Canvas.Ellipse(x1-2,y1-5,x1+2,y1+5); + end; + Image1.Canvas.Pen.Color := clBlack; + x1 := XStart + XAxisLength + xoffset; + y1 := YStart - triheight * i; + Image1.Canvas.Brush.Color := clWhite; + Image1.Canvas.TextOut(x1,y1,SetLabels[i]); + end; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.MakeXAxis(Sender: TObject); +var + i, valstart, valend, oldend : integer; + xpos : integer; + value : string; +begin + Image1.Canvas.MoveTo(XStart,YStart); + Image1.Canvas.LineTo(XEnd,YStart); + oldend := 0; + for i := 1 to NoBars do + begin + xpos := XStart + (BarWidth * i) - (BarWidth div 2); + Image1.Canvas.MoveTo(xpos,YStart); + Image1.Canvas.LineTo(xpos,YStart + 5); + value := format('%6.5g',[XPoints[0,i-1]]); + valstart := xpos - Image1.Canvas.TextWidth(value) div 2; + valend := valstart + Image1.Canvas.TextWidth(value); + if valstart > oldend then + begin + Image1.Canvas.TextOut(valstart,YStart+10,value); + oldend := valend; + end; + end; + xpos := ImageWidth div 2 - Image1.Canvas.TextWidth(XTitle) div 2; + Image1.Canvas.TextOut(xpos,YStart + 25,XTitle); +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.MakeYAxis(Sender: TObject); +var + ypos : integer; + i : integer; + incr : real; + value : real; + valstring : string; + +begin + Image1.Canvas.MoveTo(XStart,YStart); + Image1.Canvas.LineTo(XStart,YEnd); + incr := (YMax - YMin) / 20.0; + for i := 1 to 21 do + begin + value := YMin + (incr * (i-1)); + ypos := YStart - ((i-1) * YAxisLength div 20); + Image1.Canvas.MoveTo(XStart,ypos); + Image1.Canvas.LineTo(XStart-10,ypos); + valstring := format('%8.2f',[value]); + Image1.Canvas.TextOut(5, ypos,valstring); + end; + ypos := YEnd - 10 - Canvas.TextHeight(YTitle); + Image1.Canvas.TextOut(0,ypos,YTitle); +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.MakeHXaxis(Sender: TObject); +var + xpos : integer; + i : integer; + incr : real; + value : real; + valstring : string; + +begin + Image1.Canvas.MoveTo(XStart,YStart); + Image1.Canvas.LineTo(XEnd,YStart); + incr := (YMax - YMin) / 20.0; + for i := 1 to 21 do + begin + value := YMin + (incr * (i-1)); + xpos := XStart + ((i-1) * XAxisLength div 20); + Image1.Canvas.MoveTo(xpos,YStart); + Image1.Canvas.LineTo(xpos,YStart + 5); + valstring := format('%6.2f',[value]); + Image1.Canvas.TextOut(xpos - Image1.Canvas.TextWidth(valstring) div 2, + YStart + 10,FloatToStr(value)); + end; + xpos := XAxisLength div 2 - Image1.Canvas.TextWidth(YTitle) div 2; + Image1.Canvas.TextOut(xpos,YStart + 20,YTitle); +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.MakeHYaxis(Sender: TObject); +var + i : integer; + ypos : integer; + value : string; +begin + Image1.Canvas.MoveTo(XStart,YStart); + Image1.Canvas.LineTo(XStart,YEnd); + for i := 1 to NoBars do + begin + ypos := YStart - (BarWidth * i) + (BarWidth div 2); + Image1.Canvas.MoveTo(XStart,ypos); + Image1.Canvas.LineTo(XStart - 10,ypos); + value := format('%6.5g',[XPoints[0,i-1]]); + Image1.Canvas.TextOut(XStart-10-Image1.Canvas.TextWidth(value), + ypos,value); + end; + ypos := YEnd; + Image1.Canvas.TextOut(0,ypos,XTitle); +end; +//--------------------------------------------------------------------- + +function TGraphFrm.DegToRad(Deg : real; Sender : TObject): real; +begin + Result := Deg * Pi / 180.0; +end; +//--------------------------------------------------------------------- + +procedure TGraphFrm.Walls(Sender: TObject); +var + deep : integer; + triheight : integer; + x1, x2,x3, x4, y1, y2, y3, y4 : integer; // polygon vertices + bwide : integer; +// xoffset : integer; + +begin + bwide := round(BarWidth * XProp); + xoffset := round(bwide * cos(RadAngle)); + XAxisLength := XAxisLength - (NSets * xoffset); // new length of X Axis + XEnd := XStart + XAxisLength; + BarWidth := XAxisLength div NoBars; //Adjusted bar width + bwide := round(BarWidth * XProp); + xoffset := round(bwide * cos(RadAngle)); + deep := xoffset * NSets; + triheight := round(bwide * sin(RadAngle) * NSets); // total height of additional y needed + triheight := triheight div 2; // scale down depth of view + YAxisLength := YAxisLength - triheight; + YEnd := YStart - YAxisLength; + // do left wall + x1 := XStart; + x2 := x1 + deep; + y1 := YStart; + y2 := YStart - triheight; + y3 := YStart - YAxisLength - triheight; + y4 := YEnd; + Image1.Canvas.Brush.Color := WallColor; + Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y2),Point(x2,y3),Point(x1,y4)]); + // do floor + x1 := XStart; + x2 := XStart + deep; + x3 := XEnd; + x4 := XEnd + deep; + y1 := YStart; + y2 := YStart - triheight; + Image1.Canvas.Brush.Color := FloorColor; + Image1.Canvas.Polygon([Point(x1,y1),Point(x3,y1),Point(x4,y2),Point(x2,y2)]); +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pHBar2D(Sender: TObject); +var + j : integer; + x1, y1, x2, y2 : integer; + bwidth : integer; + ypos : integer; + xdist : real; + yprop : real; +begin + BarWidth := YAxisLength div NoBars; + pMakeHXAxis(self); + pMakeHYAxis(self); + { Make bar for each y data point } + for j := 1 to NoBars do + begin + Printer.Canvas.Brush.Color := Colors[j mod 12]; + bwidth := round(XProp * BarWidth); + ypos := YStart - (BarWidth * j) + (BarWidth div 2); // bar center + y1 := ypos - (bwidth div 2); + y2 := y1 + bwidth; + x1 := XStart; + yprop := (YPoints[0,j-1] - YMin) / (YMax - YMin); + xdist := yprop * XAxisLength; + x2 := XStart + round(xdist); + Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x2,y2),Point(x1,y2)]); + end; +end; +//----------------------------------------------------------------------- + +procedure TGraphFrm.pHBar3D(Sender: TObject); +var + i, j : integer; + x1, x2, x3, x4, y1, y2, y3, y4 : integer; + triheight : integer; + bwidth : integer; + ypos : integer; + xdist : real; + yprop : real; +// yoffset : integer; +// xoffset : integer; + triwidth : integer; + +begin + pWalls(self); // create left and bottom wall and axes + BarWidth := YAxisLength div NoBars; + Printer.Canvas.Brush.Color := BackColor; + pMakeHXAxis(self); + pMakeHYAxis(self); + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + for i := 1 to NSets do + begin + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + { Make bar for each y data point } + for j := 1 to NoBars do + begin + // do face + Printer.Canvas.Brush.Color := Colors[j mod 12]; + ypos := YStart - (BarWidth * j) + (BarWidth div 2); // bar center + y1 := ypos - (bwidth div 2) - yoffset; + y2 := y1 + bwidth; + x1 := XStart + xoffset; + yprop := (YPoints[0,j-1] - YMin) / (YMax - YMin); + xdist := yprop * XAxisLength; + x2 := XStart + round(xdist) + xoffset; + Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x2,y2),Point(x1,y2)]); + // do side (end of bar ) + x1 := x2; + x2 := x1 + triwidth; + y1 := y2; + y2 := y1 - triheight; + y3 := y2 - bwidth; + y4 := y1 - bwidth; + Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y2),Point(x2,y3),Point(x1,y4)]); + // do top of bar + x3 := XStart + xoffset; + x4 := x3 + triwidth; + Printer.Canvas.Polygon([Point(x3,y4),Point(x1,y4),Point(x2,y3),Point(x4,y3)]); + end; + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pWalls(Sender: TObject); +var + deep : integer; + triheight : integer; + x1, x2,x3, x4, y1, y2, y3, y4 : integer; // polygon vertices + bwide : integer; +// xoffset : integer; + +begin + bwide := round(BarWidth * XProp); + xoffset := round(bwide * cos(RadAngle)); + XAxisLength := XAxisLength - (NSets * xoffset); // new length of X Axis + XEnd := XStart + XAxisLength; + BarWidth := XAxisLength div NoBars; //Adjusted bar width + bwide := round(BarWidth * XProp); + xoffset := round(bwide * cos(RadAngle)); + deep := xoffset * NSets; + triheight := round(bwide * sin(RadAngle) * NSets); // total height of additional y needed + triheight := triheight div 2; // scale down depth of view + YAxisLength := YAxisLength - triheight; + YEnd := YStart - YAxisLength; + // do left wall + x1 := XStart; + x2 := x1 + deep; + y1 := YStart; + y2 := YStart - triheight; + y3 := YStart - YAxisLength - triheight; + y4 := YEnd; + Printer.Canvas.Brush.Color := WallColor; + Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y2),Point(x2,y3),Point(x1,y4)]); + // do floor + x1 := XStart; + x2 := XStart + deep; + x3 := XEnd; + x4 := XEnd + deep; + y1 := YStart; + y2 := YStart - triheight; + Printer.Canvas.Brush.Color := FloorColor; + Printer.Canvas.Polygon([Point(x1,y1),Point(x3,y1),Point(x4,y2),Point(x2,y2)]); +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pBar2D(Sender: TObject); +var + j : integer; + x1, y1, x2, y2 : integer; + bwidth : integer; + xpos : integer; + yprop : real; + ydist : real; +begin + pMakeXAxis(self); + pMakeYAxis(self); + { Make bar for each y data point } + for j := 1 to NoBars do + begin + Printer.Canvas.Brush.Color := Colors[j mod 12]; + bwidth := round(XProp * BarWidth); + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos - (bwidth div 2); + x2 := x1 + bwidth; + y1 := YStart; + yprop := (YPoints[0,j-1] - YMin) / (YMax - YMin); + ydist := yprop * YAxisLength; + y2 := YStart - round(ydist); + Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x2,y2),Point(x1,y2)]); + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pBar3D(Sender: TObject); +var + i, j : integer; + x1, x2, x3, x4, y1, y2, y3, y4 : integer; + triheight : integer; + bwidth : integer; + yprop : real; +// yoffset : integer; +// xoffset : integer; + xpos : integer; + ydist : integer; + triwidth : integer; + +begin + pWalls(self); // create left and bottom wall and axes + Printer.Canvas.Brush.Color := BackColor; + pMakeXAxis(self); + pMakeYAxis(self); + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + for i := NSets downto 1 do + begin + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + for j := 1 to NoBars do + begin + Printer.Canvas.Brush.Color := Colors[j mod 12]; + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos - (bwidth div 2); + x2 := x1 + bwidth; + y1 := YStart; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y2 := YStart - round(ydist); + x1 := x1 + xoffset; + x2 := x2 + xoffset; + y1 := y1 - yoffset; + y2 := y2 - yoffset; + // draw face + Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x2,y2),Point(x1,y2)]); + // draw side + x1 := x2; + x2 := x1 + triwidth; + y2 := y1 - triheight; + y3 := y1 - round(ydist); + y4 := y2 - round(ydist); + Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y2),Point(x2,y4),Point(x1,y3)]); + // draw top + x1 := xpos - (bwidth div 2) + xoffset; + x2 := x1 + bwidth; + x3 := x2 + triwidth; + x4 := x1 + triwidth; + y1 := YStart - yoffset - round(ydist); + y2 := y1 - triheight; + Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x3,y2),Point(x4,y2)]); + end; + x1 := XStart + XAxisLength + xoffset; + y1 := YStart - triheight * i; + Printer.Canvas.Brush.Color := clWhite; + Printer.Canvas.TextOut(x1,y1,SetLabels[i]); + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pPie2D(Sender: TObject); +var + i : integer; + x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6 : integer; + yprop : real; + xcenter, ycenter : double; + Total : double; + radians : double; + radius : integer; + cum : double; + value : string; + +begin + xcenter := ImageWidth div 2; + ycenter := ImageHeight div 2; + + // get the total for obtaining proportions that each y point is of the total + Total := 0.0; + cum := 0.0; + radius := round(ycenter) - YOffset; + x1 := ImageWidth div 2 - Printer.Canvas.TextWidth(XTitle) div 2; + Printer.Canvas.TextOut(x1,YStart + 25,XTitle); + x1 := round(xcenter-radius); // left of rectangle + y1 := round(ycenter-radius); // top of rectangle + x2 := round(xcenter + radius); // right of rectangle + y2 := round(ycenter + radius); // bottom of rectangle + x3 := x2; + y3 := round(ycenter); + for i := 1 to NoBars do Total := Total + YPoints[0,i-1]; + // plot an arc corresponding to each proportion starting at radian 0 + for i := 1 to NoBars do + begin + yprop := YPoints[0,i-1] / Total; + cum := cum + yprop; + radians := cum * 2.0 * Pi; + x4 := round(xcenter + radius * cos(radians)); + y4 := round(ycenter - (radius * sin(radians))); + Printer.Canvas.Brush.Color := Colors[i mod 12]; + if yprop > 0.0 then + begin + Printer.Canvas.Pie(x1,y1,x2,y2,x3,y3,x4,y4); + radians := (cum - (yprop / 2.0)) * 2.0 * Pi; + x5 := round(xcenter + radius * cos(radians)); + y5 := round(ycenter - radius * sin(radians)); + Printer.Canvas.MoveTo(x5,y5); + if x5 >= round(xcenter) then x6 := x5 + 50 + else x6 := x5 - 50; + if y5 >= round(ycenter) then y6 := y5 + 50 + else y6 := y5 - 50; + Printer.Canvas.LineTo(x6,y6); + Printer.Canvas.Brush.Color := BackColor; + value := format('%8.5g',[XPoints[0,i-1]]); + Printer.Canvas.TextOut(x6,y6,value); + if x5 >= round(xcenter) then x6 := x5 - 50 + else x6 := x5 + 50; + if y5 >= round(ycenter) then y6 := y5 - 50 + else y6 := y5 + 50; + value := format('%4.2f',[yprop*100.0]); + value := value + '%'; + Printer.Canvas.TextOut(x6,y6,value); + x3 := x4; + y3 := y4; + end; + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pExPie(Sender: TObject); +var + i : integer; + x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6 : integer; + yprop : real; + xcenter, ycenter : double; + Total : double; + radians : double; + midradians : double; + radius : integer; + cum : double; + value : string; + +begin + ycenter := ImageHeight div 2; + // get the total for obtaining proportions that each y point is of the total + Total := 0.0; + cum := 0.0; + radius := round(ycenter) - YOffset; + x1 := ImageWidth div 2 - Printer.Canvas.TextWidth(XTitle) div 2; + Printer.Canvas.TextOut(x1,YStart + 25,XTitle); + for i := 1 to NoBars do Total := Total + YPoints[0,i-1]; + // plot an arc corresponding to each proportion starting at radian 0 + for i := 1 to NoBars do + begin + xcenter := ImageWidth div 2; + ycenter := ImageHeight div 2; + yprop := YPoints[0,i-1] / Total; + cum := cum + yprop; + radians := cum * 2.0 * Pi; + midradians := (cum - (yprop / 2.0)) * 2.0 * Pi; + x5 := round(xcenter + radius * cos(midradians)); + y5 := round(ycenter - radius * sin(midradians)); + // explode pie by shifting slices away from center + if x5 >= round(xcenter) then xcenter := xcenter + 10 + else xcenter := xcenter - 10; + if y5 >= round(ycenter) then ycenter := ycenter + 10 + else ycenter := ycenter - 10; + x1 := round(xcenter-radius); // left of rectangle + y1 := round(ycenter-radius); // top of rectangle + x2 := round(xcenter + radius); // right of rectangle + y2 := round(ycenter + radius); // bottom of rectangle + midradians := (cum - yprop ) * 2.0 * Pi; + x3 := round(xcenter + radius * cos(midradians)); + y3 := round(ycenter - radius * sin(midradians)); + x4 := round(xcenter + radius * cos(radians)); + y4 := round(ycenter - (radius * sin(radians))); + Printer.Canvas.Brush.Color := Colors[i mod 12]; + if yprop > 0.0 then + begin + Printer.Canvas.Pie(x1,y1,x2,y2,x3,y3,x4,y4); + radians := (cum - (yprop / 2.0)) * 2.0 * Pi; + x5 := round(xcenter + radius * cos(radians)); + y5 := round(ycenter - radius * sin(radians)); + Printer.Canvas.MoveTo(x5,y5); + if x5 >= round(xcenter) then x6 := x5 + 50 + else x6 := x5 - 50; + if y5 >= round(ycenter) then y6 := y5 + 50 + else y6 := y5 - 50; + Printer.Canvas.LineTo(x6,y6); + Printer.Canvas.Brush.Color := BackColor; + value := format('%8.5g',[XPoints[0,i-1]]); + Printer.Canvas.TextOut(x6,y6,value); + if x5 >= round(xcenter) then x6 := x5 - 50 + else x6 := x5 + 50; + if y5 >= round(ycenter) then y6 := y5 - 50 + else y6 := y5 + 50; + value := format('%4.2f',[yprop*100.0]); + value := value + '%'; + Printer.Canvas.TextOut(x6,y6,value); + end; + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pLine2D(Sender: TObject); +var + i, j : integer; + x1, y1, x2, y2 : integer; + xpos : integer; + yprop : real; + ydist : real; +begin + pMakeXAxis(self); + pMakeYAxis(self); + { Make lines for each set of y data point } + For i := 1 to NSets do + begin + Printer.Canvas.Brush.Color := Colors[i mod 12]; + x1 := XStart + BarWidth div 2; + yprop := (YPoints[i-1,0] - YMin) / (YMax - YMin); + ydist := yprop * YAxisLength; + y1 := YStart - round(ydist); + Printer.Canvas.MoveTo(x1,y1); + for j := 2 to NoBars do + begin + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x2 := xpos; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := yprop * YAxisLength; + y2 := YStart - round(ydist); + Printer.Canvas.LineTo(x2,y2); + end; + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pLine3D(Sender: TObject); +var + i, j : integer; + x1, x2, y1, y2 : integer; + triheight : integer; + bwidth : integer; + yprop : real; +// yoffset : integer; +// xoffset : integer; + xpos : integer; + ydist : integer; + triwidth : integer; + +begin + pWalls(self); // create left and bottom wall and axes + Printer.Canvas.Brush.Color := BackColor; + pMakeXAxis(self); + pMakeYAxis(self); + XProp := 1.0; + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + for i := NSets downto 1 do + begin + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + for j := 1 to NoBars do + begin + //Image1.Canvas.Brush.Color := Colors[j mod 12]; + Printer.Canvas.Pen.Color := Colors[i mod 12]; + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos - (bwidth div 2); + x2 := x1 + bwidth; + y1 := YStart; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y2 := YStart - round(ydist); + x1 := x1 + xoffset; + x2 := x2 + xoffset; + y1 := y1 - yoffset; + y2 := y2 - yoffset; + Printer.Canvas.MoveTo(x1,y1); + Printer.Canvas.LineTo(x2,y2); + end; + Printer.Canvas.Pen.Color := clBlack; + x1 := XStart + XAxisLength + xoffset; + y1 := YStart - triheight * i; + Printer.Canvas.Brush.Color := clWhite; + Printer.Canvas.TextOut(x1,y1,SetLabels[i]); + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pPlot2D(Sender: TObject); +var + i, j : integer; + x1, y1 : integer; + triheight : integer; + bwidth : integer; + yprop : real; +// yoffset : integer; +// xoffset : integer; + xpos : integer; + ydist : integer; + triwidth : integer; +begin + pWalls(self); // create left and bottom wall and axes + Printer.Canvas.Brush.Color := BackColor; + pMakeXAxis(self); + pMakeYAxis(self); + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + { Make points for each set of y data point } + for i := NSets downto 1 do + begin + Printer.Canvas.Brush.Color := Colors[i mod 12]; + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + for j := 1 to NoBars do + begin + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y1 := YStart - round(ydist); + x1 := x1 + xoffset; + y1 := y1 - yoffset; + if PtLabels then + begin + Printer.Canvas.Brush.Color := BackColor; + Printer.Canvas.TextOut(x1,y1,PointLabels[j]); + end + else + Printer.Canvas.Ellipse(x1-5,y1-5,x1+5,y1+5); + end; + Printer.Canvas.Pen.Color := clBlack; + x1 := XStart + XAxisLength + xoffset; + y1 := YStart - triheight * i; + Printer.Canvas.Brush.Color := clWhite; + Printer.Canvas.TextOut(x1,y1,SetLabels[i]); + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pPlot3D(Sender: TObject); +var + i, j : integer; + x1, y1 : integer; + yprop : real; + triheight : integer; + bwidth : integer; +// yoffset : integer; +// xoffset : integer; + xpos : integer; + ydist : integer; + triwidth : integer; +begin + pWalls(self); // create left and bottom wall and axes + Printer.Canvas.Brush.Color := BackColor; + pMakeXAxis(self); + pMakeYAxis(self); + bwidth := round(XProp * BarWidth); + triwidth := round(bwidth * cos(RadAngle)); + triheight := round(bwidth * sin(RadAngle)); + triheight := triheight div 2; // scale down depth of view + { Make points for each set of y data point } + for i := NSets downto 1 do + begin + Printer.Canvas.Brush.Color := Colors[i mod 12]; + xoffset := triwidth * (i - 1); + yoffset := triheight * (i - 1); + for j := 1 to NoBars do + begin + xpos := XStart + (BarWidth * j) - (BarWidth div 2); + x1 := xpos; + yprop := (YPoints[i-1,j-1] - YMin) / (YMax - YMin); + ydist := round(yprop * YAxisLength); + y1 := YStart - round(ydist); + x1 := x1 + xoffset; + y1 := y1 - yoffset; + // change next to a ball by drawing multiple Ellipses around + // vertical axis ? + Printer.Canvas.Ellipse(x1-5,y1-5,x1+5,y1+5); + Printer.Canvas.Ellipse(x1-4,y1-5,x1+4,y1+5); + Printer.Canvas.Ellipse(x1-3,y1-5,x1+3,y1+5); + Printer.Canvas.Ellipse(x1-2,y1-5,x1+2,y1+5); + end; + Printer.Canvas.Pen.Color := clBlack; + x1 := XStart + XAxisLength + xoffset; + y1 := YStart - triheight * i; + Printer.Canvas.Brush.Color := clWhite; + Printer.Canvas.TextOut(x1,y1,SetLabels[i]); + end; +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pMakeXAxis(Sender: TObject); +var + i, valstart, valend, oldend : integer; + xpos : integer; + value : string; +begin + Printer.Canvas.MoveTo(XStart,YStart); + Printer.Canvas.LineTo(XEnd,YStart); + oldend := 0; + for i := 1 to NoBars do + begin + xpos := XStart + (BarWidth * i) - (BarWidth div 2); + Printer.Canvas.MoveTo(xpos,YStart); + Printer.Canvas.LineTo(xpos,YStart + 5); + value := format('%6.5g',[XPoints[0,i-1]]); + valstart := xpos - Printer.Canvas.TextWidth(value) div 2; + valend := valstart + Printer.Canvas.TextWidth(value); + if valstart > oldend then + begin + Printer.Canvas.TextOut(valstart,YStart + 10,value); + oldend := valend; + end; + end; + xpos := ImageWidth div 2 - Printer.Canvas.TextWidth(XTitle) div 2; + Printer.Canvas.TextOut(xpos,YStart + 100,XTitle); +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pMakeYaxis(Sender: TObject); +var + ypos : integer; + i : integer; + incr : real; + value : real; + valstring : string; + +begin + Printer.Canvas.MoveTo(XStart,YStart); + Printer.Canvas.LineTo(XStart,YEnd); + incr := (YMax - YMin) / 20.0; + for i := 1 to 21 do + begin + value := YMin + (incr * (i-1)); + ypos := YStart - ((i-1) * YAxisLength div 20); + Printer.Canvas.MoveTo(XStart,ypos); + Printer.Canvas.LineTo(XStart-10,ypos); + valstring := format('%10.2f',[value]); + Printer.Canvas.TextOut(XStart - 10 - Printer.Canvas.TextWidth(valstring),ypos,valstring); + end; + ypos := YEnd - 10 - Printer.Canvas.TextHeight(YTitle); + Printer.Canvas.TextOut(100,ypos,YTitle); +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pMakeHXaxis(Sender: TObject); +var + xpos : integer; + i : integer; + incr : real; + value : real; + valstring : string; + +begin + Printer.Canvas.MoveTo(XStart,YStart); + Printer.Canvas.LineTo(XEnd,YStart); + incr := (YMax - YMin) / 20.0; + for i := 1 to 21 do + begin + value := YMin + (incr * (i-1)); + xpos := XStart + ((i-1) * XAxisLength div 20); + Printer.Canvas.MoveTo(xpos,YStart); + Printer.Canvas.LineTo(xpos,YStart + 5); + valstring := format('%8.2f',[value]); + Printer.Canvas.TextOut(xpos - Printer.Canvas.TextWidth(valstring) div 2, + YStart + 10,FloatToStr(value)); + end; + xpos := XAxisLength div 2 - Printer.Canvas.TextWidth(YTitle) div 2; + Printer.Canvas.TextOut(xpos,YStart + 100,YTitle); +end; +//----------------------------------------------------------------------- +procedure TGraphFrm.pMakeHYaxis(Sender: TObject); +var + i : integer; + ypos : integer; + value : string; +begin + Printer.Canvas.MoveTo(XStart,YStart); + Printer.Canvas.LineTo(XStart,YEnd); + for i := 1 to NoBars do + begin + ypos := YStart - (BarWidth * i) + (BarWidth div 2); + Printer.Canvas.MoveTo(XStart,ypos); + Printer.Canvas.LineTo(XStart - 10,ypos); + value := format('%6.5g',[XPoints[0,i-1]]); + Printer.Canvas.TextOut(XStart-10-Printer.Canvas.TextWidth(value), + ypos,value); + end; + ypos := YEnd; + Printer.Canvas.TextOut(100,ypos,XTitle); +end; +//----------------------------------------------------------------------- + +initialization + {$I graphlib.lrs} + +end. + diff --git a/applications/lazstats/source_orig/gridhelpunit.lfm b/applications/lazstats/source_orig/gridhelpunit.lfm new file mode 100644 index 000000000..63849d7f4 --- /dev/null +++ b/applications/lazstats/source_orig/gridhelpunit.lfm @@ -0,0 +1,62 @@ +object GridHelpFrm: TGridHelpFrm + Left = 131 + Height = 461 + Top = 101 + Width = 583 + Caption = 'Using the Grid and Files' + ClientHeight = 461 + ClientWidth = 583 + LCLVersion = '0.9.28.2' + object Memo1: TMemo + Left = 9 + Height = 398 + Top = 9 + Width = 559 + Lines.Strings = ( + 'When you start LazStats you will see the grid with one empty cell. The column represents a variable and' + 'the row represents a "case", observation or subject of your study. Before you enter a value in that first' + 'cell, you should click on the Variables menu and select the Define Variables option. You will see a form' + 'that lets you specify a name or label for the variable as well as a longer title for the variable. In addition,' + 'you specify the type of variable (integer, floating point, character string), a missing value, and how you' + 'want the values entered to be displayed in the cell (justification.) Default values are provided but you' + 'can change these by clicking on a specification and entering your own. There are also "drop-down" boxes' + 'that let you select the type or justification for those specifications. It is a good idea to define all of your' + 'variables before you begin entering data. You can add additional variables in the Definition form by simply' + 'pressing the down arrow key on your key board and then change any default values to appropriate ones' + 'for your data.' + '' + 'Once you have specified the variables for the data grid and returned to the grid, you can then enter data ' + 'for those variables you have defined. When you press the down arrow key on your keyboard, a new row' + 'will automatically appear to enter the next case. BE CAREFUL! It is easy to accidentally add new (blank)' + 'lines that should not be a part of your data file. Use the Edit menu and select the Delete Row for any row' + 'accidentally added to the grid.' + '' + 'Avoid leaving any cell blank. It is recommended that you use a value such as 99999 as a missing value ' + 'until you have the correct value for that case and variable. Generally, it is NOT a good idea to have any' + 'missing data since not all procedures will work with missing data.' + '' + 'Once you have entered data (or need to take a break from data entry) it is time to save the grid data' + 'into a disk file. It is recommended that you save your data as a .LAZ file (the top option under the FILE' + 'menu.) This saves not only your data but also all of your variable definitions! You can, of course, also' + 'export your data to a .TAB or other file format commonly utilized by other programs. These other formats ' + 'do NOT save the definitions of the variables!' + '' + 'Once you have entered data in a grid you will discover it is easy to "navigate" around the grid. Use the' + '"home" key, "end" key, "page up" and "page down" keys as needed. The "TAB" key will move you from' + 'cell to cell in a case. You will also find procedures under the Variables menu and the Edit menu that lets' + 'you recode values in the grid, insert, copy and delete rows or columns, transform values in the grid, etc.' + 'Experiment! Try different options. There''s not much you can do to harm your computer with this program.' + ) + ScrollBars = ssAutoVertical + TabOrder = 0 + end + object ReturnBtn: TButton + Left = 488 + Height = 28 + Top = 424 + Width = 78 + Caption = 'Return' + ModalResult = 1 + TabOrder = 1 + end +end diff --git a/applications/lazstats/source_orig/gridhelpunit.lrs b/applications/lazstats/source_orig/gridhelpunit.lrs new file mode 100644 index 000000000..e437b16bb --- /dev/null +++ b/applications/lazstats/source_orig/gridhelpunit.lrs @@ -0,0 +1,51 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGridHelpFrm','FORMDATA',[ + 'TPF0'#12'TGridHelpFrm'#11'GridHelpFrm'#4'Left'#3#131#0#6'Height'#3#205#1#3'T' + +'op'#2'e'#5'Width'#3'G'#2#7'Caption'#6#24'Using the Grid and Files'#12'Clien' + +'tHeight'#3#205#1#11'ClientWidth'#3'G'#2#10'LCLVersion'#6#8'0.9.28.2'#0#5'TM' + +'emo'#5'Memo1'#4'Left'#2#9#6'Height'#3#142#1#3'Top'#2#9#5'Width'#3'/'#2#13'L' + +'ines.Strings'#1#6'hWhen you start LazStats you will see the grid with one e' + +'mpty cell. The column represents a variable and'#6'jthe row represents a "' + +'case", observation or subject of your study. Before you enter a value in t' + +'hat first'#6'icell, you should click on the Variables menu and select the D' + +'efine Variables option. You will see a form'#6'pthat lets you specify a na' + +'me or label for the variable as well as a longer title for the variable. I' + +'n addition,'#6'jyou specify the type of variable (integer, floating point, ' + +'character string), a missing value, and how you'#6'iwant the values entered' + +' to be displayed in the cell (justification.) Default values are provided ' + +'but you'#6'hcan change these by clicking on a specification and entering yo' + +'ur own. There are also "drop-down" boxes'#6'pthat let you select the type ' + +'or justification for those specifications. It is a good idea to define all' + +' of your'#6'lvariables before you begin entering data. You can add additio' + +'nal variables in the Definition form by simply'#6'dpressing the down arrow ' + +'key on your key board and then change any default values to appropriate one' + +'s'#6#14'for your data.'#6#0#6'jOnce you have specified the variables for th' + +'e data grid and returned to the grid, you can then enter data '#6'dfor thos' + +'e variables you have defined. When you press the down arrow key on your ke' + +'yboard, a new row'#6'jwill automatically appear to enter the next case. BE' + +' CAREFUL! It is easy to accidentally add new (blank)'#6'klines that should' + +' not be a part of your data file. Use the Edit menu and select the Delete ' + +'Row for any row'#6#31'accidentally added to the grid.'#6#0#6'gAvoid leaving' + +' any cell blank. It is recommended that you use a value such as 99999 as a' + +' missing value '#6'juntil you have the correct value for that case and vari' + +'able. Generally, it is NOT a good idea to have any'#6'Bmissing data since ' + +'not all procedures will work with missing data.'#6#0#6'eOnce you have enter' + +'ed data (or need to take a break from data entry) it is time to save the gr' + +'id data'#6'jinto a disk file. It is recommended that you save your data as' + +' a .LAZ file (the top option under the FILE'#6'jmenu.) This saves not only' + +' your data but also all of your variable definitions! You can, of course, ' + +'also'#6'jexport your data to a .TAB or other file format commonly utilized ' + +'by other programs. These other formats '#6'-do NOT save the definitions of' + +' the variables!'#6#0#6'iOnce you have entered data in a grid you will disco' + +'ver it is easy to "navigate" around the grid. Use the'#6'b"home" key, "end' + +'" key, "page up" and "page down" keys as needed. The "TAB" key will move y' + +'ou from'#6'kcell to cell in a case. You will also find procedures under th' + +'e Variables menu and the Edit menu that lets'#6'jyou recode values in the g' + +'rid, insert, copy and delete rows or columns, transform values in the grid,' + +' etc.'#6'iExperiment! Try different options. There''s not much you can do' + +' to harm your computer with this program.'#0#10'ScrollBars'#7#14'ssAutoVert' + +'ical'#8'TabOrder'#2#0#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#232#1#6'Height' + +#2#28#3'Top'#3#168#1#5'Width'#2'N'#7'Caption'#6#6'Return'#11'ModalResult'#2#1 + +#8'TabOrder'#2#1#0#0#0 +]); diff --git a/applications/lazstats/source_orig/gridhelpunit.pas b/applications/lazstats/source_orig/gridhelpunit.pas new file mode 100644 index 000000000..24b93868f --- /dev/null +++ b/applications/lazstats/source_orig/gridhelpunit.pas @@ -0,0 +1,33 @@ +unit GridHelpUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls; + +type + + { TGridHelpFrm } + + TGridHelpFrm = class(TForm) + ReturnBtn: TButton; + Memo1: TMemo; + private + { private declarations } + public + { public declarations } + end; + +var + GridHelpFrm: TGridHelpFrm; + +implementation + +initialization + {$I gridhelpunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/groupfrequnit.lfm b/applications/lazstats/source_orig/groupfrequnit.lfm new file mode 100644 index 000000000..228097f81 --- /dev/null +++ b/applications/lazstats/source_orig/groupfrequnit.lfm @@ -0,0 +1,213 @@ +object GroupFreqForm: TGroupFreqForm + Left = 259 + Height = 412 + Top = 137 + Width = 461 + Caption = 'Group Frequency Analysis' + ClientHeight = 412 + ClientWidth = 461 + OnShow = ResetBtnClick + LCLVersion = '0.9.30' + object Label1: TLabel + Left = 16 + Height = 16 + Top = 8 + Width = 102 + Caption = 'Available Variables:' + ParentColor = False + end + object Label2: TLabel + Left = 256 + Height = 16 + Top = 208 + Width = 79 + Caption = 'Group Variable' + ParentColor = False + end + object VarList: TListBox + Left = 16 + Height = 256 + Top = 24 + Width = 181 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object GrpInBtn: TBitBtn + Left = 211 + Height = 26 + Top = 200 + 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 = 1 + end + object GrpOutBtn: TBitBtn + Left = 211 + Height = 26 + Top = 232 + 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 = 2 + end + object GrpVarEdit: TEdit + Left = 255 + Height = 23 + Top = 224 + Width = 139 + TabOrder = 3 + Text = 'GrpVarEdit' + end + object ResetBtn: TButton + Left = 16 + Height = 27 + Top = 312 + Width = 89 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 4 + end + object CancelBtn: TButton + Left = 16 + Height = 27 + Top = 360 + Width = 89 + Cancel = True + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 5 + end + object ComputeBtn: TButton + Left = 112 + Height = 27 + Top = 312 + Width = 89 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 6 + end + object ReturnBtn: TButton + Left = 112 + Height = 27 + Top = 360 + Width = 89 + Caption = 'Return' + ModalResult = 1 + TabOrder = 7 + end + object OptionsBox: TRadioGroup + Left = 208 + Height = 131 + Top = 256 + Width = 229 + AutoFill = True + Caption = 'Plot Choices:' + 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 = 113 + ClientWidth = 225 + Items.Strings = ( + 'Plot means using 2D Horizontal Bars' + 'Plot means using 3D Horizontal Bars' + 'Plot means using 2D Vertical Bars' + 'Plot means using 3D Vertical Bars' + ) + TabOrder = 8 + end + object Memo1: TMemo + Left = 211 + Height = 130 + Top = 24 + Width = 230 + Lines.Strings = ( + 'This procedure plots the frequency of' + 'cases in each of the groups in a group' + 'variable. The group variable should' + 'be defined as an integer variable.' + '' + 'Select the variable and type of plot' + 'and click the Compute button for' + 'the results.' + ) + TabOrder = 9 + end +end diff --git a/applications/lazstats/source_orig/groupfrequnit.lrs b/applications/lazstats/source_orig/groupfrequnit.lrs new file mode 100644 index 000000000..3363f95eb --- /dev/null +++ b/applications/lazstats/source_orig/groupfrequnit.lrs @@ -0,0 +1,142 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGroupFreqForm','FORMDATA',[ + 'TPF0'#14'TGroupFreqForm'#13'GroupFreqForm'#4'Left'#3#3#1#6'Height'#3#156#1#3 + +'Top'#3#137#0#5'Width'#3#205#1#7'Caption'#6#24'Group Frequency Analysis'#12 + +'ClientHeight'#3#156#1#11'ClientWidth'#3#205#1#6'OnShow'#7#13'ResetBtnClick' + +#10'LCLVersion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#16#6'Height'#2#16 + +#3'Top'#2#8#5'Width'#2'f'#7'Caption'#6#20'Available Variables:'#11'ParentCol' + +'or'#8#0#0#6'TLabel'#6'Label2'#4'Left'#3#0#1#6'Height'#2#16#3'Top'#3#208#0#5 + +'Width'#2'O'#7'Caption'#6#14'Group Variable'#11'ParentColor'#8#0#0#8'TListBo' + +'x'#7'VarList'#4'Left'#2#16#6'Height'#3#0#1#3'Top'#2#24#5'Width'#3#181#0#10 + +'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'GrpInBtn' + +#4'Left'#3#211#0#6'Height'#2#26#3'Top'#3#200#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#255#255#255#0#255#255#255#0#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#1#0#0#7'TBitBtn'#9'GrpOutBtn'#4'Left'#3#211#0#6'Height'#2#26#3 + +'Top'#3#232#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'TabOrder'#2#2#0#0#5 + +'TEdit'#10'GrpVarEdit'#4'Left'#3#255#0#6'Height'#2#23#3'Top'#3#224#0#5'Width' + +#3#139#0#8'TabOrder'#2#3#4'Text'#6#10'GrpVarEdit'#0#0#7'TButton'#8'ResetBtn' + +#4'Left'#2#16#6'Height'#2#27#3'Top'#3'8'#1#5'Width'#2'Y'#7'Caption'#6#5'Rese' + +'t'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#4#0#0#7'TButton'#9'CancelBt' + +'n'#4'Left'#2#16#6'Height'#2#27#3'Top'#3'h'#1#5'Width'#2'Y'#6'Cancel'#9#7'Ca' + +'ption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#5#0#0#7'TButton'#10'Co' + +'mputeBtn'#4'Left'#2'p'#6'Height'#2#27#3'Top'#3'8'#1#5'Width'#2'Y'#7'Caption' + +#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#6#0#0#7'TButton' + +#9'ReturnBtn'#4'Left'#2'p'#6'Height'#2#27#3'Top'#3'h'#1#5'Width'#2'Y'#7'Capt' + +'ion'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#7#0#0#11'TRadioGroup'#10 + +'OptionsBox'#4'Left'#3#208#0#6'Height'#3#131#0#3'Top'#3#0#1#5'Width'#3#229#0 + +#8'AutoFill'#9#7'Caption'#6#13'Plot Choices:'#28'ChildSizing.LeftRightSpacin' + +'g'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizonta' + +'l'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsH' + +'omogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds' + +#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7 + ,#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'Cl' + +'ientHeight'#2'q'#11'ClientWidth'#3#225#0#13'Items.Strings'#1#6'#Plot means ' + +'using 2D Horizontal Bars'#6'#Plot means using 3D Horizontal Bars'#6'!Plot m' + +'eans using 2D Vertical Bars'#6'!Plot means using 3D Vertical Bars'#0#8'TabO' + +'rder'#2#8#0#0#5'TMemo'#5'Memo1'#4'Left'#3#211#0#6'Height'#3#130#0#3'Top'#2 + +#24#5'Width'#3#230#0#13'Lines.Strings'#1#6'%This procedure plots the frequen' + +'cy of'#6'&cases in each of the groups in a group'#6'$variable. The group v' + +'ariable should'#6'"be defined as an integer variable.'#6#0#6'$Select the va' + +'riable and type of plot'#6' and click the Compute button for'#6#12'the resu' + +'lts.'#0#8'TabOrder'#2#9#0#0#0 +]); diff --git a/applications/lazstats/source_orig/groupfrequnit.pas b/applications/lazstats/source_orig/groupfrequnit.pas new file mode 100644 index 000000000..40f1f84a1 --- /dev/null +++ b/applications/lazstats/source_orig/groupfrequnit.pas @@ -0,0 +1,173 @@ +unit GroupFreqUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, ExtCtrls, MainUnit, OutPutUnit, FunctionsLib, GraphLib, + Globals, DataProcs; + +type + + { TGroupFreqForm } + + TGroupFreqForm = class(TForm) + GrpInBtn: TBitBtn; + GrpOutBtn: TBitBtn; + CancelBtn: TButton; + ComputeBtn: TButton; + GrpVarEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Memo1: TMemo; + OptionsBox: TRadioGroup; + ResetBtn: TButton; + ReturnBtn: TButton; + VarList: TListBox; + procedure ComputeBtnClick(Sender: TObject); + procedure GrpInBtnClick(Sender: TObject); + procedure GrpOutBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + GroupFreqForm: TGroupFreqForm; + +implementation + +{ TGroupFreqForm } + +procedure TGroupFreqForm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); + GrpVarEdit.Text := ''; + GrpInBtn.Visible := true; + GrpOutBtn.Visible := false; +end; + +procedure TGroupFreqForm.GrpInBtnClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + if index < 0 then exit; + GrpVarEdit.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + GrpInBtn.Visible := false; + GrpOutBtn.Visible := true; +end; + +procedure TGroupFreqForm.ComputeBtnClick(Sender: TObject); +VAR + nogroups, mingrp, maxgrp, grpcol, tempcol, value, minfreq, maxfreq : integer; + labelstr : string; + results, prompt : boolean; + result, intvalue, i, j : integer; + dblvalue : double; + strvalue : string; + freq : IntDyneVec; + plottype : integer; +begin + // get the variable to analyze + + grpcol := 0; + for i := 1 to NoVariables do + begin + strvalue := Trim(OS3MainFrm.DataGrid.Cells[i,0]); + if GrpVarEdit.Text = strvalue then grpcol := i; + end; + labelstr := GrpVarEdit.Text; + mingrp := 1000; + maxgrp := -1000; + for i := 1 to NoCases do + begin + if not ValidValue(i,grpcol) then continue; + value := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[grpcol,i]))); + if value < mingrp then mingrp := value; + if value > maxgrp then maxgrp := value; + end; + nogroups := maxgrp - mingrp + 1; + if nogroups < 2 then + begin + ShowMessage('One or fewer groups found. Returning.'); + exit; + end; + // setup frequency array and count cases in each group + SetLength(freq,NoGroups+1); + for i := 0 to NoGroups do freq[i] := 0; + for i := 1 to NoCases do + begin + if not ValidValue(i,grpcol) then continue; + value := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[grpcol,i]))); + value := value - mingrp; + freq[value] := freq[value] + 1; + end; + // get min and max frequencies and check for existence of a range + minfreq := 10000; + maxfreq := -10000; + for i := 0 to NoGroups-1 do + begin + if freq[i] < minfreq then minfreq := freq[i]; + if freq[i] > maxfreq then maxfreq := freq[i]; + end; + if minfreq = maxfreq then + begin + ShowMessage('All groups have equal frequencies. Cannot plot.'); + freq := nil; + exit; + end; + plottype := OptionsBox.ItemIndex + 1; + if plottype = 3 then plottype := 1 + else if plottype = 4 then plottype := 2 + else if plottype = 1 then plottype := 9 + else if plottype = 2 then plottype := 10; + + // plot the frequencies + SetLength(GraphFrm.Xpoints,1,nogroups+1); + SetLength(GraphFrm.Ypoints,1,nogroups+1); + GraphFrm.nosets := 1; + GraphFrm.nbars := nogroups; + GraphFrm.Heading := 'Frequency Distribution'; + GraphFrm.XTitle := 'Values of ' + labelstr; + GraphFrm.YTitle := 'Frequency'; + GraphFrm.barwideprop := 0.5; + GraphFrm.AutoScale := false; + GraphFrm.miny := 0.0; + GraphFrm.maxy := maxfreq; + GraphFrm.GraphType := plottype; + GraphFrm.BackColor := clYellow; + GraphFrm.WallColor := clBlack; + GraphFrm.FloorColor := clLtGray; + GraphFrm.ShowBackWall := true; + for i := 0 to nogroups do + begin + GraphFrm.Ypoints[0,i] := freq[i]; + GraphFrm.Xpoints[0,i] := mingrp + i; + end; + GraphFrm.ShowModal; + GraphFrm.Xpoints := nil; + GraphFrm.Ypoints := nil; +end; + +procedure TGroupFreqForm.GrpOutBtnClick(Sender: TObject); +begin + if GrpVarEdit.Text = '' then exit; + VarList.Items.Add(GrpVarEdit.Text); + GrpVarEdit.Text := ''; + GrpInBtn.Visible := true; + GrpOutBtn.Visible := false; +end; + +initialization + {$I groupfrequnit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/guttmanunit.lfm b/applications/lazstats/source_orig/guttmanunit.lfm new file mode 100644 index 000000000..1b8cfe452 --- /dev/null +++ b/applications/lazstats/source_orig/guttmanunit.lfm @@ -0,0 +1,178 @@ +object GuttmanFrm: TGuttmanFrm + Left = 155 + Height = 332 + Top = 113 + Width = 400 + Caption = 'Guttman Sclaogram Analysis' + ClientHeight = 332 + ClientWidth = 400 + OnShow = FormShow + LCLVersion = '0.9.26.2' + object Label1: TLabel + Left = 10 + Height = 14 + Top = 8 + Width = 90 + Caption = 'Variables Available' + ParentColor = False + end + object Label2: TLabel + Left = 208 + Height = 14 + Top = 11 + Width = 72 + Caption = 'Selected Items' + ParentColor = False + end + object VarList: TListBox + Left = 9 + Height = 250 + Top = 24 + Width = 153 + MultiSelect = True + TabOrder = 0 + end + object InBtn: TBitBtn + Left = 169 + Height = 27 + Top = 25 + 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 = InBtnClick + TabOrder = 1 + end + object OutBtn: TBitBtn + Left = 169 + Height = 27 + Top = 56 + 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 = OutBtnClick + TabOrder = 2 + end + object AllBtn: TBitBtn + Left = 169 + Height = 27 + Top = 104 + Width = 30 + Caption = 'ALL' + NumGlyphs = 0 + OnClick = AllBtnClick + TabOrder = 3 + end + object ItemList: TListBox + Left = 206 + Height = 246 + Top = 30 + Width = 156 + TabOrder = 4 + end + object ResetBtn: TButton + Left = 8 + Height = 28 + Top = 289 + Width = 62 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 5 + end + object CancelBtn: TButton + Left = 100 + Height = 28 + Top = 289 + Width = 62 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 6 + end + object ComputeBtn: TButton + Left = 208 + Height = 28 + Top = 289 + Width = 62 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 7 + end + object ReturnBtn: TButton + Left = 300 + Height = 28 + Top = 288 + Width = 62 + Caption = 'Return' + ModalResult = 1 + TabOrder = 8 + end +end diff --git a/applications/lazstats/source_orig/guttmanunit.lrs b/applications/lazstats/source_orig/guttmanunit.lrs new file mode 100644 index 000000000..44d65e644 --- /dev/null +++ b/applications/lazstats/source_orig/guttmanunit.lrs @@ -0,0 +1,127 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TGuttmanFrm','FORMDATA',[ + 'TPF0'#11'TGuttmanFrm'#10'GuttmanFrm'#4'Left'#3#155#0#6'Height'#3'L'#1#3'Top' + +#2'q'#5'Width'#3#144#1#7'Caption'#6#26'Guttman Sclaogram Analysis'#12'Client' + +'Height'#3'L'#1#11'ClientWidth'#3#144#1#6'OnShow'#7#8'FormShow'#10'LCLVersio' + +'n'#6#8'0.9.26.2'#0#6'TLabel'#6'Label1'#4'Left'#2#10#6'Height'#2#14#3'Top'#2 + +#8#5'Width'#2'Z'#7'Caption'#6#19'Variables Available'#11'ParentColor'#8#0#0#6 + +'TLabel'#6'Label2'#4'Left'#3#208#0#6'Height'#2#14#3'Top'#2#11#5'Width'#2'H'#7 + +'Caption'#6#14'Selected Items'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4 + +'Left'#2#9#6'Height'#3#250#0#3'Top'#2#24#5'Width'#3#153#0#11'MultiSelect'#9#8 + +'TabOrder'#2#0#0#0#7'TBitBtn'#5'InBtn'#4'Left'#3#169#0#6'Height'#2#27#3'Top' + +#2#25#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#10'InBtnClick'#8'TabOrder'#2#1#0#0#7'TBitBtn'#6'OutBtn'#4'Left'#3 + +#169#0#6'Height'#2#27#3'Top'#2'8'#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''#204#138#255#162#216#171#255 + +#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149 + +#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~' + +#255'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205 + +#139#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V' + +#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/' + +#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e' + +#195'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199 + +'t'#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'OutBtnClick'#8'TabOrder'#2#2#0#0 + +#7'TBitBtn'#6'AllBtn'#4'Left'#3#169#0#6'Height'#2#27#3'Top'#2'h'#5'Width'#2 + +#30#7'Caption'#6#3'ALL'#9'NumGlyphs'#2#0#7'OnClick'#7#11'AllBtnClick'#8'TabO' + +'rder'#2#3#0#0#8'TListBox'#8'ItemList'#4'Left'#3#206#0#6'Height'#3#246#0#3'T' + +'op'#2#30#5'Width'#3#156#0#8'TabOrder'#2#4#0#0#7'TButton'#8'ResetBtn'#4'Left' + +#2#8#6'Height'#2#28#3'Top'#3'!'#1#5'Width'#2'>'#7'Caption'#6#5'Reset'#7'OnCl' + +'ick'#7#13'ResetBtnClick'#8'TabOrder'#2#5#0#0#7'TButton'#9'CancelBtn'#4'Left' + +#2'd'#6'Height'#2#28#3'Top'#3'!'#1#5'Width'#2'>'#7'Caption'#6#6'Cancel'#11'M' + +'odalResult'#2#2#8'TabOrder'#2#6#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#208 + +#0#6'Height'#2#28#3'Top'#3'!'#1#5'Width'#2'>'#7'Caption'#6#7'Compute'#7'OnCl' + +'ick'#7#15'ComputeBtnClick'#8'TabOrder'#2#7#0#0#7'TButton'#9'ReturnBtn'#4'Le' + +'ft'#3','#1#6'Height'#2#28#3'Top'#3' '#1#5'Width'#2'>'#7'Caption'#6#6'Return' + +#11'ModalResult'#2#1#8'TabOrder'#2#8#0#0#0 +]); diff --git a/applications/lazstats/source_orig/guttmanunit.pas b/applications/lazstats/source_orig/guttmanunit.pas new file mode 100644 index 000000000..03a21912d --- /dev/null +++ b/applications/lazstats/source_orig/guttmanunit.pas @@ -0,0 +1,598 @@ +unit GuttmanUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, MainUnit, OutPutUnit, FunctionsLib, Globals, + DataProcs, Math; + +type + + { TGuttmanFrm } + + TGuttmanFrm = class(TForm) + InBtn: TBitBtn; + OutBtn: TBitBtn; + AllBtn: TBitBtn; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + Label1: TLabel; + Label2: TLabel; + ItemList: TListBox; + VarList: TListBox; + procedure AllBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure InBtnClick(Sender: TObject); + procedure OutBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + GuttmanFrm: TGuttmanFrm; + +implementation + +{ TGuttmanFrm } + +procedure TGuttmanFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + ItemList.Clear; + OutBtn.Visible := false; + InBtn.Visible := true; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TGuttmanFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TGuttmanFrm.AllBtnClick(Sender: TObject); +VAR count, i : integer; +begin + count := VarList.Items.Count; + for i := 1 to count do + ItemList.Items.Add(VarList.Items.Strings[i-1]); + VarList.Clear; + InBtn.Visible := false; + OutBtn.Visible := true; +end; + +procedure TGuttmanFrm.ComputeBtnClick(Sender: TObject); +var + i, j, k, col, X, e0, e1, e2, e3, first, last, errors : integer; + totalerrors, rowno : integer; + FreqMat0 : IntDyneMat; // Pointer to array of 0 responses for each item by score group + FreqMat1 : IntDyneMat; // Pointer to array of 1 responses for each item by score group + RowTots : IntDyneVec; // Pointer to vector of total score frequencies for items + ColTots : IntDyneMat; // Pointer to array of 0 and 1 column totals + ColProps : DblDyneVec; // Pointer to array of proportions correct in columns + ColNoSelected : IntDyneVec; // Pointer to vector of item Grid columns + CaseVector : IntDyneVec; // Pointer to vector of subject's item responses + TotalScore : integer; // Total score of a subject + temp : integer; // temporary variable used in sorting + CutScore : IntDyneVec; // Optimal cut scores for each item + ErrorMat : IntDyneMat; // matrix of errors above and below cut scores + sequence : IntDyneVec; // original and sorted sequence no. of items + CaseNo : IntDyneVec; // ID number for each case + ModalArray : IntDyneMat; // Array of modal item responses + NoSelected : integer; + VarLabels : StrDyneVec; // variable labels + outline, astring : string; + done : boolean; + CoefRepro : double; + Min_Coeff : double; +begin + // allocate heap space for arrays + SetLength(ColNoSelected,NoVariables); + SetLength(FreqMat0,NoCases,NoVariables); + SetLength(FreqMat1,NoCases,NoVariables); + SetLength(RowTots,NoCases); + SetLength(ColTots,NoVariables,2); + SetLength(ColProps,NoVariables); + SetLength(CaseVector,NoCases); + SetLength(CutScore,NoCases); + SetLength(ErrorMat,NoVariables,2); + SetLength(sequence,NoVariables); + SetLength(CaseNo,NoCases); + SetLength(ModalArray,NoVariables+1,NoVariables+1); + SetLength(VarLabels,NoVariables); + + // get variables used for the analysis + NoSelected := ItemList.Items.Count; + for i := 1 to NoVariables do + begin + for j := 1 to NoSelected do + begin + 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; + OutPutFrm.RichEdit.Clear; + + // Initialize sequence + for i := 1 to NoSelected do sequence[i-1] := i; + + // 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 + begin + RowTots[i] := 0; + CutScore[i] := 0; + 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 + for i := 1 to NoCases do + begin + if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; + TotalScore := 0; + for j := 1 to NoSelected do + begin + col := ColNoSelected[j-1]; + X := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col,i]))); + CaseVector[j-1] := X; + TotalScore := TotalScore + X; + end; + for j := 1 to NoSelected do + begin + if (CaseVector[j-1] = 0) then FreqMat0[i-1,j-1] := 1 + else FreqMat1[i-1,j-1] := 1; + end; + end; + + // Get Row Totals for each score group (rows of FreqMat1) + for i := 1 to NoCases do + begin + if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; + for j := 1 to NoSelected do + begin + RowTots[i-1] := RowTots[i-1] + FreqMat1[i-1,j-1]; + end; + end; + + // Get Column Totals for item scores of 1 and 0 + for i := 1 to NoSelected do //columns + begin + for j := 1 to NoCases do // rows + begin + if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; + ColTots[i-1,0] := ColTots[i-1,0] + FreqMat0[j-1,i-1]; + ColTots[i-1,1] := ColTots[i-1,1] + FreqMat1[j-1,i-1]; + end; + end; + + //Sort frequency matrices into descending order + for i := 1 to NoCases - 1 do + begin + if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; + for j := i + 1 to NoCases do + begin + if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; + if (RowTots[i-1] < RowTots[j-1]) then //swap + begin + for k := 1 to NoSelected do + begin // carry all columns in the swap + temp := FreqMat0[i-1,k-1]; + FreqMat0[i-1,k-1] := FreqMat0[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; + // Also swap row totals + temp := RowTots[i-1]; + RowTots[i-1] := RowTots[j-1]; + RowTots[j-1] := temp; + // And case number + temp := CaseNo[i-1]; + CaseNo[i-1] := CaseNo[j-1]; + CaseNo[j-1] := temp; + end; // end if + end; // Next j + end; // next i + + // Now sort the columns into ascending order of number right + for i := 1 to NoSelected - 1 do + begin + for j := i + 1 to NoSelected do + begin + if (ColTots[i-1,1] > ColTots[j-1,1]) then //swap + begin + for k := 1 to NoCases do + begin + if (not GoodRecord(k,NoSelected,ColNoSelected)) then continue; + temp := FreqMat0[k-1,i-1]; + FreqMat0[k-1,i-1] := FreqMat0[k-1,j-1]; + FreqMat0[k-1,j-1] := temp; + temp := FreqMat1[k-1,i-1]; + FreqMat1[k-1,i-1] := FreqMat1[k-1,j-1]; + FreqMat1[k-1,j-1] := temp; + end; // next k + // swap column totals also + temp := ColTots[i-1,0]; + ColTots[i-1,0] := ColTots[j-1,0]; + ColTots[j-1,0] := temp; + temp := ColTots[i-1,1]; + ColTots[i-1,1] := ColTots[j-1,1]; + ColTots[j-1,1] := temp; + // swap label pointers + temp := sequence[i-1]; + sequence[i-1] := sequence[j-1]; + sequence[j-1] := temp; + end; // end if + end; // next j + end; // next i + + //For each item (column), find the optimal cutting value + for i := 1 to NoSelected do + begin + CutScore[i-1] := 0; + for j := 1 to NoCases do // j is the trial cut point + begin + if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; + e0 := 0; + e1 := 0; + //Get errors prior to the cut point + for k := 1 to j do + begin + if (not GoodRecord(k,NoSelected,ColNoSelected)) then continue; + if (FreqMat0[k-1,i-1] = 1) then e0 := e0 + 1; + end; + //Get errors following the cut point + for k := j + 1 to NoCases do + begin + if (not GoodRecord(k,NoSelected,ColNoSelected)) then continue; + if (FreqMat1[k-1,i-1] = 1) then e1 := e1 + 1; + end; + //Save errors for each cut + CaseVector[j-1] := e0 + e1; + end; // next j + // Save minimum cut score index + e2 := 32000; + e3 := 0; + for j := 1 to NoCases do + begin + if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; + if (CaseVector[j-1] < e2) then + begin + e2 := CaseVector[j-1]; + e3 := j; + end; + end; + CutScore[i-1] := e3; //Position of optimal cut for item i + end; + + // Get error counts; + for i := 1 to NoSelected do + begin + for j := 1 to CutScore[i-1] do + begin + if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; + 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]; + end; + for j := CutScore[i-1] + 1 to NoCases do + begin + if (not GoodRecord(j,NoSelected,ColNoSelected)) then continue; + 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]; + end; + end; + + // Print results + OutPutFrm.RichEdit.Lines.Add(' GUTTMAN SCALOGRAM ANALYSIS'); + OutPutFrm.RichEdit.Lines.Add(' Cornell Method'); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('No. of Cases := %3d. No. of items := %3d',[NoCases,NoSelected]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add('RESPONSE MATRIX'); + first := 1; + last := first + 5; // column (item) index + if (last > NoSelected) then last := NoSelected; + done := false; + + while (not done) do //loop through all of the score groups + begin + OutPutFrm.RichEdit.Lines.Add('Subject Row Item Number'); + outline := 'Label Sum'; + for i := first to last do + begin + astring := format('%10s',[VarLabels[sequence[i-1]-1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + for i := first to last do + begin + astring := ' 0 1 '; + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + for i := 1 to NoCases do // rows + begin + if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; + outline := format(' %3d %3d ',[CaseNo[i-1],RowTots[i-1]]); + for j := first to last do + begin + astring := format(' %3d %3d ',[FreqMat0[i-1,j-1],FreqMat1[i-1,j-1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + // check for optimal cut point for this score + for j := first to last do + begin + if (CutScore[j-1] = i) then + begin + astring := ' -cut- '; + outline := outline + astring; + end + else begin + astring := ' '; + outline := outline + astring; + end; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ''; + end; // Next row (score group) + OutPutFrm.RichEdit.Lines.Add(''); + outline := 'TOTALS '; + for j := first to last do + begin + astring := format(' %3d %3d ',[ColTots[j-1,0],ColTots[j-1,1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := 'ERRORS '; + for j := first to last do + begin + astring := format(' %3d %3d ',[ErrorMat[j-1,0],ErrorMat[j-1,1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + if (last < NoSelected) then + begin + first := last + 1; + last := first + 5; // column (item) index + if (last > NoSelected) then last := NoSelected; + end + else done := true; + OutPutFrm.RichEdit.Lines.Add(''); + end; + + OutPutFrm.RichEdit.Lines.Add(''); + CoefRepro := 0.0; + for j := 1 to NoSelected do + CoefRepro := CoefRepro + ErrorMat[j-1,0] + ErrorMat[j-1,1]; + CoefRepro := 1.0 - (CoefRepro / (NoCases * NoSelected)); + outline := format('Coefficient of Reproducibility := %6.3f',[CoefRepro]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + //-----------------------------GOODENOUGH---------------------------------- + // Complete Goodenough method and print results + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(' GUTTMAN SCALOGRAM ANALYSIS'); + OutPutFrm.RichEdit.Lines.Add(' Goodenough Modification Using Modal Responses'); + totalerrors := 0; + Min_Coeff := 0.0; + for i := 1 to NoSelected + 1 do + for j := 1 to NoSelected do ModalArray[i-1,j-1] := 0; + for i := 1 to NoSelected do // column + begin + ColProps[i-1] := ColTots[i-1,1] / NoCases; + ErrorMat[i-1,0] := 0; + ErrorMat[i-1,1] := 0; + end; + // Get the cut scores for each score row based on rounded proportions + for i := 1 to NoSelected do + begin + CutScore[i-1] := Trunc(ColProps[i-1] * (NoSelected+1)); + end; + // Build modal response array for the total scores by items + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(' MODAL ITEM RESPONSES'); + OutPutFrm.RichEdit.Lines.Add('TOTAL ITEMS'); + outline := ' '; + for i := 1 to NoSelected do + begin + astring := format('%10s',[VarLabels[sequence[i-1]-1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + for i := 0 to NoSelected do + begin + for j := 1 to NoSelected do + begin + if (CutScore[j-1] > i) then ModalArray[i,j-1] := 1 + else ModalArray[i,j-1] := 0; + end; + astring := format(' %3d ',[NoSelected - i]); + outline := astring; + for j := 1 to NoSelected do + begin + astring := format(' %3d ',[ModalArray[i,j-1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('No. of Cases := %3d. No. of items := %3d',[NoCases,NoSelected]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('RESPONSE MATRIX'); + first := 1; + last := first + 5; // column (item) index + if (last > NoSelected) then last := NoSelected; + done := false; + + while (not done) do //loop through all of the score groups + begin + OutPutFrm.RichEdit.Lines.Add('Subject Row Error Item Number'); + outline := 'Label Sum Count'; + for i := first to last do + begin + astring := format('%10s',[VarLabels[sequence[i-1]-1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + for i := first to last do + begin + astring := ' 0 1 '; + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + for i := 1 to NoCases do // rows + begin + if (not GoodRecord(i,NoSelected,ColNoSelected)) then continue; + errors := 0; + for j := first to last do + begin + rowno := NoSelected - RowTots[i-1] + 1; + if (FreqMat1[i-1,j-1] <> ModalArray[rowno-1,j-1]) then errors := errors + 1; + end; + + outline := format(' %3d %3d %3d ',[CaseNo[i-1],RowTots[i-1],errors]); + for j := first to last do + begin + astring := format(' %3d %3d ',[FreqMat0[i-1,j-1],FreqMat1[i-1,j-1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + totalerrors := totalerrors + errors; + end; // Next row (score group) + OutPutFrm.RichEdit.Lines.Add(''); + + outline :='TOTALS '; + for j := first to last do + begin + astring := format(' %3d %3d ',[ColTots[j-1,0],ColTots[j-1,1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + + outline := 'PROPORTIONS '; + for j := first to last do + begin + astring := format('%4.2f %4.2f ',[(1.0-ColProps[j-1]),ColProps[j-1]]); + outline := outline + astring; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + + if (last < NoSelected) then + begin + first := last + 1; + last := first + 5; // column (item) index + if (last > NoSelected) then last := NoSelected; + end + else done := true; + OutPutFrm.RichEdit.Lines.Add(''); + end; + OutPutFrm.RichEdit.Lines.Add(''); + CoefRepro := 1.0 - (totalerrors / (NoCases * NoSelected)); + outline := format('Coefficient of Reproducibility := %6.3f',[CoefRepro]); + OutPutFrm.RichEdit.Lines.Add(outline); + for j := 1 to NoSelected do + begin + if (ColProps[j-1] > (1.0 - ColProps[j-1])) then Min_Coeff := Min_Coeff + ColProps[j-1] + else Min_Coeff := Min_Coeff + (1.0 - ColProps[j-1]); + end; + Min_Coeff := Min_coeff / NoSelected; + outline := format('Minimal Marginal Reproducibility := %6.3f',[Min_Coeff]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + + // 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; + +procedure TGuttmanFrm.InBtnClick(Sender: TObject); +VAR i, index : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + ItemList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + OutBtn.Visible := true; +end; + +procedure TGuttmanFrm.OutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := ItemList.ItemIndex; + if index < 0 then + begin + OutBtn.Visible := false; + exit; + end; + VarList.Items.Add(ItemList.Items.Strings[index]); + ItemList.Items.Delete(index); +end; + +initialization + {$I guttmanunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/helpunit.lfm b/applications/lazstats/source_orig/helpunit.lfm new file mode 100644 index 000000000..d0f03470c --- /dev/null +++ b/applications/lazstats/source_orig/helpunit.lfm @@ -0,0 +1,53 @@ +object HelpFrm: THelpFrm + Left = 239 + Height = 117 + Top = 107 + Width = 303 + Caption = 'HTML Help Viewer' + ClientHeight = 117 + ClientWidth = 303 + OnCreate = FormCreate + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 9 + Height = 14 + Top = 8 + Width = 235 + Caption = 'PRESS THE Button for the TABLE OF CONTENTS!' + ParentColor = False + end + object HelpBtn: TButton + Left = 8 + Height = 28 + Top = 32 + Width = 154 + HelpType = htKeyword + HelpKeyword = 'HTML/LAZTOC.html' + Caption = 'Table of Contents' + OnClick = HelpBtnClick + TabOrder = 0 + end + object ReturnBtn: TButton + Left = 200 + Height = 27 + Top = 32 + Width = 85 + Caption = 'Return' + ModalResult = 1 + TabOrder = 1 + end + object HTMLHelpDatabase1: THTMLHelpDatabase + BaseURL = 'file://html/' + AutoRegister = True + KeywordPrefix = 'HTML/' + left = 16 + top = 72 + end + object HTMLBrowserHelpViewer1: THTMLBrowserHelpViewer + BrowserParams = '%s' + AutoRegister = True + left = 144 + top = 72 + end +end diff --git a/applications/lazstats/source_orig/helpunit.lrs b/applications/lazstats/source_orig/helpunit.lrs new file mode 100644 index 000000000..4e8d669d4 --- /dev/null +++ b/applications/lazstats/source_orig/helpunit.lrs @@ -0,0 +1,19 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('THelpFrm','FORMDATA',[ + 'TPF0'#8'THelpFrm'#7'HelpFrm'#4'Left'#3#239#0#6'Height'#2'u'#3'Top'#2'k'#5'Wi' + +'dth'#3'/'#1#7'Caption'#6#16'HTML Help Viewer'#12'ClientHeight'#2'u'#11'Clie' + +'ntWidth'#3'/'#1#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8'FormShow'#10'LCL' + +'Version'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2#14#3'T' + +'op'#2#8#5'Width'#3#235#0#7'Caption'#6'+PRESS THE Button for the TABLE OF CO' + +'NTENTS!'#11'ParentColor'#8#0#0#7'TButton'#7'HelpBtn'#4'Left'#2#8#6'Height'#2 + +#28#3'Top'#2' '#5'Width'#3#154#0#8'HelpType'#7#9'htKeyword'#11'HelpKeyword'#6 + +#16'HTML/LAZTOC.html'#7'Caption'#6#17'Table of Contents'#7'OnClick'#7#12'Hel' + +'pBtnClick'#8'TabOrder'#2#0#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#200#0#6'He' + +'ight'#2#27#3'Top'#2' '#5'Width'#2'U'#7'Caption'#6#6'Return'#11'ModalResult' + +#2#1#8'TabOrder'#2#1#0#0#17'THTMLHelpDatabase'#17'HTMLHelpDatabase1'#7'BaseU' + +'RL'#6#12'file://html/'#12'AutoRegister'#9#13'KeywordPrefix'#6#5'HTML/'#4'le' + +'ft'#2#16#3'top'#2'H'#0#0#22'THTMLBrowserHelpViewer'#22'HTMLBrowserHelpViewe' + +'r1'#13'BrowserParams'#6#2'%s'#12'AutoRegister'#9#4'left'#3#144#0#3'top'#2'H' + +#0#0#0 +]); diff --git a/applications/lazstats/source_orig/helpunit.pas b/applications/lazstats/source_orig/helpunit.pas new file mode 100644 index 000000000..64485bafd --- /dev/null +++ b/applications/lazstats/source_orig/helpunit.pas @@ -0,0 +1,56 @@ +unit HelpUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, LazHelpHTML, HelpIntfs; + +type + + { THelpFrm } + + THelpFrm = class(TForm) + ReturnBtn: TButton; + HelpBtn: TButton; + HTMLBrowserHelpViewer1: THTMLBrowserHelpViewer; + HTMLHelpDatabase1: THTMLHelpDatabase; + Label1: TLabel; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + HelpFrm: THelpFrm; + +implementation + +{ THelpFrm } + +procedure THelpFrm.FormShow(Sender: TObject); +begin +// HelpBtnClick(self); +end; + +procedure THelpFrm.FormCreate(Sender: TObject); +begin + HTMLHelpDatabase1.BaseURL := 'file://html'; +end; + +procedure THelpFrm.HelpBtnClick(Sender: TObject); +begin + ShowHelpOrErrorForKeyword('','HTML/LAZTOC.html'); +end; + +initialization + {$I helpunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/hierarchunit.lfm b/applications/lazstats/source_orig/hierarchunit.lfm new file mode 100644 index 000000000..701b5ee26 --- /dev/null +++ b/applications/lazstats/source_orig/hierarchunit.lfm @@ -0,0 +1,242 @@ +object HierarchFrm: THierarchFrm + Left = 172 + Height = 340 + Top = 97 + Width = 464 + Caption = 'Hierarchical Cluster Analysis' + ClientHeight = 340 + ClientWidth = 464 + OnShow = FormShow + LCLVersion = '0.9.26.2' + object Label1: TLabel + Left = 6 + Height = 14 + Top = 6 + Width = 90 + Caption = 'Available Variables' + ParentColor = False + end + object Label2: TLabel + Left = 211 + Height = 14 + Top = 7 + Width = 90 + Caption = 'Predictor Variables' + ParentColor = False + end + object VarList: TListBox + Left = 5 + Height = 306 + Top = 22 + Width = 154 + MultiSelect = True + TabOrder = 0 + end + object PredIn: TBitBtn + Left = 168 + Height = 32 + Top = 25 + Width = 32 + 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 = 1 + end + object PredOut: TBitBtn + Left = 168 + Height = 32 + Top = 64 + Width = 32 + 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 = 2 + end + object PredList: TListBox + Left = 208 + Height = 121 + Top = 24 + Width = 160 + TabOrder = 3 + end + object GroupBox1: TGroupBox + Left = 166 + Height = 176 + Top = 153 + Width = 205 + Caption = 'Options' + ClientHeight = 158 + ClientWidth = 201 + TabOrder = 4 + object STDChk: TCheckBox + Left = 8 + Height = 17 + Top = 4 + Width = 122 + Caption = 'Standardize Variables' + TabOrder = 0 + end + object ReplaceChk: TCheckBox + Left = 44 + Height = 17 + Top = 23 + Width = 117 + Caption = 'Replace Grid Values' + TabOrder = 1 + end + object StatsChk: TCheckBox + Left = 8 + Height = 17 + Top = 44 + Width = 118 + Caption = 'Descriptive Statistics' + TabOrder = 2 + end + object PlotChk: TCheckBox + Left = 8 + Height = 17 + Top = 67 + Width = 139 + Caption = 'No. Groups vs Errors Plot' + TabOrder = 3 + end + object MaxGrpsChk: TCheckBox + Left = 8 + Height = 17 + Top = 91 + Width = 124 + Caption = 'Maximum No. Groups:' + TabOrder = 4 + end + object MembersChk: TCheckBox + Left = 7 + Height = 17 + Top = 116 + Width = 133 + Caption = 'Print Group Membership' + TabOrder = 5 + end + object VarChk: TCheckBox + Left = 8 + Height = 17 + Top = 139 + Width = 150 + Caption = 'Cluster Variables, not cases' + TabOrder = 6 + end + object MaxGrps: TEdit + Left = 143 + Height = 20 + Top = 86 + Width = 37 + TabOrder = 7 + Text = 'MaxGrps' + end + end + object ResetBtn: TButton + Left = 384 + Height = 31 + Top = 25 + Width = 72 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 5 + end + object CancelBtn: TButton + Left = 384 + Height = 31 + Top = 80 + Width = 72 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 6 + end + object ComputeBtn: TButton + Left = 384 + Height = 31 + Top = 136 + Width = 72 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 7 + end + object ReturnBtn: TButton + Left = 384 + Height = 31 + Top = 192 + Width = 72 + Caption = 'Return' + ModalResult = 1 + TabOrder = 8 + end +end diff --git a/applications/lazstats/source_orig/hierarchunit.lrs b/applications/lazstats/source_orig/hierarchunit.lrs new file mode 100644 index 000000000..81a7c0a2e --- /dev/null +++ b/applications/lazstats/source_orig/hierarchunit.lrs @@ -0,0 +1,142 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('THierarchFrm','FORMDATA',[ + 'TPF0'#12'THierarchFrm'#11'HierarchFrm'#4'Left'#3#172#0#6'Height'#3'T'#1#3'To' + +'p'#2'a'#5'Width'#3#208#1#7'Caption'#6#29'Hierarchical Cluster Analysis'#12 + +'ClientHeight'#3'T'#1#11'ClientWidth'#3#208#1#6'OnShow'#7#8'FormShow'#10'LCL' + +'Version'#6#8'0.9.26.2'#0#6'TLabel'#6'Label1'#4'Left'#2#6#6'Height'#2#14#3'T' + +'op'#2#6#5'Width'#2'Z'#7'Caption'#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#7#5'Width'#2 + +'Z'#7'Caption'#6#19'Predictor Variables'#11'ParentColor'#8#0#0#8'TListBox'#7 + +'VarList'#4'Left'#2#5#6'Height'#3'2'#1#3'Top'#2#22#5'Width'#3#154#0#11'Multi' + +'Select'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#6'PredIn'#4'Left'#3#168#0#6'Height' + +#2' '#3'Top'#2#25#5'Width'#2' '#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0 + +#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0 + +#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161 + +'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'?'#136'E'#255 + +'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255#255#0#255#255#255 + +#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211#161#255#148#208#157 + +#255#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195 + +#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$'#196#255#255#255#0 + +#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171#255#158#214#167#255 + +#154#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144 + +#255#133#199#139#255#129#197#135#255'}'#194#130#255'J'#145'P'#255'%i)'#201 + +#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255'e'#195'q'#255'a'#190 + +'m'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255 + +'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#9'NumGlyphs'#2#0#7'OnClick'#7#11'PredInClick'#8'TabOrder'#2#1#0#0#7'TBitBtn' + +#7'PredOut'#4'Left'#3#168#0#6'Height'#2' '#3'Top'#2'@'#5'Width'#2' '#10'Glyp' + +'h.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0 + +#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + ,#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0'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'' + +#204#138#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255 + +#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135 + +#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0#255 + +#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X'#177 + +'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255 + +'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#12 + +'PredOutClick'#8'TabOrder'#2#2#0#0#8'TListBox'#8'PredList'#4'Left'#3#208#0#6 + +'Height'#2'y'#3'Top'#2#24#5'Width'#3#160#0#8'TabOrder'#2#3#0#0#9'TGroupBox'#9 + +'GroupBox1'#4'Left'#3#166#0#6'Height'#3#176#0#3'Top'#3#153#0#5'Width'#3#205#0 + +#7'Caption'#6#7'Options'#12'ClientHeight'#3#158#0#11'ClientWidth'#3#201#0#8 + +'TabOrder'#2#4#0#9'TCheckBox'#6'STDChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2#4 + +#5'Width'#2'z'#7'Caption'#6#21'Standardize Variables'#8'TabOrder'#2#0#0#0#9 + +'TCheckBox'#10'ReplaceChk'#4'Left'#2','#6'Height'#2#17#3'Top'#2#23#5'Width'#2 + +'u'#7'Caption'#6#19'Replace Grid Values'#8'TabOrder'#2#1#0#0#9'TCheckBox'#8 + +'StatsChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2','#5'Width'#2'v'#7'Caption'#6 + +#22'Descriptive Statistics'#8'TabOrder'#2#2#0#0#9'TCheckBox'#7'PlotChk'#4'Le' + +'ft'#2#8#6'Height'#2#17#3'Top'#2'C'#5'Width'#3#139#0#7'Caption'#6#25'No. Gro' + +'ups vs Errors Plot'#8'TabOrder'#2#3#0#0#9'TCheckBox'#10'MaxGrpsChk'#4'Left' + +#2#8#6'Height'#2#17#3'Top'#2'['#5'Width'#2'|'#7'Caption'#6#19'Maximum No. Gr' + +'oups:'#8'TabOrder'#2#4#0#0#9'TCheckBox'#10'MembersChk'#4'Left'#2#7#6'Height' + +#2#17#3'Top'#2't'#5'Width'#3#133#0#7'Caption'#6#22'Print Group Membership'#8 + +'TabOrder'#2#5#0#0#9'TCheckBox'#6'VarChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#3 + +#139#0#5'Width'#3#150#0#7'Caption'#6#28'Cluster Variables, not cases'#8'TabO' + ,'rder'#2#6#0#0#5'TEdit'#7'MaxGrps'#4'Left'#3#143#0#6'Height'#2#20#3'Top'#2'V' + +#5'Width'#2'%'#8'TabOrder'#2#7#4'Text'#6#7'MaxGrps'#0#0#0#7'TButton'#8'Reset' + +'Btn'#4'Left'#3#128#1#6'Height'#2#31#3'Top'#2#25#5'Width'#2'H'#7'Caption'#6#5 + +'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#5#0#0#7'TButton'#9'Canc' + +'elBtn'#4'Left'#3#128#1#6'Height'#2#31#3'Top'#2'P'#5'Width'#2'H'#7'Caption'#6 + +#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#6#0#0#7'TButton'#10'ComputeBtn' + +#4'Left'#3#128#1#6'Height'#2#31#3'Top'#3#136#0#5'Width'#2'H'#7'Caption'#6#7 + +'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#7#0#0#7'TButton'#9 + +'ReturnBtn'#4'Left'#3#128#1#6'Height'#2#31#3'Top'#3#192#0#5'Width'#2'H'#7'Ca' + +'ption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#8#0#0#0 +]); diff --git a/applications/lazstats/source_orig/hierarchunit.pas b/applications/lazstats/source_orig/hierarchunit.pas new file mode 100644 index 000000000..f2469b40b --- /dev/null +++ b/applications/lazstats/source_orig/hierarchunit.pas @@ -0,0 +1,485 @@ +unit HierarchUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, MainUnit, OutPutUnit, FunctionsLib, GraphLib, + Globals, MatrixLib, DataProcs, Math; + +type + + { THierarchFrm } + + THierarchFrm = class(TForm) + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + MaxGrps: TEdit; + STDChk: TCheckBox; + ReplaceChk: TCheckBox; + StatsChk: TCheckBox; + PlotChk: TCheckBox; + MaxGrpsChk: TCheckBox; + MembersChk: TCheckBox; + VarChk: TCheckBox; + GroupBox1: TGroupBox; + PredIn: TBitBtn; + PredOut: TBitBtn; + Label1: TLabel; + Label2: TLabel; + PredList: TListBox; + VarList: TListBox; + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure PredInClick(Sender: TObject); + procedure PredOutClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + HierarchFrm: THierarchFrm; + +implementation + +{ THierarchFrm } + +procedure THierarchFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + PredList.Clear; + PredOut.Visible := false; + PredIn.Visible := true; + StdChk.Checked := false; + ReplaceChk.Checked := false; + StatsChk.Checked := false; + PlotChk.Checked := false; + MaxGrpsChk.Checked := false; + VarChk.Checked := false; + MaxGrps.Text := ''; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure THierarchFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure THierarchFrm.ComputeBtnClick(Sender: TObject); +label next1; +var + varlabels, rowlabels : StrDyneVec; + outline, cellstring : string; + i, j, k, k1, k3, L, w3, n3, n4, n5, M, col, count: integer; + GrpCnt, Nrows, Ncols, NoSelected, linecount : integer; + w2, k4, k5, L1 : IntDyneVec; + ColSelected : IntDyneVec; + X, Y, d1, x1, MaxError : double; + W, XAxis, YAxis, means, variances, stddevs : DblDyneVec; + Distance : DblDyneMat; +begin + MaxError := 0.0; + GrpCnt := 0; + NoSelected := PredList.Items.Count; + if VarChk.Checked = false then + begin + SetLength(w2,NoCases); + SetLength(k4,NoCases); + SetLength(k5,NoCases); + SetLength(L1,NoCases); + SetLength(W,NoSelected); + SetLength(XAxis,NoCases); + SetLength(YAxis,NoCases); + SetLength(means,NoSelected); + SetLength(variances,NoSelected); + SetLength(stddevs,NoSelected); + SetLength(Distance,NoCases,NoCases); + SetLength(varlabels,NoSelected); + SetLength(rowlabels,NoCases); + SetLength(ColSelected,NoSelected); + Ncols := NoSelected; + Nrows := NoCases; + for i := 0 to Ncols - 1 do + begin + cellstring := PredList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + if (cellstring = OS3MainFrm.DataGrid.Cells[j,0]) then + begin + varlabels[i] := cellstring; + ColSelected[i] := j; + end; + end; + end; + for i := 0 to NoCases-1 do rowlabels[i] := IntToStr(i); + end + else begin + SetLength(w2,NoSelected); + SetLength(k4,NoSelected); + SetLength(k5,NoSelected); + SetLength(L1,NoSelected); + SetLength(W,NoCases); + SetLength(XAxis,NoSelected); + SetLength(YAxis,NoSelected); + SetLength(means,NoCases); + SetLength(variances,NoCases); + SetLength(stddevs,NoCases); + SetLength(Distance,NoSelected,NoCases); + SetLength(varlabels,NoCases); + SetLength(rowlabels,NoSelected); + SetLength(ColSelected,NoSelected); + Ncols := NoCases; + Nrows := NoSelected; + //Get labels of selected variables + for i := 0 to Nrows - 1 do + begin + cellstring := PredList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + if (cellstring = OS3MainFrm.DataGrid.Cells[j,0]) then + begin + ColSelected[i] := j; + rowlabels[i] := cellstring; + end; + end; + end; + for i := 0 to NoCases-1 do varlabels[i] := IntToStr(i); + end; + if MembersChk.Checked then k3 := 1 else k3 := 0; + + for j := 0 to Ncols-1 do + begin + means[j] := 0.0; + variances[j] := 0.0; + stddevs[j] := 0.0; + end; + + if VarChk.Checked = false then + begin + // Get labels of rows +// for i := 1 to Nrows do rowlabels[i-1] := MainFrm.Grid.Cells[0,i]; + + // Get data into the distance matrix + count := 0; + for i := 1 to Nrows do + begin + if (not GoodRecord(i,NoSelected,ColSelected)) then continue; + count := count + 1; + for j := 1 to Ncols do + begin + col := ColSelected[j-1]; + X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col,i])); + means[j-1] := means[j-1] + X; + variances[j-1] := variances[j-1] + (X * X); + Distance[i-1,j-1] := X; + end; + end; + end + else begin // cluster variables + // Get labels of columns +// for i := 1 to Nrows do rowlabels[i-1] := MainFrm.Grid.Cells[i,0]; + + // Get data into the distance matrix + count := 0; + for i := 1 to Nrows do // actually grid column in this case + begin +// if (not GoodRecord(i,NoSelected,ColSelected)) then continue; + count := count + 1; + for j := 1 to Ncols do // actually grid rows in this case + begin +// if (not GoodRecord(j,NoSelected,ColSelected)) then continue; + col := ColSelected[i-1]; + X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col,j])); + means[j-1] := means[j-1] + X; + variances[j-1] := variances[j-1] + (X * X); + Distance[i-1,j-1] := X; + end; + end; + end; + + // Calculate means and standard deviations of variables + for j := 0 to Ncols-1 do + begin + variances[j] := variances[j] - (means[j] * means[j] / count); + variances[j] := variances[j] / (count - 1); + stddevs[j] := sqrt(variances[j]); + means[j] := means[j] / count; + end; + + // Ready the output form + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Hierarchical Cluster Analysis'); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Number of objects to cluster := %d on %d variables.', + [Nrows, Ncols]); + OutPutFrm.RichEdit.Lines.Add(outline); + linecount := 3; + if (StatsChk.Checked) then + begin + DynVectorPrint(means,Ncols,'Variable Means',varlabels,count); + DynVectorPrint(variances,Ncols,'Variable Variances',varlabels,count); + DynVectorPrint(stddevs,Ncols,'Variable Standard Deviations',varlabels,count); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + linecount := 0; + end; + + // Standardize the distance scores if elected + if (StdChk.Checked) then + begin + for j := 0 to Ncols-1 do + for i := 0 to Nrows-1 do + Distance[i,j] := (Distance[i,j] - means[j]) / stddevs[j]; + end; + + if (ReplaceChk.Checked) then // replace original values in grid with z scores if elected + begin + for i := 1 to Nrows do + begin + if (not GoodRecord(i,NoSelected,ColSelected)) then continue; + for j := 1 to Ncols do + begin + col := ColSelected[j-1]; + outline := format('%6.4f',[Distance[i-1,j-1]]); + OS3MainFrm.DataGrid.Cells[col,i] := outline; + end; + end; + end; + + // Convert data matrix to initial matrix of error potentials + for i := 1 to Nrows do + begin +// if (not GoodRecord(i,NoSelected,ColSelected)) then continue; + for j := 1 to Ncols do W[j-1] := Distance[i-1,j-1]; + for j := i to Nrows do + begin +// if (not GoodRecord(i,NoSelected,ColSelected)) then continue; + Distance[i-1,j-1] := 0.0; + for k := 1 to Ncols do Distance[i-1,j-1] := Distance[i-1,j-1] + + (Distance[j-1,k-1] - W[k-1]) * (Distance[j-1,k-1] - W[k-1]); + Distance[i-1,j-1] := Distance[i-1,j-1] / 2.0; + end; + end; + for i := 1 to Nrows do + for j := i to Nrows do Distance[j-1,i-1] := 0.0; + + // Now, group the cases for maximum groups down + if MaxGrpsChk.Checked then + begin + k1 := StrToInt(MaxGrps.Text); + n3 := Nrows; + end + else begin + k1 := 2; + n3 := Nrows; + end; + + // Initialize group membership and group-n vectors + for i := 0 to Nrows-1 do + begin + k4[i] := i+1; + k5[i] := i+1; + w2[i] := 1; + end; + + // Locate optimal combination, if more than 2 groups remain +next1: + n3 := n3 - 1; + if (n3 > 1) then + begin + x1 := 100000000000.0; + for i := 1 to Nrows do + begin + if (k5[i-1] = i) then + begin + for j := i to Nrows do + begin + if ((i <> j) and (k5[j-1] = j)) then + begin + d1 := Distance[i-1,j-1] - Distance[i-1,i-1] - Distance[j-1,j-1]; + if (d1 < x1) then + begin + x1 := d1; + L := i; + M := j; + end; // end if + end; // end if + end; // next j + end; // end if + end; // next i + n4 := w2[L-1]; + n5 := w2[M-1]; + + OutPutFrm.RichEdit.Lines.Add(''); + linecount := linecount + 1; + GrpCnt := GrpCnt + 1; + XAxis[GrpCnt-1] := n3; + YAxis[GrpCnt-1] := x1; + if (x1 > MaxError) then MaxError := x1; + outline := format('%d groups after combining group %d (n := %d ) and group %d (n := %d) error := %7.3f', + [n3, L, n4, M, n5, x1]); + OutPutFrm.RichEdit.Lines.Add(outline); + linecount := linecount + 1; + if (linecount >= 60) then + begin + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + linecount := 0; + end; + w3 := w2[L-1] + w2[M-1]; + x1 := Distance[L-1,M-1] * w3; + Y := Distance[L-1,L-1] * w2[L-1] + Distance[M-1,M-1] * w2[M-1]; + Distance[L-1,L-1] := Distance[L-1,M-1]; + for i := 1 to Nrows do + if (k5[i-1] = M) then k5[i-1] := L; + for i := 1 to Nrows do + begin + if ((i <> L) and (k5[i-1] = i)) then + begin + if (i <= L) then + begin + Distance[i-1,L-1] := Distance[i-1,L-1] * (w2[i-1] + w2[L-1]) + + Distance[i-1,M-1] * (w2[i-1] + w2[M-1]) + + x1 - Y - Distance[i-1,i-1] * w2[i-1]; + Distance[i-1,L-1] := Distance[i-1,L-1] / (w2[i-1] + w3); + end + else + begin + Distance[L-1,i-1] := Distance[L-1,i-1] * (w2[L-1] + w2[i-1]) + + (Distance[M-1,i-1] + Distance[i-1,M-1]) * (w2[M-1] + w2[i-1]); + Distance[L-1,i-1] := (Distance[L-1,i-1]+ x1 - Y + - Distance[i-1,i-1] * w2[i-1]) / (w2[i-1] + w3); + end; + end; + end; + w2[L-1] := w3; + if (n3 > k1) then goto next1; + + // print group memberships of all objects, if optioned + for i := 1 to Nrows do + begin + if (k5[i-1] = i) then + begin + L := 0; + for j := 1 to Nrows do + begin + if (k5[j-1] = i) then + begin + L := L + 1; + L1[L-1] := k4[j-1]; + if k3 = 1 then L1[L-1] := j; + end; + end; + if k3 = 1 then + begin + outline := format('Group %d (n := %d)',[i,L]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ''; + for j := 1 to L do + begin + outline := format(' Object := %s',[rowlabels[L1[j-1]-1]]); + OutPutFrm.RichEdit.Lines.Add(outline); + linecount := linecount + 1; + end; + if (linecount >= 60) then + begin + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + linecount := 0; + end; + end; // end if + end; // end if + end; // next i + goto next1; + end; // end if + if (linecount > 0) then OutPutFrm.ShowModal; + + if (PlotChk.Checked) then + begin + SetLength(GraphFrm.Ypoints,1,GrpCnt); + SetLength(GraphFrm.Xpoints,1,GrpCnt); + for i := 1 to GrpCnt do + begin + GraphFrm.Ypoints[0,i-1] := YAxis[i-1]; + GraphFrm.Xpoints[0,i-1] := XAxis[i-1]; + end; + GraphFrm.nosets := 1; + GraphFrm.nbars := GrpCnt; + GraphFrm.Heading := 'NO. GROUPS VERSUS GROUPING ERROR'; + GraphFrm.XTitle := 'NO. GROUPS'; + GraphFrm.YTitle := 'ERROR'; +// GraphFrm.Ypoints[1] := YAxis; +// GraphFrm.Xpoints[1] := XAxis; + GraphFrm.AutoScale := true; + GraphFrm.PtLabels := false; + GraphFrm.GraphType := 7; // 2d points + GraphFrm.BackColor := clYellow; + GraphFrm.ShowBackWall := true; + GraphFrm.ShowModal; +end; + + // clean up + ColSelected := nil; + rowlabels := nil; + varlabels := nil; + Distance := nil; + stddevs := nil; + variances := nil; + means := nil; + YAxis := nil; + XAxis := nil; + W := nil; + L1 := nil; + k5 := nil; + k4 := nil; + w2 := nil; + GraphFrm.Xpoints := nil; + GraphFrm.Ypoints := nil; +end; + +procedure THierarchFrm.PredInClick(Sender: TObject); +VAR i, index : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + PredList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + PredOut.Visible := true; +end; + +procedure THierarchFrm.PredOutClick(Sender: TObject); +VAR index : integer; +begin + index := PredList.ItemIndex; + if index < 0 then + begin + PredOut.Visible := false; + exit; + end; + VarList.Items.Add(PredList.Items.Strings[index]); + PredList.Items.Delete(index); +end; + +initialization + {$I hierarchunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/hypergeounit.lfm b/applications/lazstats/source_orig/hypergeounit.lfm new file mode 100644 index 000000000..dfb53cac3 --- /dev/null +++ b/applications/lazstats/source_orig/hypergeounit.lfm @@ -0,0 +1,182 @@ +object HyperGeoForm: THyperGeoForm + Left = 288 + Height = 403 + Top = 161 + Width = 320 + Caption = 'Hypergeometric Probabilities' + ClientHeight = 403 + ClientWidth = 320 + OnShow = ResetBtnClick + LCLVersion = '0.9.30' + object Label1: TLabel + Left = 7 + Height = 16 + Top = 20 + Width = 69 + Caption = 'Sample Size: ' + ParentColor = False + end + object Label2: TLabel + Left = 10 + Height = 16 + Top = 55 + Width = 153 + Caption = 'Number observed in sample:' + ParentColor = False + end + object Label3: TLabel + Left = 9 + Height = 16 + Top = 88 + Width = 85 + Caption = 'Population Size:' + ParentColor = False + end + object Label4: TLabel + Left = 7 + Height = 16 + Top = 123 + Width = 173 + Caption = 'Number observed in population:' + ParentColor = False + end + object Label5: TLabel + Left = 7 + Height = 16 + Top = 163 + Width = 85 + Caption = 'Probability of X:' + ParentColor = False + end + object Label6: TLabel + Left = 8 + Height = 16 + Top = 201 + Width = 138 + Caption = 'Probability greater than X:' + ParentColor = False + end + object Label7: TLabel + Left = 8 + Height = 16 + Top = 238 + Width = 153 + Caption = 'Probability less or equal to X:' + ParentColor = False + end + object Label8: TLabel + Left = 9 + Height = 16 + Top = 275 + Width = 171 + Caption = 'Probability greater or equal to X:' + ParentColor = False + end + object Label9: TLabel + Left = 7 + Height = 16 + Top = 313 + Width = 120 + Caption = 'Probability less than X:' + ParentColor = False + end + object ResetBtn: TButton + Left = 7 + Height = 31 + Top = 346 + Width = 76 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 0 + end + object ComputeBtn: TButton + Left = 112 + Height = 31 + Top = 344 + Width = 76 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 1 + end + object ReturnBtn: TButton + Left = 216 + Height = 31 + Top = 344 + Width = 76 + Caption = 'Return' + ModalResult = 1 + TabOrder = 2 + end + object SampSizeEdit: TEdit + Left = 208 + Height = 23 + Top = 12 + Width = 76 + TabOrder = 3 + Text = 'SampSizeEdit' + end + object SampObsEdit: TEdit + Left = 208 + Height = 23 + Top = 48 + Width = 76 + TabOrder = 4 + Text = 'Edit1' + end + object PopSizeEdit: TEdit + Left = 208 + Height = 23 + Top = 80 + Width = 76 + TabOrder = 5 + Text = 'Edit1' + end + object PopObsEdit: TEdit + Left = 208 + Height = 23 + Top = 112 + Width = 76 + TabOrder = 6 + Text = 'Edit1' + end + object ProbXEdit: TEdit + Left = 208 + Height = 23 + Top = 152 + Width = 76 + TabOrder = 7 + Text = 'Edit1' + end + object ProbGTEdit: TEdit + Left = 208 + Height = 23 + Top = 192 + Width = 76 + TabOrder = 8 + Text = 'Edit1' + end + object ProbLEEdit: TEdit + Left = 208 + Height = 23 + Top = 231 + Width = 76 + TabOrder = 9 + Text = 'Edit1' + end + object ProbGEEdit: TEdit + Left = 208 + Height = 23 + Top = 268 + Width = 76 + TabOrder = 10 + Text = 'Edit1' + end + object ProbLTEdit: TEdit + Left = 208 + Height = 23 + Top = 306 + Width = 76 + TabOrder = 11 + Text = 'Edit1' + end +end diff --git a/applications/lazstats/source_orig/hypergeounit.lrs b/applications/lazstats/source_orig/hypergeounit.lrs new file mode 100644 index 000000000..2c1907c68 --- /dev/null +++ b/applications/lazstats/source_orig/hypergeounit.lrs @@ -0,0 +1,45 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('THyperGeoForm','FORMDATA',[ + 'TPF0'#13'THyperGeoForm'#12'HyperGeoForm'#4'Left'#3' '#1#6'Height'#3#147#1#3 + +'Top'#3#161#0#5'Width'#3'@'#1#7'Caption'#6#28'Hypergeometric Probabilities' + +#12'ClientHeight'#3#147#1#11'ClientWidth'#3'@'#1#6'OnShow'#7#13'ResetBtnClic' + +'k'#10'LCLVersion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#7#6'Height'#2 + +#16#3'Top'#2#20#5'Width'#2'E'#7'Caption'#6#13'Sample Size: '#11'ParentColor' + +#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#10#6'Height'#2#16#3'Top'#2'7'#5'Width'#3 + +#153#0#7'Caption'#6#26'Number observed in sample:'#11'ParentColor'#8#0#0#6'T' + +'Label'#6'Label3'#4'Left'#2#9#6'Height'#2#16#3'Top'#2'X'#5'Width'#2'U'#7'Cap' + +'tion'#6#16'Population Size:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Le' + +'ft'#2#7#6'Height'#2#16#3'Top'#2'{'#5'Width'#3#173#0#7'Caption'#6#30'Number ' + +'observed in population:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#2 + +#7#6'Height'#2#16#3'Top'#3#163#0#5'Width'#2'U'#7'Caption'#6#17'Probability o' + +'f X:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label6'#4'Left'#2#8#6'Height'#2#16#3 + +'Top'#3#201#0#5'Width'#3#138#0#7'Caption'#6#27'Probability greater than X:' + +#11'ParentColor'#8#0#0#6'TLabel'#6'Label7'#4'Left'#2#8#6'Height'#2#16#3'Top' + +#3#238#0#5'Width'#3#153#0#7'Caption'#6#31'Probability less or equal to X:'#11 + +'ParentColor'#8#0#0#6'TLabel'#6'Label8'#4'Left'#2#9#6'Height'#2#16#3'Top'#3 + +#19#1#5'Width'#3#171#0#7'Caption'#6'"Probability greater or equal to X:'#11 + +'ParentColor'#8#0#0#6'TLabel'#6'Label9'#4'Left'#2#7#6'Height'#2#16#3'Top'#3 + +'9'#1#5'Width'#2'x'#7'Caption'#6#24'Probability less than X:'#11'ParentColor' + +#8#0#0#7'TButton'#8'ResetBtn'#4'Left'#2#7#6'Height'#2#31#3'Top'#3'Z'#1#5'Wid' + +'th'#2'L'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2 + +#0#0#0#7'TButton'#10'ComputeBtn'#4'Left'#2'p'#6'Height'#2#31#3'Top'#3'X'#1#5 + +'Width'#2'L'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabO' + +'rder'#2#1#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#216#0#6'Height'#2#31#3'Top' + +#3'X'#1#5'Width'#2'L'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder' + +#2#2#0#0#5'TEdit'#12'SampSizeEdit'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#2#12 + +#5'Width'#2'L'#8'TabOrder'#2#3#4'Text'#6#12'SampSizeEdit'#0#0#5'TEdit'#11'Sa' + +'mpObsEdit'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#2'0'#5'Width'#2'L'#8'TabOr' + +'der'#2#4#4'Text'#6#5'Edit1'#0#0#5'TEdit'#11'PopSizeEdit'#4'Left'#3#208#0#6 + +'Height'#2#23#3'Top'#2'P'#5'Width'#2'L'#8'TabOrder'#2#5#4'Text'#6#5'Edit1'#0 + +#0#5'TEdit'#10'PopObsEdit'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#2'p'#5'Widt' + +'h'#2'L'#8'TabOrder'#2#6#4'Text'#6#5'Edit1'#0#0#5'TEdit'#9'ProbXEdit'#4'Left' + +#3#208#0#6'Height'#2#23#3'Top'#3#152#0#5'Width'#2'L'#8'TabOrder'#2#7#4'Text' + +#6#5'Edit1'#0#0#5'TEdit'#10'ProbGTEdit'#4'Left'#3#208#0#6'Height'#2#23#3'Top' + +#3#192#0#5'Width'#2'L'#8'TabOrder'#2#8#4'Text'#6#5'Edit1'#0#0#5'TEdit'#10'Pr' + +'obLEEdit'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#3#231#0#5'Width'#2'L'#8'Tab' + +'Order'#2#9#4'Text'#6#5'Edit1'#0#0#5'TEdit'#10'ProbGEEdit'#4'Left'#3#208#0#6 + +'Height'#2#23#3'Top'#3#12#1#5'Width'#2'L'#8'TabOrder'#2#10#4'Text'#6#5'Edit1' + +#0#0#5'TEdit'#10'ProbLTEdit'#4'Left'#3#208#0#6'Height'#2#23#3'Top'#3'2'#1#5 + +'Width'#2'L'#8'TabOrder'#2#11#4'Text'#6#5'Edit1'#0#0#0 +]); diff --git a/applications/lazstats/source_orig/hypergeounit.pas b/applications/lazstats/source_orig/hypergeounit.pas new file mode 100644 index 000000000..c2a70e458 --- /dev/null +++ b/applications/lazstats/source_orig/hypergeounit.pas @@ -0,0 +1,181 @@ +unit HyperGeoUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, functionsLib, OutPutUnit; + +type + + { THyperGeoForm } + + THyperGeoForm = class(TForm) + ResetBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + SampSizeEdit: TEdit; + SampObsEdit: TEdit; + PopSizeEdit: TEdit; + PopObsEdit: TEdit; + ProbXEdit: TEdit; + ProbGTEdit: TEdit; + ProbLEEdit: TEdit; + ProbGEEdit: TEdit; + ProbLTEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + Label7: TLabel; + Label8: TLabel; + Label9: TLabel; + procedure ComputeBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure FisherTable(A,B,C,D, p, SumP : double); + private + { private declarations } + + public + { public declarations } + end; + +var + HyperGeoForm: THyperGeoForm; + +implementation + +{ THyperGeoForm } + +procedure THyperGeoForm.ResetBtnClick(Sender: TObject); +begin + SampSizeEdit.Text := ''; + SampObsEdit.Text := ''; + PopSizeEdit.Text := ''; + PopObsEdit.Text := ''; + ProbXEdit.Text := ''; + ProbGEEdit.Text := ''; + ProbLTEdit.Text := ''; + ProbLEEdit.Text := ''; + ProbGTEdit.Text := ''; + label5.Visible := false; + label6.Visible := false; + label7.Visible := false; + label8.Visible := false; + label9.Visible := false; + ProbXEdit.Visible := false; + ProbGEEdit.Visible := false; + ProbLTEdit.Visible := false; + ProbLEEdit.Visible := false; + ProbGTEdit.Visible := false; +end; + +procedure THyperGeoForm.ComputeBtnClick(Sender: TObject); +VAR + SampObs, PopObs, SampSize, PopSize, N : double; + A, B, C, D, APlusC, BPlusD, APlusB, CPlusD : double; + largest : integer; + ProbX, Prob, SumProb, ProbGE, ProbGT, ProbLT, ProbLE : double; + done : boolean; + outvalue : string; +begin + done := false; + SumProb := 0.0; + label5.Visible := true; + label6.Visible := true; + label7.Visible := true; + label8.Visible := true; + label9.Visible := true; + ProbXEdit.Visible := true; + ProbGEEdit.Visible := true; + ProbLTEdit.Visible := true; + ProbLEEdit.Visible := true; + ProbGTEdit.Visible := true; + SampObs := StrToFloat(SampObsEdit.Text); + PopObs := StrToFloat(PopObsEdit.Text); + SampSize := StrToFloat(SampSizeEdit.Text); + PopSize := StrToFloat(PopSizeEdit.Text); + A := SampObs; + B := SampSize - A; + C := PopObs; + D := PopSize - C; + APlusC := A + C; + BPlusD := B + D; + APlusB := A + B; + CPlusD := C + D; + N := A + B + C + D; + +// largest := 1; + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Hypergeometric Distribution Calculations'); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Accumulating Values of the distribution'); + OutPutFrm.RichEdit.Lines.Add(''); + ProbX := combos(A,C) * combos(B,D) / combos(APlusB,CPlusD); + outvalue := format('%6.4f',[ProbX]); + ProbXEdit.Text := outvalue; + SumProb := SumProb + ProbX; + FisherTable(A,B,C,D,ProbX,SumProb); + + // get more extreme probabilities + while not done do + begin + if A = APlusB then done := true + else begin + A := A + 1; + B := B - 1; + if (A < 0) or (B < 0) or (C < 0) or (D < 0) then done := true; + end; + if not done then + begin + Prob := combos(A,C) * combos(B,D) / combos(APlusB,CPlusD); + SumProb := SumProb + Prob; + FisherTable(A,B,C,D,Prob,SumProb); + end; + end; // end while not done + OutPutFrm.ShowModal; + ProbGE := SumProb; + ProbGT := SumProb - ProbX; + ProbLT := 1.0 - ProbGE; + ProbLE := ProbLT + ProbX; + outvalue := format('%6.4f',[ProbGE]); + ProbGEEdit.Text := outvalue; + outvalue := format('%6.4f',[ProbLE]); + ProbLEEdit.Text := outvalue; + outvalue := format('%6.4f',[ProbGT]); + ProbGTEdit.Text := outvalue; + outvalue := format('%6.4f',[ProbLT]); + ProbLTEdit.Text := outvalue; + OutPutFrm.RichEdit.Clear; + +end; + +procedure THyperGeoForm.FisherTable(A,B,C,D, p, SumP : double); +VAR + outline : string; +begin + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Table for Hypergeometric Probabilities'); + OutPutFrm.RichEdit.Lines.Add(' Column'); + OutPutFrm.RichEdit.Lines.Add('Row 1 2'); + outline := format(' 1 %10.0f %10.0f',[A,B]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format(' 2 %10.0f %10.0f',[C,D]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Probability = %6.4f',[p]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Cumulative Probability = %6.4f',[SumP]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); +end; + +initialization + {$I hypergeounit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/interruptedunit.lfm b/applications/lazstats/source_orig/interruptedunit.lfm new file mode 100644 index 000000000..45709e35c --- /dev/null +++ b/applications/lazstats/source_orig/interruptedunit.lfm @@ -0,0 +1,291 @@ +object InterruptedFrm: TInterruptedFrm + Left = 66 + Height = 337 + Top = 66 + Width = 537 + Align = alCustom + AutoSize = True + BorderIcons = [biSystemMenu] + BorderStyle = bsDialog + Caption = 'Interrupted Time Series Analysis' + ClientHeight = 337 + ClientWidth = 537 + OnShow = FormShow + Position = poDefault + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 2 + Height = 14 + Top = 0 + Width = 90 + Caption = 'Available Variables' + ParentColor = False + end + object Label2: TLabel + Left = 250 + Height = 14 + Top = 2 + Width = 138 + Caption = 'Pre-Treatment Observations' + ParentColor = False + end + object Label3: TLabel + Left = 250 + Height = 14 + Top = 153 + Width = 143 + Caption = 'Post-Treatment Observations' + ParentColor = False + end + object VarList: TListBox + Left = 0 + Height = 271 + Top = 23 + Width = 188 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object PreInBtn: TBitBtn + Left = 194 + Height = 29 + Top = 23 + Width = 35 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE + 6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580 + 3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3 + 71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7 + 74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7 + 74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + NumGlyphs = 0 + OnClick = PreInBtnClick + TabOrder = 1 + end + object PreOutBtn: TBitBtn + Left = 194 + Height = 29 + Top = 64 + Width = 35 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580 + 3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3 + 71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7 + 74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF + FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + NumGlyphs = 0 + OnClick = PreOutBtnClick + TabOrder = 2 + end + object PostInBtn: TBitBtn + Left = 194 + Height = 29 + Top = 169 + Width = 35 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE + 6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580 + 3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3 + 71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7 + 74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7 + 74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + NumGlyphs = 0 + OnClick = PostInBtnClick + TabOrder = 3 + end + object PostOutBtn: TBitBtn + Left = 194 + Height = 29 + Top = 208 + Width = 35 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF004DA1560647994FB8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0053A95CD94DA156F747994F38FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF005DB868CF71BE7BFF7AC183FF5BAA64FF47994FFF419149FF3B8842FF3580 + 3BFF2F7835FF2A702FFF256929FF216324FF1D5E20FFFFFFFF00FFFFFF0065C3 + 71C47BC886FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF72BD78FF216324FFFFFFFF00FFFFFF0068C7 + 74C97FCC8AFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF78C07EFF256929FFFFFFFF00FFFFFF00FFFF + FF0068C774D180CD8BFF7CC987FF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF3B8842FF35803BFF2F7835FF2A702FFFFFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C774DB65C371F7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0068C7740668C774BBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + NumGlyphs = 0 + OnClick = PostOutBtnClick + TabOrder = 4 + end + object PreList: TListBox + Left = 239 + Height = 118 + Top = 23 + Width = 155 + ItemHeight = 0 + MultiSelect = True + TabOrder = 5 + end + object PostList: TListBox + Left = 239 + Height = 127 + Top = 169 + Width = 158 + ItemHeight = 0 + MultiSelect = True + TabOrder = 6 + end + object ResetBtn: TButton + Left = 418 + Height = 27 + Top = 40 + Width = 72 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 7 + end + object CancelBtn: TButton + Left = 418 + Height = 27 + Top = 104 + Width = 72 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 8 + end + object ComputeBtn: TButton + Left = 418 + Height = 27 + Top = 169 + Width = 72 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 9 + end + object ReturnBtn: TButton + Left = 418 + Height = 27 + Top = 232 + Width = 72 + Caption = 'Return' + ModalResult = 1 + TabOrder = 10 + end + object CorrChk: TCheckBox + Left = 1 + Height = 17 + Top = 305 + Width = 110 + Caption = 'ShowCorrelograms' + TabOrder = 11 + end +end diff --git a/applications/lazstats/source_orig/interruptedunit.lrs b/applications/lazstats/source_orig/interruptedunit.lrs new file mode 100644 index 000000000..23cf61db9 --- /dev/null +++ b/applications/lazstats/source_orig/interruptedunit.lrs @@ -0,0 +1,237 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TInterruptedFrm','FORMDATA',[ + 'TPF0'#15'TInterruptedFrm'#14'InterruptedFrm'#4'Left'#2'B'#6'Height'#3'Q'#1#3 + +'Top'#2'B'#5'Width'#3#25#2#5'Align'#7#8'alCustom'#8'AutoSize'#9#11'BorderIco' + +'ns'#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6' Inter' + +'rupted Time Series Analysis'#12'ClientHeight'#3'Q'#1#11'ClientWidth'#3#25#2 + +#6'OnShow'#7#8'FormShow'#8'Position'#7#9'poDefault'#10'LCLVersion'#6#8'0.9.2' + +'8.2'#0#6'TLabel'#6'Label1'#4'Left'#2#2#6'Height'#2#14#3'Top'#2#0#5'Width'#2 + +'Z'#7'Caption'#6#19'Available Variables'#11'ParentColor'#8#0#0#6'TLabel'#6'L' + +'abel2'#4'Left'#3#250#0#6'Height'#2#14#3'Top'#2#2#5'Width'#3#138#0#7'Caption' + +#6#26'Pre-Treatment Observations'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4 + +'Left'#3#250#0#6'Height'#2#14#3'Top'#3#153#0#5'Width'#3#143#0#7'Caption'#6#27 + +'Post-Treatment Observations'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4 + +'Left'#2#0#6'Height'#3#15#1#3'Top'#2#23#5'Width'#3#188#0#10'ItemHeight'#2#0 + +#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#8'PreInBtn'#4'Left'#3#194#0 + +#6'Height'#2#29#3'Top'#2#23#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#13'PreInBtnClick'#8'TabOrder'#2 + ,#1#0#0#7'TBitBtn'#9'PreOutBtn'#4'Left'#3#194#0#6'Height'#2#29#3'Top'#2'@'#5 + +'Width'#2'#'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0 + +'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0 + +#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O' + +#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V' + +#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255 + +'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5' + +#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195 + +'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144 + +#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255 + +'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255 + +#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212 + +#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133 + +#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255 + +#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135 + +#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A' + +#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyp' + +'hs'#2#0#7'OnClick'#7#14'PreOutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#9'Po' + +'stInBtn'#4'Left'#3#194#0#6'Height'#2#29#3'Top'#3#169#0#5'Width'#2'#'#10'Gly' + +'ph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0 + +#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + ,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$' + +#184#29'^ '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X' + +#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B' + +#255'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255 + +#255#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165 + +#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201 + +#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140 + +'J'#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255 + +#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154 + +#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194 + +#130#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h' + +#199't'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\' + +#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/' + +'x5'#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#14'PostInBtnClick' + +#8'TabOrder'#2#3#0#0#7'TBitBtn'#10'PostOutBtn'#4'Left'#3#194#0#6'Height'#2#29 + +#3'Top'#3#208#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#15'PostOutBtnClick'#8'TabOrder'#2#4#0#0 + +#8'TListBox'#7'PreList'#4'Left'#3#239#0#6'Height'#2'v'#3'Top'#2#23#5'Width'#3 + +#155#0#10'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#5#0#0#8'TListBox'#8 + +'PostList'#4'Left'#3#239#0#6'Height'#2#127#3'Top'#3#169#0#5'Width'#3#158#0#10 + +'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#6#0#0#7'TButton'#8'ResetBtn' + +#4'Left'#3#162#1#6'Height'#2#27#3'Top'#2'('#5'Width'#2'H'#7'Caption'#6#5'Res' + +'et'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#7#0#0#7'TButton'#9'CancelB' + +'tn'#4'Left'#3#162#1#6'Height'#2#27#3'Top'#2'h'#5'Width'#2'H'#7'Caption'#6#6 + +'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#8#0#0#7'TButton'#10'ComputeBtn'#4 + +'Left'#3#162#1#6'Height'#2#27#3'Top'#3#169#0#5'Width'#2'H'#7'Caption'#6#7'Co' + +'mpute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#9#0#0#7'TButton'#9'Re' + +'turnBtn'#4'Left'#3#162#1#6'Height'#2#27#3'Top'#3#232#0#5'Width'#2'H'#7'Capt' + +'ion'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#10#0#0#9'TCheckBox'#7'Co' + +'rrChk'#4'Left'#2#1#6'Height'#2#17#3'Top'#3'1'#1#5'Width'#2'n'#7'Caption'#6 + +#16'ShowCorrelograms'#8'TabOrder'#2#11#0#0#0 +]); diff --git a/applications/lazstats/source_orig/interruptedunit.pas b/applications/lazstats/source_orig/interruptedunit.pas new file mode 100644 index 000000000..45b3db7c3 --- /dev/null +++ b/applications/lazstats/source_orig/interruptedunit.pas @@ -0,0 +1,909 @@ +unit InterruptedUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, MainUnit, Globals, DataProcs, OutPutUnit, + AutoPlotUnit, GraphLib; + +type + + { TInterruptedFrm } + + TInterruptedFrm = class(TForm) + CorrChk: TCheckBox; + PreInBtn: TBitBtn; + PreOutBtn: TBitBtn; + PostInBtn: TBitBtn; + PostOutBtn: TBitBtn; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + VarList: TListBox; + PreList: TListBox; + PostList: TListBox; + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure PostInBtnClick(Sender: TObject); + procedure PostOutBtnClick(Sender: TObject); + procedure PreInBtnClick(Sender: TObject); + procedure PreOutBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure matinverse(Sender: TObject); + procedure plotit( Sender: TObject); + procedure PlotFuncs(Sender: TObject); + + private + { private declarations } + z : DblDyneVec; + y : DblDyneVec; + x : DblDyneMat; + x1 : array[1..4,1..4] of double; + x2 : array[1..4,1..4] of double; + x3 : array[1..4] of double; + t : array[1..4] of double; + p : array[1..100] of double; + p1 : array[1..4] of double; + ii3 : array[1..4,1..3] of double; + p2 : array[1..4] of double; + s : array[1..4] of double; + t2 : array[1..4] of double; + b : array[1..4,1..1] of double; + x4 : array[1..50,1..10] of double; + d : array[1..50,1..5] of double; + r : array[1..50] of double; + x5 : array[1..50,1..11] of double; + a1 : array[1..10] of double; + a2 : array[1..10] of double; + r2 : array[1..10] of double; + e : array[1..10] of double; + f2 : array[1..5,1..10] of double; + pl : string; + f1s, g1s, g2s, g3s, g4s, g5s, g6s, g7s, g8s : string; + c9, g, c, g1, t3, t4, t5, t6, f4, n7, d7, y1, xx3, f1, f2x, s1 : double; + s3, s4, h, f3, y2, a, det, amax : double; + col, n, n1, n2, n4, n5, n6, m, l1, l2, i3, t1, NoGoodCases : integer; + n3, j1, m1, i1, R1 : integer; + + public + { public declarations } + end; + +var + InterruptedFrm: TInterruptedFrm; + +implementation + +{ TInterruptedFrm } + +procedure TInterruptedFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + PreList.Clear; + PostList.Clear; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); + PreOutBtn.Visible := false; + PostOutBtn.Visible := false; + PreInBtn.Visible := true; + PostInBtn.Visible := true; +end; + +procedure TInterruptedFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(Self); +end; + +procedure TInterruptedFrm.ComputeBtnClick(Sender: TObject); +label 300; +var + i, i2, j, j2, j3, k : integer; + ColNoSelected : IntDyneVec; + rxy : DblDyneVec; + heading : string; +begin + g1s := 't..change in level '; + g2s := 't..change in slope '; + g3s := 'scaled posterior '; + g4s := 'lower 99 percent '; + g5s := 'lower 95 percent '; + g6s := 'delta '; + g7s := 'upper 95 percent '; + g8s := 'upper 99 percent '; + c9 := 1.0E-15; + n1 := 0; + n2 := 0; + g := 0.01; + NoGoodCases := 0; + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Interrupted Time Series Analysis'); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Adapted from the Fortran program written by Glass and Maguire'); + OutPutFrm.RichEdit.Lines.Add('and based on Box and Tiao IMA(1,1) procedure. Published in'); + OutPutFrm.RichEdit.Lines.Add('How To Do Psychotherapy and How to Evaluate It by'); + OutPutFrm.RichEdit.Lines.Add('John M. Gottman and Sandra R. Leiblum, Holt, Rinehart and '); + OutPutFrm.RichEdit.Lines.Add('Winston, Inc., New York, 1974.'); + OutPutFrm.RichEdit.Lines.Add(''); + n1 := PreList.Items.Count; + n2 := PostList.Items.Count; + t1 := n1 + n2; + if t1 < 5 then + begin + ShowMessage('There must be more than 4 total values in the series.'); + exit; + end; + // allocate space + SetLength(z,t1); + SetLength(y,t1); + SetLength(x,t1,4); + SetLength(ColNoSelected,t1); + SetLength(rxy,t1); + + // Get column numbers of variables selected + for i := 1 to n1 do + begin + for j := 1 to NoVariables do + begin + if PreList.Items.Strings[i-1] = OS3MainFrm.DataGrid.Cells[j,0] then + ColNoSelected[i-1] := j; + end; + end; + for i := 1 to n2 do + begin + for j := 1 to NoVariables do + begin + if PostList.Items.Strings[i-1] = OS3MainFrm.DataGrid.Cells[j,0] then + ColNoSelected[n1+i-1] := j; + end; + end; + + // read pre and post values - average for the cases + for j := 0 to t1-1 do z[j] := 0.0; + for i := 1 to NoCases do + begin + if NOT GoodRecord(i,t1,ColNoSelected) then continue; + for j := 0 to t1-1 do + begin + col := ColNoSelected[j]; + z[j] := z[j] + StrToFloat(OS3MainFrm.DataGrid.Cells[col,i]); + NoGoodCases := NoGoodCases + 1; + end; + end; + for j := 0 to t1-1 do z[j] := z[j] / NoGoodCases; + + // plot correlograms + for j3 := 1 to 4 do + begin + case j3 of + 1 : begin + f1s := 'Pre-Treatment Data'; + n4 := n1; + l1 := 1; + l2 := n1; + OutPutFrm.RichEdit.Lines.Add('Correlogram of Pre-Treatment Raw Data'); + heading := 'Correlogram of Pre-Treatment Raw Data'; + i2 := 0; + for i := l1 to l2 do + begin + i2 := i2 + 1; + y[i2-1] := z[i-1]; + end; + end; + 2 : begin + f1s := 'Post-Treatment Data'; + n4 := n2; + l1 := n1 + 1; + l2 := t1; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Correlogram of Post-Treatment Raw Data'); + heading := 'Correlogram of Post-Treatment Raw Data'; + i2 := 0; + for i := l1 to l2 do + begin + i2 := i2 + 1; + y[i2-1] := z[i-1]; + end; + end; + 3 : begin + f1s := 'Pre-Treatment Data'; + n4 := n1 - 1; + l1 := 1; + l2 := n1 - 1; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Correlogram of Pre-Treatment Differences'); + heading := 'Correlogram of Pre-Treatment Differences'; + i2 := 0; + for i := l1 to l2 do + begin + i2 := i2 + 1; + i3 := i + 1; + y[i2-1] := z[i3-1] - z[i-1]; + end; + end; + 4 : begin + f1s := 'Post-Treatment Data'; + n4 := n2-1; + l1 := n1 + 1; + l2 := t1 - 1; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Correlogram of Post-Treatment Differences'); + heading := 'Correlogram of Post-Treatment Differences'; + i2 := 0; + for i := l1 to l2 do + begin + i2 := i2 + 1; + i3 := i + 1; + y[i2-1] := z[i3-1] - z[i-1]; + end; + end; + end; + j2 := n4 * 3 div 4; + for k := 1 to j2 do + begin + n5 := n4 - k; + c := 0.0; + t3 := 0.0; + t4 := 0.0; + t5 := 0.0; + t6 := 0.0; + for i := 1 to n5 do + begin + n6 := i + k; + c := c + y[i-1] * y[n6-1]; + t3 := t3 + y[i-1]; + t4 := t4 + y[n6-1]; + t5 := t5 + y[i-1] * y[i-1]; + t6 := t6 + y[n6-1] * y[n6-1]; + end; + f4 := n5; + n7 := c - (t3 * t4) / f4; + d7 := (t5 - (t3 * t3) / f4) * (t6 - (t4 * t4) / f4); + if d7 > 0.0 then + begin + d7 := sqrt(d7); + r[k] := n7 / d7; + end + else r[k] := 1.0; + pl := format('lag %3d r %4.2f',[k,r[k]]); + OutPutFrm.RichEdit.Lines.Add(pl); + end; // next k + s4 := 1; + n := 1; + m := j2; + for i := 1 to j2 do x4[i,1] := r[i]; +// plotit(Self); + if CorrChk.Checked then + begin + rxy[0] := 0.0; + for i := 1 to j2 do rxy[i] := r[i]; + AutoPlotFrm.PlotPartCors := false; + AutoPlotFrm.PlotLimits := false; + AutoPlotFrm.correlations := rxy; + AutoPlotFrm.partcors := rxy; + AutoPlotFrm.uplimit := 0.99; + AutoPlotFrm.lowlimit := -0.99; + AutoPlotFrm.npoints := j2+1; + AutoPlotFrm.DepVarEdit := heading; + AutoPlotFrm.ShowModal; + end; + end; // next j3 + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + // Now do the analysis + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(' residual t for change in t for'); + OutPutFrm.RichEdit.Lines.Add(' gamma variance level level level change'); +300: + y[0] := z[0]; + for i := 1 to t1-1 do + begin + i1 := i - 1; + y1 := abs(y[i1]); + if (y1 - c9) <= 0.0 then y[i] := z[i] - z[i1] + else if (y1 - 0.000001) > 0 then y[i] := (z[i] - z[i1]) + (1.0 - g) * y[i1]; + g1 := abs(1.0 - g); + if (g1 - 0.001) > 0 then y[i] := (z[i] - z[i1]) + (1.0 - g) * y[i1] + else y[i] := z[i] - z[i1]; + end; + for i := 0 to t1 - 1 do x[i,0] := 1; + for i := 1 to n1 do x[i-1,1] := 0.0; + for i := n1 + 1 to t1 do x[i-1,1] := 1.0; + x[0,2] := 1.0; + x[1,2] := 1.0 - g; + for i := 2 to t1-1 do + begin + i1 := i - 1; + x[i,2] := x[1,2] * x[i1,2]; + xx3 := abs(x[i,2]); + if (c9 - xx3) <= 0.0 then continue; + x[i,2] := 0.0; + end; + for i := 1 to n1 do x[i-1,3] := 0.0; + for i := n1 to t1-1 do + begin + i1 := i-n1; + x[i,3] := x[i1,2]; + xx3 := abs(x[i,3]); + if (c9 - xx3) <= 0.0 then continue; + x[i,3] := 0.0; + end; + for i := 1 to 4 do + begin + for j := 1 to 4 do + begin + x2[i,j] := 0.0; + x1[i,j] := 0.0; + end; + end; + for i := 1 to 4 do + for j := 1 to 4 do + for k := 1 to t1 do + x2[i,j] := x2[i,j] + x[k-1,i-1] * x[k-1,j-1]; + for i := 1 to 4 do + for j := 1 to 4 do + x1[i,j] := x2[i,j]; + for i := 1 to 4 do x3[i] := 0.0; + for i := 1 to 4 do + for j := 1 to t1 do + x3[i] := x3[i] + x[j-1,i-1] * y[j-1]; + for i := 1 to 4 do b[i,1] := x3[i]; + matinverse(Self); + for i := 1 to 4 do t[i] := b[i,1]; + for i := 1 to 4 do s[i] := x1[i,i]; + f1 := t1; + y1 := 0.0; + for i := 0 to t1-1 do + begin + y1 := y1 + y[i] * y[i]; + end; + for i := 1 to 4 do x3[i] := 0.0; + for j := 1 to 4 do + for i := 1 to 4 do + begin + x3[j] := x3[j] + t[i] * x2[i,j]; + end; + f2x := 0.0; + for i := 1 to 4 do + begin + f2x := f2x + x3[i] * t[i]; + end; + s1 := y1 - f2x; + s1 := s1 / (f1 - 4.0); + for i := 1 to 4 do + begin + s[i] := sqrt(s1 * s[i]); + t2[i] := t[i] / s[i]; + end; + s3 := ln(s1); + det := ln(det); + h := (-0.5 * det) - (0.5 * (f1 - 4.0) * s3); + h := 0.4342945 * h; + j1 := j1 + 1; + x5[j1,1] := g; + x5[j1,2] := s1; + x5[j1,3] := t[3]; + x5[j1,4] := t2[3]; + x5[j1,5] := t[4]; + x5[j1,6] := t2[4]; + x5[j1,7] := t[1]; + x5[j1,8] := t2[1]; + x5[j1,9] := t[2]; + x5[j1,10] := t2[2]; + if (t1 - 30) >= 0 then + begin + d[j1,1] := t[4] - 2.58 * s[4]; + d[j1,2] := t[4] - 1.96 * s[4]; + d[j1,3] := t[4]; + d[j1,4] := t[4] + 1.96 * s[4]; + d[j1,5] := t[4] + 2.58 * s[4]; + end; + n3 := n3 + 1; + p[n3] := h; + g := g + 0.04; + if (n3 - 49) <= 0 then goto 300; + f3 := p[1]; + for i := 2 to 49 do if (f3 - p[i]) < 0 then f3 := p[i]; + for i := 1 to 49 do + begin + p[i] := p[i] - f3; + y2 := abs(p[i]); + if (y2 - 35) >= 0 then p[i] := 0.0 + else begin + p[i] := p[i] / 0.4342945; + p[i] := exp(p[i]); + end; + end; + a := 0.0; + for i := 2 to 49 do + begin + i2 := i - 1; + a := a + 0.005 * (p[i] + p[i1]); + end; + for i := 1 to 49 do p[i] := p[i] / a; + for i := 1 to 49 do x5[i,11] := p[i]; + for i := 1 to 49 do + begin + pl := format('%2d ',[i]); + for j := 1 to 6 do + pl := pl + format('%6.2f ',[x5[i,j]]); + OutPutFrm.RichEdit.Lines.Add(pl); + end; + + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(''); + pl := ' t for change in t for scaled'; + OutPutFrm.RichEdit.Lines.Add(pl); + pl := ' slope slope slope change posterior'; + OutPutFrm.RichEdit.Lines.Add(pl); + for i := 1 to 49 do + begin + pl := format('%2d ',[i]); + for j := 7 to 11 do + pl := pl + format('%6.2f ',[x5[i,j]]); + OutPutFrm.RichEdit.Lines.Add(pl); + end; + + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(''); + for i := 1 to 49 do + begin + x4[i,1] := x5[i,5]; + x4[i,2] := x5[i,9]; + x4[i,3] := x5[i,11]; + end; + m := 49; + n := 3; + i3 := 1; + f1s := g1s + g2s + g3s; + PlotFuncs(Self); + plotit(Self); // plot the f[i,j] values + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + n := 5; + if (t1 - 30) >= 0 then + begin // do confidence intervals around delta + for i := 1 to 49 do + for j := 1 to 5 do + x4[i,j] := d[i,j]; + f1s := g4s + g5s + g6s + g7s + g8s; + pl := 'Confidence Intervals Around Delta'; + OutPutFrm.RichEdit.Lines.Add(pl); + pl := 'gamma lower 99 lower 95 delta upper 95 upper 99'; + OutPutFrm.RichEdit.Lines.Add(pl); + for i := 1 to 49 do + begin + pl := format('%6.2f ',[x5[i,1]]); + for j := 1 to 5 do + pl := pl + format('%6.2f ',[d[i,j]]); + OutPutFrm.RichEdit.Lines.Add(pl); + end; + OutPutFrm.RichEdit.Lines.Add(''); + pl := 'Graph of Confidence Intervals Around Delta Hat'; + OutPutFrm.RichEdit.Lines.Add(pl); + plotit(Self); // plot f matrix + end; + + OutPutFrm.ShowModal; + + // clean up + rxy := nil; + ColNoSelected := nil; + x := nil; + y := nil; + z := nil; +end; + +procedure TInterruptedFrm.PostInBtnClick(Sender: TObject); +VAR i, index : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + PostList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + PostOutBtn.Visible := true; + if VarList.Items.Count = 0 then PostInBtn.Visible := false; +end; + +procedure TInterruptedFrm.PostOutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := PostList.ItemIndex; + if index >= 0 then + begin + VarList.Items.Add(PostList.Items.Strings[index]); + PostList.Items.Delete(index); + PostInBtn.Visible := true; + if PostList.Items.Count = 0 then PostOutBtn.Visible := false; + end; +end; + +procedure TInterruptedFrm.PreInBtnClick(Sender: TObject); +VAR i, index : integer; +begin + index := VarList.Items.count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + PreList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + PreOutBtn.Visible := true; + if VarList.Items.Count = 0 then PreInBtn.Visible := false; +end; + +procedure TInterruptedFrm.PreOutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := PreList.ItemIndex; + if index >= 0 then + begin + VarList.Items.Add(PreList.Items.Strings[index]); + PreList.Items.Delete(index); + PreInBtn.Visible := true; + if PreList.Items.Count = 0 then PreOutBtn.Visible := false; + end; +end; + +procedure TInterruptedFrm.matinverse(Sender: TObject); +var + i, j, j2, j4, k, L, Lc : integer; + temp : double; +begin + //Matrix inverse and determinant + + det := 1; + m1 := 1; + N := 4; + For i := 1 To 4 do + begin + p1[i] := 0.0; + For j := 1 To 2 do ii3[i, j] := 0.0; + end; + For i := 1 To N do + begin + amax := 0.0; + For j := 1 To N do + begin + If (p1[j] - 1) <> 0 Then + begin + For k := 1 To N do + begin + If (p1[k] - 1) <> 0 Then + begin + If (p1[k] - 1) > 0 Then Exit; + If Abs(amax) - Abs(x1[j, k]) <= 0 Then + begin + R1 := j; + i1 := k; + amax := x1[j, k]; + End; + End; + end; + End; + end; + p1[i1] := p1[i1] + 1; + If (R1 - i1) <> 0 Then //Swap + begin + det := -det; + For L := 1 To N do + begin + s4 := x1[R1, L]; + x1[R1, L] := x1[i1, L]; + x1[i1, L] := s4; + end; + If m1 > 0 Then //Swap + begin + For L := 1 To m1 do + begin + s4 := b[R1, L]; + b[R1, L] := b[i1, L]; + b[i1, L] := s4; + end; + End; + End; + ii3[i, 1] := R1; + ii3[i, 2] := i1; + p2[i] := x1[i1, i1]; + det := det * p2[i]; + If p2[i] = 0 Then + begin + ShowMessage('A singular matrix was found.'); + Exit; + End; + x1[i1, i1] := 1; + For L := 1 To N do + begin + x1[i1, L] := x1[i1, L] / p2[i]; + end; + If m1 > 0 Then + begin + For L := 1 To m1 do + begin + b[i1, L] := b[i1, L] / p2[i]; + end; + End; + For Lc := 1 To N do + begin + If (Lc - i1) <> 0 Then + begin + temp := x1[Lc,i1]; + x1[L1,i1] := 0.0; + For L := 1 To N do + begin + x1[Lc,L] := x1[Lc,L] - x1[i1,L] * temp; + end; + If m1 > 0 Then + begin + For L := 1 To m1 do + b[L1, L] := b[L1, L] - b[i1, L] * temp; + End; + End; + end; + end; + For i := 1 To N do + begin + L := N + 1 - i; + If (ii3[L, 1] - ii3[L, 2]) <> 0 Then + begin + j2 := round(ii3[L, 1]); + j4 := round(ii3[L, 2]); + For k := 1 To N do + begin + s4 := x1[k, j2]; + x1[k, j2] := x1[k, j4]; + x1[k, j4] := s4; + end; + End; + end; +end; +//-------------------------------------------------------------------- + +procedure TInterruptedFrm.plotit( Sender: TObject); +label 2180, 2660; +var + i, i2, ip, j, k, L, n8 : integer; + bstr, p1str, p2str : string; + c5, z2 : double; + +begin + For i := 1 To N do + begin + a1[i] := 1E+37; + a2[i] := -1E+37; + end; + bstr := '153510cmha'; + For i := 1 To M do + begin + For j := 1 To N do + begin + c5 := x4[i, j] - a1[j]; + If c5 >= 0 Then goto 2180; + a1[j] := x4[i, j]; +2180: c5 := x4[i, j] - a2[j]; + If c5 <= 0 Then continue; + a2[j] := x4[i, j]; + end; + end; + If (N - 5) = 0 Then + begin + For j := 1 To 5 do + begin + a2[j] := a2[5]; + a1[j] := a1[1]; + end; + End; + n8 := N; + For j := 1 To N do + begin + r2[j] := (a2[j] - a1[j]) / 55; + end; + For j := 1 To N do + begin + e[j] := (a2[j] - a1[j]) / 4; + f2[1, j] := a1[j] + 0.05; + c5 := a1[j]; + If c5 < 0 Then + begin + f2[1, j] := f2[1, j] - 0.1; + End; + f2[5, j] := a2[j] - 0.05; + c5 := a2[j]; + If c5 < 0 Then + begin + f2[5, j] := f2[5, j] - 0.1; + End; + f2[2, j] := a1[j] + e[j] + 0.05; + c5 := f2[2, j]; + If c5 < 0 Then + begin + f2[2, j] := f2[2, j] - 0.1; + End; + f2[3, j] := a1[j] + e[j] * 2 + 0.05; + c5 := f2[3, j]; + If c5 < 0 Then + begin + f2[3, j] := f2[3, j] - 0.1; + End; + f2[4, j] := a2[j] - e[j] + 0.05; + c5 := f2[4, j]; + If c5 < 0 Then + begin + f2[4, j] := f2[4, j] - 0.1; + End; + end; + + For j := 1 To n8 do + begin + pl := bstr[j] + ' '; + For i := 1 To 5 do + begin + pl := pl + format('%6.2f ',[f2[i,j]]); + end; + pl := pl + copy(bstr, j, 1); + OutPutFrm.RichEdit.Lines.Add(pl); + end; + pl := ''; + OutPutFrm.RichEdit.Lines.Add('----------------------------------------------------------------------'); + + for i2 := 1 to 73 do + begin + p2str := p2str + ' '; + p1str := p1str + ' '; + end; + For i := 1 To M do + begin + For i2 := 1 To 72 do p1str[i2] := ' '; + k := 0; + p1str[1] := '.'; + For i2 := 1 To 5 do + begin + k := k + 14; + p1str[k] := '.'; + end; + n7 := i; + while N7 >= 0 do + begin + n7 := n7 - 10; + end; + If n7 >= 0 Then + begin + k := 3; + p1str[k] := '-'; + For i2 := 3 To 30 do + begin + k := k + 2; + p1str[k] := '-'; + end; + End; + For k := 1 To N do + begin + If r2[k] > 0 Then + z2 := (x4[i, k] - a1[k]) / r2[k] + 1 + Else z2 := 0; + L := round(z2); + If (L - 1) < 0 Then L := 1; + If (55 - L) < 0 Then L := 55; + If (p1str[L] = ' ') Or (p1str[L] = '.') Or (p1str[L] = '-') Then + begin + p2str[k] := bstr[k]; + p1str[L] := p2str[k]; + end + Else begin + p1str[L] := '+'; + End; + end; + If (s4 - 1) = 0 Then goto 2660; + OutPutFrm.RichEdit.Lines.Add(''); +2660: + pl := format('%2d. ',[i]); + For ip := 1 To 55 do pl := pl + p1str[ip]; + pl := pl + format('. %2d',[i]); + OutPutFrm.RichEdit.Lines.Add(pl); + end; + OutPutFrm.RichEdit.Lines.Add('----------------------------------------------------------------------'); + OutPutFrm.RichEdit.Lines.Add(''); + For j := 1 To n8 do + begin + pl := bstr[j] + ' '; + For i := 1 To 5 do + begin + pl := pl + format('%6.2f ',[f2[i,j]]); + end; + pl := pl + bstr[j]; + OutPutFrm.RichEdit.Lines.Add(pl); + end; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(' Plot Description'); + OutPutFrm.RichEdit.Lines.Add('title character minimum maximum resolution'); + + For j := 1 To N do + begin + pl := copy(f1s,j*20-19,20); + pl := pl + ' ' + bstr[j]; + pl := pl + ' ' + format('%6.2f',[a1[j]]); + pl := pl + ' ' + format('%6.2f',[a2[j]]); + pl := pl + ' ' + format('%6.2f',[r2[j]]); + OutPutFrm.RichEdit.Lines.Add(pl); + end; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add(''); +end; +//------------------------------------------------------------------- + +procedure TInterruptedFrm.PlotFuncs(Sender: TObject); +var + i, j : integer; + title : string; + gamma : double; +begin + // Allocate space for point sets of means + SetLength(GraphFrm.Ypoints,3,50); + SetLength(GraphFrm.Xpoints,3,50); + // store points for means + gamma := 0.0; + for i := 1 to 49 do + begin + for j := 1 to 3 do + begin + GraphFrm.Ypoints[j-1,i-1] := x4[i,j]; + GraphFrm.Xpoints[j-1,i-1] := gamma; + end; + gamma := gamma + 0.04; + end; + title := 'Plot of ts for change in level and slope and posterior'; + GraphFrm.nosets := 3; + GraphFrm.nbars := 49; + GraphFrm.Heading := title; + GraphFrm.SetLabels[1] := 'level'; + GraphFrm.SetLabels[2] := 'slope'; + GraphFrm.SetLabels[3] := 'posterior'; + GraphFrm.XTitle := 'Gamma Increment'; + GraphFrm.YTitle := 't'; + GraphFrm.barwideprop := 0.5; + GraphFrm.AutoScale := true; + GraphFrm.GraphType := 5; // 2d line chart + GraphFrm.BackColor := clYellow; + GraphFrm.WallColor := clBlack; + GraphFrm.FloorColor := clLtGray; + GraphFrm.ShowBackWall := true; + GraphFrm.ShowModal; + + GraphFrm.Xpoints := nil; + GraphFrm.Ypoints := nil; +end; + +initialization + {$I interruptedunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/inversezunit.lfm b/applications/lazstats/source_orig/inversezunit.lfm new file mode 100644 index 000000000..020d8db59 --- /dev/null +++ b/applications/lazstats/source_orig/inversezunit.lfm @@ -0,0 +1,80 @@ +object InversezForm: TInversezForm + Left = 288 + Height = 179 + Top = 161 + Width = 320 + Caption = 'Normal z for a given probability' + ClientHeight = 179 + ClientWidth = 320 + OnShow = ResetBtnClick + LCLVersion = '0.9.30' + object Label1: TLabel + Left = 9 + Height = 16 + Top = 13 + Width = 136 + Caption = 'Cumulative Probability = ' + ParentColor = False + end + object ProbEdit: TEdit + Left = 153 + Height = 23 + Top = 7 + Width = 65 + TabOrder = 0 + Text = 'ProbEdit' + end + object Label2: TLabel + Left = 8 + Height = 16 + Top = 46 + Width = 144 + Caption = 'Corresponds to a z value = ' + ParentColor = False + end + object ZEdit: TEdit + Left = 154 + Height = 23 + Top = 39 + Width = 65 + TabOrder = 1 + Text = 'ZEdit' + end + object CancelBtn: TButton + Left = 8 + Height = 33 + Top = 80 + Width = 82 + Cancel = True + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 2 + end + object ResetBtn: TButton + Left = 113 + Height = 33 + Top = 80 + Width = 82 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 3 + end + object ComputeBtn: TButton + Left = 216 + Height = 33 + Top = 80 + Width = 82 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 4 + end + object ReturnBtn: TButton + Left = 115 + Height = 33 + Top = 130 + Width = 77 + Caption = 'Return' + ModalResult = 1 + TabOrder = 5 + end +end diff --git a/applications/lazstats/source_orig/inversezunit.lrs b/applications/lazstats/source_orig/inversezunit.lrs new file mode 100644 index 000000000..f2a19e094 --- /dev/null +++ b/applications/lazstats/source_orig/inversezunit.lrs @@ -0,0 +1,23 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TInversezForm','FORMDATA',[ + 'TPF0'#13'TInversezForm'#12'InversezForm'#4'Left'#3' '#1#6'Height'#3#179#0#3 + +'Top'#3#161#0#5'Width'#3'@'#1#7'Caption'#6' Normal z for a given probability' + +#12'ClientHeight'#3#179#0#11'ClientWidth'#3'@'#1#6'OnShow'#7#13'ResetBtnClic' + +'k'#10'LCLVersion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2 + +#16#3'Top'#2#13#5'Width'#3#136#0#7'Caption'#6#25'Cumulative Probability = ' + +#11'ParentColor'#8#0#0#5'TEdit'#8'ProbEdit'#4'Left'#3#153#0#6'Height'#2#23#3 + +'Top'#2#7#5'Width'#2'A'#8'TabOrder'#2#0#4'Text'#6#8'ProbEdit'#0#0#6'TLabel'#6 + +'Label2'#4'Left'#2#8#6'Height'#2#16#3'Top'#2'.'#5'Width'#3#144#0#7'Caption'#6 + +#27'Corresponds to a z value = '#11'ParentColor'#8#0#0#5'TEdit'#5'ZEdit'#4'L' + +'eft'#3#154#0#6'Height'#2#23#3'Top'#2''''#5'Width'#2'A'#8'TabOrder'#2#1#4'Te' + +'xt'#6#5'ZEdit'#0#0#7'TButton'#9'CancelBtn'#4'Left'#2#8#6'Height'#2'!'#3'Top' + +#2'P'#5'Width'#2'R'#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8 + +'TabOrder'#2#2#0#0#7'TButton'#8'ResetBtn'#4'Left'#2'q'#6'Height'#2'!'#3'Top' + +#2'P'#5'Width'#2'R'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'T' + +'abOrder'#2#3#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#216#0#6'Height'#2'!'#3 + +'Top'#2'P'#5'Width'#2'R'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnC' + +'lick'#8'TabOrder'#2#4#0#0#7'TButton'#9'ReturnBtn'#4'Left'#2's'#6'Height'#2 + +'!'#3'Top'#3#130#0#5'Width'#2'M'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8 + +'TabOrder'#2#5#0#0#0 +]); diff --git a/applications/lazstats/source_orig/inversezunit.pas b/applications/lazstats/source_orig/inversezunit.pas new file mode 100644 index 000000000..f5a3dd629 --- /dev/null +++ b/applications/lazstats/source_orig/inversezunit.pas @@ -0,0 +1,60 @@ +unit InversezUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, functionslib; + +type + + { TInversezForm } + + TInversezForm = class(TForm) + CancelBtn: TButton; + ComputeBtn: TButton; + ResetBtn: TButton; + ReturnBtn: TButton; + ZEdit: TEdit; + Label2: TLabel; + ProbEdit: TEdit; + Label1: TLabel; + procedure ComputeBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + InversezForm: TInversezForm; + +implementation + +{ TInversezForm } + +procedure TInversezForm.ResetBtnClick(Sender: TObject); +begin + ProbEdit.Text := ''; + ZEdit.Text := ''; +end; + +procedure TInversezForm.ComputeBtnClick(Sender: TObject); +VAR + Prob, Zscore : double; + outvalue : string; +begin + Prob := StrToFloat(ProbEdit.Text); + Zscore := inversez(Prob); + outvalue := format('%6.4f',[Zscore]); + ZEdit.Text := outvalue; +end; + +initialization + {$I inversezunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/itembankingunit.lfm b/applications/lazstats/source_orig/itembankingunit.lfm new file mode 100644 index 000000000..07e76826a --- /dev/null +++ b/applications/lazstats/source_orig/itembankingunit.lfm @@ -0,0 +1,245 @@ +object ItemBankFrm: TItemBankFrm + Left = 139 + Height = 565 + Top = 107 + Width = 346 + Caption = 'Item Banking' + ClientHeight = 545 + ClientWidth = 346 + Menu = MainMenu1 + OnCreate = FormCreate + OnShow = FormShow + LCLVersion = '0.9.30.4' + object Label1: TLabel + Left = 10 + Height = 16 + Top = 40 + Width = 86 + Caption = 'No. Item Codes:' + ParentColor = False + end + object NItemCodesText: TEdit + Left = 156 + Height = 23 + Top = 32 + Width = 44 + TabOrder = 0 + end + object BankNameLabel: TLabel + Left = 8 + Height = 16 + Top = 8 + Width = 92 + Caption = 'Item Bank Name:' + ParentColor = False + end + object BankNameText: TEdit + Left = 112 + Height = 23 + Top = 0 + Width = 224 + TabOrder = 1 + end + object NMCItemsLabel: TLabel + Left = 8 + Height = 16 + Top = 72 + Width = 142 + Caption = 'No. Multiple Choice Items:' + ParentColor = False + end + object NMCItemsText: TEdit + Left = 156 + Height = 23 + Top = 64 + Width = 44 + TabOrder = 2 + end + object TFItemsLabel: TLabel + Left = 8 + Height = 16 + Top = 104 + Width = 113 + Caption = 'No. True-False Items:' + ParentColor = False + end + object NTFItemsText: TEdit + Left = 156 + Height = 23 + Top = 96 + Width = 44 + TabOrder = 3 + end + object NMatchLabel: TLabel + Left = 8 + Height = 16 + Top = 136 + Width = 109 + Caption = 'No. Matching Items:' + ParentColor = False + end + object NMatchItemsText: TEdit + Left = 156 + Height = 23 + Top = 128 + Width = 44 + TabOrder = 4 + end + object NEssayLabel: TLabel + Left = 8 + Height = 16 + Top = 167 + Width = 86 + Caption = 'No. Essay Items:' + ParentColor = False + end + object NEssayText: TEdit + Left = 156 + Height = 23 + Top = 160 + Width = 44 + TabOrder = 5 + end + object FilesLabel: TLabel + Left = 16 + Height = 16 + Top = 320 + Width = 24 + Caption = 'Files' + ParentColor = False + end + object FileListBox1: TFileListBox + Left = 16 + Height = 188 + Top = 344 + Width = 267 + Directory = 'C:\Users\wgmiller\Desktop' + ItemHeight = 15 + TabOrder = 6 + end + object Button1: TButton + Left = 15 + Height = 19 + Top = 272 + Width = 305 + Caption = 'Click to Change Directory to Options Default Directory' + OnClick = Button1Click + TabOrder = 7 + end + object DirectoryEdit1: TEdit + Left = 16 + Height = 23 + Top = 296 + Width = 267 + TabOrder = 8 + Text = 'DirectoryEdit1' + end + object Label2: TLabel + Left = 10 + Height = 16 + Top = 200 + Width = 79 + Caption = 'Test Specified?' + ParentColor = False + end + object TestSpecifiedEdit: TEdit + Left = 156 + Height = 23 + Top = 192 + Width = 44 + TabOrder = 9 + end + object Label3: TLabel + Left = 9 + Height = 16 + Top = 231 + Width = 74 + Caption = 'No. Specified:' + ParentColor = False + end + object NSpecifiedEdit: TEdit + Left = 157 + Height = 23 + Top = 226 + Width = 43 + TabOrder = 10 + Text = 'NSpecifiedEdit' + end + object MainMenu1: TMainMenu + left = 272 + top = 72 + object MenuItem1: TMenuItem + Caption = 'Item Bank' + object OpenItemBank: TMenuItem + Caption = 'Open an existing item bank' + OnClick = OpenItemBankClick + end + object NewItemBank: TMenuItem + Caption = 'Create a new item bank' + OnClick = NewItemBankClick + end + object SaveBankMenu: TMenuItem + Caption = 'Save Current Item Bank' + OnClick = SaveBankMenuClick + end + object ExitThis: TMenuItem + Caption = 'Exit this procedure' + OnClick = ExitThisClick + end + end + object Operations: TMenuItem + Caption = 'Operations' + object CreateCodes: TMenuItem + Caption = 'Create Item Content Codes' + OnClick = CreateCodesClick + end + object ShowCodes: TMenuItem + Caption = 'Display all codes' + OnClick = ShowCodesClick + end + object MCItems: TMenuItem + Caption = 'Create or Edit Multiple Choice Items' + OnClick = MCItemsClick + end + object TFItems: TMenuItem + Caption = 'Create or Edit True-False Items' + OnClick = TFItemsClick + end + object MatchingItems: TMenuItem + Caption = 'Create or Edit Matching Items' + OnClick = MatchingItemsClick + end + object EssayItems: TMenuItem + Caption = 'Create or Edit Essay Items' + OnClick = EssayItemsClick + end + end + object TestOptions: TMenuItem + Caption = 'Test Options' + object TestSpecs: TMenuItem + Caption = 'Specify a test''s Contents' + OnClick = TestSpecsClick + end + object ListItems: TMenuItem + Caption = 'List all test items' + OnClick = ListItemsClick + end + object PrintTest: TMenuItem + Caption = 'Print a test to administer' + OnClick = PrintTestClick + end + end + end + object OpenDialog1: TOpenDialog + left = 272 + top = 184 + end + object SaveDialog1: TSaveDialog + left = 272 + top = 128 + end + object SelDir: TSelectDirectoryDialog + left = 208 + top = 184 + end +end diff --git a/applications/lazstats/source_orig/itembankingunit.lrs b/applications/lazstats/source_orig/itembankingunit.lrs new file mode 100644 index 000000000..c75e3995a --- /dev/null +++ b/applications/lazstats/source_orig/itembankingunit.lrs @@ -0,0 +1,65 @@ +LazarusResources.Add('TItemBankFrm','FORMDATA',[ + 'TPF0'#12'TItemBankFrm'#11'ItemBankFrm'#4'Left'#3#139#0#6'Height'#3'5'#2#3'To' + +'p'#2'k'#5'Width'#3'Z'#1#7'Caption'#6#12'Item Banking'#12'ClientHeight'#3'!' + +#2#11'ClientWidth'#3'Z'#1#4'Menu'#7#9'MainMenu1'#8'OnCreate'#7#10'FormCreate' + +#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.30.4'#0#6'TLabel'#6'Label1'#4 + +'Left'#2#10#6'Height'#2#16#3'Top'#2'('#5'Width'#2'V'#7'Caption'#6#15'No. Ite' + +'m Codes:'#11'ParentColor'#8#0#0#5'TEdit'#14'NItemCodesText'#4'Left'#3#156#0 + +#6'Height'#2#23#3'Top'#2' '#5'Width'#2','#8'TabOrder'#2#0#0#0#6'TLabel'#13'B' + +'ankNameLabel'#4'Left'#2#8#6'Height'#2#16#3'Top'#2#8#5'Width'#2'\'#7'Caption' + +#6#15'Item Bank Name:'#11'ParentColor'#8#0#0#5'TEdit'#12'BankNameText'#4'Lef' + +'t'#2'p'#6'Height'#2#23#3'Top'#2#0#5'Width'#3#224#0#8'TabOrder'#2#1#0#0#6'TL' + +'abel'#13'NMCItemsLabel'#4'Left'#2#8#6'Height'#2#16#3'Top'#2'H'#5'Width'#3 + +#142#0#7'Caption'#6#26'No. Multiple Choice Items:'#11'ParentColor'#8#0#0#5'T' + +'Edit'#12'NMCItemsText'#4'Left'#3#156#0#6'Height'#2#23#3'Top'#2'@'#5'Width'#2 + +','#8'TabOrder'#2#2#0#0#6'TLabel'#12'TFItemsLabel'#4'Left'#2#8#6'Height'#2#16 + +#3'Top'#2'h'#5'Width'#2'q'#7'Caption'#6#21'No. True-False Items:'#11'ParentC' + +'olor'#8#0#0#5'TEdit'#12'NTFItemsText'#4'Left'#3#156#0#6'Height'#2#23#3'Top' + +#2'`'#5'Width'#2','#8'TabOrder'#2#3#0#0#6'TLabel'#11'NMatchLabel'#4'Left'#2#8 + +#6'Height'#2#16#3'Top'#3#136#0#5'Width'#2'm'#7'Caption'#6#19'No. Matching It' + +'ems:'#11'ParentColor'#8#0#0#5'TEdit'#15'NMatchItemsText'#4'Left'#3#156#0#6 + +'Height'#2#23#3'Top'#3#128#0#5'Width'#2','#8'TabOrder'#2#4#0#0#6'TLabel'#11 + +'NEssayLabel'#4'Left'#2#8#6'Height'#2#16#3'Top'#3#167#0#5'Width'#2'V'#7'Capt' + +'ion'#6#16'No. Essay Items:'#11'ParentColor'#8#0#0#5'TEdit'#10'NEssayText'#4 + +'Left'#3#156#0#6'Height'#2#23#3'Top'#3#160#0#5'Width'#2','#8'TabOrder'#2#5#0 + +#0#6'TLabel'#10'FilesLabel'#4'Left'#2#16#6'Height'#2#16#3'Top'#3'@'#1#5'Widt' + +'h'#2#24#7'Caption'#6#5'Files'#11'ParentColor'#8#0#0#12'TFileListBox'#12'Fil' + +'eListBox1'#4'Left'#2#16#6'Height'#3#188#0#3'Top'#3'X'#1#5'Width'#3#11#1#9'D' + +'irectory'#6#25'C:\Users\wgmiller\Desktop'#10'ItemHeight'#2#15#8'TabOrder'#2 + +#6#0#0#7'TButton'#7'Button1'#4'Left'#2#15#6'Height'#2#19#3'Top'#3#16#1#5'Wid' + +'th'#3'1'#1#7'Caption'#6'6Click to Change Directory to Options Default Direc' + +'tory'#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2#7#0#0#5'TEdit'#14'Directo' + +'ryEdit1'#4'Left'#2#16#6'Height'#2#23#3'Top'#3'('#1#5'Width'#3#11#1#8'TabOrd' + +'er'#2#8#4'Text'#6#14'DirectoryEdit1'#0#0#6'TLabel'#6'Label2'#4'Left'#2#10#6 + +'Height'#2#16#3'Top'#3#200#0#5'Width'#2'O'#7'Caption'#6#15'Test Specified?' + +#11'ParentColor'#8#0#0#5'TEdit'#17'TestSpecifiedEdit'#4'Left'#3#156#0#6'Heig' + +'ht'#2#23#3'Top'#3#192#0#5'Width'#2','#8'TabOrder'#2#9#0#0#6'TLabel'#6'Label' + +'3'#4'Left'#2#9#6'Height'#2#16#3'Top'#3#231#0#5'Width'#2'J'#7'Caption'#6#14 + +'No. Specified:'#11'ParentColor'#8#0#0#5'TEdit'#14'NSpecifiedEdit'#4'Left'#3 + +#157#0#6'Height'#2#23#3'Top'#3#226#0#5'Width'#2'+'#8'TabOrder'#2#10#4'Text'#6 + +#14'NSpecifiedEdit'#0#0#9'TMainMenu'#9'MainMenu1'#4'left'#3#16#1#3'top'#2'H' + +#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#9'Item Bank'#0#9'TMenuItem'#12'Ope' + +'nItemBank'#7'Caption'#6#26'Open an existing item bank'#7'OnClick'#7#17'Open' + +'ItemBankClick'#0#0#9'TMenuItem'#11'NewItemBank'#7'Caption'#6#22'Create a ne' + +'w item bank'#7'OnClick'#7#16'NewItemBankClick'#0#0#9'TMenuItem'#12'SaveBank' + +'Menu'#7'Caption'#6#22'Save Current Item Bank'#7'OnClick'#7#17'SaveBankMenuC' + +'lick'#0#0#9'TMenuItem'#8'ExitThis'#7'Caption'#6#19'Exit this procedure'#7'O' + +'nClick'#7#13'ExitThisClick'#0#0#0#9'TMenuItem'#10'Operations'#7'Caption'#6 + +#10'Operations'#0#9'TMenuItem'#11'CreateCodes'#7'Caption'#6#25'Create Item C' + +'ontent Codes'#7'OnClick'#7#16'CreateCodesClick'#0#0#9'TMenuItem'#9'ShowCode' + +'s'#7'Caption'#6#17'Display all codes'#7'OnClick'#7#14'ShowCodesClick'#0#0#9 + +'TMenuItem'#7'MCItems'#7'Caption'#6'$Create or Edit Multiple Choice Items'#7 + +'OnClick'#7#12'MCItemsClick'#0#0#9'TMenuItem'#7'TFItems'#7'Caption'#6#31'Cre' + +'ate or Edit True-False Items'#7'OnClick'#7#12'TFItemsClick'#0#0#9'TMenuItem' + +#13'MatchingItems'#7'Caption'#6#29'Create or Edit Matching Items'#7'OnClick' + +#7#18'MatchingItemsClick'#0#0#9'TMenuItem'#10'EssayItems'#7'Caption'#6#26'Cr' + +'eate or Edit Essay Items'#7'OnClick'#7#15'EssayItemsClick'#0#0#0#9'TMenuIte' + +'m'#11'TestOptions'#7'Caption'#6#12'Test Options'#0#9'TMenuItem'#9'TestSpecs' + +#7'Caption'#6#25'Specify a test''s Contents'#7'OnClick'#7#14'TestSpecsClick' + +#0#0#9'TMenuItem'#9'ListItems'#7'Caption'#6#19'List all test items'#7'OnClic' + +'k'#7#14'ListItemsClick'#0#0#9'TMenuItem'#9'PrintTest'#7'Caption'#6#26'Print' + +' a test to administer'#7'OnClick'#7#14'PrintTestClick'#0#0#0#0#11'TOpenDial' + +'og'#11'OpenDialog1'#4'left'#3#16#1#3'top'#3#184#0#0#0#11'TSaveDialog'#11'Sa' + +'veDialog1'#4'left'#3#16#1#3'top'#3#128#0#0#0#22'TSelectDirectoryDialog'#6'S' + +'elDir'#4'left'#3#208#0#3'top'#3#184#0#0#0#0 +]); diff --git a/applications/lazstats/source_orig/itembankingunit.pas b/applications/lazstats/source_orig/itembankingunit.pas new file mode 100644 index 000000000..3ba04de74 --- /dev/null +++ b/applications/lazstats/source_orig/itembankingunit.pas @@ -0,0 +1,752 @@ +unit ItemBankingUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + Menus, EditBtn, StdCtrls, outputunit, FileCtrl, ItemCodesUnit, OptionsUnit, + TFItemUnit, EssayItemUnit, MCItemUnit, MatchItemUnit, TestSpecsUnit; + +type + Bank = Record + BankName : string; + NMCItems : integer; + NTFItems : integer; + NMatchItems : integer; + NEssayItems : integer; + NCodes : integer; + TestItems : integer; + end; + +type + MCItem = Record + ItemNumber : integer; + MajorCode : integer; + MinorCode : integer; + NoChoices : integer; + ItemStem : string; + ChoiceOne : string; + ChoiceTwo : string; + ChoiceThree : string; + ChoiceFour : string; + ChoiceFive : string; + CorrectChoice : char; + PicName : string; + end; + +type + TFItem = Record + ItemNumber : integer; + MajorCode : integer; + MinorCode : integer; + ItemStem : string; + CorrectChoice : char; + PicName : string; + end; + +type + MatchItem = Record + ItemNumber : integer; + MajorCode : integer; + MinorCode : integer; + NLeft : integer; + NRight : integer; + Left1 : string; + Left2 : string; + Left3 : string; + Left4 : string; + Left5 : string; + Right1 : string; + Right2 : string; + Right3 : string; + Right4 : string; + Right5 : string; + CorrectChoice : char; + PicName : string; + end; + +type + EssayItem = Record + ItemNumber : integer; + MajorCode : integer; + MinorCode : integer; + ItemStem : string; + Answer : string; + PicName : string; + end; + + +type CodeData = record + codenumber : integer; + majorcodes : integer; + minorcodes : integer; + Description : string; +end; +type testspec = record + ItemNumber : integer; + MajorCode : integer; + MinorCode : integer; + ItemType : string; +end; + +type + + { TItemBankFrm } + + TItemBankFrm = class(TForm) + BankNameLabel: TLabel; + BankNameText: TEdit; + Button1: TButton; + DirectoryEdit1: TEdit; + NSpecifiedEdit: TEdit; + Label3: TLabel; + TestSpecifiedEdit: TEdit; + FileListBox1: TFileListBox; + FilesLabel: TLabel; + Label2: TLabel; + ShowCodes: TMenuItem; + OpenDialog1: TOpenDialog; + SaveBankMenu: TMenuItem; + NEssayText: TEdit; + NEssayLabel: TLabel; + NMatchItemsText: TEdit; + NMatchLabel: TLabel; + NTFItemsText: TEdit; + SaveDialog1: TSaveDialog; + SelDir: TSelectDirectoryDialog; + TFItemsLabel: TLabel; + NMCItemsText: TEdit; + NMCItemsLabel: TLabel; + NItemCodesText: TEdit; + Label1: TLabel; + MainMenu1: TMainMenu; + MenuItem1: TMenuItem; + MCItems: TMenuItem; + MatchingItems: TMenuItem; + EssayItems: TMenuItem; + ListItems: TMenuItem; + ExitThis: TMenuItem; + CreateCodes: TMenuItem; + PrintTest: TMenuItem; + TestSpecs: TMenuItem; + TestOptions: TMenuItem; + TFItems: TMenuItem; + Operations: TMenuItem; + NewItemBank: TMenuItem; + OpenItemBank: TMenuItem; + procedure Button1Click(Sender: TObject); + procedure CreateCodesClick(Sender: TObject); + procedure EssayItemsClick(Sender: TObject); + procedure ExitThisClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure ListItemsClick(Sender: TObject); + procedure MatchingItemsClick(Sender: TObject); + procedure MCItemsClick(Sender: TObject); + procedure NewItemBankClick(Sender: TObject); + procedure OpenItemBankClick(Sender: TObject); + procedure PrintTestClick(Sender: TObject); + procedure SaveBankMenuClick(Sender: TObject); + procedure ShowCodesClick(Sender: TObject); + procedure TestSpecsClick(Sender: TObject); + procedure TFItemsClick(Sender: TObject); + private + { private declarations } + Bitmap : TBitmap; + Grect : TRect; + public + { public declarations } + CodesInfo : array[1..100] of CodeData; + MCItemInfo : array[1..100] of MCItem; + TFItemInfo : array[1..100] of TFItem; + MatchInfo : array[1..100] of MatchItem; + EssayInfo : array[1..100] of EssayItem; + TestContents : array[1..100] of testspec; + BankInfo : Bank; + // FileName : string; + + end; + +var + ItemBankFrm: TItemBankFrm; + +implementation + +{ TItemBankFrm } + +procedure TItemBankFrm.OpenItemBankClick(Sender: TObject); +var + FileName : string; + BankFile : TextFile; + i : integer; + cellvalue : integer; + nochoices : integer; +begin + OpenDialog1.DefaultExt := '.BNK'; + OpenDialog1.Filter := 'ALL (*.*)|*.*|Item Bank (*.BNK)|*.BNK'; + OpenDialog1.FilterIndex := 2; + if OpenDialog1.Execute then + begin + FileName := OpenDialog1.FileName; + BankNameText.Text := FileName; + FileName := OpenDialog1.FileName; + AssignFile(BankFile,FileName); + Reset(BankFile); + // place all data from the records in this file + // read general BankInfo first + Readln(BankFile,BankInfo.BankName); + Readln(BankFile,BankInfo.NMCItems); + NMCItemsText.Text := IntToStr(BankInfo.NMCItems); + Readln(BankFile,BankInfo.NTFItems); + NTFItemsText.Text := IntToStr(BankInfo.NTFItems); + Readln(BankFile,BankInfo.NMatchItems); + NMatchItemsText.Text := IntToStr(BankInfo.NMatchItems ); + Readln(BankFile,BankInfo.NEssayItems); + NEssayText.Text := IntToStr(BankInfo.NEssayItems ); + Readln(BankFile,BankInfo.NCodes); + NItemCodesText.Text := IntToStr(BankInfo.NCodes); + Readln(BankFile,BankInfo.TestItems); + NSpecifiedEdit.Text := IntToStr(BankInfo.TestItems); +// ShowMessage('Read no. of items by type'); + // now read codes + if BankInfo.Ncodes > 0 then + begin + for i := 1 to BankInfo.NCodes do + begin + Readln(BankFile,cellvalue); + CodesInfo[i].codenumber := cellvalue; + Readln(BankFile,cellvalue); + CodesInfo[i].majorcodes := cellvalue; + Readln(BankFile,cellvalue); + CodesInfo[i].minorcodes := cellvalue; + Readln(BankFile,CodesInfo[i].Description); + end; +// ShowMessage('Read item codes'); + end; + // now read MC items + if BankInfo.NMCItems > 0 then + begin + for i := 1 to BankInfo.NMCItems do + begin + Readln(BankFile,MCItemInfo[i].ItemNumber); + Readln(BankFile,MCItemInfo[i].MajorCode); + Readln(BankFile,MCItemInfo[i].MinorCode); + Readln(BankFile,MCItemInfo[i].NoChoices); + Readln(BankFile,MCItemInfo[i].ItemStem); + nochoices := McItemInfo[i].NoChoices; + if nochoices > 0 then Readln(BankFile,MCItemInfo[i].ChoiceOne); + if nochoices > 1 then Readln(BankFile,MCItemInfo[i].ChoiceTwo); + if nochoices > 2 then Readln(BankFile,MCItemInfo[i].ChoiceThree); + if nochoices > 3 then Readln(BankFile,MCItemInfo[i].ChoiceFour); + if nochoices > 4 then Readln(BankFile,MCItemInfo[i].ChoiceFive); + Readln(BankFile,MCItemInfo[i].CorrectChoice); + Readln(BankFile,MCItemInfo[i].PicName); + end; +// ShowMessage('Read MC items'); + end; + // now read T-F items + if BankInfo.NTFItems > 0 then + begin + for i := 1 to BankInfo.NTFItems do + begin + readln(BankFile,TFItemInfo[i].ItemNumber); + Readln(BankFile,TFItemInfo[i].MajorCode); + Readln(BankFile,TFItemInfo[i].MinorCode); + Readln(BankFile,TFItemInfo[i].ItemStem); + Readln(BankFile,TFItemInfo[i].CorrectChoice); + Readln(BankFile,TFItemInfo[i].PicName); + end; +// ShowMessage('Read True-False items'); + end; + // now read matching items + if BankInfo.NMatchItems > 0 then + begin + for i := 1 to BankInfo.NMatchItems do + begin + Readln(BankFile,MatchInfo[i].ItemNumber); + Readln(BankFile,MatchInfo[i].MajorCode); + Readln(BankFile,MatchInfo[i].MinorCode); + Readln(BankFile,MatchInfo[i].NLeft); + Readln(BankFile,MatchInfo[i].NRight); + nochoices := MatchInfo[i].NLeft; + if nochoices > 0 then Readln(BankFile,MatchInfo[i].Left1); + if nochoices > 1 then Readln(BankFile,MatchInfo[i].Left2); + if nochoices > 2 then Readln(BankFile,MatchInfo[i].Left3); + if nochoices > 3 then Readln(BankFile,MatchInfo[i].Left4); + if nochoices > 4 then Readln(BankFile,MatchInfo[i].Left5); + nochoices := MatchInfo[i].NRight; + if nochoices > 0 then Readln(BankFile,MatchInfo[i].Right1); + if nochoices > 1 then Readln(BankFile,MatchInfo[i].Right2); + if nochoices > 2 then Readln(BankFile,MatchInfo[i].Right3); + if nochoices > 3 then Readln(BankFile,MatchInfo[i].Right4); + if nochoices > 4 then Readln(BankFile,MatchInfo[i].Right5); + Readln(BankFile,MatchInfo[i].CorrectChoice); + Readln(BankFile,MatchInfo[i].PicName); + end; +// ShowMessage('Read Matching items'); + end; + // now read essay items + if BankInfo.NEssayItems > 0 then + begin + for i := 1 to BankInfo.NEssayItems do + begin + Readln(BankFile,EssayInfo[i].ItemNumber); + Readln(BankFile,EssayInfo[i].MajorCode); + Readln(BankFile,EssayInfo[i].MinorCode); + Readln(BankFile,EssayInfo[i].ItemStem); + Readln(BankFile,EssayInfo[i].Answer); + Readln(BankFile,EssayInfo[i].PicName); + end; +// ShowMessage('Read Essay items'); + end; + if BankInfo.TestItems > 0 then + begin + TestSpecifiedEdit.Text := 'Y'; + for i := 1 to BankInfo.TestItems do + begin + readln(BankFile,TestContents[i].ItemNumber); + readln(BankFile,TestContents[i].MajorCode); + readln(BankFile,TestContents[i].MinorCode); + readln(BankFile,TestContents[i].ItemType); + end; + end; + CloseFile(BankFile); + end; +end; + +procedure TItemBankFrm.PrintTestClick(Sender: TObject); +Var + outline : string[180]; + i, nmc, ntf, nessay, nmatch, itemno : integer; + mcitem, tfitem, essayitem, matchitem : integer; + nleft, nright : integer; + JPEG : TJPEGImage; +begin + itemno := 0; + nmc := StrToInt(NMCItemsText.Text); + ntf := StrToInt(NTFItemsText.Text); + nessay := StrToInt(NEssayText.Text); + nmatch := StrToInt(NMatchItemsText.Text); + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Directions: This test may contain a variety of different item types.'); + OutPutFrm.RichEdit.Lines.Add('For each item, circle the correct answer or provide the answer if'); + OutPutFrm.RichEdit.Lines.Add('required. You may use the back of the test to provide answers to'); + OutPutFrm.RichEdit.Lines.Add('essay questions - just start with the item number.'); + OutPutFrm.RichEdit.Lines.Add('Start now!'); + OutPutFrm.RichEdit.Lines.Add(''); + if nmc > 0 then + begin + OutPutFrm.RichEdit.Lines.Add('MULTIPLE CHOICE ITEMS:'); + for i := 1 to BankInfo.TestItems do + begin + if TestContents[i].ItemType = 'MC' then + begin + itemno := itemno + 1; + outline := format('Item %d',[itemno]); + OutPutFrm.RichEdit.Lines.Add(outline); + mcitem := TestContents[i].ItemNumber; + if MCItemInfo[mcitem].PicName <> 'none' then + begin + outline := format('Reference picture = %s',[MCItemInfo[mcitem].PicName]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + { begin + Grect.Top := OutPutFrm.RichEdit.Lines.Count ; + Grect.Left := 20; + Grect.Right := 120; + Grect.Bottom := Grect.Top + 120; + JPEG := TJPEGImage.Create; + JPEG.LoadFromFile(MCItemInfo[mcitem].PicName) ; + OutPutFrm.Canvas.StretchDraw(Grect,JPEG); + JPEG.Free; + end; } + OutPutFrm.RichEdit.Lines.Add(MCItemInfo[mcitem].ItemStem); + nleft := MCItemInfo[mcitem].NoChoices; + OutPutFrm.RichEdit.Lines.Add('A. ' + MCItemInfo[mcitem].ChoiceOne); + OutPutFrm.RichEdit.Lines.Add('B. ' + MCItemInfo[mcitem].ChoiceTwo); + if nleft > 2 then + OutPutFrm.RichEdit.Lines.Add('C. ' + MCItemInfo[mcitem].ChoiceThree); + if nleft > 3 then + OutPutFrm.RichEdit.Lines.Add('D. ' + MCItemInfo[mcitem].ChoiceFour); + if nleft > 4 then + OutPutFrm.RichEdit.Lines.Add('E. ' + MCItemInfo[mcitem].ChoiceFive); + OutPutFrm.RichEdit.Lines.Add(''); + end; + end; + end; + if ntf > 0 then + begin + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('TRUE OR FALSE ITEMS:'); + for i := 1 to BankInfo.TestItems do + begin + if TestContents[i].ItemType = 'TF' then + begin + itemno := itemno + 1; + outline := format('Item %d',[itemno]); + OutPutFrm.RichEdit.Lines.Add(outline); + tfitem := TestContents[i].ItemNumber; + OutPutFrm.RichEdit.Lines.Add(TFItemInfo[tfitem].ItemStem); + OutPutFrm.RichEdit.Lines.Add('A. TRUE'); + OutPutFrm.RichEdit.Lines.Add('B. False'); + end; + end; + OutPutFrm.RichEdit.Lines.Add(''); + end; + if nessay > 0 then + begin + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('ESSAY ITEMS:'); + for i := 1 to BankInfo.TestItems do + begin + if TestContents[i].ItemType = 'Essay' then + begin + itemno := itemno + 1; + outline := format('Item %d',[itemno]); + OutPutFrm.RichEdit.Lines.Add(outline); + essayitem := TestContents[i].ItemNumber; + OutPutFrm.RichEdit.Lines.Add(EssayInfo[essayitem].ItemStem); + end; + end; + OutPutFrm.RichEdit.Lines.Add(''); + end; + if nmatch > 0 then + begin + OutPutFrm.RichEdit.Lines.Add('MATCHING ITEMS:'); + for i := 1 to BankInfo.TestItems do + begin + if TestContents[i].ItemType = 'Matching' then + begin + itemno := itemno + 1; + outline := format('Item %d',[itemno]); + OutPutFrm.RichEdit.Lines.Add(outline); + matchitem := TestContents[i].ItemNumber; + outline := format('A. %s',[ItemBankFrm.MatchInfo[matchitem].Left1]); + outline := outline + ' 1. '; + outline := outline + ItemBankFrm.MatchInfo[matchitem].Right1 ; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('B. %s',[ItemBankFrm.MatchInfo[matchitem].Left2]); + nleft := ItemBankFrm.MatchInfo[matchitem].NLeft; + nright := ItemBankFrm.MatchInfo[matchitem].NRight; + if nright > 1 then + begin + outline := outline + ' 2. '; + outline := outline + ItemBankFrm.MatchInfo[matchitem].Right2; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + if nleft > 2 then + begin + outline := format('C. %s',[ItemBankFrm.MatchInfo[matchitem].Left3]); + if nright > 2 then + begin + outline := outline + ' 3. '; + outline := outline + ItemBankFrm.MatchInfo[matchitem].Right3; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + + if nleft > 3 then + begin + outline := format('D. %s',[ItemBankFrm.MatchInfo[matchitem].Left4]); + if nright > 3 then + begin + outline := outline + ' 4. '; + outline := outline + ItemBankFrm.MatchInfo[matchitem].Right4; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + + if nleft > 4 then + begin + outline := format('E. %s',[ItemBankFrm.MatchInfo[matchitem].Left5]); + if nright > 4 then + begin + outline := outline + ' 5. '; + outline := outline + ItemBankFrm.MatchInfo[matchitem].Right5; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + end; + + end; +// OutPutFrm.RichEdit.Lines.Add(''); + end; + OutPutFrm.RichEdit.Lines.Add(''); + end; + OutPutFrm.ShowModal; +end; + +procedure TItemBankFrm.SaveBankMenuClick(Sender: TObject); +var + FileName : string; + BankFile : TextFile; + i : integer; + cellvalue : integer; + nochoices : integer; + message : string; + nspecs : integer; +begin + if BankNameText.Text = '' then Close; + SaveDialog1.DefaultExt := '.BNK'; + SaveDialog1.Filter := 'ALL (*.*)|*.*|ItemBank (*.BNK)|*.BNK'; + SaveDialog1.FilterIndex := 2; + if SaveDialog1.Execute then + begin + FileName := SaveDialog1.FileName; + AssignFile(BankFile,FileName); + Rewrite(BankFile); + BankInfo.BankName := FileName; + // place all data from the records in this file + // write general BankInfo first + writeln(BankFile,BankInfo.BankName); + writeln(BankFile,BankInfo.NMCItems); + writeln(BankFile,BankInfo.NTFItems); + writeln(BankFile,BankInfo.NMatchItems); + writeln(BankFile,BankInfo.NEssayItems); + writeln(BankFile,BankInfo.NCodes); + writeln(BankFile,BankInfo.TestItems); + // now save codes + if BankInfo.NCodes > 0 then + begin + for i := 1 to BankInfo.NCodes do + begin + cellvalue := CodesInfo[i].codenumber; + writeln(BankFile,cellvalue); + cellvalue := CodesInfo[i].majorcodes ; + writeln(BankFile,cellvalue); + cellvalue := CodesInfo[i].minorcodes; + writeln(BankFile,cellvalue); + writeln(BankFile,CodesInfo[i].Description); + end; + end; + // now save MC items + if BankInfo.NMCItems > 0 then + begin + for i := 1 to BankInfo.NMCItems do + begin + nochoices := MCItemInfo[i].NoChoices ; + writeln(BankFile,MCItemInfo[i].ItemNumber); + writeln(BankFile,MCItemInfo[i].MajorCode); + writeln(BankFile,MCItemInfo[i].MinorCode); + writeln(BankFile,MCItemInfo[i].NoChoices); + writeln(BankFile,MCItemInfo[i].ItemStem); + if nochoices > 0 then writeln(BankFile,MCItemInfo[i].ChoiceOne); + if nochoices > 1 then writeln(BankFile,MCItemInfo[i].ChoiceTwo); + if nochoices > 2 then writeln(BankFile,MCItemInfo[i].ChoiceThree); + if nochoices > 3 then writeln(BankFile,MCItemInfo[i].ChoiceFour); + if nochoices > 4 then writeln(BankFile,MCItemInfo[i].ChoiceFive); + writeln(BankFile,MCItemInfo[i].CorrectChoice); + writeln(BankFile,MCItemInfo[i].PicName); + end; + end; + // now save T-F items + if BankInfo.NTFItems > 0 then + begin + for i := 1 to BankInfo.NTFItems do + begin + writeln(BankFile,TFItemInfo[i].ItemNumber); + writeln(BankFile,TFItemInfo[i].MajorCode); + writeln(BankFile,TFItemInfo[i].MinorCode); + writeln(BankFile,TFItemInfo[i].ItemStem); + writeln(BankFile,TFItemInfo[i].CorrectChoice); + writeln(BankFile,TFItemInfo[i].PicName); + end; + end; + // now save matching items + if BankInfo.NMatchItems > 0 then + begin + for i := 1 to BankInfo.NMatchItems do + begin + nochoices := MatchInfo[i].NLeft; + Writeln(BankFile,MatchInfo[i].ItemNumber); + writeln(BankFile,MatchInfo[i].MajorCode); + writeln(BankFile,MatchInfo[i].MinorCode); + writeln(BankFile,MatchInfo[i].NLeft); + writeln(BankFile,MatchInfo[i].NRight); + if nochoices > 0 then writeln(BankFile,MatchInfo[i].Left1); + if nochoices > 1 then writeln(BankFile,MatchInfo[i].Left2); + if nochoices > 2 then writeln(BankFile,MatchInfo[i].Left3); + if nochoices > 3 then writeln(BankFile,MatchInfo[i].Left4); + if nochoices > 4 then writeln(BankFile,MatchInfo[i].Left5); + nochoices := MatchInfo[i].NRight; + if nochoices > 0 then writeln(BankFile,MatchInfo[i].Right1); + if nochoices > 1 then writeln(BankFile,MatchInfo[i].Right2); + if nochoices > 2 then writeln(BankFile,MatchInfo[i].Right3); + if nochoices > 3 then writeln(BankFile,MatchInfo[i].Right4); + if nochoices > 4 then writeln(BankFile,MatchInfo[i].Right5); + writeln(BankFile,MatchInfo[i].CorrectChoice); + writeln(BankFile,MatchInfo[i].PicName); + end; + end; + // now save essay items + if BankInfo.NEssayItems > 0 then + begin + for i := 1 to BankInfo.NEssayItems do + begin + writeln(BankFile,EssayInfo[i].ItemNumber); + writeln(BankFile,EssayInfo[i].MajorCode); + writeln(BankFile,EssayInfo[i].MinorCode); + writeln(BankFile,EssayInfo[i].ItemStem); + writeln(BankFile,EssayInfo[i].Answer); + writeln(BankFile,EssayInfo[i].PicName); + end; + end; + // now save test specifications + nspecs := StrToInt(NSpecifiedEdit.Text); + if nspecs > 0 then + begin + TestSpecifiedEdit.Text := 'Y'; + for i := 1 to TestSpecsForm.testno do + begin + writeln(BankFile,TestContents[i].ItemNumber); + writeln(BankFile,TestContents[i].MajorCode); + writeln(BankFile,TestContents[i].MinorCode); + writeln(BankFile,TestContents[i].ItemType); + end; + end; + CloseFile(BankFile); + end; +end; + +procedure TItemBankFrm.ShowCodesClick(Sender: TObject); +Var + i : integer; + outline : string; + ncodes : integer; +begin +if NItemCodesText.Text <> '' then + begin + OutPutFrm.RichEdit.Lines.Add('Current Item Coding Scheme'); + OutPutFrm.RichEdit.Lines.Add(''); + ncodes := StrToInt(NItemCodesText.Text); + for i := 1 to ncodes do + begin + outline := format('Code number %d',[i]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Major Code %d',[CodesInfo[i].majorcodes]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Minor Code %d',[CodesInfo[i].minorcodes]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Description %s',[CodesInfo[i].Description]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + end; + OutPutFrm.ShowModal; + end; + +end; + +procedure TItemBankFrm.TestSpecsClick(Sender: TObject); +begin + TestSpecsForm.SpecFileEdit.Text := BankNameText.Text; + TestSpecsForm.MCNoEdit.Text := IntToStr(BankInfo.NMCItems); + TestSpecsForm.TFNoEdit.Text := IntToStr(BankInfo.NTFItems); + TestSpecsForm.EssayNoEdit.Text := IntToStr(BankInfo.NEssayItems); + TestSpecsForm.MatchNoEdit.Text := IntToStr(BankInfo.NMatchItems); + TestSpecsForm.ShowModal; +end; + +procedure TItemBankFrm.TFItemsClick(Sender: TObject); +begin + TFItemForm.ShowModal; +end; + +procedure TItemBankFrm.NewItemBankClick(Sender: TObject); +Var + response : string; +begin + response := InputBox('SAVE','Save current item bank (Y or N)?','N'); + if response = 'Y' then SaveBankMenuClick(self); + BankNameText.Text := ''; + OpenItemBankClick(self); +end; + +procedure TItemBankFrm.ExitThisClick(Sender: TObject); +Var + response : string; +begin + response := InputBox('SAVE','Save current item bank (Y or N)?','N'); + if response = 'Y' then SaveBankMenuClick(self); + ItemBankFrm.Hide; + Close; +end; + +procedure TItemBankFrm.FormCreate(Sender: TObject); +begin + DirectoryEdit1.Text := OptionsFrm.FilePathEdit.Text; + FileListBox1.Directory := DirectoryEdit1.Text; +end; + +procedure TItemBankFrm.FormShow(Sender: TObject); +begin + BankNameText.Text := ''; + NItemCodesText.Text := ''; + NMCItemsText.Text := ''; + NTFItemsText.Text := ''; + NMatchItemsText.Text := ''; + NEssayText.Text := ''; + BankInfo.BankName := ''; + BankInfo.NCodes := 0; + BankInfo.NEssayItems := 0; + BankInfo.NMatchItems := 0; + BankInfo.NTFItems := 0; + BankInfo.NMCItems := 0; + TestSpecifiedEdit.Text := 'N'; + NSpecifiedEdit.Text := ''; +end; + +procedure TItemBankFrm.ListItemsClick(Sender: TObject); +Var + i : integer; + outline : string; +begin + if BankInfo.TestItems > 0 then + begin + OutPutFrm.RichEdit.Clear; + for i := 1 to BankInfo.TestItems do + begin + outline := format('Item number: %d',[TestContents[i].ItemNumber]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Major code: %d',[TestContents[i].MajorCode]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Minor code: %d',[TestContents[i].MinorCode]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Item type: %s',[TestContents[i].ItemType]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + end; + OutPutFrm.ShowModal; +end; + +procedure TItemBankFrm.MatchingItemsClick(Sender: TObject); +begin + MatchItemForm.ShowModal; +end; + +procedure TItemBankFrm.MCItemsClick(Sender: TObject); +begin + MCItemForm.ShowModal; +end; + +procedure TItemBankFrm.CreateCodesClick(Sender: TObject); +begin + CodesForm.ShowModal; +end; + +procedure TItemBankFrm.Button1Click(Sender: TObject); +begin + DirectoryEdit1.Text := OptionsFrm.FilePathEdit.Text; + FileListBox1.Directory := DirectoryEdit1.Text; +end; + +procedure TItemBankFrm.EssayItemsClick(Sender: TObject); +begin + EssayItemForm.ShowModal; +end; + +initialization + {$I itembankingunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/itemcodesunit.lfm b/applications/lazstats/source_orig/itemcodesunit.lfm new file mode 100644 index 000000000..7923173d0 --- /dev/null +++ b/applications/lazstats/source_orig/itemcodesunit.lfm @@ -0,0 +1,134 @@ +object CodesForm: TCodesForm + Left = 212 + Height = 286 + Top = 126 + Width = 709 + Caption = 'Code Creation Form' + ClientHeight = 286 + ClientWidth = 709 + OnShow = FormShow + LCLVersion = '0.9.30' + object Memo1: TMemo + Left = 24 + Height = 102 + Top = 4 + Width = 667 + Lines.Strings = ( + 'One of the first steps in creating an item bank is to develop a coding scheme for each item in the item bank of items. You' + 'can create up to 100 major and minor codes to describe each item in your bank. Typically, the first item major code is 1 and ' + 'the corresponding minor code is 0. You will typically have multiple minor coded items under each major code. For ' + 'example, a major code 1 and minor code 0 might be a major section in a statistics book such as Descriptive Analyses. Under' + 'the same major code you might have a minor code 1 to represent items such as the Mean or the Standard Deviation.' + 'On this form you will enter the major and minor codes and a description for each one.' + ) + TabOrder = 0 + end + object ItemNoLabel: TLabel + Left = 25 + Height = 16 + Top = 120 + Width = 79 + Caption = 'Code Number:' + ParentColor = False + end + object ItemNoEdit: TEdit + Left = 106 + Height = 23 + Top = 113 + Width = 37 + TabOrder = 1 + Text = '1' + end + object MajorLabel: TLabel + Left = 168 + Height = 16 + Top = 120 + Width = 66 + Caption = 'Major Code:' + ParentColor = False + end + object MajorEdit: TEdit + Left = 238 + Height = 23 + Top = 112 + Width = 35 + TabOrder = 2 + Text = '1' + end + object MinorLabel: TLabel + Left = 296 + Height = 16 + Top = 120 + Width = 67 + Caption = 'Minor Code:' + ParentColor = False + end + object MinorEdit: TEdit + Left = 368 + Height = 23 + Top = 114 + Width = 38 + TabOrder = 3 + Text = '0' + end + object DescLabel: TLabel + Left = 25 + Height = 16 + Top = 153 + Width = 112 + Caption = 'Category Description' + ParentColor = False + end + object DescriptionEdit: TEdit + Left = 144 + Height = 23 + Top = 147 + Width = 545 + TabOrder = 4 + end + object SaveCodeBtn: TButton + Left = 24 + Height = 33 + Top = 189 + Width = 137 + Caption = 'Save Info. for this code' + OnClick = SaveCodeBtnClick + TabOrder = 5 + end + object StartNewBtn: TButton + Left = 168 + Height = 32 + Top = 189 + Width = 146 + Caption = 'Start New Code' + OnClick = StartNewBtnClick + TabOrder = 6 + end + object DisplayBtn: TButton + Left = 329 + Height = 32 + Top = 240 + Width = 177 + Caption = 'Display All Saved Code Data' + OnClick = DisplayBtnClick + TabOrder = 7 + end + object ReturnBtn: TButton + Left = 592 + Height = 30 + Top = 240 + Width = 92 + Caption = 'Return' + OnClick = ReturnBtnClick + TabOrder = 8 + end + object EditOneBtn: TButton + Left = 329 + Height = 31 + Top = 190 + Width = 177 + Caption = 'Edit a Specific Code Entry' + OnClick = EditOneBtnClick + TabOrder = 9 + end +end diff --git a/applications/lazstats/source_orig/itemcodesunit.lrs b/applications/lazstats/source_orig/itemcodesunit.lrs new file mode 100644 index 000000000..fc8fe4055 --- /dev/null +++ b/applications/lazstats/source_orig/itemcodesunit.lrs @@ -0,0 +1,41 @@ +LazarusResources.Add('TCodesForm','FORMDATA',[ + 'TPF0'#10'TCodesForm'#9'CodesForm'#4'Left'#3#212#0#6'Height'#3#30#1#3'Top'#2 + +'~'#5'Width'#3#197#2#7'Caption'#6#18'Code Creation Form'#12'ClientHeight'#3 + +#30#1#11'ClientWidth'#3#197#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#6'0.9' + +'.30'#0#5'TMemo'#5'Memo1'#4'Left'#2#24#6'Height'#2'f'#3'Top'#2#4#5'Width'#3 + +#155#2#13'Lines.Strings'#1#6'{One of the first steps in creating an item ban' + +'k is to develop a coding scheme for each item in the item bank of items. Y' + +'ou'#6'~can create up to 100 major and minor codes to describe each item in ' + +'your bank. Typically, the first item major code is 1 and '#6'sthe correspo' + +'nding minor code is 0. You will typically have multiple minor coded items ' + +'under each major code. For '#6'{example, a major code 1 and minor code 0 m' + +'ight be a major section in a statistics book such as Descriptive Analyses. ' + +' Under'#6'pthe same major code you might have a minor code 1 to represent i' + +'tems such as the Mean or the Standard Deviation.'#6'VOn this form you will ' + +'enter the major and minor codes and a description for each one.'#0#8'TabOr' + +'der'#2#0#0#0#6'TLabel'#11'ItemNoLabel'#4'Left'#2#25#6'Height'#2#16#3'Top'#2 + +'x'#5'Width'#2'O'#7'Caption'#6#12'Code Number:'#11'ParentColor'#8#0#0#5'TEdi' + +'t'#10'ItemNoEdit'#4'Left'#2'j'#6'Height'#2#23#3'Top'#2'q'#5'Width'#2'%'#8'T' + +'abOrder'#2#1#4'Text'#6#1'1'#0#0#6'TLabel'#10'MajorLabel'#4'Left'#3#168#0#6 + +'Height'#2#16#3'Top'#2'x'#5'Width'#2'B'#7'Caption'#6#11'Major Code:'#11'Pare' + +'ntColor'#8#0#0#5'TEdit'#9'MajorEdit'#4'Left'#3#238#0#6'Height'#2#23#3'Top'#2 + +'p'#5'Width'#2'#'#8'TabOrder'#2#2#4'Text'#6#1'1'#0#0#6'TLabel'#10'MinorLabel' + +#4'Left'#3'('#1#6'Height'#2#16#3'Top'#2'x'#5'Width'#2'C'#7'Caption'#6#11'Min' + +'or Code:'#11'ParentColor'#8#0#0#5'TEdit'#9'MinorEdit'#4'Left'#3'p'#1#6'Heig' + +'ht'#2#23#3'Top'#2'r'#5'Width'#2'&'#8'TabOrder'#2#3#4'Text'#6#1'0'#0#0#6'TLa' + +'bel'#9'DescLabel'#4'Left'#2#25#6'Height'#2#16#3'Top'#3#153#0#5'Width'#2'p'#7 + +'Caption'#6#20'Category Description'#11'ParentColor'#8#0#0#5'TEdit'#15'Descr' + +'iptionEdit'#4'Left'#3#144#0#6'Height'#2#23#3'Top'#3#147#0#5'Width'#3'!'#2#8 + +'TabOrder'#2#4#0#0#7'TButton'#11'SaveCodeBtn'#4'Left'#2#24#6'Height'#2'!'#3 + +'Top'#3#189#0#5'Width'#3#137#0#7'Caption'#6#24'Save Info. for this code'#7'O' + +'nClick'#7#16'SaveCodeBtnClick'#8'TabOrder'#2#5#0#0#7'TButton'#11'StartNewBt' + +'n'#4'Left'#3#168#0#6'Height'#2' '#3'Top'#3#189#0#5'Width'#3#146#0#7'Caption' + +#6#14'Start New Code'#7'OnClick'#7#16'StartNewBtnClick'#8'TabOrder'#2#6#0#0#7 + +'TButton'#10'DisplayBtn'#4'Left'#3'I'#1#6'Height'#2' '#3'Top'#3#240#0#5'Widt' + +'h'#3#177#0#7'Caption'#6#27'Display All Saved Code Data'#7'OnClick'#7#15'Dis' + +'playBtnClick'#8'TabOrder'#2#7#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'P'#2#6 + +'Height'#2#30#3'Top'#3#240#0#5'Width'#2'\'#7'Caption'#6#6'Return'#7'OnClick' + +#7#14'ReturnBtnClick'#8'TabOrder'#2#8#0#0#7'TButton'#10'EditOneBtn'#4'Left'#3 + +'I'#1#6'Height'#2#31#3'Top'#3#190#0#5'Width'#3#177#0#7'Caption'#6#26'Edit a ' + +'Specific Code Entry'#7'OnClick'#7#15'EditOneBtnClick'#8'TabOrder'#2#9#0#0#0 +]); diff --git a/applications/lazstats/source_orig/itemcodesunit.pas b/applications/lazstats/source_orig/itemcodesunit.pas new file mode 100644 index 000000000..a0f2fd3db --- /dev/null +++ b/applications/lazstats/source_orig/itemcodesunit.pas @@ -0,0 +1,152 @@ +unit ItemCodesUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, outputunit; + +type + + { TCodesForm } + + TCodesForm = class(TForm) + EditOneBtn: TButton; + ReturnBtn: TButton; + DisplayBtn: TButton; + StartNewBtn: TButton; + SaveCodeBtn: TButton; + DescLabel: TLabel; + DescriptionEdit: TEdit; + MinorEdit: TEdit; + MinorLabel: TLabel; + MajorEdit: TEdit; + ItemNoEdit: TEdit; + ItemNoLabel: TLabel; + MajorLabel: TLabel; + Memo1: TMemo; + procedure EditOneBtnClick(Sender: TObject); + procedure DisplayBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure ReturnBtnClick(Sender: TObject); + procedure SaveCodeBtnClick(Sender: TObject); + procedure StartNewBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + CodesForm: TCodesForm; + +implementation +uses ItemBankingUnit; +{ TCodesForm } + +procedure TCodesForm.SaveCodeBtnClick(Sender: TObject); +var + currentno : integer; +begin + currentno := StrToInt(ItemNoEdit.Text); + if currentno > ItemBankFrm.BankInfo.NCodes then + ItemBankFrm.BankInfo.NCodes := currentno; + ItemBankFrm.NItemCodesText.Text := IntToStr(currentno); + ItemBankFrm.CodesInfo[currentno].codenumber := currentno; + ItemBankFrm.CodesInfo[currentno].majorcodes := StrToInt(MajorEdit.Text); + ItemBankFrm.CodesInfo[currentno].minorcodes := StrToInt(MinorEdit.Text); + ItemBankFrm.CodesInfo[currentno].Description := DescriptionEdit.Text; +end; + +procedure TCodesForm.DisplayBtnClick(Sender: TObject); +var + currentno : integer; + i : integer; + outline : string; +begin + currentno := ItemBankFrm.BankInfo.NCodes; + OutPutFrm.RichEdit.Lines.Add('Current Item Codes'); + OutPutFrm.RichEdit.Lines.Add(''); + + for i := 1 to currentno do + begin + outline := format('Item number %3d',[ItemBankFrm.CodesInfo[i].codenumber]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Major Code %3d',[ItemBankFrm.CodesInfo[i].majorcodes]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Minor Code %3d',[ItemBankFrm.CodesInfo[i].minorcodes]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Description %s',[ItemBankFrm.CodesInfo[i].Description]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + end; + OutPutFrm.ShowModal; +end; + +procedure TCodesForm.EditOneBtnClick(Sender: TObject); +Var + response : string; + codeno : integer; +begin + response := InputBox('Code Number:','Number:','1'); + codeno := StrToInt(response); + if codeno <= ItemBankFrm.BankInfo.NCodes then + begin + ItemNoEdit.Text := IntToStr(ItemBankFrm.CodesInfo[codeno].codenumber); + MajorEdit.Text := IntToStr(ItemBankFrm.CodesInfo[codeno].majorcodes); + MinorEdit.Text := IntToStr(ItemBankFrm.CodesInfo[codeno].minorcodes); + DescriptionEdit.Text := ItemBankFrm.CodesInfo[codeno].Description; + end; +end; + +procedure TCodesForm.FormShow(Sender: TObject); +Var ncodes : integer; +begin + if ItemBankFrm.NItemCodesText.Text <> '' then + begin + ncodes := StrToInt(ItemBankFrm.NItemCodesText.Text); + ItemNoEdit.Text := IntToStr(ItemBankFrm.CodesInfo[ncodes].codenumber); + MajorEdit.Text := IntToStr(ItemBankFrm.CodesInfo[ncodes].majorcodes) ; + MinorEdit.Text := IntToStr(ItemBankFrm.CodesInfo[ncodes].minorcodes); + DescriptionEdit.Text := ItemBankFrm.CodesInfo[ncodes].Description; + end else + begin + ItemNoEdit.Text := '1'; + MajorEdit.Text := '1'; + MinorEdit.Text := '0'; + DescriptionEdit.Text := ''; + end; +end; + +procedure TCodesForm.ReturnBtnClick(Sender: TObject); +begin + CodesForm.Hide; + Close; +end; + +procedure TCodesForm.StartNewBtnClick(Sender: TObject); +var + currentno : integer; + newnumber : integer; +begin + currentno := StrToInt(ItemNoEdit.Text); + newnumber := currentno + 1; + ItemNoEdit.Text := IntToStr(newnumber); + currentno := StrToInt(MinorEdit.Text); + newnumber := currentno + 1; + MinorEdit.Text := IntToStr(newnumber); + DescriptionEdit.Text := ''; + if newnumber > StrToInt(ItemBankFrm.NItemCodesText.Text) then + begin + ItemBankFrm.NItemCodesText.Text := IntToStr(newnumber); + ItemBankFrm.CodesInfo[newnumber].codenumber := newnumber; + end; +end; + +initialization + {$I itemcodesunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/jpegunit.lfm b/applications/lazstats/source_orig/jpegunit.lfm new file mode 100644 index 000000000..7542e8ae0 --- /dev/null +++ b/applications/lazstats/source_orig/jpegunit.lfm @@ -0,0 +1,66 @@ +object JPEGform: TJPEGform + Left = 139 + Height = 689 + Top = 45 + Width = 737 + Caption = 'JPEG Viewer' + ClientHeight = 689 + ClientWidth = 737 + LCLVersion = '0.9.30' + object Image1: TImage + Left = 9 + Height = 607 + Top = 9 + Width = 714 + Proportional = True + end + object LoadBtn: TButton + Left = 16 + Height = 27 + Top = 639 + Width = 107 + Caption = 'Load Image' + OnClick = LoadBtnClick + TabOrder = 0 + end + object ReturnBtn: TButton + Left = 624 + Height = 26 + Top = 639 + Width = 91 + Caption = 'Return' + ModalResult = 1 + TabOrder = 1 + end + object StretchBtn: TButton + Left = 169 + Height = 24 + Top = 641 + Width = 87 + Caption = 'Stretch' + OnClick = StretchBtnClick + TabOrder = 2 + end + object NormalBtn: TButton + Left = 312 + Height = 24 + Top = 642 + Width = 87 + Caption = 'Normal' + OnClick = NormalBtnClick + TabOrder = 3 + end + object PropBtn: TButton + Left = 457 + Height = 24 + Top = 641 + Width = 112 + Caption = 'Show Proportional' + OnClick = PropBtnClick + TabOrder = 4 + end + object OpenPictureDialog1: TOpenPictureDialog + left = 108 + top = 77 + end +end diff --git a/applications/lazstats/source_orig/jpegunit.lrs b/applications/lazstats/source_orig/jpegunit.lrs new file mode 100644 index 000000000..38dcf0005 --- /dev/null +++ b/applications/lazstats/source_orig/jpegunit.lrs @@ -0,0 +1,20 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TJPEGform','FORMDATA',[ + 'TPF0'#9'TJPEGform'#8'JPEGform'#4'Left'#3#139#0#6'Height'#3#177#2#3'Top'#2'-' + +#5'Width'#3#225#2#7'Caption'#6#11'JPEG Viewer'#12'ClientHeight'#3#177#2#11'C' + +'lientWidth'#3#225#2#10'LCLVersion'#6#6'0.9.30'#0#6'TImage'#6'Image1'#4'Left' + +#2#9#6'Height'#3'_'#2#3'Top'#2#9#5'Width'#3#202#2#12'Proportional'#9#0#0#7'T' + +'Button'#7'LoadBtn'#4'Left'#2#16#6'Height'#2#27#3'Top'#3#127#2#5'Width'#2'k' + +#7'Caption'#6#10'Load Image'#7'OnClick'#7#12'LoadBtnClick'#8'TabOrder'#2#0#0 + +#0#7'TButton'#9'ReturnBtn'#4'Left'#3'p'#2#6'Height'#2#26#3'Top'#3#127#2#5'Wi' + +'dth'#2'['#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#1#0#0#7 + +'TButton'#10'StretchBtn'#4'Left'#3#169#0#6'Height'#2#24#3'Top'#3#129#2#5'Wid' + +'th'#2'W'#7'Caption'#6#7'Stretch'#7'OnClick'#7#15'StretchBtnClick'#8'TabOrde' + +'r'#2#2#0#0#7'TButton'#9'NormalBtn'#4'Left'#3'8'#1#6'Height'#2#24#3'Top'#3 + +#130#2#5'Width'#2'W'#7'Caption'#6#6'Normal'#7'OnClick'#7#14'NormalBtnClick'#8 + +'TabOrder'#2#3#0#0#7'TButton'#7'PropBtn'#4'Left'#3#201#1#6'Height'#2#24#3'To' + +'p'#3#129#2#5'Width'#2'p'#7'Caption'#6#17'Show Proportional'#7'OnClick'#7#12 + +'PropBtnClick'#8'TabOrder'#2#4#0#0#18'TOpenPictureDialog'#18'OpenPictureDial' + +'og1'#4'left'#2'l'#3'top'#2'M'#0#0#0 +]); diff --git a/applications/lazstats/source_orig/jpegunit.pas b/applications/lazstats/source_orig/jpegunit.pas new file mode 100644 index 000000000..b66cc07cc --- /dev/null +++ b/applications/lazstats/source_orig/jpegunit.pas @@ -0,0 +1,83 @@ +unit JPEGUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + ExtCtrls, StdCtrls, ExtDlgs; + +type + + { TJPEGform } + + TJPEGform = class(TForm) + PropBtn: TButton; + StretchBtn: TButton; + NormalBtn: TButton; + OpenPictureDialog1: TOpenPictureDialog; + ReturnBtn: TButton; + LoadBtn: TButton; + Image1: TImage; + procedure LoadBtnClick(Sender: TObject); + procedure NormalBtnClick(Sender: TObject); + procedure PropBtnClick(Sender: TObject); + procedure StretchBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + JPEGform: TJPEGform; + +implementation + +{ TJPEGform } + +procedure TJPEGform.LoadBtnClick(Sender: TObject); +VAR + JPEG : TJPEGImage; +begin + OpenPictureDialog1.Options := OpenPictureDialog1.Options+[ofFileMustExist]; + if not OpenPictureDialog1.Execute then exit; + try + JPEG := TJPEGImage.Create; + try + JPEG.LoadFromFile(OpenPictureDialog1.FileName); + Image1.Picture.Assign(JPEG); + finally + JPEG.Free; + end; + JPEGForm.Caption := OpenPictureDialog1.FileName; + except + on E: Exception do begin + MessageDlg('Error','Error: '+E.Message,mtError,[mbOk],0); + end; + end; +end; + +procedure TJPEGform.NormalBtnClick(Sender: TObject); +begin + Image1.Proportional := false; + Image1.Stretch := false; +end; + +procedure TJPEGform.PropBtnClick(Sender: TObject); +begin + Image1.Proportional := true; +end; + +procedure TJPEGform.StretchBtnClick(Sender: TObject); +begin + Image1.Proportional := false; + Image1.Stretch := true; +end; + +initialization + {$I jpegunit.lrs} + +end. +