diff --git a/applications/lazstats/source/forms/analysis/comparisons/withinanovaunit.pas b/applications/lazstats/source/forms/analysis/comparisons/withinanovaunit.pas index 17ad1f7c6..af1a3635d 100644 --- a/applications/lazstats/source/forms/analysis/comparisons/withinanovaunit.pas +++ b/applications/lazstats/source/forms/analysis/comparisons/withinanovaunit.pas @@ -116,7 +116,7 @@ var SSrows, SScols, SSwrows, SSerr, SStot: double; MSrows, MScols, MSwrows, MSerr, MStot: double; dfrows, dfcols, dfwrows, dferr, dftot: double; - f1, f2, probf1, GrandMean, Term1, Term2, Term3, Term4: double; + f1, probf1, GrandMean, Term1, Term2, Term3, Term4: double; r1, r2, r3, r4, X, avgvar, avgcov: double; determ1, determ2, M2, C2, chi2, prob: double; errorfound: boolean; @@ -351,7 +351,6 @@ begin M2 := 0.0; C2 := 0.0; chi2 := 0.0; - f2 := 0; prob := 0.0; Determ(vcmat,NoSelected,NoSelected,determ1,errorfound); if determ1 < 0.0 then determ1 := 0.0; diff --git a/applications/lazstats/source/forms/analysis/correlation/autocorunit.pas b/applications/lazstats/source/forms/analysis/correlation/autocorunit.pas index 4beb0cac8..e5353da65 100644 --- a/applications/lazstats/source/forms/analysis/correlation/autocorunit.pas +++ b/applications/lazstats/source/forms/analysis/correlation/autocorunit.pas @@ -669,8 +669,10 @@ begin for i := 1 to NoPts do begin X := pts[i-1]; - if (MeanChk.Checked = true) then covzero := covzero + (X * X) - else covzero := covzero + ((X - mean) * (X - mean)); + if (MeanChk.Checked = true) then + covzero := covzero + sqr(X) + else + covzero := covzero + sqr(X - mean); end; covzero := covzero / count; diff --git a/applications/lazstats/source/forms/analysis/correlation/canonunit.pas b/applications/lazstats/source/forms/analysis/correlation/canonunit.pas index 78c034f73..af2b1deec 100644 --- a/applications/lazstats/source/forms/analysis/correlation/canonunit.pas +++ b/applications/lazstats/source/forms/analysis/correlation/canonunit.pas @@ -157,7 +157,7 @@ const SEPARATOR = '==========================================================================='; var i, j, k, count, a_size, b_size, no_factors, novars, IER: integer; - outline, cellstring, gridstring: string; + cellstring, gridstring: 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; diff --git a/applications/lazstats/source/forms/analysis/correlation/partialsunit.pas b/applications/lazstats/source/forms/analysis/correlation/partialsunit.pas index 14866cf1d..8d576a9e0 100644 --- a/applications/lazstats/source/forms/analysis/correlation/partialsunit.pas +++ b/applications/lazstats/source/forms/analysis/correlation/partialsunit.pas @@ -188,16 +188,16 @@ end; procedure TPartialsFrm.ComputeBtnClick(Sender: TObject); var - rmatrix, workmat : DblDyneMat; - Means, Variances, StdDevs, W, Betas : DblDyneVec; - R2Full, R2Cntrl, SemiPart, Partial, df1, df2, F, Prob : double; - NoPredVars, NoCntrlVars, DepVarNo, TotNoVars, pcnt, ccnt, count : integer; - PredVars, CntrlVars : IntDyneVec; - MatVars : IntDyneVec; - outline, varstring : string; - i, j, K, L, NCases : integer; - errorcode : boolean; - vtimesw, W1, v : DblDyneMat; + rmatrix, workmat: DblDyneMat; + Means, Variances, StdDevs, W, Betas: DblDyneVec; + R2Full, R2Cntrl, SemiPart, Partial, df1, df2, F, Prob: double; + NoPredVars, NoCntrlVars, DepVarNo, TotNoVars, pcnt, ccnt, count: integer; + PredVars, CntrlVars: IntDyneVec; + MatVars: IntDyneVec; + outline, varstring: string; + i, j, K, L: integer; + errorcode: boolean; + vtimesw, W1, v: DblDyneMat; begin DepVarNo := 1; @@ -213,7 +213,6 @@ begin end; TotNoVars := NoPredVars + NoCntrlVars + 1; count := NoCases; - NCases := NoCases; // Allocate space required SetLength(vtimesw,NoVariables,NoVariables); diff --git a/applications/lazstats/source/forms/analysis/cross-classification/abcloglinunit.pas b/applications/lazstats/source/forms/analysis/cross-classification/abcloglinunit.pas index ab6ee4d55..578e31404 100644 --- a/applications/lazstats/source/forms/analysis/cross-classification/abcloglinunit.pas +++ b/applications/lazstats/source/forms/analysis/cross-classification/abcloglinunit.pas @@ -576,7 +576,7 @@ var Title, astr : string; NewRowMarg,NewColMarg,NewSliceMarg : DblDyneVec; LogRowMarg, LogColMarg, LogSliceMarg : DblDyneVec; - NewTotal : double; + NewTotal: double = 0.0; ABLogs, ACLogs, BCLogs : DblDyneMat; LogTotal, mu, Ysqr : double; DF : integer; diff --git a/applications/lazstats/source/forms/analysis/cross-classification/twowayloglinunit.pas b/applications/lazstats/source/forms/analysis/cross-classification/twowayloglinunit.pas index c7e92da7e..f3de89626 100644 --- a/applications/lazstats/source/forms/analysis/cross-classification/twowayloglinunit.pas +++ b/applications/lazstats/source/forms/analysis/cross-classification/twowayloglinunit.pas @@ -249,7 +249,7 @@ end; procedure TTwoWayLogLinFrm.ComputeBtnClick(Sender: TObject); var Data : DblDyneMat; - NewData : DblDyneMat; + NewData : DblDyneMat = nil; Prop : DblDyneMat; LogData : DblDyneMat; Expected : DblDyneMat; @@ -262,7 +262,7 @@ var ColLogs : DblDyneVec; CellLambdas : DblDyneCube; Total : double; - NewTotal : double; + NewTotal: double = 0.0; TotalLogs : double; mu : double; row, col : integer; @@ -304,18 +304,18 @@ begin end; // Get data - SetLength(Data,Nrows+1,Ncols+1); - SetLength(CellLambdas,Nrows+1,Ncols+1,4); - SetLength(RowMarg,Nrows+1); - SetLength(RowLogs,Nrows+1); - SetLength(ColMarg,Ncols+1); - SetLength(ColLogs,Ncols+1); - SetLength(Prop,Nrows+1,Ncols+1); - SetLength(LogData,Nrows+1,Ncols+1); - SetLength(Expected,Nrows+1,Ncols+1); - SetLength(NewData,Nrows+1,Ncols+1); - SetLength(NewRowMarg,Nrows+1); - SetLength(NewColMarg,Ncols+1); + SetLength(Data, Nrows + 1, Ncols + 1); + SetLength(CellLambdas, Nrows + 1,Ncols + 1, 4); + SetLength(RowMarg, Nrows + 1); + SetLength(RowLogs, Nrows + 1); + SetLength(ColMarg, Ncols + 1); + SetLength(ColLogs, Ncols + 1); + SetLength(Prop, Nrows + 1, Ncols + 1); + SetLength(LogData, Nrows + 1, Ncols + 1); + SetLength(Expected, Nrows + 1, Ncols + 1); + SetLength(NewData, Nrows + 1, Ncols + 1); + SetLength(NewRowMarg, Nrows + 1); + SetLength(NewColMarg, Ncols + 1); for i := 1 to Nrows do for j := 1 to Ncols do diff --git a/applications/lazstats/source/forms/analysis/measurement_programs/comprelunit.pas b/applications/lazstats/source/forms/analysis/measurement_programs/comprelunit.pas index 3759b1725..fc247fe2b 100644 --- a/applications/lazstats/source/forms/analysis/measurement_programs/comprelunit.pas +++ b/applications/lazstats/source/forms/analysis/measurement_programs/comprelunit.pas @@ -148,7 +148,7 @@ end; procedure TCompRelFrm.AllBtnClick(Sender: TObject); var - i, count : integer; + i: integer; cellstring : string; begin cellstring := '1.0'; @@ -171,7 +171,7 @@ var Weights, Reliabilities, VectProd, means, variances, stddevs: DblDyneVec; CompRel, numerator, denominator, compscore: double; colnoselected: IntDyneVec; - outline, cellstring: string; + cellstring: string; title: string; RowLabels: StrDyneVec; lReport: TStrings; @@ -314,6 +314,7 @@ var cellstring: string; begin cellstring := '1.0'; + i := 0; while i < VarList.Items.Count do begin if VarList.Selected[i] then @@ -339,6 +340,7 @@ procedure TCompRelFrm.OutBtnClick(Sender: TObject); var i: Integer; begin + i := 0; while i < ItemList.Items.Count do begin if ItemList.Selected[i] then diff --git a/applications/lazstats/source/forms/analysis/measurement_programs/difunit.lfm b/applications/lazstats/source/forms/analysis/measurement_programs/difunit.lfm index 429eb8a73..ce36e7487 100644 --- a/applications/lazstats/source/forms/analysis/measurement_programs/difunit.lfm +++ b/applications/lazstats/source/forms/analysis/measurement_programs/difunit.lfm @@ -94,7 +94,7 @@ object DIFFrm: TDIFFrm Height = 19 Top = 167 Width = 137 - Caption = 'Item Char. Curves' + Caption = 'Plot Item Curves' TabOrder = 7 end object CountsChk: TCheckBox diff --git a/applications/lazstats/source/forms/analysis/measurement_programs/difunit.pas b/applications/lazstats/source/forms/analysis/measurement_programs/difunit.pas index 734c5284f..8a30a109e 100644 --- a/applications/lazstats/source/forms/analysis/measurement_programs/difunit.pas +++ b/applications/lazstats/source/forms/analysis/measurement_programs/difunit.pas @@ -1,8 +1,9 @@ -// Test file: DIFData.laz +// Data file not 100% clear, bus seems to be: DIFData.laz // - Reference Group Code: 1 // - Focal Group Code: 2 // - No. of Score Levels: 11 // - Lower/Upper Bounds: 0-3, 4-7, 8-11, 12-15, 16-19, 20-23, 24-27, 28-31, 32-35, 36-39, 40-43 +// The result obtained this way match the pdf file. unit DifUnit; diff --git a/applications/lazstats/source/forms/analysis/measurement_programs/polydifunit.lfm b/applications/lazstats/source/forms/analysis/measurement_programs/polydifunit.lfm index 75800a077..48226b5c3 100644 --- a/applications/lazstats/source/forms/analysis/measurement_programs/polydifunit.lfm +++ b/applications/lazstats/source/forms/analysis/measurement_programs/polydifunit.lfm @@ -369,6 +369,7 @@ object PolyDIFFrm: TPolyDIFFrm BorderSpacing.Right = 8 OnEditingDone = LevelsEditEditingDone TabOrder = 4 + Text = 'LevelsEdit' end object GroupBox1: TGroupBox AnchorSideLeft.Control = GroupBox2 @@ -378,7 +379,7 @@ object PolyDIFFrm: TPolyDIFFrm AnchorSideRight.Side = asrBottom Left = 0 Height = 51 - Top = 307 + Top = 328 Width = 188 Anchors = [akTop, akLeft, akRight] AutoSize = True @@ -471,19 +472,19 @@ object PolyDIFFrm: TPolyDIFFrm AnchorSideRight.Control = Panel3 AnchorSideRight.Side = asrBottom Left = 0 - Height = 132 + Height = 153 Top = 163 Width = 188 AutoSize = True BorderSpacing.Top = 12 BorderSpacing.Right = 8 Caption = 'Enter Bounds for Levels' - ClientHeight = 112 + ClientHeight = 133 ClientWidth = 184 TabOrder = 5 object Panel2: TPanel Left = 8 - Height = 104 + Height = 125 Top = 0 Width = 168 AutoSize = True @@ -491,7 +492,7 @@ object PolyDIFFrm: TPolyDIFFrm BorderSpacing.Right = 8 BorderSpacing.Bottom = 8 BevelOuter = bvNone - ClientHeight = 104 + ClientHeight = 125 ClientWidth = 168 TabOrder = 0 object Label6: TLabel @@ -534,7 +535,7 @@ object PolyDIFFrm: TPolyDIFFrm AnchorSideRight.Control = LowBoundEdit Left = 50 Height = 15 - Top = 54 + Top = 50 Width = 70 Anchors = [akTop, akRight] BorderSpacing.Right = 8 @@ -547,7 +548,7 @@ object PolyDIFFrm: TPolyDIFFrm AnchorSideRight.Control = UpBoundEdit Left = 50 Height = 15 - Top = 85 + Top = 77 Width = 70 Anchors = [akTop, akRight] BorderSpacing.Right = 8 @@ -572,16 +573,17 @@ object PolyDIFFrm: TPolyDIFFrm OnChange = LevelScrollChange end object LowBoundEdit: TEdit + AnchorSideTop.Control = LevelNoEdit AnchorSideTop.Side = asrBottom AnchorSideRight.Control = Panel2 AnchorSideRight.Side = asrBottom Left = 128 Height = 23 - Top = 50 + Top = 46 Width = 40 Alignment = taRightJustify Anchors = [akTop, akRight] - BorderSpacing.Top = 8 + BorderSpacing.Top = 4 OnEditingDone = LowBoundEditEditingDone TabOrder = 2 Text = 'LowBoundEdit' @@ -593,14 +595,14 @@ object PolyDIFFrm: TPolyDIFFrm AnchorSideRight.Side = asrBottom Left = 128 Height = 23 - Top = 81 + Top = 73 Width = 40 Alignment = taRightJustify Anchors = [akTop, akRight] - BorderSpacing.Top = 8 + BorderSpacing.Top = 4 OnEditingDone = UpBoundEditEditingDone TabOrder = 3 - Text = 'Edit1' + Text = 'UpBoundEdit' end object LevelNoEdit: TStaticText AnchorSideTop.Control = Label8 @@ -617,6 +619,22 @@ object PolyDIFFrm: TPolyDIFFrm BorderStyle = sbsSingle TabOrder = 1 end + object NextBtn: TButton + AnchorSideTop.Control = UpBoundEdit + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = UpBoundEdit + AnchorSideRight.Side = asrBottom + Left = 90 + Height = 25 + Top = 100 + Width = 78 + Anchors = [akTop, akRight] + AutoSize = True + BorderSpacing.Top = 4 + Caption = 'Next level' + OnClick = NextBtnClick + TabOrder = 4 + end end end end diff --git a/applications/lazstats/source/forms/analysis/measurement_programs/polydifunit.pas b/applications/lazstats/source/forms/analysis/measurement_programs/polydifunit.pas index 26daf8e90..9cc0b042b 100644 --- a/applications/lazstats/source/forms/analysis/measurement_programs/polydifunit.pas +++ b/applications/lazstats/source/forms/analysis/measurement_programs/polydifunit.pas @@ -7,6 +7,7 @@ // - Level 1: lower bound 0, upper bound 1 // - Level 2: lower bound 2, upper bound 3 // - Level 3: lower bound 4, upper bound 5 +// - Lower/upper bounds: 0-1, 2-3, 4-5 // The results obtained this way match the pdf file. unit PolyDifUnit; @@ -26,6 +27,7 @@ type TPolyDIFFrm = class(TForm) Bevel1: TBevel; + NextBtn: TButton; GroupBox2: TGroupBox; HelpBtn: TButton; LevelNoEdit: TStaticText; @@ -79,6 +81,7 @@ type procedure LevelScrollChange(Sender: TObject); procedure LevelsEditEditingDone(Sender: TObject); procedure LowBoundEditEditingDone(Sender: TObject); + procedure NextBtnClick(Sender: TObject); procedure ResetBtnClick(Sender: TObject); procedure UpBoundEditEditingDone(Sender: TObject); procedure VarListSelectionChange(Sender: TObject; User: boolean); @@ -147,16 +150,18 @@ end; procedure TPolyDIFFrm.UpBoundEditEditingDone(Sender: TObject); var level: Integer; + n: Integer; begin level := StrToInt(LevelNoEdit.Caption) - 1; - Ubounds[level] := StrToInt(UpBoundEdit.Text); - if level + 1 = StrToInt(LevelsEdit.Text) then + if TryStrToInt(UpBoundEdit.Text, n) then begin - ComputeBtn.Enabled := true; - exit; - end; -// LowBoundEdit.Text := IntToStr(UBounds[level]); //IntToStr(Ubounds[level] + 1); -// LowBoundEdit.SetFocus; + Ubounds[level] := n; + if level + 1 = StrToInt(LevelsEdit.Text) then + exit; + if LBounds[level + 1] = -1 then + lBounds[level + 1] := UBounds[level] + 1; + end else + MessageDlg(Format('No valid number in upper bound at level #%d.', [level+1]), mtError, [mbOk], 0); end; procedure TPolyDIFFrm.FormActivate(Sender: TObject); @@ -272,7 +277,7 @@ begin if LBounds[level] = -1 then LowBoundEdit.Text := '' else - LowBoundEdit.Text :=IntToStr(LBounds[level]); + LowBoundEdit.Text := IntToStr(LBounds[level]); if UBounds[level] = -1 then UpBoundEdit.Text := '' @@ -289,17 +294,24 @@ begin LevelScroll.Max := Max(L - 1, 0); LevelScroll.Min := 0; LevelNoEdit.Caption := IntToStr(LevelScroll.Position + 1); - //LevelScroll.Enabled := true; - //LowBoundEdit.SetFocus; end; end; procedure TPolyDIFFrm.LowBoundEditEditingDone(Sender: TObject); var level: integer; + n: Integer; begin level := LevelScroll.Position; - Lbounds[level] := StrToInt(LowBoundEdit.Text); + if TryStrToInt(LowBoundEdit.Text, n) then + Lbounds[level] := n + else + Messagedlg(Format('No valid number in lower bound at level #%d.', [level+1]), mtError, [mbOK], 0); +end; + +procedure TPolyDIFFrm.NextBtnClick(Sender: TObject); +begin + LevelScroll.Position := LevelScroll.Position + 1; end; procedure TPolyDIFFrm.AllBtnClick(Sender: TObject); @@ -318,22 +330,23 @@ end; procedure TPolyDIFFrm.ComputeBtnClick(Sender: TObject); var - i, j, k : integer; - itm, nolevels, level : integer; - grpvar : integer; - subjgrp : integer; - subjtot : integer; - value : integer; - cellstring : string; - title : string; - nsize : array [1..2] of integer; - FData : IntDyneCube; //no. of category values within item for focal group - RData : IntDyneCube; //no. of category values within item for reference group - TotData : IntDyneCube; // sum of the above two - t, Mf, Mb, Sf, Sb, Nb, Nf, df, d, Sd : DblDyneVec; - Zc, Vart, BigJ, SumE, SumV, Term1, MY, prob : double; - X, BigDnum, BigDden, BigD, BigDS, Zd, M2, E, VarE, Ti, dftot : double; - loscore, hiscore : integer; + i, j, k: integer; + itm, nolevels, level: integer; + grpvar: integer; + subjgrp: integer; + subjtot: integer; + value: integer; + cellstring: string; + title: string; + nsize: array [1..2] of integer; + FData: IntDyneCube; //no. of category values within item for focal group + RData: IntDyneCube; //no. of category values within item for reference group + TotData: IntDyneCube; // sum of the above two + t, Mf, Mb, Sf, Sb, Nb, Nf, df, d, Sd: DblDyneVec; + Zc, Vart, BigJ, SumE, SumV, Term1, MY, prob: double; + X, BigDnum, BigDden, BigD, BigDS, Zd, M2, E, VarE, Ti, dftot: double; + loscore, hiscore: integer; + morePlots: Boolean; lReport: TStrings; begin NoItems := ItemsList.Items.Count; @@ -376,7 +389,6 @@ begin end; end; - lReport := TStringList.Create; try lReport.Add('POLYTOMOUS ITEM DIF ANALYSIS'); @@ -491,6 +503,7 @@ begin lReport.Add(''); // obtain statistics and print frequency in categories for each item + morePlots := true; for i := 1 to NoItems do begin lReport.Add('ITEM ' + IntToStr(i)); @@ -631,11 +644,11 @@ begin lReport.Add(DIVIDER); lReport.Add(''); - if GraphChk.Checked then + if GraphChk.Checked and morePlots then begin GraphFrm.nosets := 2; GraphFrm.nbars := nolevels; - GraphFrm.Heading := 'Level Means'; + GraphFrm.Heading := 'Level Means, Item ' + IntToStr(i); GraphFrm.XTitle := 'Level'; GraphFrm.YTitle := 'Mean'; SetLength(GraphFrm.Ypoints, 2, nolevels+1); @@ -656,7 +669,7 @@ begin GraphFrm.BackColor := GRAPH_BACK_COLOR; GraphFrm.WallColor := GRAPH_WALL_COLOR; GraphFrm.FloorColor := GRAPH_FLOOR_COLOR; - GraphFrm.ShowModal; + morePlots := (GraphFrm.ShowModal = mrOK); end; end; // next item diff --git a/applications/lazstats/source/forms/analysis/multivariate/bartletttestunit.pas b/applications/lazstats/source/forms/analysis/multivariate/bartletttestunit.pas index 2d1e91051..5c4bc1029 100644 --- a/applications/lazstats/source/forms/analysis/multivariate/bartletttestunit.pas +++ b/applications/lazstats/source/forms/analysis/multivariate/bartletttestunit.pas @@ -110,7 +110,7 @@ VAR means, variances, stddevs: DblDyneVec; determinant, chisquare, probability: double; i, j, df, p, ncases, colno: integer; - aline, strvalue, title, probvalue, chivalue: string; + title: string; ColNoSelected: IntDyneVec; dblvalue: double; DataGrid: DblDyneMat; diff --git a/applications/lazstats/source/forms/analysis/nonparametric/kaplanmeierunit.pas b/applications/lazstats/source/forms/analysis/nonparametric/kaplanmeierunit.pas index 972525e57..14a9d82e4 100644 --- a/applications/lazstats/source/forms/analysis/nonparametric/kaplanmeierunit.pas +++ b/applications/lazstats/source/forms/analysis/nonparametric/kaplanmeierunit.pas @@ -419,12 +419,14 @@ begin FrmOutPut.ShowModal(); } // get no. of categories + nocats := 0; for i := 0 to NoCases do - if ((Deaths[i] > 0) or (Censored[i] > 0)) then nocats := nocats + 1; - SetLength(Time,nocats+2); - SetLength(AtRisk,nocats+2); - SetLength(Dead,nocats+2); - SetLength(CondProb,nocats+2); + if (Deaths[i] > 0) or (Censored[i] > 0) then + nocats := nocats + 1; + SetLength(Time, nocats + 2); + SetLength(AtRisk, nocats + 2); + SetLength(Dead, nocats + 2); + SetLength(CondProb, nocats + 2); for i := 0 to nocats do begin Time[i] := 0; diff --git a/applications/lazstats/source/forms/analysis/statistical_process_control/sigmachartunit.pas b/applications/lazstats/source/forms/analysis/statistical_process_control/sigmachartunit.pas index 1e761a370..094aaa4f2 100644 --- a/applications/lazstats/source/forms/analysis/statistical_process_control/sigmachartunit.pas +++ b/applications/lazstats/source/forms/analysis/statistical_process_control/sigmachartunit.pas @@ -134,7 +134,7 @@ const var i, j, GrpVar, MeasVar, mingrp, maxgrp, G, range, grpsize : integer; oldgrpsize : integer; - X, UCL, LCL, Sigma, UpperSpec, LowerSpec, TargetSpec : double; + X, UCL, LCL, UpperSpec, LowerSpec, TargetSpec : double; xmin, xmax, GrandMean, GrandSD, semean, D3Value, D4Value : double; GrandSigma, C4, gamma, B : double; means, stddev: DblDyneVec; @@ -165,7 +165,6 @@ begin GrpVar := 1; MeasVar := 2; - Sigma := 3.0; UpperSpec := 0.0; LowerSpec := 0.0; TargetSpec := 0.0; diff --git a/applications/lazstats/source/forms/misc/graphlib.pas b/applications/lazstats/source/forms/misc/graphlib.pas index 09feec68b..76547bc67 100644 --- a/applications/lazstats/source/forms/misc/graphlib.pas +++ b/applications/lazstats/source/forms/misc/graphlib.pas @@ -406,7 +406,7 @@ begin x2 := x1 + bwidth; x3 := x2 + triwidth; x4 := x1 + triwidth; - y1 := YStart - yoffset - round(ydist); + y1 := YStart - yoffset {%H-}- round(ydist); y2 := y1 - triheight; Image1.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x3,y2),Point(x4,y2)]); end; @@ -643,7 +643,7 @@ begin y2 := y1 - triheight; yprop := (YPoints[i-1,j] - YMin) / (YMax - YMin); ydist := round(yprop * YAxisLength); - y3 := ystart - yoffset - round(ydist); + y3 := ystart - yoffset {%H-}- round(ydist); y4 := y3 - triheight; points[0] := Point(x1,y1); points[1] := Point(x2,y2); @@ -1124,7 +1124,7 @@ begin x2 := x1 + bwidth; x3 := x2 + triwidth; x4 := x1 + triwidth; - y1 := YStart - yoffset - round(ydist); + y1 := YStart - yoffset {%H-}- round(ydist); y2 := y1 - triheight; Printer.Canvas.Polygon([Point(x1,y1),Point(x2,y1),Point(x3,y2),Point(x4,y2)]); end; diff --git a/applications/lazstats/source/forms/simulations/multgenunit.pas b/applications/lazstats/source/forms/simulations/multgenunit.pas index 426a903d2..5790ee4fa 100644 --- a/applications/lazstats/source/forms/simulations/multgenunit.pas +++ b/applications/lazstats/source/forms/simulations/multgenunit.pas @@ -95,7 +95,6 @@ var determ, n3, r1, s8, s9, d2, x, y, mean : double; linestring : string; cellstring : string; - singular : boolean; title : string; RowLabels: StrDyneVec; ColLabels: StrDyneVec; @@ -127,7 +126,6 @@ begin end; // get determinant of Rho matrix, i.e. check for singularity - singular := FALSE; for i := 0 to NoVars-1 do begin for j := 0 to NoVars - 1 do diff --git a/applications/lazstats/source/units/matrixlib.pas b/applications/lazstats/source/units/matrixlib.pas index 4c4f0617d..46456c2d7 100644 --- a/applications/lazstats/source/units/matrixlib.pas +++ b/applications/lazstats/source/units/matrixlib.pas @@ -1954,7 +1954,7 @@ procedure scatplot(const x, y: DblDyneVec; NoCases: integer; var i, j, l, row, xslot : integer; maxy: double; - incrementx, incrementy, rangex, rangey, swap : double; + incrementx, incrementy, rangex, rangey: double; plotstring : array[0..51,0..61] of char; height : integer; overlap : boolean;