diff --git a/applications/lazstats/LazStats.chm b/applications/lazstats/LazStats.chm index 5e1bc30fb..24ed877d1 100644 Binary files a/applications/lazstats/LazStats.chm and b/applications/lazstats/LazStats.chm differ diff --git a/applications/lazstats/data/autocorr.laz b/applications/lazstats/data/autocorr.laz deleted file mode 100644 index 68c1e996b..000000000 --- a/applications/lazstats/data/autocorr.laz +++ /dev/null @@ -1,413 +0,0 @@ -201 -1 -VAR -VARIABLE 1 -5 -F -3 -99999 -L -Case 0 -VAR -Case 1 -5.310 -Case 2 -5.267 -Case 3 -5.936 -Case 4 -6.032 -Case 5 -6.048 -Case 6 -6.188 -Case 7 -6.038 -Case 8 -6.344 -Case 9 -6.176 -Case 10 -5.780 -Case 11 -5.678 -Case 12 -5.843 -Case 13 -5.342 -Case 14 -5.373 -Case 15 -4.798 -Case 16 -4.622 -Case 17 -4.634 -Case 18 -4.267 -Case 19 -4.504 -Case 20 -4.424 -Case 21 -4.452 -Case 22 -4.597 -Case 23 -4.353 -Case 24 -4.671 -Case 25 -4.908 -Case 26 -5.095 -Case 27 -5.257 -Case 28 -5.558 -Case 29 -6.128 -Case 30 -6.144 -Case 31 -6.409 -Case 32 -6.453 -Case 33 -6.309 -Case 34 -5.981 -Case 35 -6.042 -Case 36 -5.932 -Case 37 -5.751 -Case 38 -5.196 -Case 39 -5.145 -Case 40 -4.971 -Case 41 -4.605 -Case 42 -4.381 -Case 43 -4.451 -Case 44 -4.055 -Case 45 -4.309 -Case 46 -4.369 -Case 47 -4.504 -Case 48 -4.506 -Case 49 -4.559 -Case 50 -5.049 -Case 51 -5.398 -Case 52 -5.608 -Case 53 -5.800 -Case 54 -5.969 -Case 55 -5.867 -Case 56 -6.154 -Case 57 -6.482 -Case 58 -6.322 -Case 59 -6.040 -Case 60 -5.911 -Case 61 -6.066 -Case 62 -5.908 -Case 63 -5.582 -Case 64 -4.985 -Case 65 -5.156 -Case 66 -4.549 -Case 67 -4.322 -Case 68 -4.140 -Case 69 -4.434 -Case 70 -4.338 -Case 71 -4.221 -Case 72 -4.578 -Case 73 -4.251 -Case 74 -4.788 -Case 75 -5.083 -Case 76 -5.303 -Case 77 -5.276 -Case 78 -5.581 -Case 79 -5.848 -Case 80 -5.998 -Case 81 -6.140 -Case 82 -5.992 -Case 83 -6.409 -Case 84 -6.418 -Case 85 -6.141 -Case 86 -5.908 -Case 87 -5.765 -Case 88 -5.354 -Case 89 -5.033 -Case 90 -5.083 -Case 91 -4.878 -Case 92 -4.467 -Case 93 -4.612 -Case 94 -4.471 -Case 95 -4.242 -Case 96 -4.446 -Case 97 -4.431 -Case 98 -4.566 -Case 99 -4.520 -Case 100 -4.705 -Case 101 -4.914 -Case 102 -5.541 -Case 103 -5.745 -Case 104 -5.667 -Case 105 -5.834 -Case 106 -6.185 -Case 107 -6.406 -Case 108 -6.450 -Case 109 -6.122 -Case 110 -5.892 -Case 111 -5.977 -Case 112 -5.928 -Case 113 -5.383 -Case 114 -5.450 -Case 115 -4.973 -Case 116 -4.682 -Case 117 -4.536 -Case 118 -4.454 -Case 119 -4.121 -Case 120 -4.398 -Case 121 -4.503 -Case 122 -4.348 -Case 123 -4.337 -Case 124 -4.801 -Case 125 -4.817 -Case 126 -5.178 -Case 127 -5.490 -Case 128 -5.407 -Case 129 -5.738 -Case 130 -6.070 -Case 131 -5.940 -Case 132 -6.188 -Case 133 -6.025 -Case 134 -6.315 -Case 135 -5.917 -Case 136 -6.080 -Case 137 -6.022 -Case 138 -5.508 -Case 139 -5.186 -Case 140 -5.293 -Case 141 -4.847 -Case 142 -4.838 -Case 143 -4.535 -Case 144 -4.166 -Case 145 -4.372 -Case 146 -4.137 -Case 147 -4.353 -Case 148 -4.280 -Case 149 -4.777 -Case 150 -5.013 -Case 151 -4.952 -Case 152 -5.371 -Case 153 -5.794 -Case 154 -5.607 -Case 155 -5.792 -Case 156 -5.889 -Case 157 -6.159 -Case 158 -6.239 -Case 159 -6.460 -Case 160 -6.363 -Case 161 -5.937 -Case 162 -5.828 -Case 163 -5.520 -Case 164 -5.447 -Case 165 -5.154 -Case 166 -4.690 -Case 167 -4.484 -Case 168 -4.556 -Case 169 -4.183 -Case 170 -4.373 -Case 171 -4.363 -Case 172 -4.084 -Case 173 -4.563 -Case 174 -4.707 -Case 175 -4.892 -Case 176 -5.194 -Case 177 -5.477 -Case 178 -5.350 -Case 179 -5.683 -Case 180 -6.034 -Case 181 -6.036 -Case 182 -6.386 -Case 183 -6.436 -Case 184 -6.004 -Case 185 -5.921 -Case 186 -6.016 -Case 187 -5.762 -Case 188 -5.481 -Case 189 -5.496 -Case 190 -5.102 -Case 191 -4.648 -Case 192 -4.600 -Case 193 -4.444 -Case 194 -4.411 -Case 195 -4.097 -Case 196 -4.492 -Case 197 -4.300 -Case 198 -4.326 -Case 199 -4.400 -Case 200 -4.879 -Case 201 -4.868 diff --git a/applications/lazstats/data/strikes.laz b/applications/lazstats/data/strikes.laz new file mode 100644 index 000000000..9db95970a --- /dev/null +++ b/applications/lazstats/data/strikes.laz @@ -0,0 +1,71 @@ +30 +1 +VAR 1 +VARIABLE 1 +6 +F +4 +99999 +L +CASE/VAR. +VAR 1 +Case 1 +4805.5 +Case 2 +5228.3 +Case 3 +5178.6 +Case 4 +3462.4 +Case 5 +4332.9 +Case 6 +3810.6 +Case 7 +3661.4 +Case 8 +3736.0 +Case 9 +3736.0 +Case 10 +3300.7 +Case 11 +3313.1 +Case 12 +3561.9 +Case 13 +3362.9 +Case 14 +3661.4 +Case 15 +4022.0 +Case 16 +4432.4 +Case 17 +4656.3 +Case 18 +5166.2 +Case 19 +5862.6 +Case 20 +5875.0 +Case 21 +5228.3 +Case 22 +5104.0 +Case 23 +5464.6 +Case 24 +6260.5 +Case 25 +5141.3 +Case 26 +5775.5 +Case 27 +5663.6 +Case 28 +4258.3 +Case 29 +4917.4 +Case 30 +3885.2 diff --git a/applications/lazstats/docs/HelpNDoc/LazStats.hnd b/applications/lazstats/docs/HelpNDoc/LazStats.hnd index b6271f46e..c8645d25f 100644 Binary files a/applications/lazstats/docs/HelpNDoc/LazStats.hnd and b/applications/lazstats/docs/HelpNDoc/LazStats.hnd differ diff --git a/applications/lazstats/source/forms/analysis/correlation/autocorunit.lfm b/applications/lazstats/source/forms/analysis/correlation/autocorunit.lfm index f51d2af73..bff19404e 100644 --- a/applications/lazstats/source/forms/analysis/correlation/autocorunit.lfm +++ b/applications/lazstats/source/forms/analysis/correlation/autocorunit.lfm @@ -9,6 +9,7 @@ object AutoCorrFrm: TAutoCorrFrm ClientWidth = 684 OnActivate = FormActivate OnCreate = FormCreate + OnShow = FormShow Position = poMainFormCenter LCLVersion = '2.1.0.0' object GroupBox1: TGroupBox diff --git a/applications/lazstats/source/forms/analysis/correlation/autocorunit.pas b/applications/lazstats/source/forms/analysis/correlation/autocorunit.pas index a2eaeb195..246e81643 100644 --- a/applications/lazstats/source/forms/analysis/correlation/autocorunit.pas +++ b/applications/lazstats/source/forms/analysis/correlation/autocorunit.pas @@ -1,8 +1,6 @@ -// File for testing: -// --- not found (the pdf docs mention "strikes.tab" - but this does not exist. -// -- created test file autocorr.laz - -// TODO: Crashes when multiple smoothing options are applied. +// File for testing: "strkkes.tab" +// - original file not found, but could be reconstructed from graphs. +// --> there is no EXACT agreement of numbers with the pdf file "autocorrelation.pdf". unit AutoCorUnit; @@ -72,6 +70,7 @@ type procedure ComputeBtnClick(Sender: TObject); procedure FormActivate(Sender: TObject); procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); procedure HelpBtnClick(Sender: TObject); procedure InBtnClick(Sender: TObject); procedure OutBtnClick(Sender: TObject); @@ -204,8 +203,11 @@ procedure TAutoCorrFrm.FormCreate(Sender: TObject); begin Assert(OS3MainFrm <> nil); if PointsFrm = nil then Application.CreateForm(TPointsFrm, PointsFrm); +end; - ResetBtnClick(self); +procedure TAutoCorrFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(nil); end; procedure TAutoCorrFrm.HelpBtnClick(Sender: TObject); @@ -423,7 +425,7 @@ begin lReport.Add('Variance: %8.3f', [covzero]); lReport.Add(''); - lReport.Add(' Lag Rxy MeanX MeanY Std.Dev.X Std.Dev.Y Cases LCL UCL '); + lReport.Add(' Lag Rxy MeanX MeanY Std.Dev.X Std.Dev.Y Cases LCL UCL '); lReport.Add('----- -------- -------- -------- ---------- ---------- -------- -------- --------'); end; @@ -589,6 +591,8 @@ begin DynVectorPrint(PartCors, maxlag, Title, ColLabels, NoPts, lReport); end; + DisplayReport(lReport); + // plot correlations if elected uplimit := 1.96 * (1.0 / sqrt(count)); lowlimit := -1.96 * (1.0 / sqrt(count)); @@ -659,8 +663,6 @@ begin end; end; - DisplayReport(lReport); - finally lReport.Free; diff --git a/applications/lazstats/source/forms/analysis/correlation/pointsunit.pas b/applications/lazstats/source/forms/analysis/correlation/pointsunit.pas index 1a1f93691..676bade2a 100644 --- a/applications/lazstats/source/forms/analysis/correlation/pointsunit.pas +++ b/applications/lazstats/source/forms/analysis/correlation/pointsunit.pas @@ -92,10 +92,10 @@ var begin height := Image1.Canvas.Height; width := Image1.Canvas.Width; - topmarg := height div 10; - verthi := height - (2 * topmarg); + topmarg := height div 12; // 10; + verthi := height - 4 * topmarg; botmarg := topmarg + verthi; - botmarg := height; + //botmarg := height; leftmarg := width div 10; horizlong := width - 2 * leftmarg; rightmarg := leftmarg + horizlong; @@ -157,8 +157,8 @@ begin Y := botmarg; end; labelstring := 'CASES'; - X := (leftmarg + horizlong div 2) - (Canvas.TextWidth(labelstring) div 2); - Y := botmarg + Image1.Canvas.TextHeight(labelstring); + X := (leftmarg + horizlong div 2) - Canvas.TextWidth(labelstring) div 2; + Y := botmarg + Image1.Canvas.TextHeight(labelstring) + 10; Image1.Canvas.TextOut(X,Y,labelstring); // Plot lines from point to point