From 0ded851cec7c5a4c691a749a71155a7ac7fc2559 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 16 Nov 2020 10:15:02 +0000 Subject: [PATCH] LazStats: Add original sources, part 2 git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7873 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../lazstats/source_orig/BLKMREGUNIT.PAS | 478 +++++++++++++ .../lazstats/source_orig/BLKMREGUNIT.lfm | 406 +++++++++++ .../lazstats/source_orig/BLKMREGUNIT.lrs | 263 +++++++ .../lazstats/source_orig/CANONUNIT.PAS | 584 +++++++++++++++ .../lazstats/source_orig/CANONUNIT.lfm | 328 +++++++++ .../lazstats/source_orig/CANONUNIT.lrs | 244 +++++++ .../lazstats/source_orig/CCHARTUNIT.lfm | 123 ++++ .../lazstats/source_orig/CCHARTUNIT.lrs | 36 + .../lazstats/source_orig/CHISQRUNIT.PAS | 555 ++++++++++++++ .../lazstats/source_orig/CHISQRUNIT.lfm | 481 +++++++++++++ .../lazstats/source_orig/CHISQRUNIT.lrs | 368 ++++++++++ .../lazstats/source_orig/COCHRANQUNIT.PAS | 197 +++++ .../lazstats/source_orig/COCHRANQUNIT.lfm | 190 +++++ .../lazstats/source_orig/COCHRANQUNIT.lrs | 130 ++++ .../lazstats/source_orig/COMPRELUNIT.PAS | 289 ++++++++ .../lazstats/source_orig/COMPRELUNIT.lfm | 250 +++++++ .../lazstats/source_orig/COMPRELUNIT.lrs | 141 ++++ .../lazstats/source_orig/CONCORDANCE.PAS | 368 ++++++++++ .../lazstats/source_orig/CONCORDANCE.lfm | 164 +++++ .../lazstats/source_orig/CONCORDANCE.lrs | 56 ++ .../lazstats/source_orig/CompTestUnit.lfm | 124 ++++ .../source_orig/CompletionItemUnit.lfm | 288 ++++++++ .../source_orig/CompletionItemUnit.pas | 336 +++++++++ .../lazstats/source_orig/bnestaunit.lfm | 435 +++++++++++ .../lazstats/source_orig/bnestaunit.lrs | 359 ++++++++++ .../lazstats/source_orig/bnestaunit.pas | 540 ++++++++++++++ .../lazstats/source_orig/boxplotunit.lfm | 134 ++++ .../lazstats/source_orig/boxplotunit.lrs | 35 + .../lazstats/source_orig/boxplotunit.pas | 676 ++++++++++++++++++ .../lazstats/source_orig/breakdownunit.lfm | 302 ++++++++ .../lazstats/source_orig/breakdownunit.lrs | 242 +++++++ .../lazstats/source_orig/breakdownunit.pas | 559 +++++++++++++++ .../lazstats/source_orig/bubbleplotunit.lfm | 553 ++++++++++++++ .../lazstats/source_orig/bubbleplotunit.lrs | 460 ++++++++++++ .../lazstats/source_orig/bubbleplotunit.pas | 592 +++++++++++++++ .../lazstats/source_orig/calculatorunit.lfm | 434 +++++++++++ .../lazstats/source_orig/calculatorunit.lrs | 102 +++ .../lazstats/source_orig/calculatorunit.pas | 504 +++++++++++++ .../lazstats/source_orig/cchartunit.pas | 280 ++++++++ .../lazstats/source_orig/colinsertunit.lfm | 77 ++ .../lazstats/source_orig/colinsertunit.lrs | 22 + .../lazstats/source_orig/colinsertunit.pas | 48 ++ .../lazstats/source_orig/comparedistunit.lfm | 371 ++++++++++ .../lazstats/source_orig/comparedistunit.lrs | 263 +++++++ .../lazstats/source_orig/comparedistunit.pas | 515 +++++++++++++ .../lazstats/source_orig/concordanceunit.lfm | 190 +++++ .../lazstats/source_orig/concordanceunit.lrs | 130 ++++ .../lazstats/source_orig/concordanceunit.pas | 351 +++++++++ .../lazstats/source_orig/contexthelpunit.lfm | 43 ++ .../lazstats/source_orig/contexthelpunit.lrs | 15 + 50 files changed, 14631 insertions(+) create mode 100644 applications/lazstats/source_orig/BLKMREGUNIT.PAS create mode 100644 applications/lazstats/source_orig/BLKMREGUNIT.lfm create mode 100644 applications/lazstats/source_orig/BLKMREGUNIT.lrs create mode 100644 applications/lazstats/source_orig/CANONUNIT.PAS create mode 100644 applications/lazstats/source_orig/CANONUNIT.lfm create mode 100644 applications/lazstats/source_orig/CANONUNIT.lrs create mode 100644 applications/lazstats/source_orig/CCHARTUNIT.lfm create mode 100644 applications/lazstats/source_orig/CCHARTUNIT.lrs create mode 100644 applications/lazstats/source_orig/CHISQRUNIT.PAS create mode 100644 applications/lazstats/source_orig/CHISQRUNIT.lfm create mode 100644 applications/lazstats/source_orig/CHISQRUNIT.lrs create mode 100644 applications/lazstats/source_orig/COCHRANQUNIT.PAS create mode 100644 applications/lazstats/source_orig/COCHRANQUNIT.lfm create mode 100644 applications/lazstats/source_orig/COCHRANQUNIT.lrs create mode 100644 applications/lazstats/source_orig/COMPRELUNIT.PAS create mode 100644 applications/lazstats/source_orig/COMPRELUNIT.lfm create mode 100644 applications/lazstats/source_orig/COMPRELUNIT.lrs create mode 100644 applications/lazstats/source_orig/CONCORDANCE.PAS create mode 100644 applications/lazstats/source_orig/CONCORDANCE.lfm create mode 100644 applications/lazstats/source_orig/CONCORDANCE.lrs create mode 100644 applications/lazstats/source_orig/CompTestUnit.lfm create mode 100644 applications/lazstats/source_orig/CompletionItemUnit.lfm create mode 100644 applications/lazstats/source_orig/CompletionItemUnit.pas create mode 100644 applications/lazstats/source_orig/bnestaunit.lfm create mode 100644 applications/lazstats/source_orig/bnestaunit.lrs create mode 100644 applications/lazstats/source_orig/bnestaunit.pas create mode 100644 applications/lazstats/source_orig/boxplotunit.lfm create mode 100644 applications/lazstats/source_orig/boxplotunit.lrs create mode 100644 applications/lazstats/source_orig/boxplotunit.pas create mode 100644 applications/lazstats/source_orig/breakdownunit.lfm create mode 100644 applications/lazstats/source_orig/breakdownunit.lrs create mode 100644 applications/lazstats/source_orig/breakdownunit.pas create mode 100644 applications/lazstats/source_orig/bubbleplotunit.lfm create mode 100644 applications/lazstats/source_orig/bubbleplotunit.lrs create mode 100644 applications/lazstats/source_orig/bubbleplotunit.pas create mode 100644 applications/lazstats/source_orig/calculatorunit.lfm create mode 100644 applications/lazstats/source_orig/calculatorunit.lrs create mode 100644 applications/lazstats/source_orig/calculatorunit.pas create mode 100644 applications/lazstats/source_orig/cchartunit.pas create mode 100644 applications/lazstats/source_orig/colinsertunit.lfm create mode 100644 applications/lazstats/source_orig/colinsertunit.lrs create mode 100644 applications/lazstats/source_orig/colinsertunit.pas create mode 100644 applications/lazstats/source_orig/comparedistunit.lfm create mode 100644 applications/lazstats/source_orig/comparedistunit.lrs create mode 100644 applications/lazstats/source_orig/comparedistunit.pas create mode 100644 applications/lazstats/source_orig/concordanceunit.lfm create mode 100644 applications/lazstats/source_orig/concordanceunit.lrs create mode 100644 applications/lazstats/source_orig/concordanceunit.pas create mode 100644 applications/lazstats/source_orig/contexthelpunit.lfm create mode 100644 applications/lazstats/source_orig/contexthelpunit.lrs diff --git a/applications/lazstats/source_orig/BLKMREGUNIT.PAS b/applications/lazstats/source_orig/BLKMREGUNIT.PAS new file mode 100644 index 000000000..4d28b9522 --- /dev/null +++ b/applications/lazstats/source_orig/BLKMREGUNIT.PAS @@ -0,0 +1,478 @@ +unit BlkMRegUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, Globals, MainUnit, MatrixLib, OutPutUnit, + FunctionsLib, DataProcs, DictionaryUnit; + + +type + + { TBlkMregFrm } + + TBlkMregFrm = class(TForm) + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + CPChkBox: TCheckBox; + CovChkBox: TCheckBox; + CorrsChkBox: TCheckBox; + MeansChkBox: TCheckBox; + SaveDialog1: TSaveDialog; + VarChkBox: TCheckBox; + SDChkBox: TCheckBox; + MatSaveChkBox: TCheckBox; + PredictChkBox: TCheckBox; + GroupBox1: TGroupBox; + InProb: TEdit; + Label5: TLabel; + NextBlkBtn: TButton; + DepInBtn: TBitBtn; + DepOutBtn: TBitBtn; + BlockNoEdit: TEdit; + InBtn: TBitBtn; + Label4: TLabel; + OutBtn: TBitBtn; + AllBtn: TBitBtn; + DepVar: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + BlockList: TListBox; + VarList: TListBox; + procedure AllBtnClick(Sender: TObject); + procedure CancelBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure DepInBtnClick(Sender: TObject); + procedure DepOutBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure InBtnClick(Sender: TObject); + procedure NextBlkBtnClick(Sender: TObject); + procedure OutBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + BlkVarCols : IntDyneMat; + NoBlocks : integer; + VarsInBlk : IntDyneVec; + NoVars : integer; + + public + { public declarations } + end; + +var + BlkMregFrm: TBlkMregFrm; + +implementation + +{ TBlkMregFrm } + +procedure TBlkMregFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + BlockList.Items.Clear; + VarList.Items.Clear; + BlockNoEdit.Text := '1'; + NoBlocks := 1; + for i := 1 to NoVariables do + begin + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); + end; + InBtn.Enabled := true; + OutBtn.Enabled := false; + DepInBtn.Enabled := true; + DepOutBtn.Enabled := false; + CPChkBox.Checked := false; + CovChkBox.Checked := false; + CorrsChkBox.Checked := true; + MeansChkBox.Checked := true; + VarChkBox.Checked := false; + SDChkBox.Checked := true; + MatSaveChkBox.Checked := false; + PredictChkBox.Checked := false; +// HeteroChk.Checked := false; + NoVars := 0; + DepVar.Text := ''; + InProb.Text := '0.05'; + SetLength(BlkVarCols,NoVariables,NoVariables); + SetLength(VarsInBlk,NoVariables); +end; + +procedure TBlkMregFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TBlkMregFrm.AllBtnClick(Sender: TObject); +VAR count, index : integer; +begin + count := VarList.Items.Count; + for index := 0 to count-1 do + begin + BlockList.Items.Add(VarList.Items.Strings[index]); + end; + VarList.Clear; +end; + +procedure TBlkMregFrm.CancelBtnClick(Sender: TObject); +begin + if VarsInBlk <> nil then VarsInBlk := nil; + if BlkVarCols <> nil then BlkVarCols := nil; + BlkMRegFrm.Hide; +end; + +procedure TBlkMregFrm.ComputeBtnClick(Sender: TObject); +Label CleanUp; +var + i, j, k, col, mattype, errorcode, NCases : integer; + NoIndepVars, DepVarCol, NEntered, StepNo : integer; + R2, df1, df2, Y, z, BPG, chiprob : double; + StdErrEst, F, FProbF, OldR2 : double; + pdf1, pdf2, probin, prout : double; + BetaWeights : DblDyneVec; + cellstring, outline : string; + corrs : DblDyneMat; + Means : DblDyneVec; + Variances : DblDyneVec; + StdDevs : DblDyneVec; + title : string; + IndRowLabels : StrDyneVec; + IndColLabels : StrDyneVec; + IndepInverse : DblDyneMat; + IndepIndex : IntDyneVec; + XYCorrs : DblDyneVec; + Partial : DblDyneVec; + Candidate : IntDyneVec; + filename : string; + ColEntered : IntDyneVec; + constant : double; + errcode : boolean; +begin + SetLength(corrs,NoVariables+1,NoVariables+1); + SetLength(IndepInverse,NoVariables,NoVariables); + SetLength(Means,NoVariables); + SetLength(Variances,NoVariables); + SetLength(StdDevs,NoVariables); + SetLength(IndepIndex,NoVariables); + SetLength(IndColLabels,NoVariables); + SetLength(IndRowLabels,NoVariables); + SetLength(BetaWeights,NoVariables); + SetLength(Candidate,NoVariables); + SetLength(ColEntered,NoVariables); + + NextBlkBtnClick(self); + probin := StrToFloat(InProb.Text); // probability to include a block + prout := 1.0; + OutPutFrm.RichEdit.Clear; +// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify; + OutPutFrm.RichEdit.Lines.Add('Block Entry Multiple Regression by Bill Miller'); + errorcode := 0; + + { get dependendent variable column } + if DepVar.Text = '' then + begin + ShowMessage('ERROR! No Dependent variable selected.'); + goto CleanUp; + end; + DepVarCol := 0; + NoVars := NoVars + 1; + for j := 1 to NoVariables do + if DepVar.Text = OS3MainFrm.DataGrid.Cells[j,0] then DepVarCol := j; + R2 := 0.0; + OldR2 := 0.0; + pdf1 := 0.0; + pdf2 := 0.0; + for i := 1 to NoBlocks-1 do Candidate[i-1] := i; + { Now, complete Mult. Regs by adding blocks in each step } + for StepNo := 1 to NoBlocks-1 do + begin + NEntered := 0; + for i := 1 to StepNo do + begin + if (Candidate[StepNo-1] <> 0) then + begin + for j := 1 to VarsInBlk[i-1] do + begin + NEntered := NEntered + 1; + ColEntered[NEntered-1] := BlkVarCols[i-1,j-1]; + k := BlkVarCols[i-1,j-1]; + IndRowLabels[NEntered-1] := OS3MainFrm.DataGrid.Cells[k,0]; + IndColLabels[NEntered-1] := OS3MainFrm.DataGrid.Cells[k,0]; + end; + end; + end; + NEntered := NEntered + 1; // dependent variable last + ColEntered[NEntered-1] := DepVarCol; + IndRowLabels[NEntered-1] := OS3MainFrm.DataGrid.Cells[DepVarCol,0]; + IndColLabels[NEntered-1] := OS3MainFrm.DataGrid.Cells[DepVarCol,0]; + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('----------------- Trial Block %d Variables Added ------------------',[StepNo]); + OutPutFrm.RichEdit.Lines.Add(outline); + if CPChkBox.Checked = true then + begin + title := 'Cross-Products Matrix'; + GridXProd(NEntered,ColEntered,Corrs,errcode,NCases); + MAT_PRINT(Corrs,NEntered,NEntered,title,IndRowLabels,IndColLabels,NCases); + end; + if CovChkBox.Checked = true then + begin + title := 'Variance-Covariance Matrix'; + GridCovar(NEntered,ColEntered,Corrs,Means,Variances, + StdDevs,errcode,NCases); + MAT_PRINT(Corrs,NEntered,NEntered,title,IndRowLabels,IndColLabels,NCases); + end; + Correlations(NEntered,ColEntered,Corrs,Means,Variances, + StdDevs,errcode,NCases); + if CorrsChkBox.Checked = true then + begin + title := 'Product-Moment Correlations Matrix'; + MAT_PRINT(Corrs,NEntered,NEntered,title,IndRowLabels,IndColLabels,NCases); + end; + title := 'Means'; + if MeansChkBox.Checked = true then + DynVectorPrint(Means,NEntered,title,IndColLabels,NCases); + title := 'Variances'; + if VarChkBox.Checked = true then + DynVectorPrint(Variances,NEntered,title,IndColLabels,NCases); + title := 'Standard Deviations'; + if SDChkBox.Checked = true then + DynVectorPrint(StdDevs,NEntered,title,IndColLabels,NCases); + if errorcode > 0 then + begin + ShowMessage('ERROR! A selected variable has no variability-run aborted.'); + goto CleanUp; + end; + NoIndepVars := NEntered - 1; + for i := 1 to NoIndepVars do IndepIndex[i-1] := i; + MReg2(NCases,NEntered,NoIndepVars,IndepIndex,corrs,IndepInverse, + IndRowLabels,R2,BetaWeights, + Means,Variances,errorcode,StdErrEst,constant,prout,true, false,false); + outline := format('Increase in R Squared = %6.3f',[R2-OldR2]); + OutPutFrm.RichEdit.Lines.Add(outline); + df1 := NoIndepVars - pdf1; + df2 := NCases - NoIndepVars - 1; + F := ((R2 - OldR2) / (1.0 - R2)) * df2 / df1; + FProbF := probf(F,df1,df2); + outline := format('F = %6.3f with probability = %6.3f',[F,FProbF]); + OutPutFrm.RichEdit.Lines.Add(outline); + if FProbF < probin then + begin + outline := format('Block %d met entry requirements',[StepNo]); + OutPutFrm.RichEdit.Lines.Add(outline); + end + else + begin + Candidate[StepNo-1] := 0; + NoIndepVars := NoIndepVars - VarsInBlk[StepNo-1]; + outline := format('Block %d did not meet entry requirements',[StepNo]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OldR2 := R2; + pdf1 := NoIndepVars; + end; + + { add [predicted scores, residual scores, etc. to grid if options elected } + if PredictChkBox.Checked = true then + begin + prout := 1.0; + Correlations(NEntered,ColEntered,Corrs,Means,Variances, + StdDevs,errcode,NCases); + + MReg2(NCases,NEntered,NoIndepVars,IndepIndex,corrs,IndepInverse, + IndRowLabels,R2,BetaWeights, + Means,Variances,errorcode,StdErrEst,constant,prout,true, false,false); + + Predict(ColEntered, NEntered, IndepInverse, Means, StdDevs, + BetaWeights, StdErrEst, IndepIndex, NoIndepVars); + end; + +{ if HeteroChk.Checked = true then // do BPG test + begin + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('====================================================='); + OutPutFrm.RichEdit.Lines.Add('Breusch-Pagan-Godfrey Test of Heteroscedasticity'); + OutPutFrm.RichEdit.Lines.Add('====================================================='); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Auxiliary Regression'); + OutPutFrm.RichEdit.Lines.Add(''); + BPG := 0.0; + col := NoVariables + 1; + DictionaryFrm.NewVar(col); + DictionaryFrm.DictGrid.Cells[1,col] := 'BPGResid.'; + OS3MainFrm.DataGrid.Cells[col,0] := 'BPGResid.'; + NoVariables := NoVariables + 1; + // get predicted raw score + for i := 1 to NCases do + begin + Y := 0.0; + for j := 1 to NoIndepVars do + begin + col := IndepIndex[j-1]; + k := ColEntered[col-1]; + z := (StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i])) - + Means[col-1]) / StdDevs[col-1]; + Y := Y + (z * BetaWeights[j-1]); // predicted z score + end; + Y := Y * StdDevs[NEntered-1] + Means[NEntered-1]; // predicte raw + k := ColEntered[NEntered-1]; + Y := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[k,i])) - Y; // residual + BPG := BPG + (Y * Y); // sum of squared residuals + // save squared value for each case + OS3MainFrm.DataGrid.Cells[NoVariables,i] := FloatToStr(Y * Y); +// OS3MainFrm.DataGrid.Cells[NoVariables,i] := Format('%8.3f',[Y * Y]); + end; + BPG := BPG / NCases; + for i := 1 to NCases do + begin + Y := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[NoVariables,i])) / BPG; + OS3MainFrm.DataGrid.Cells[NoVariables,i] := Format('%8.3f',[Y]); + end; + // Now, regress Hetero values on the independent variables + DepVarCol := NoVariables; + ColEntered[NEntered-1] := NoVariables; + IndRowLabels[NEntered-1] := OS3MainFrm.DataGrid.Cells[DepVarCol,0]; + IndColLabels[NEntered-1] := OS3MainFrm.DataGrid.Cells[DepVarCol,0]; + Correlations(NEntered,ColEntered,Corrs,Means,Variances, + StdDevs,errcode,NCases); + if CorrsChkBox.Checked = true then + begin + title := 'Product-Moment Correlations Matrix'; + MAT_PRINT(Corrs,NEntered,NEntered,title,IndRowLabels,IndColLabels,NCases); + end; + title := 'Means'; + if MeansChkBox.Checked = true then + DynVectorPrint(Means,NEntered,title,IndColLabels,NCases); + title := 'Variances'; + if VarChkBox.Checked = true then + DynVectorPrint(Variances,NEntered,title,IndColLabels,NCases); + title := 'Standard Deviations'; + if SDChkBox.Checked = true then + DynVectorPrint(StdDevs,NEntered,title,IndColLabels,NCases); + MReg2(NCases,NEntered,NoIndepVars,IndepIndex,corrs,IndepInverse, + IndRowLabels,R2,BetaWeights, + Means,Variances,errorcode,StdErrEst,constant,prout,true, false,false); + BPG := ( R2 * Variances[NEntered-1] * (Ncases-1) ) / 2; + chiprob := 1.0 - chisquaredprob(BPG,NEntered-1); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Breusch-Pagan-Godfrey Test of Heteroscedasticity'); + outline := format('Chi-Square = %8.3f with probability greater value = %8.3f',[BPG,chiprob]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + end; +} + if MatSaveChkBox.Checked = true then + begin + SaveDialog1.Filter := 'FreeStat matrix files (*.MAT)|*.MAT|All files (*.*)|*.*'; + SaveDialog1.FilterIndex := 1; + if SaveDialog1.Execute then + begin + filename := SaveDialog1.FileName; + MATSAVE(Corrs,NoVars,NoVars,Means,StdDevs,NCases,IndRowLabels,IndColLabels,filename); + end; + end; + OutPutFrm.ShowModal; +CleanUp: + ColEntered := nil; + Candidate := nil; + BetaWeights := nil; + IndColLabels := nil; + IndRowLabels := nil; + IndepIndex := nil; + StdDevs := nil; + Variances := nil; + Means := nil; + IndepInverse := nil; + corrs := nil; + VarsInBlk := nil; + BlkVarCols := nil; +end; + +procedure TBlkMregFrm.DepInBtnClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + DepVar.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + DepOutBtn.Enabled := true; + DepInBtn.Enabled := false; +end; + +procedure TBlkMregFrm.DepOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(DepVar.Text); + DepVar.Text := ''; + DepInBtn.Enabled := true; +end; + +procedure TBlkMregFrm.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 + BlockList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + OutBtn.Enabled := true; +end; + +procedure TBlkMregFrm.NextBlkBtnClick(Sender: TObject); +var + blkno, i, j, count : integer; + cellstring : string; +begin + {save columns of variables in the current block } + count := BlockList.Items.Count; + if count = 0 then + begin + VarsInBlk[NoBlocks-1] := 0; + exit; + end; + VarsInBlk[NoBlocks-1] := count; + for i := 0 to count-1 do + begin + for j := 1 to NoVariables do + begin + cellstring := OS3MainFrm.DataGrid.Cells[j,0]; + if cellstring = BlockList.Items.Strings[i] then + begin + BlkVarCols[NoBlocks-1,i] := j; + NoVars := NoVars + 1; + end; + end; + end; + blkno := StrToInt(BlockNoEdit.Text); + blkno := blkno + 1; + BlockNoEdit.Text := IntToStr(blkno); + NoBlocks := blkno; + BlockList.Clear; +end; + +procedure TBlkMregFrm.OutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := BlockList.ItemIndex; + VarList.Items.Add(BlockList.Items.Strings[index]); + BlockList.Items.Delete(index); + InBtn.Enabled := true; + if BlockList.Items.Count = 0 then OutBtn.Enabled := false; +end; + +initialization + {$I blkmregunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/BLKMREGUNIT.lfm b/applications/lazstats/source_orig/BLKMREGUNIT.lfm new file mode 100644 index 000000000..088ac8f8f --- /dev/null +++ b/applications/lazstats/source_orig/BLKMREGUNIT.lfm @@ -0,0 +1,406 @@ +object BlkMregFrm: TBlkMregFrm + Left = 131 + Height = 331 + Top = 97 + Width = 613 + Caption = 'Block Entry Multiple Regression' + ClientHeight = 331 + ClientWidth = 613 + OnShow = FormShow + LCLVersion = '1.0.2.0' + object Label1: TLabel + Left = 6 + Height = 16 + Top = 8 + Width = 99 + Caption = 'Available Variables' + ParentColor = False + end + object Label2: TLabel + Left = 217 + Height = 16 + Top = 40 + Width = 104 + Caption = 'Dependent Variable' + ParentColor = False + end + object Label3: TLabel + Left = 214 + Height = 16 + Top = 112 + Width = 168 + Caption = 'Independent Var.s for this block' + ParentColor = False + end + object Label4: TLabel + Left = 181 + Height = 16 + Top = 12 + Width = 55 + Caption = 'Block No. ' + ParentColor = False + end + object Label5: TLabel + Left = 383 + Height = 16 + Top = 11 + Width = 164 + Caption = 'Minimum Prob. to enter block:' + ParentColor = False + end + object VarList: TListBox + Left = 6 + Height = 297 + Top = 23 + Width = 161 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object DepInBtn: TBitBtn + Left = 176 + Height = 29 + Top = 40 + 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 = DepInBtnClick + TabOrder = 1 + end + object DepOutBtn: TBitBtn + Left = 176 + Height = 29 + Top = 72 + 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 = DepOutBtnClick + TabOrder = 2 + end + object InBtn: TBitBtn + Left = 176 + Height = 29 + Top = 144 + 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 = InBtnClick + TabOrder = 3 + end + object OutBtn: TBitBtn + Left = 176 + Height = 29 + Top = 176 + 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 = OutBtnClick + TabOrder = 4 + end + object AllBtn: TBitBtn + Left = 176 + Height = 29 + Top = 216 + Width = 32 + Caption = 'ALL' + NumGlyphs = 0 + OnClick = AllBtnClick + TabOrder = 5 + end + object DepVar: TEdit + Left = 216 + Height = 23 + Top = 56 + Width = 146 + TabOrder = 6 + Text = 'DepVar' + end + object BlockList: TListBox + Left = 214 + Height = 192 + Top = 128 + Width = 150 + ItemHeight = 0 + TabOrder = 7 + end + object BlockNoEdit: TEdit + Left = 239 + Height = 23 + Top = 5 + Width = 37 + TabOrder = 8 + Text = 'BlockNoEdit' + end + object NextBlkBtn: TButton + Left = 288 + Height = 25 + Top = 1 + Width = 72 + Caption = 'Next Block' + OnClick = NextBlkBtnClick + TabOrder = 9 + end + object InProb: TEdit + Left = 552 + Height = 23 + Top = 5 + Width = 44 + TabOrder = 10 + Text = 'InProb' + end + object GroupBox1: TGroupBox + Left = 382 + Height = 209 + Top = 40 + Width = 216 + Caption = 'Options' + ClientHeight = 191 + ClientWidth = 212 + TabOrder = 11 + object CPChkBox: TCheckBox + Left = 6 + Height = 19 + Top = 1 + Width = 169 + Caption = 'Show Cross-Products Matrix' + TabOrder = 0 + end + object CovChkBox: TCheckBox + Left = 6 + Height = 19 + Top = 22 + Width = 197 + Caption = 'Show Variance-Covariance Matrix' + TabOrder = 1 + end + object CorrsChkBox: TCheckBox + Left = 6 + Height = 19 + Top = 43 + Width = 169 + Caption = 'Show Intercorrelation Matrix' + TabOrder = 2 + end + object MeansChkBox: TCheckBox + Left = 7 + Height = 19 + Top = 64 + Width = 87 + Caption = 'Show Means' + TabOrder = 3 + end + object VarChkBox: TCheckBox + Left = 7 + Height = 19 + Top = 85 + Width = 102 + Caption = 'Show Variances' + TabOrder = 4 + end + object SDChkBox: TCheckBox + Left = 6 + Height = 19 + Top = 109 + Width = 157 + Caption = 'Show Standard Deviations' + TabOrder = 5 + end + object MatSaveChkBox: TCheckBox + Left = 6 + Height = 19 + Top = 132 + Width = 142 + Caption = 'Save Correlation Matrix' + TabOrder = 6 + end + object PredictChkBox: TCheckBox + Left = 7 + Height = 19 + Top = 154 + Width = 195 + Caption = 'Predictions,residuals,C.I.''s to Grid' + TabOrder = 7 + end + end + object ResetBtn: TButton + Left = 382 + Height = 26 + Top = 264 + Width = 66 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 12 + end + object CancelBtn: TButton + Left = 504 + Height = 26 + Top = 264 + Width = 66 + Caption = 'Cancel' + ModalResult = 2 + OnClick = CancelBtnClick + TabOrder = 13 + end + object ComputeBtn: TButton + Left = 382 + Height = 26 + Top = 296 + Width = 66 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 14 + end + object ReturnBtn: TButton + Left = 504 + Height = 26 + Top = 296 + Width = 66 + Caption = 'Return' + ModalResult = 1 + TabOrder = 15 + end + object SaveDialog1: TSaveDialog + left = 178 + top = 264 + end +end diff --git a/applications/lazstats/source_orig/BLKMREGUNIT.lrs b/applications/lazstats/source_orig/BLKMREGUNIT.lrs new file mode 100644 index 000000000..9fc2c44d9 --- /dev/null +++ b/applications/lazstats/source_orig/BLKMREGUNIT.lrs @@ -0,0 +1,263 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TBlkMregFrm','FORMDATA',[ + 'TPF0'#11'TBlkMregFrm'#10'BlkMregFrm'#4'Left'#3#131#0#6'Height'#3'K'#1#3'Top' + +#2'a'#5'Width'#3'e'#2#7'Caption'#6#31'Block Entry Multiple Regression'#12'Cl' + +'ientHeight'#3'K'#1#11'ClientWidth'#3'e'#2#6'OnShow'#7#8'FormShow'#10'LCLVer' + +'sion'#6#7'1.0.2.0'#0#6'TLabel'#6'Label1'#4'Left'#2#6#6'Height'#2#16#3'Top'#2 + +#8#5'Width'#2'c'#7'Caption'#6#19'Available Variables'#11'ParentColor'#8#0#0#6 + +'TLabel'#6'Label2'#4'Left'#3#217#0#6'Height'#2#16#3'Top'#2'('#5'Width'#2'h'#7 + +'Caption'#6#18'Dependent Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3' + +#4'Left'#3#214#0#6'Height'#2#16#3'Top'#2'p'#5'Width'#3#168#0#7'Caption'#6' I' + +'ndependent Var.s for this block'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4 + +'Left'#3#181#0#6'Height'#2#16#3'Top'#2#12#5'Width'#2'7'#7'Caption'#6#10'Bloc' + +'k No. '#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#3#127#1#6'Height' + +#2#16#3'Top'#2#11#5'Width'#3#164#0#7'Caption'#6#29'Minimum Prob. to enter bl' + +'ock:'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#6#6'Height'#3 + +')'#1#3'Top'#2#23#5'Width'#3#161#0#10'ItemHeight'#2#0#11'MultiSelect'#9#8'Ta' + +'bOrder'#2#0#0#0#7'TBitBtn'#8'DepInBtn'#4'Left'#3#176#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#255#255#255#0#255 + +#255#255#0#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'DepInBtnClick'#8'TabOrder'#2#1#0#0#7'TBitBtn'#9'DepOutBtn'#4 + +'Left'#3#176#0#6'Height'#2#29#3'Top'#2'H'#5'Width'#2' '#10'Glyph.Data'#10':' + +#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' ' + +#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A' + +#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255 + +#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'#196'{'#200#134#255#156#213 + +#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135 + +#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r' + +#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0'h'#199't'#201#127#204#138 + +#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207 + +#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}' + +#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0 + +'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S' + +#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';' + +#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#14'DepOutBtnClick' + +#8'TabOrder'#2#2#0#0#7'TBitBtn'#5'InBtn'#4'Left'#3#176#0#6'Height'#2#29#3'To' + +'p'#3#144#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'NumGlyp' + +'hs'#2#0#7'OnClick'#7#10'InBtnClick'#8'TabOrder'#2#3#0#0#7'TBitBtn'#6'OutBtn' + +#4'Left'#3#176#0#6'Height'#2#29#3'Top'#3#176#0#5'Width'#2' '#10'Glyph.Data' + +#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0 + +#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8'#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['#170'd'#255'G'#153'O'#255'A' + +#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$'#255 + ,#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'#196'{'#200#134#255#156#213 + +#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135 + +#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'r' + +#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0'h'#199't'#201#127#204#138 + +#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207 + +#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}' + +#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0 + +'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S' + +#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';' + +#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'OutBtnClick'#8 + +'TabOrder'#2#4#0#0#7'TBitBtn'#6'AllBtn'#4'Left'#3#176#0#6'Height'#2#29#3'Top' + +#3#216#0#5'Width'#2' '#7'Caption'#6#3'ALL'#9'NumGlyphs'#2#0#7'OnClick'#7#11 + +'AllBtnClick'#8'TabOrder'#2#5#0#0#5'TEdit'#6'DepVar'#4'Left'#3#216#0#6'Heigh' + +'t'#2#23#3'Top'#2'8'#5'Width'#3#146#0#8'TabOrder'#2#6#4'Text'#6#6'DepVar'#0#0 + +#8'TListBox'#9'BlockList'#4'Left'#3#214#0#6'Height'#3#192#0#3'Top'#3#128#0#5 + +'Width'#3#150#0#10'ItemHeight'#2#0#8'TabOrder'#2#7#0#0#5'TEdit'#11'BlockNoEd' + +'it'#4'Left'#3#239#0#6'Height'#2#23#3'Top'#2#5#5'Width'#2'%'#8'TabOrder'#2#8 + +#4'Text'#6#11'BlockNoEdit'#0#0#7'TButton'#10'NextBlkBtn'#4'Left'#3' '#1#6'He' + +'ight'#2#25#3'Top'#2#1#5'Width'#2'H'#7'Caption'#6#10'Next Block'#7'OnClick'#7 + +#15'NextBlkBtnClick'#8'TabOrder'#2#9#0#0#5'TEdit'#6'InProb'#4'Left'#3'('#2#6 + +'Height'#2#23#3'Top'#2#5#5'Width'#2','#8'TabOrder'#2#10#4'Text'#6#6'InProb'#0 + +#0#9'TGroupBox'#9'GroupBox1'#4'Left'#3'~'#1#6'Height'#3#209#0#3'Top'#2'('#5 + +'Width'#3#216#0#7'Caption'#6#7'Options'#12'ClientHeight'#3#191#0#11'ClientWi' + +'dth'#3#212#0#8'TabOrder'#2#11#0#9'TCheckBox'#8'CPChkBox'#4'Left'#2#6#6'Heig' + +'ht'#2#19#3'Top'#2#1#5'Width'#3#169#0#7'Caption'#6#26'Show Cross-Products Ma' + +'trix'#8'TabOrder'#2#0#0#0#9'TCheckBox'#9'CovChkBox'#4'Left'#2#6#6'Height'#2 + +#19#3'Top'#2#22#5'Width'#3#197#0#7'Caption'#6#31'Show Variance-Covariance Ma' + +'trix'#8'TabOrder'#2#1#0#0#9'TCheckBox'#11'CorrsChkBox'#4'Left'#2#6#6'Height' + +#2#19#3'Top'#2'+'#5'Width'#3#169#0#7'Caption'#6#28'Show Intercorrelation Mat' + +'rix'#8'TabOrder'#2#2#0#0#9'TCheckBox'#11'MeansChkBox'#4'Left'#2#7#6'Height' + +#2#19#3'Top'#2'@'#5'Width'#2'W'#7'Caption'#6#10'Show Means'#8'TabOrder'#2#3#0 + +#0#9'TCheckBox'#9'VarChkBox'#4'Left'#2#7#6'Height'#2#19#3'Top'#2'U'#5'Width' + +#2'f'#7'Caption'#6#14'Show Variances'#8'TabOrder'#2#4#0#0#9'TCheckBox'#8'SDC' + +'hkBox'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'm'#5'Width'#3#157#0#7'Caption'#6 + +#24'Show Standard Deviations'#8'TabOrder'#2#5#0#0#9'TCheckBox'#13'MatSaveChk' + +'Box'#4'Left'#2#6#6'Height'#2#19#3'Top'#3#132#0#5'Width'#3#142#0#7'Caption'#6 + +#23'Save Correlation Matrix'#8'TabOrder'#2#6#0#0#9'TCheckBox'#13'PredictChkB' + +'ox'#4'Left'#2#7#6'Height'#2#19#3'Top'#3#154#0#5'Width'#3#195#0#7'Caption'#6 + +'$Predictions,residuals,C.I.''s to Grid'#8'TabOrder'#2#7#0#0#0#7'TButton'#8 + +'ResetBtn'#4'Left'#3'~'#1#6'Height'#2#26#3'Top'#3#8#1#5'Width'#2'B'#7'Captio' + +'n'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#12#0#0#7'TButton' + +#9'CancelBtn'#4'Left'#3#248#1#6'Height'#2#26#3'Top'#3#8#1#5'Width'#2'B'#7'Ca' + +'ption'#6#6'Cancel'#11'ModalResult'#2#2#7'OnClick'#7#14'CancelBtnClick'#8'Ta' + +'bOrder'#2#13#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3'~'#1#6'Height'#2#26#3 + +'Top'#3'('#1#5'Width'#2'B'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBt' + +'nClick'#8'TabOrder'#2#14#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#248#1#6'Heig' + ,'ht'#2#26#3'Top'#3'('#1#5'Width'#2'B'#7'Caption'#6#6'Return'#11'ModalResult' + +#2#1#8'TabOrder'#2#15#0#0#11'TSaveDialog'#11'SaveDialog1'#4'left'#3#178#0#3 + +'top'#3#8#1#0#0#0 +]); diff --git a/applications/lazstats/source_orig/CANONUNIT.PAS b/applications/lazstats/source_orig/CANONUNIT.PAS new file mode 100644 index 000000000..cb06669eb --- /dev/null +++ b/applications/lazstats/source_orig/CANONUNIT.PAS @@ -0,0 +1,584 @@ +unit CanonUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + MainUnit, OutPutUnit, FunctionsLib, GraphLib, Globals, DataProcs, + MatrixLib, StdCtrls, Buttons, contexthelpunit; + +type + + { TCannonFrm } + + TCannonFrm = class(TForm) + HelpBtn: TButton; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + CorsChk: TCheckBox; + InvChk: TCheckBox; + EigenChk: TCheckBox; + RedundChk: TCheckBox; + GroupBox1: TGroupBox; + LeftIn: TBitBtn; + LeftOut: TBitBtn; + RightIn: TBitBtn; + RightOut: TBitBtn; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + LeftList: TListBox; + RightList: TListBox; + VarList: TListBox; + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure LeftInClick(Sender: TObject); + procedure LeftOutClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure RightInClick(Sender: TObject); + procedure RightOutClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + CannonFrm: TCannonFrm; + +implementation + +{ TCannonFrm } + +procedure TCannonFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + LeftList.Clear; + RightList.Clear; + LeftOut.Visible := false; + LeftIn.Visible := true; + RightOut.Visible := false; + RightIn.Visible := true; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TCannonFrm.RightInClick(Sender: TObject); +VAR i, index : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + RightList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + RightOut.Visible := true; +end; + +procedure TCannonFrm.RightOutClick(Sender: TObject); +VAR index : integer; +begin + index := RightList.ItemIndex; + if index < 0 then + begin + RightOut.Visible := false; + exit; + end; + VarList.Items.Add(RightList.Items.Strings[index]); + RightList.Items.Delete(index); +end; + +procedure TCannonFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TCannonFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +procedure TCannonFrm.ComputeBtnClick(Sender: TObject); +label cleanup; +var + i, j, k, count, a_size, b_size, no_factors, novars, 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, a_vars, b_vars : IntDyneVec; + selected : IntDyneVec; + RowLabels, ColLabels : StrDyneVec; + CanLabels : StrDyneVec; + NCases : integer; + title : string; + errorcode : boolean; + +begin + 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 := LeftList.Items.Count; + b_size := RightList.Items.Count; + novars := a_size + b_size; + + // allocate memory for matrices and vectors + SetLength(raa,a_size,a_size); + SetLength(rbb,b_size,b_size); + SetLength(rab,a_size,b_size); + SetLength(rba,b_size,a_size); + SetLength(bigmat,novars+1,novars+1); + SetLength(prod,novars,novars); + SetLength(first_prod,novars,novars); + SetLength(second_prod,novars,novars); + SetLength(char_equation,novars,novars); + SetLength(raainv,a_size,a_size); + SetLength(rbbinv,b_size,b_size); + 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,novars,novars); + SetLength(b_cors,novars,novars); + 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,a_size); + SetLength(b_vars,b_size); + SetLength(CanLabels,novars); + SetLength(RowLabels,novars); + SetLength(ColLabels,novars); + SetLength(Selected,novars); + + //------------ WORK STARTS HERE! ------------------------------------- + + // Build labels for canonical functions 1 to novars + for i := 1 to b_size do + CanLabels[i-1]:='Var. ' + IntToStr(i); + + // identify variables selected for left and right variables + for i := 0 to a_size - 1 do // identify left variables + begin + cellstring := LeftList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + gridstring := OS3MainFrm.DataGrid.Cells[j,0]; + if (cellstring = gridstring) then + begin + a_vars[i] := j; + RowLabels[i] := gridstring; + end; + end; + end; + for i := 0 to b_size - 1 do // identify left variables + begin + cellstring := RightList.Items.Strings[i]; + for j := 1 to NoVariables do + begin + gridstring := OS3MainFrm.DataGrid.Cells[j,0]; + if (cellstring = gridstring) then + begin + b_vars[i] := j; + ColLabels[i] := gridstring; + end; + end; + end; + + // build list of all variables selected + for i := 1 to a_size do selected[i-1] := a_vars[i-1]; + for i := 1 to b_size do selected[i-1 + a_size] := b_vars[i-1]; + + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('CANONICAL CORRELATION ANALYSIS'); + OutPutFrm.RichEdit.Lines.Add(''); + // Get means, standard deviations, etc. for total matrix + Correlations(novars,selected,bigmat,mean,variance,stddev,errorcode,Ncases); + count := Ncases; + if (IER = 1)then + begin + ShowMessage('Zero variance found for a variable-terminating'); + goto cleanup; + end; + + //partition matrix into quadrants + for i := 1 to a_size do + for j := 1 to a_size do raa[i-1,j-1]:= bigmat[i-1,j-1]; + + for i := a_size + 1 to novars do + for j := a_size + 1 to novars do + rbb[i-1-a_size,j-1-a_size] := bigmat[i-1,j-1]; + + for i := 1 to a_size do + for j := a_size + 1 to novars do + rab[i-1,j-1-a_size] := bigmat[i-1,j-1]; + + for i := a_size + 1 to novars do + for j := 1 to a_size do + rba[i-1-a_size,j-1] := bigmat[i-1,j-1]; + + if CorsChk.Checked then + begin + title := 'Left Correlation Matrix'; + MAT_PRINT(raa,a_size,a_size,title,RowLabels,RowLabels,NCases); + title := 'Right Correlation Matrix'; + MAT_PRINT(rbb,b_size,b_size,title,ColLabels,ColLabels,NCases); + title := 'Left-Right Correlation Matrix'; + MAT_PRINT(rab,a_size,b_size,title,RowLabels,ColLabels,NCases); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; + + // get inverses of left and right hand matrices raa and rbb + for i := 1 to a_size do + for j := 1 to a_size do + raainv[i-1,j-1] := raa[i-1,j-1]; + SVDinverse(raainv,a_size); + if InvChk.Checked then + begin + title := 'Inverse of Left Matrix'; + MAT_PRINT(raainv,a_size,a_size,title,RowLabels,RowLabels,NCases); + end; + + for i := 1 to b_size do + for j := 1 to b_size do + rbbinv[i-1,j-1] := rbb[i-1,j-1]; + SVDinverse(rbbinv,b_size); + if InvChk.Checked then + begin + title := 'Inverse of Right Matrix'; + MAT_PRINT(rbbinv,b_size,b_size,title,ColLabels,ColLabels,NCases); + end; + + // get products of raainv x rab and the rbbinv x rba matrix + MatAxB(first_prod,rbbinv,rba,b_size,b_size,b_size,a_size,errorcode); + 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,ColLabels,RowLabels,NCases); + title := 'Left Inverse x Left-Right Matrix'; + MAT_PRINT(second_prod,a_size,b_size,title,RowLabels,ColLabels,NCases); + + //get characteristic equations matrix (product of last two product matrices + //The product should yeild rows and cols representing the smaller of the two sets + 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,NCases); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + // now get roots and vectors of the characteristic equation using + // NonSymRoots routine + minroot := 0.0; + for i := 1 to b_size do + begin + roots[i-1] := 0.0; + pcnt_trace[i-1] := 0.0; + for j := 1 to b_size do eigenvectors[i-1,j-1] := 0.0; + end; + trace := 0.0; + no_factors := b_size; + nonsymroots(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 + MATTRN(eigentrans,eigenvectors,b_size,b_size); + MatAxB(tempmat,eigentrans,rbb,b_size,b_size,b_size,b_size,errorcode); + MatAxB(theta,tempmat,eigenvectors,b_size,b_size,b_size,b_size,errorcode); + for j := 1 to b_size do + begin + q := 1.0 / sqrt(theta[j-1,j-1]); + for i := 1 to b_size do + begin + norm_b[i-1,j-1] := eigenvectors[i-1,j-1] * q; + raw_b[i-1,j-1] := norm_b[i-1,j-1] / stddev[a_size+i-1]; + end; + end; + MatAxB(norm_a,second_prod,norm_b,a_size,b_size,b_size,b_size,errorcode); + for j := 1 to b_size do + begin + for i := 1 to a_size do + begin + norm_a[i-1,j-1] := norm_a[i-1,j-1] * (1.0 / sqrt(roots[j-1])); + raw_a[i-1,j-1] := norm_a[i-1,j-1] / stddev[i-1]; + end; + end; + + // Compute the correlations between variables and canonical variables + MatAxB(a_cors,raa,norm_a,a_size,a_size,a_size,b_size,errorcode); + for j := 1 to b_size do + begin + q := 0.0; + for i := 1 to a_size do q := q + norm_a[i-1,j-1] * a_cors[i-1,j-1]; + q := 1.0 / sqrt(q); + for i := 1 to a_size do a_cors[i-1,j-1] := a_cors[i-1,j-1] * q; + end; + MatAxB(b_cors,rbb,norm_b,b_size,b_size,b_size,b_size,errorcode); + for j := 1 to b_size do + begin + q := 0.0; + for i := 1 to b_size do q := q + norm_b[i-1,j-1] * b_cors[i-1,j-1]; + q := 1.0 / sqrt(q); + for i := 1 to b_size do b_cors[i-1,j-1] := b_cors[i-1,j-1] * q; + end; + + // Compute the Proportions of Variance (PVs) and Redundancy Coefficients + for j := 1 to b_size do + begin + pv_a[j-1] := 0.0; + for i := 1 to a_size do pv_a[j-1] := pv_a[j-1] + (a_cors[i-1,j-1] * a_cors[i-1,j-1]); + pv_a[j-1] := pv_a[j-1] / a_size; + rd_a[j-1] := pv_a[j-1] * roots[j-1]; + end; + for j := 1 to b_size do + begin + pv_b[j-1] := 0.0; + for i := 1 to b_size do pv_b[j-1] := pv_b[j-1] + (b_cors[i-1,j-1] * b_cors[i-1,j-1]); + pv_b[j-1] := pv_b[j-1] / b_size; + rd_b[j-1] := pv_b[j-1] * roots[j-1]; + end; + + // Compute tests of the roots + q := a_size + b_size + 1; + q := -(count - 1.0 - (q / 2.0)); + k := 0; + for i := 1 to b_size do + begin + w := 1.0; + for j := i to b_size do w := w * (1.0 - roots[j-1]); + root_chi[i-1] := q * ln(w); + root_df[i-1] := (a_size - i + 1) * (b_size - i + 1); + chi_prob[i-1] := 1.0 - chisquaredprob(root_chi[i-1],root_df[i-1]); + if (chi_prob[i-1] < critical_prob) then k := k + 1; + end; + Roys := roots[0] / (1.0 - roots[0]); + Lambda := 1.0; + for i := 1 to b_size do + begin + Hroot := roots[i-1] / (1.0 - roots[i-1]); + 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 := 1 to b_size do + begin + outline := format('%2d %10.6f %8.3f %7.3f %8.3f %2d %8.3f', + [i, sqrt(roots[i-1]), roots[i-1], pcnt_trace[i-1], root_chi[i-1], root_df[i-1], chi_prob[i-1]]); + 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 EigenChk.Checked then + begin + title := 'Eigenvectors'; + MAT_PRINT(eigenvectors,b_size,b_size,title,CanLabels,CanLabels,NCases); + OutPutFrm.ShowModal(); + OutPutFrm.RichEdit.Clear; + end; + + title := 'Standardized Right Side Weights'; + MAT_PRINT(norm_a,a_size,b_size,title,RowLabels,CanLabels,NCases); + title := 'Standardized Left Side Weights'; + MAT_PRINT(norm_b,b_size,b_size,title,ColLabels,CanLabels,NCases); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + title := 'Raw Right Side Weights'; + MAT_PRINT(raw_a,a_size,b_size,title,RowLabels,CanLabels,NCases); + title := 'Raw Left Side Weights'; + MAT_PRINT(raw_b,b_size,b_size,title,ColLabels,CanLabels,NCases); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + title := 'Right Side Correlations with Function'; + MAT_PRINT(a_cors,a_size,b_size,title,RowLabels,CanLabels,NCases); + title := 'Left Side Correlations with Function'; + MAT_PRINT(b_cors,b_size,b_size,title,ColLabels,CanLabels,NCases); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + if RedundChk.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 := 1 to b_size do + begin + outline := format('%10d %10.5f %10.5f',[i,pv_a[i-1],rd_a[i-1]]); + 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 := 1 to b_size do + begin + outline := format('%10d %10.5f %10.5f',[i,pv_b[i-1],rd_b[i-1]]); + 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; + rba := nil; + rab := nil; + rbb := nil; + raa := nil; +end; + +procedure TCannonFrm.LeftInClick(Sender: TObject); +VAR i, index : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + LeftList.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + LeftOut.Visible := true; +end; + +procedure TCannonFrm.LeftOutClick(Sender: TObject); +VAR index : integer; +begin + index := LeftList.ItemIndex; + if index < 0 then + begin + LeftOut.Visible := false; + exit; + end; + VarList.Items.Add(LeftList.Items.Strings[index]); + LeftList.Items.Delete(index); +end; + +initialization + {$I canonunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/CANONUNIT.lfm b/applications/lazstats/source_orig/CANONUNIT.lfm new file mode 100644 index 000000000..747936e5f --- /dev/null +++ b/applications/lazstats/source_orig/CANONUNIT.lfm @@ -0,0 +1,328 @@ +object CannonFrm: TCannonFrm + Left = 261 + Height = 318 + Top = 157 + Width = 513 + Caption = 'Cannical Correlation Analysis' + ClientHeight = 318 + ClientWidth = 513 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 6 + Height = 14 + Top = 7 + Width = 94 + Caption = 'Available Variables:' + ParentColor = False + end + object Label2: TLabel + Left = 222 + Height = 14 + Top = 9 + Width = 95 + Caption = 'Left-Hand Variables' + ParentColor = False + end + object Label3: TLabel + Left = 223 + Height = 14 + Top = 152 + Width = 101 + Caption = 'Right-Hand Variables' + ParentColor = False + end + object VarList: TListBox + Left = 6 + Height = 263 + Top = 24 + Width = 155 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object LeftIn: TBitBtn + Left = 176 + Height = 29 + Top = 24 + 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 = LeftInClick + TabOrder = 1 + end + object LeftOut: TBitBtn + Left = 176 + Height = 29 + Top = 56 + 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 = LeftOutClick + TabOrder = 2 + end + object RightIn: TBitBtn + Left = 176 + Height = 29 + Top = 160 + 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 = RightInClick + TabOrder = 3 + end + object RightOut: TBitBtn + Left = 176 + Height = 29 + Top = 192 + 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 = RightOutClick + TabOrder = 4 + end + object LeftList: TListBox + Left = 219 + Height = 113 + Top = 25 + Width = 135 + ItemHeight = 0 + TabOrder = 5 + end + object RightList: TListBox + Left = 222 + Height = 118 + Top = 168 + Width = 133 + ItemHeight = 0 + TabOrder = 6 + end + object GroupBox1: TGroupBox + Left = 368 + Height = 94 + Top = 9 + Width = 138 + Caption = 'Options' + ClientHeight = 76 + ClientWidth = 134 + TabOrder = 7 + object CorsChk: TCheckBox + Left = 7 + Height = 17 + Top = 1 + Width = 78 + Caption = 'Correlations' + TabOrder = 0 + end + object InvChk: TCheckBox + Left = 7 + Height = 17 + Top = 17 + Width = 90 + Caption = 'Matrix Inverse' + TabOrder = 1 + end + object EigenChk: TCheckBox + Left = 7 + Height = 17 + Top = 33 + Width = 82 + Caption = 'Eigenvectors' + TabOrder = 2 + end + object RedundChk: TCheckBox + Left = 7 + Height = 17 + Top = 49 + Width = 87 + Caption = 'Redundancies' + TabOrder = 3 + end + end + object ResetBtn: TButton + Left = 392 + Height = 32 + Top = 152 + Width = 78 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 8 + end + object CancelBtn: TButton + Left = 392 + Height = 32 + Top = 192 + Width = 78 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 9 + end + object ComputeBtn: TButton + Left = 392 + Height = 32 + Top = 232 + Width = 78 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 10 + end + object ReturnBtn: TButton + Left = 392 + Height = 32 + Top = 272 + Width = 78 + Caption = 'Return' + ModalResult = 1 + TabOrder = 11 + end + object HelpBtn: TButton + Tag = 111 + Left = 392 + Height = 32 + Top = 112 + Width = 80 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 12 + end +end diff --git a/applications/lazstats/source_orig/CANONUNIT.lrs b/applications/lazstats/source_orig/CANONUNIT.lrs new file mode 100644 index 000000000..e8d0478c9 --- /dev/null +++ b/applications/lazstats/source_orig/CANONUNIT.lrs @@ -0,0 +1,244 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TCannonFrm','FORMDATA',[ + 'TPF0'#10'TCannonFrm'#9'CannonFrm'#4'Left'#3#5#1#6'Height'#3'>'#1#3'Top'#3#157 + +#0#5'Width'#3#1#2#7'Caption'#6#29'Cannical Correlation Analysis'#12'ClientHe' + +'ight'#3'>'#1#11'ClientWidth'#3#1#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6 + +#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#6#6'Height'#2#14#3'Top'#2#7#5'W' + +'idth'#2'^'#7'Caption'#6#20'Available Variables:'#11'ParentColor'#8#0#0#6'TL' + +'abel'#6'Label2'#4'Left'#3#222#0#6'Height'#2#14#3'Top'#2#9#5'Width'#2'_'#7'C' + +'aption'#6#19'Left-Hand Variables'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3' + +#4'Left'#3#223#0#6'Height'#2#14#3'Top'#3#152#0#5'Width'#2'e'#7'Caption'#6#20 + +'Right-Hand Variables'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2 + +#6#6'Height'#3#7#1#3'Top'#2#24#5'Width'#3#155#0#10'ItemHeight'#2#0#11'MultiS' + +'elect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#6'LeftIn'#4'Left'#3#176#0#6'Height' + +#2#29#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 + +#9'NumGlyphs'#2#0#7'OnClick'#7#11'LeftInClick'#8'TabOrder'#2#1#0#0#7'TBitBtn' + +#7'LeftOut'#4'Left'#3#176#0#6'Height'#2#29#3'Top'#2'8'#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#9'NumGlyphs'#2#0#7'OnClick'#7#12 + +'LeftOutClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#7'RightIn'#4'Left'#3#176#0#6'H' + +'eight'#2#29#3'Top'#3#160#0#5'Width'#2'#'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0 + +'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4 + +#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + ,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#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#12'RightInClick'#8'TabOrder'#2#3 + +#0#0#7'TBitBtn'#8'RightOut'#4'Left'#3#176#0#6'Height'#2#29#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'NumGlyp' + +'hs'#2#0#7'OnClick'#7#13'RightOutClick'#8'TabOrder'#2#4#0#0#8'TListBox'#8'Le' + +'ftList'#4'Left'#3#219#0#6'Height'#2'q'#3'Top'#2#25#5'Width'#3#135#0#10'Item' + +'Height'#2#0#8'TabOrder'#2#5#0#0#8'TListBox'#9'RightList'#4'Left'#3#222#0#6 + +'Height'#2'v'#3'Top'#3#168#0#5'Width'#3#133#0#10'ItemHeight'#2#0#8'TabOrder' + +#2#6#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#3'p'#1#6'Height'#2'^'#3'Top'#2#9#5 + +'Width'#3#138#0#7'Caption'#6#7'Options'#12'ClientHeight'#2'L'#11'ClientWidth' + +#3#134#0#8'TabOrder'#2#7#0#9'TCheckBox'#7'CorsChk'#4'Left'#2#7#6'Height'#2#17 + +#3'Top'#2#1#5'Width'#2'N'#7'Caption'#6#12'Correlations'#8'TabOrder'#2#0#0#0#9 + +'TCheckBox'#6'InvChk'#4'Left'#2#7#6'Height'#2#17#3'Top'#2#17#5'Width'#2'Z'#7 + +'Caption'#6#14'Matrix Inverse'#8'TabOrder'#2#1#0#0#9'TCheckBox'#8'EigenChk'#4 + +'Left'#2#7#6'Height'#2#17#3'Top'#2'!'#5'Width'#2'R'#7'Caption'#6#12'Eigenvec' + +'tors'#8'TabOrder'#2#2#0#0#9'TCheckBox'#9'RedundChk'#4'Left'#2#7#6'Height'#2 + +#17#3'Top'#2'1'#5'Width'#2'W'#7'Caption'#6#12'Redundancies'#8'TabOrder'#2#3#0 + +#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#136#1#6'Height'#2' '#3'Top'#3#152#0#5 + +'Width'#2'N'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder' + +#2#8#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#136#1#6'Height'#2' '#3'Top'#3#192 + +#0#5'Width'#2'N'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#9#0 + +#0#7'TButton'#10'ComputeBtn'#4'Left'#3#136#1#6'Height'#2' '#3'Top'#3#232#0#5 + +'Width'#2'N'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabO' + +'rder'#2#10#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#136#1#6'Height'#2' '#3'Top' + +#3#16#1#5'Width'#2'N'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder' + +#2#11#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2'o'#4'Left'#3#136#1#6'Height'#2' '#3 + +'Top'#2'p'#5'Width'#2'P'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8 + +'TabOrder'#2#12#0#0#0 +]); diff --git a/applications/lazstats/source_orig/CCHARTUNIT.lfm b/applications/lazstats/source_orig/CCHARTUNIT.lfm new file mode 100644 index 000000000..023a79ae5 --- /dev/null +++ b/applications/lazstats/source_orig/CCHARTUNIT.lfm @@ -0,0 +1,123 @@ +object cChartFrm: TcChartFrm + Left = 156 + Height = 308 + Top = 111 + Width = 386 + Caption = 'Defects C Chart' + ClientHeight = 308 + ClientWidth = 386 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 9 + Height = 14 + Top = 8 + Width = 90 + Caption = 'Selection Variables' + ParentColor = False + end + object Label2: TLabel + Left = 171 + Height = 14 + Top = 24 + Width = 111 + Caption = 'Measurement Variable:' + ParentColor = False + end + object VarList: TListBox + Left = 7 + Height = 224 + Top = 24 + Width = 151 + ItemHeight = 0 + OnClick = VarListClick + TabOrder = 0 + end + object MeasEdit: TEdit + Left = 171 + Height = 21 + Top = 40 + Width = 142 + TabOrder = 1 + Text = 'MeasEdit' + end + object SigmaOpts: TRadioGroup + Left = 171 + Height = 104 + Top = 72 + Width = 204 + AutoFill = True + Caption = 'No. of Sigma Units for UCL and LCL' + 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 = 86 + ClientWidth = 200 + Items.Strings = ( + '3 Sigma (Default)' + '2 Sigma' + '1 Sigma' + 'X Sigmas where X = ' + ) + TabOrder = 2 + end + object XSigmaEdit: TEdit + Left = 312 + Height = 21 + Top = 144 + Width = 45 + TabOrder = 3 + Text = 'XSigmaEdit' + end + object ResetBtn: TButton + Left = 272 + Height = 32 + Top = 184 + Width = 82 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 4 + end + object CancelBtn: TButton + Left = 171 + Height = 28 + Top = 224 + Width = 80 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 5 + end + object ComputeBtn: TButton + Left = 272 + Height = 28 + Top = 224 + Width = 80 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 6 + end + object ReturnBtn: TButton + Left = 224 + Height = 32 + Top = 264 + Width = 77 + Caption = 'Return' + ModalResult = 1 + TabOrder = 7 + end + object HelpBtn: TButton + Tag = 112 + Left = 171 + Height = 32 + Top = 184 + Width = 80 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 8 + end +end diff --git a/applications/lazstats/source_orig/CCHARTUNIT.lrs b/applications/lazstats/source_orig/CCHARTUNIT.lrs new file mode 100644 index 000000000..d98d118f0 --- /dev/null +++ b/applications/lazstats/source_orig/CCHARTUNIT.lrs @@ -0,0 +1,36 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TcChartFrm','FORMDATA',[ + 'TPF0'#10'TcChartFrm'#9'cChartFrm'#4'Left'#3#156#0#6'Height'#3'4'#1#3'Top'#2 + +'o'#5'Width'#3#130#1#7'Caption'#6#15'Defects C Chart'#12'ClientHeight'#3'4'#1 + +#11'ClientWidth'#3#130#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2' + +#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2#14#3'Top'#2#8#5'Width'#2'Z'#7 + +'Caption'#6#19'Selection Variables'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2' + +#4'Left'#3#171#0#6'Height'#2#14#3'Top'#2#24#5'Width'#2'o'#7'Caption'#6#21'Me' + +'asurement Variable:'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2 + +#7#6'Height'#3#224#0#3'Top'#2#24#5'Width'#3#151#0#10'ItemHeight'#2#0#7'OnCli' + +'ck'#7#12'VarListClick'#8'TabOrder'#2#0#0#0#5'TEdit'#8'MeasEdit'#4'Left'#3 + +#171#0#6'Height'#2#21#3'Top'#2'('#5'Width'#3#142#0#8'TabOrder'#2#1#4'Text'#6 + +#8'MeasEdit'#0#0#11'TRadioGroup'#9'SigmaOpts'#4'Left'#3#171#0#6'Height'#2'h' + +#3'Top'#2'H'#5'Width'#3#204#0#8'AutoFill'#9#7'Caption'#6'"No. of Sigma Units' + +' for UCL and LCL'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBo' + +'ttomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildR' + +'esize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'Ch' + +'ildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVerti' + +'cal'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTop' + +'ToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'V'#11'Clie' + +'ntWidth'#3#200#0#13'Items.Strings'#1#6#17'3 Sigma (Default)'#6#7'2 Sigma'#6 + +#7'1 Sigma'#6#19'X Sigmas where X = '#0#8'TabOrder'#2#2#0#0#5'TEdit'#10'XSig' + +'maEdit'#4'Left'#3'8'#1#6'Height'#2#21#3'Top'#3#144#0#5'Width'#2'-'#8'TabOrd' + +'er'#2#3#4'Text'#6#10'XSigmaEdit'#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#16#1#6 + +'Height'#2' '#3'Top'#3#184#0#5'Width'#2'R'#7'Caption'#6#5'Reset'#7'OnClick'#7 + +#13'ResetBtnClick'#8'TabOrder'#2#4#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#171 + +#0#6'Height'#2#28#3'Top'#3#224#0#5'Width'#2'P'#7'Caption'#6#6'Cancel'#11'Mod' + +'alResult'#2#2#8'TabOrder'#2#5#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#16#1#6 + +'Height'#2#28#3'Top'#3#224#0#5'Width'#2'P'#7'Caption'#6#7'Compute'#7'OnClick' + +#7#15'ComputeBtnClick'#8'TabOrder'#2#6#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3 + +#224#0#6'Height'#2' '#3'Top'#3#8#1#5'Width'#2'M'#7'Caption'#6#6'Return'#11'M' + +'odalResult'#2#1#8'TabOrder'#2#7#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2'p'#4'Lef' + +'t'#3#171#0#6'Height'#2' '#3'Top'#3#184#0#5'Width'#2'P'#7'Caption'#6#4'Help' + +#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2#8#0#0#0 +]); diff --git a/applications/lazstats/source_orig/CHISQRUNIT.PAS b/applications/lazstats/source_orig/CHISQRUNIT.PAS new file mode 100644 index 000000000..f1070929b --- /dev/null +++ b/applications/lazstats/source_orig/CHISQRUNIT.PAS @@ -0,0 +1,555 @@ +unit ChiSqrUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + ExtCtrls, StdCtrls, Buttons, MainUnit, OutPutUnit, FunctionsLib, + GraphLib, Globals, MatrixLib, DataProcs, Math, DictionaryUnit; + +type + + { TChiSqrFrm } + + TChiSqrFrm = class(TForm) + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + ObsChk: TCheckBox; + ExpChk: TCheckBox; + PropsChk: TCheckBox; + CellChiChk: TCheckBox; + SaveFChk: TCheckBox; + GroupBox1: TGroupBox; + YatesChk: TCheckBox; + RowIn: TBitBtn; + RowOut: TBitBtn; + ColIn: TBitBtn; + ColOut: TBitBtn; + DepIn: TBitBtn; + DepOut: TBitBtn; + NCasesEdit: TEdit; + NCasesLabel: TLabel; + RowEdit: TEdit; + ColEdit: TEdit; + DepEdit: TEdit; + InputGrp: TRadioGroup; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + AnalyzeLabel: TLabel; + VarList: TListBox; + procedure ColInClick(Sender: TObject); + procedure ColOutClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure DepInClick(Sender: TObject); + procedure DepOutClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure InputGrpClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure ReturnBtnClick(Sender: TObject); + procedure RowInClick(Sender: TObject); + procedure RowOutClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + ChiSqrFrm: TChiSqrFrm; + +implementation + +{ TChiSqrFrm } + +procedure TChiSqrFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + RowEdit.Text := ''; + ColEdit.Text := ''; + DepEdit.Text := ''; + DepEdit.Visible := false; + RowIn.Visible := true; + RowOut.Visible := false; + ColIn.Visible := true; + ColOut.Visible := false; + DepIn.Visible := false; + DepOut.Visible := false; + NCasesLabel.Visible := false; + AnalyzeLabel.Visible := false; + NCasesEdit.Text := ''; + NCasesEdit.Visible := false; + InputGrp.ItemIndex := 0; + ObsChk.Checked := false; + ExpChk.Checked := false; + PropsChk.Checked := false; + CellChiChk.Checked := false; + SaveFChk.Checked := false; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TChiSqrFrm.ReturnBtnClick(Sender: TObject); +begin + ChiSqrFrm.Hide; +end; + +procedure TChiSqrFrm.RowInClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + RowEdit.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + RowIn.Visible := false; + RowOut.Visible := true; +end; + +procedure TChiSqrFrm.RowOutClick(Sender: TObject); +begin + VarList.Items.Add(RowEdit.Text); + RowEdit.Text := ''; + RowIn.Visible := true; + RowOut.Visible := false; +end; + +procedure TChiSqrFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TChiSqrFrm.ColInClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + ColEdit.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + ColIn.Visible := false; + ColOut.Visible := true; +end; + +procedure TChiSqrFrm.ColOutClick(Sender: TObject); +begin + VarList.Items.Add(ColEdit.Text); + ColEdit.Text := ''; + ColIn.Visible := true; + ColOut.Visible := false; +end; + +procedure TChiSqrFrm.ComputeBtnClick(Sender: TObject); +var + i, j, RowNo, ColNo, DepNo, MinRow, MaxRow, MinCol, MaxCol : integer; + Row, Col, NoSelected, Ncases, Nrows, Ncols, FObs, df : integer; + RowLabels, ColLabels : StrDyneVec; + ColNoSelected : IntDyneVec; + cellstring, outline : string; + Freq : IntDyneMat; + Prop, Expected, CellChi : DblDyneMat; + PObs, ChiSquare, ProbChi, phi, SumX, SumY, VarX, VarY, liklihood : double; + yates : boolean; + title : string; + filename : string; + Adjchisqr, probliklihood, G, pearsonr, MantelHaenszel, MHprob : double; + Adjprobchi, CoefCont, CramerV : double; +begin + SetLength(ColNoSelected,NoVariables); + yates := false; + RowNo := 0; + ColNo := 0; + DepNo := 0; + for i := 1 to NoVariables do + begin + cellstring := OS3MainFrm.DataGrid.Cells[i,0]; + if cellstring = RowEdit.Text then RowNo := i; + if cellstring = ColEdit.Text then ColNo := i; + if cellstring = DepEdit.Text then DepNo := i; + end; + ColNoSelected[0] := RowNo; + ColNoSelected[1] := ColNo; + NoSelected := 2; + if InputGrp.ItemIndex > 0 then // for reading proportions or frequencies + begin + NoSelected := 3; + ColNoSelected[2] := DepNo; + end; + // get min and max of row and col numbers + MinRow := 1000; + MaxRow := 0; + MinCol := 1000; + MaxCol := 0; + for i := 1 to NoCases do + begin + if NOT GoodRecord(i,NoSelected,ColNoSelected) then continue; + Row := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[RowNo,i]))); + Col := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[ColNo,i]))); + if Row > MaxRow then MaxRow := Row; + if Row < MinRow then MinRow := Row; + if Col > MaxCol then MaxCol := Col; + if Col < MinCol then MinCol := Col; + end; + Nrows := MaxRow - MinRow + 1; + Ncols := MaxCol - MinCol + 1; + + // allocate and initialize + SetLength(Freq,Nrows+1,Ncols+1); + SetLength(Prop,Nrows+1,Ncols+1); + SetLength(Expected,Nrows,Ncols); + SetLength(CellChi,Nrows,Ncols); + SetLength(RowLabels,Nrows+1); + SetLength(ColLabels,Ncols+1); + for i := 1 to Nrows + 1 do + for j := 1 to Ncols + 1 do Freq[i-1,j-1] := 0; + + // get cell data + NCases := 0; + case InputGrp.ItemIndex of + 0 : begin // count number of cases in each row and column combination + for i := 1 to NoCases do + begin + if not GoodRecord(i,NoSelected,ColNoSelected) then continue; + NCases := NCases + 1; + Row := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[RowNo,i]))); + Col := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[ColNo,i]))); + Row := Row - MinRow + 1; + Col := Col - MinCol + 1; + Freq[Row-1,Col-1] := Freq[Row-1,Col-1] + 1; + end; + end; + 1 : begin // read frequencies data from grid + for i := 1 to NoCases do + begin + if not GoodRecord(i,NoSelected,ColNoSelected) then continue; + Row := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[RowNo,i]))); + Col := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[ColNo,i]))); + Row := Row - MinRow + 1; + Col := Col - MinCol + 1; + FObs := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[DepNo,i]))); + Freq[Row-1,Col-1] := Freq[Row-1,Col-1] + FObs; + NCases := NCases + FObs; + end; + end; + 2 : begin // get no. of cases and proportions for each cell + NCases := StrToInt(NCasesEdit.Text); + for i := 1 to NoCases do + begin + if not GoodRecord(i,NoSelected,ColNoSelected) then continue; + Row := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[RowNo,i]))); + Col := round(StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[ColNo,i]))); + Row := Row - MinRow + 1; + Col := Col - MinCol + 1; + PObs := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[DepNo,i])); + Freq[Row-1,Col-1] := Freq[Row-1,Col-1] + round(PObs * NCases); + end; + end; + end; // end case + Freq[Nrows,Ncols] := NCases; + + // Now, calculate expected values + // Get row totals first + for i := 1 to Nrows do + for j := 1 to Ncols do + Freq[i-1,Ncols] := Freq[i-1,Ncols] + Freq[i-1,j-1]; + // Get col totals next + for j := 1 to Ncols do + for i := 1 to Nrows do + Freq[Nrows,j-1] := Freq[Nrows,j-1] + Freq[i-1,j-1]; + // Then get expected values and cell chi-squares + ChiSquare := 0.0; + AdjChisqr := 0.0; + if (YatesChk.Checked) and (Nrows = 2) and (Ncols = 2) then yates := true; + for i := 1 to Nrows do + begin + for j := 1 to Ncols do + begin + Expected[i-1,j-1] := Freq[Nrows,j-1] * Freq[i-1,Ncols] / NCases; + if Expected[i-1,j-1] > 0.0 then + CellChi[i-1,j-1] := sqr(Freq[i-1,j-1] - Expected[i-1,j-1]) + / Expected[i-1,j-1] + else begin + ShowMessage('ERROR! Zero expected value found.'); + CellChi[i-1,j-1] := 0.0; + end; + ChiSquare := ChiSquare + CellChi[i-1,j-1]; + end; + end; + df := (Nrows - 1) * (Ncols - 1); + if yates = true then // 2 x 2 corrected chi-square + begin + Adjchisqr := abs((Freq[0,0] * Freq[1,1]) - (Freq[0,1] * Freq[1,0])); + Adjchisqr := sqr(Adjchisqr - NCases / 2.0) * NCases; // numerator + Adjchisqr := Adjchisqr / (Freq[0,2] * Freq[1,2] * Freq[2,0] * Freq[2,1]); + Adjprobchi := 1.0 - chisquaredprob(Adjchisqr,df); + end; + ProbChi := 1.0 - chisquaredprob(ChiSquare,df); // prob. larger chi + + //Print results to output form + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Chi-square Analysis Results'); + OutPutFrm.RichEdit.Lines.Add(''); + + // print tables requested by use + for i := 1 to Nrows do RowLabels[i-1] := format('Row %d',[i]); + RowLabels[Nrows] := 'Total'; + for j := 1 to Ncols do ColLabels[j-1] := format('COL.%d',[j]); + ColLabels[Ncols] := 'Total'; + + if ObsChk.Checked then + begin + IntArrayPrint(Freq, Nrows+1, Ncols+1,'Rows', + RowLabels, ColLabels,'OBSERVED FREQUENCIES'); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; + + if ExpChk.Checked then + begin + title := 'EXPECTED FREQUENCIES'; + MAT_Print(Expected,Nrows,Ncols,title,RowLabels,ColLabels,NCases); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; + + if PropsChk.Checked then + begin + title := 'ROW PROPORTIONS'; + for i := 1 to Nrows + 1 do + begin + for j := 1 to Ncols do + begin + if Freq[i-1,Ncols] > 0.0 then + Prop[i-1,j-1] := Freq[i-1,j-1] / Freq[i-1,Ncols] + else Prop[i-1,j-1] := 0.0; + end; + if Freq[i-1,Ncols] > 0.0 then Prop[i-1,Ncols] := 1.0 + else Prop[i-1,Ncols] := 0.0; + end; + MAT_PRINT(Prop,Nrows+1,Ncols+1,title,RowLabels,ColLabels,NCases); + title := 'COLUMN PROPORTIONS'; + for j := 1 to Ncols + 1 do + begin + for i := 1 to Nrows do + begin + if Freq[Nrows,j-1] > 0.0 then + Prop[i-1,j-1] := Freq[i-1,j-1] / Freq[Nrows,j-1] + else Prop[i-1,j-1] := 0.0; + end; + if Freq[Nrows,j-1] > 0.0 then Prop[NRows,j-1] := 1.0 + else Prop[NRows,j-1] := 0.0; + end; + MAT_PRINT(Prop,Nrows+1,Ncols+1,title,RowLabels,ColLabels,NCases); + Title := 'PROPORTIONS OF TOTAL N'; + for i := 1 to Nrows + 1 do + for j := 1 to Ncols + 1 do Prop[i-1,j-1] := Freq[i-1,j-1] / NCases; + Prop[Nrows,Ncols] := 1.0; + MAT_PRINT(Prop,Nrows+1,Ncols+1,title,RowLabels,ColLabels,NCases); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; + + if CellChiChk.Checked then + begin + title := 'CHI-SQUARED VALUE FOR CELLS'; + MAT_PRINT(CellChi,Nrows,Ncols,title,RowLabels,ColLabels,NCases); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; + + outline := format('Chi-square = %8.3f with D.F. = %d. Prob. > value = %8.3f', + [ChiSquare,df,ProbChi]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + if yates = true then + begin + outline := format('Chi-square using Yates correction = %8.3f and Prob > value = %8.3f', + [Adjchisqr,Adjprobchi]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + + liklihood := 0.0; + for i := 0 to Nrows-1 do + for j := 0 to Ncols-1 do + if (Freq[i,j] > 0.0) then + liklihood := Liklihood + (Freq[i,j] * (ln(Expected[i,j] / Freq[i,j]))); + liklihood := -2.0 * liklihood; + probliklihood := 1.0 - chisquaredprob(liklihood,df); + outline := format('Liklihood Ratio = %8.3f with prob. > value = %6.4f', + [liklihood,probliklihood]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + G := 0.0; + for i := 0 to Nrows-1 do + for j := 0 to Ncols-1 do + if (Expected[i,j] > 0) then + G := G + Freq[i,j] * (ln(Freq[i,j] / Expected[i,j])); + G := 2.0 * G; + probliklihood := 1.0 - chisquaredprob(G,df); + outline := format('G statistic = %8.3f with prob. > value = %6.4f',[G,probliklihood]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + if ((Nrows > 1) and (Ncols > 1)) then + begin + phi := sqrt(ChiSquare / Ncases); + outline := format('phi correlation = %6.4f',[phi]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + pearsonr := 0.0; + SumX := 0.0; + SumY := 0.0; + VarX := 0.0; + VarY := 0.0; + for i := 0 to Nrows-1 do SumX := SumX + ( (i+1) * Freq[i,Ncols] ); + for j := 0 to Ncols-1 do SumY := SumY + ( (j+1) * Freq[Nrows,j] ); + for i := 0 to Nrows-1 do VarX := VarX + ( ((i+1)*(i+1)) * Freq[i,Ncols] ); + for j := 0 to Ncols-1 do VarY := VarY + ( ((j+1)*(j+1)) * Freq[Nrows,j] ); + VarX := VarX - ((SumX * SumX) / Ncases); + VarY := VarY - ((SumY * SumY) / Ncases); + for i := 0 to Nrows-1 do + for j := 0 to Ncols-1 do + pearsonr := pearsonr + ((i+1)*(j+1) * Freq[i,j]); + pearsonr := pearsonr - (SumX * SumY / Ncases); + pearsonr := pearsonr / sqrt(VarX * VarY); + outline := format('Pearson Correlation r = %6.4f',[pearsonr]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + MantelHaenszel := (Ncases-1) * (pearsonr * pearsonr); + MHprob := 1.0 - chisquaredprob(MantelHaenszel,1); + outline := format('Mantel-Haenszel Test of Linear Association = %8.3f with probability > value = %6.4f', + [MantelHaenszel, MHprob]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + CoefCont := sqrt(ChiSquare / (ChiSquare + Ncases)); + outline := format('The coefficient of contingency = %8.3f',[CoefCont]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + + if (Nrows < Ncols) then + CramerV := sqrt(ChiSquare / (Ncases * ((Nrows-1)))) + else CramerV := sqrt(ChiSquare / (Ncases * ((Ncols-1)))); + outline := format('Cramers V = %8.3f',[CramerV]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + end; + + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + // save frequency data file if elected + if SaveFChk.Checked then + begin + OS3MainFrm.CloseFileBtnClick(self); + OS3MainFrm.FileNameEdit.Text := ''; + for i := 1 to DictionaryFrm.DictGrid.RowCount - 1 do + for j := 0 to 7 do DictionaryFrm.DictGrid.Cells[j,i] := ''; + DictionaryFrm.DictGrid.RowCount := 1; +// DictionaryFrm.FileNameEdit.Text := ''; + + // get labels for new file + ColLabels[0] := 'ROW'; + ColLabels[1] := 'COL'; + ColLabels[2] := 'FREQ'; + // create new variables + Row := 0; + OS3MainFrm.DataGrid.ColCount := 4; + DictionaryFrm.DictGrid.ColCount := 8; + NoVariables := 0; + for i := 1 to 3 do + begin + col := NoVariables + 1; + DictionaryFrm.NewVar(col); + DictionaryFrm.DictGrid.Cells[1,col] := ColLabels[i-1]; + OS3MainFrm.DataGrid.Cells[col,0] := ColLabels[i-1]; + NoVariables := NoVariables + 1; + end; + OS3MainFrm.DataGrid.RowCount := (Nrows * NCols) + 1; + for i := 1 to Nrows do + begin + for j := 1 to Ncols do + begin + Row := Row + 1; + OS3MainFrm.DataGrid.Cells[0,Row] := format('Case:%d',[Row]); + OS3MainFrm.DataGrid.Cells[1,Row] := IntToStr(i); + OS3MainFrm.DataGrid.Cells[2,Row] := IntToStr(j); + OS3MainFrm.DataGrid.Cells[3,Row] := IntToStr(Freq[i-1,j-1]); + end; + end; + NoCases := Row; + OS3MainFrm.FileNameEdit.Text := 'ChiSqrFreq.LAZ'; + OS3MainFrm.NoCasesEdit.Text := IntToStr(NoCases); + OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables); +// OS3MainFrm.SaveFileBtnClick(self); + end; + + //clean up + ColLabels := nil; + RowLabels := nil; + CellChi := nil; + Expected := nil; + Prop := nil; + Freq := nil; + ColNoSelected := nil; + ResetBtnClick(self); +end; + +procedure TChiSqrFrm.DepInClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + DepEdit.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + DepIn.Visible := false; + DepOut.Visible := true; +end; + +procedure TChiSqrFrm.DepOutClick(Sender: TObject); +begin + VarList.Items.Add(DepEdit.Text); + DepEdit.Text := ''; + DepIn.Visible := true; + DepOut.Visible := false; +end; + +procedure TChiSqrFrm.InputGrpClick(Sender: TObject); +VAR index : integer; +begin + index := InputGrp.ItemIndex; + if index = 2 then // only proportions available - get N size + begin + NCasesLabel.Visible := true; + AnalyzeLabel.Visible := true; + NCasesEdit.Visible := true; + NCasesEdit.SetFocus; + DepIn.Visible := true; + DepOut.Visible := false; + DepEdit.Visible := true; + end; + if index = 1 then // frequencies available for each row and column combo + begin + NCasesLabel.Visible := false; + NCasesEdit.Visible := false; + DepIn.Visible := true; + DepEdit.Visible := true; + AnalyzeLabel.Visible := true; + end; + if index = 0 then // have to count cases in each row and col. combination + begin + NCasesLabel.Visible := false; + NCasesEdit.Visible := false; + DepIn.Visible := false; + DepOut.Visible := false; + DepEdit.Visible := false; + end; +end; + +initialization + {$I chisqrunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/CHISQRUNIT.lfm b/applications/lazstats/source_orig/CHISQRUNIT.lfm new file mode 100644 index 000000000..f233951e0 --- /dev/null +++ b/applications/lazstats/source_orig/CHISQRUNIT.lfm @@ -0,0 +1,481 @@ +object ChiSqrFrm: TChiSqrFrm + Left = 173 + Height = 486 + Top = 99 + Width = 425 + Caption = 'Contingency Chi Squared' + ClientHeight = 486 + ClientWidth = 425 + OnShow = FormShow + LCLVersion = '0.9.30' + object Label1: TLabel + Left = 7 + Height = 16 + Top = 111 + Width = 99 + Caption = 'Available Variables' + ParentColor = False + end + object Label2: TLabel + Left = 206 + Height = 16 + Top = 136 + Width = 69 + Caption = 'Row Variable' + ParentColor = False + end + object Label3: TLabel + Left = 205 + Height = 16 + Top = 203 + Width = 89 + Caption = 'Column Variable' + ParentColor = False + end + object AnalyzeLabel: TLabel + Left = 205 + Height = 16 + Top = 288 + Width = 101 + Caption = 'Variable to Analyze' + ParentColor = False + end + object NCasesLabel: TLabel + Left = 7 + Height = 16 + Top = 384 + Width = 100 + Caption = 'Total No. of Cases:' + ParentColor = False + end + object InputGrp: TRadioGroup + Left = 7 + Height = 87 + Top = 1 + Width = 409 + AutoFill = True + Caption = 'Input Options' + 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 = 69 + ClientWidth = 405 + Items.Strings = ( + 'Count vases classified by row and column vectors in the data grid' + 'Use frequencies recorded in the data grid for row and column variables' + 'Use proportions recorded in the data grid for row and column variables' + ) + OnClick = InputGrpClick + TabOrder = 0 + end + object VarList: TListBox + Left = 7 + Height = 222 + Top = 136 + Width = 153 + ItemHeight = 0 + TabOrder = 1 + end + object RowIn: TBitBtn + Left = 168 + Height = 26 + Top = 136 + 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 = RowInClick + TabOrder = 2 + end + object RowOut: TBitBtn + Left = 168 + Height = 26 + Top = 168 + 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 = RowOutClick + TabOrder = 3 + end + object ColIn: TBitBtn + Left = 168 + Height = 26 + Top = 208 + Width = 30 + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00216324B81D5E2006FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF002A702F38256929F7216324D9FFFFFF00FFFFFF00FFFFFF00FFFFFF0061BE + 6DFF5DB868FF58B162FF53A95CFF4DA156FF47994FFF419149FF3B8842FF3580 + 3BFF3F8845FF59A15EFF448B49FF216324CFFFFFFF00FFFFFF00FFFFFF0065C3 + 71FFA0D7A9FF9CD5A5FF98D3A1FF94D09DFF90CE98FF8BCB93FF87C98EFF82C6 + 89FF7EC384FF7AC180FF76BE7CFF458C4AFF216324C4FFFFFF00FFFFFF0068C7 + 74FFA5DAAEFFA2D8ABFF9ED6A7FF9AD4A3FF96D29FFF93CF9AFF8ECC95FF89CA + 90FF85C78BFF81C587FF7DC282FF4A9150FF256929C9FFFFFF00FFFFFF0068C7 + 74FF68C774FF65C371FF61BE6DFF5DB868FF58B162FF53A95CFF4DA156FF4799 + 4FFF419149FF5AA362FF559D5CFF2F7835D1FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00419149F73B8842DBFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF0047994FBB41914906FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF + FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 + } + NumGlyphs = 0 + OnClick = ColInClick + TabOrder = 4 + end + object ColOut: TBitBtn + Left = 168 + Height = 26 + Top = 241 + 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 = ColOutClick + TabOrder = 5 + end + object DepIn: TBitBtn + Left = 168 + Height = 26 + Top = 288 + 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 = DepInClick + TabOrder = 6 + end + object DepOut: TBitBtn + Left = 168 + Height = 26 + Top = 320 + 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 = DepOutClick + TabOrder = 7 + end + object RowEdit: TEdit + Left = 206 + Height = 23 + Top = 152 + Width = 100 + TabOrder = 8 + Text = 'RowEdit' + end + object ColEdit: TEdit + Left = 205 + Height = 23 + Top = 224 + Width = 100 + TabOrder = 9 + Text = 'Edit1' + end + object DepEdit: TEdit + Left = 206 + Height = 23 + Top = 312 + Width = 100 + TabOrder = 10 + Text = 'Edit1' + end + object NCasesEdit: TEdit + Left = 112 + Height = 23 + Top = 376 + Width = 41 + TabOrder = 11 + Text = 'NCasesEdit' + end + object YatesChk: TCheckBox + Left = 7 + Height = 19 + Top = 416 + Width = 129 + Caption = 'Use Yates Correction' + TabOrder = 12 + end + object GroupBox1: TGroupBox + Left = 188 + Height = 119 + Top = 352 + Width = 210 + Caption = 'Output Options:' + ClientHeight = 101 + ClientWidth = 206 + TabOrder = 13 + object ObsChk: TCheckBox + Left = 8 + Height = 19 + Top = 0 + Width = 168 + Caption = 'Show Observed Frequencies' + TabOrder = 0 + end + object ExpChk: TCheckBox + Left = 8 + Height = 19 + Top = 19 + Width = 165 + Caption = 'Show Expected Frequencies' + TabOrder = 1 + end + object PropsChk: TCheckBox + Left = 8 + Height = 19 + Top = 39 + Width = 209 + Caption = 'Show Row and Column Proportions' + TabOrder = 2 + end + object CellChiChk: TCheckBox + Left = 8 + Height = 19 + Top = 59 + Width = 178 + Caption = 'Show Cell Chi-Squared Values' + TabOrder = 3 + end + object SaveFChk: TCheckBox + Left = 8 + Height = 19 + Top = 79 + Width = 173 + Caption = 'Save a File of Frequency Data' + TabOrder = 4 + end + end + object ResetBtn: TButton + Left = 328 + Height = 27 + Top = 144 + Width = 70 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 14 + end + object CancelBtn: TButton + Left = 328 + Height = 27 + Top = 192 + Width = 70 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 15 + end + object ComputeBtn: TButton + Left = 328 + Height = 27 + Top = 240 + Width = 70 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 16 + end + object ReturnBtn: TButton + Left = 328 + Height = 27 + Top = 288 + Width = 70 + Caption = 'Return' + ModalResult = 1 + OnClick = ReturnBtnClick + TabOrder = 17 + end +end diff --git a/applications/lazstats/source_orig/CHISQRUNIT.lrs b/applications/lazstats/source_orig/CHISQRUNIT.lrs new file mode 100644 index 000000000..2551e9204 --- /dev/null +++ b/applications/lazstats/source_orig/CHISQRUNIT.lrs @@ -0,0 +1,368 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TChiSqrFrm','FORMDATA',[ + 'TPF0'#10'TChiSqrFrm'#9'ChiSqrFrm'#4'Left'#3#173#0#6'Height'#3#230#1#3'Top'#2 + +'c'#5'Width'#3#169#1#7'Caption'#6#23'Contingency Chi Squared'#12'ClientHeigh' + +'t'#3#230#1#11'ClientWidth'#3#169#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6 + +#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#7#6'Height'#2#16#3'Top'#2'o'#5'Wi' + +'dth'#2'c'#7'Caption'#6#19'Available Variables'#11'ParentColor'#8#0#0#6'TLab' + +'el'#6'Label2'#4'Left'#3#206#0#6'Height'#2#16#3'Top'#3#136#0#5'Width'#2'E'#7 + +'Caption'#6#12'Row Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Lef' + +'t'#3#205#0#6'Height'#2#16#3'Top'#3#203#0#5'Width'#2'Y'#7'Caption'#6#15'Colu' + +'mn Variable'#11'ParentColor'#8#0#0#6'TLabel'#12'AnalyzeLabel'#4'Left'#3#205 + +#0#6'Height'#2#16#3'Top'#3' '#1#5'Width'#2'e'#7'Caption'#6#19'Variable to An' + +'alyze'#11'ParentColor'#8#0#0#6'TLabel'#11'NCasesLabel'#4'Left'#2#7#6'Height' + +#2#16#3'Top'#3#128#1#5'Width'#2'd'#7'Caption'#6#19'Total No. of Cases:'#11'P' + +'arentColor'#8#0#0#11'TRadioGroup'#8'InputGrp'#4'Left'#2#7#6'Height'#2'W'#3 + +'Top'#2#1#5'Width'#3#153#1#8'AutoFill'#9#7'Caption'#6#13'Input Options'#28'C' + +'hildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'Ch' + +'ildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.' + +'EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizo' + +'ntal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChil' + +'ds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizi' + +'ng.ControlsPerLine'#2#1#12'ClientHeight'#2'E'#11'ClientWidth'#3#149#1#13'It' + +'ems.Strings'#1#6'ACount vases classified by row and column vectors in the d' + +'ata grid'#6'FUse frequencies recorded in the data grid for row and column v' + +'ariables'#6'FUse proportions recorded in the data grid for row and column v' + +'ariables'#0#7'OnClick'#7#13'InputGrpClick'#8'TabOrder'#2#0#0#0#8'TListBox'#7 + +'VarList'#4'Left'#2#7#6'Height'#3#222#0#3'Top'#3#136#0#5'Width'#3#153#0#10'I' + +'temHeight'#2#0#8'TabOrder'#2#1#0#0#7'TBitBtn'#5'RowIn'#4'Left'#3#168#0#6'He' + +'ight'#2#26#3'Top'#3#136#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#10'RowInClick'#8'TabOrder'#2#2#0 + +#0#7'TBitBtn'#6'RowOut'#4'Left'#3#168#0#6'Height'#2#26#3'Top'#3#168#0#5'Widt' + +'h'#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#11'RowOutClick'#8'TabOrder'#2#3#0#0#7'TBitBtn'#5'ColIn'#4'Left'#3 + +#168#0#6'Height'#2#26#3'Top'#3#208#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#10'ColInClick'#8'TabOrder' + +#2#4#0#0#7'TBitBtn'#6'ColOut'#4'Left'#3#168#0#6'Height'#2#26#3'Top'#3#241#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'NumGlyp' + +'hs'#2#0#7'OnClick'#7#11'ColOutClick'#8'TabOrder'#2#5#0#0#7'TBitBtn'#5'DepIn' + +#4'Left'#3#168#0#6'Height'#2#26#3'Top'#3' '#1#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'DepInClick'#8 + +'TabOrder'#2#6#0#0#7'TBitBtn'#6'DepOut'#4'Left'#3#168#0#6'Height'#2#26#3'Top' + +#3'@'#1#5'Width'#2#30#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0 + +'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0 + +#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G' + +#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161 + +'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131 + +#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/' + +'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e' + +#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255 + +#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132 + +#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255 + +#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154 + +#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255 + +#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201 + +#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O' + +#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255 + ,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num' + +'Glyphs'#2#0#7'OnClick'#7#11'DepOutClick'#8'TabOrder'#2#7#0#0#5'TEdit'#7'Row' + +'Edit'#4'Left'#3#206#0#6'Height'#2#23#3'Top'#3#152#0#5'Width'#2'd'#8'TabOrde' + +'r'#2#8#4'Text'#6#7'RowEdit'#0#0#5'TEdit'#7'ColEdit'#4'Left'#3#205#0#6'Heigh' + +'t'#2#23#3'Top'#3#224#0#5'Width'#2'd'#8'TabOrder'#2#9#4'Text'#6#5'Edit1'#0#0 + +#5'TEdit'#7'DepEdit'#4'Left'#3#206#0#6'Height'#2#23#3'Top'#3'8'#1#5'Width'#2 + +'d'#8'TabOrder'#2#10#4'Text'#6#5'Edit1'#0#0#5'TEdit'#10'NCasesEdit'#4'Left'#2 + +'p'#6'Height'#2#23#3'Top'#3'x'#1#5'Width'#2')'#8'TabOrder'#2#11#4'Text'#6#10 + +'NCasesEdit'#0#0#9'TCheckBox'#8'YatesChk'#4'Left'#2#7#6'Height'#2#19#3'Top'#3 + +#160#1#5'Width'#3#129#0#7'Caption'#6#20'Use Yates Correction'#8'TabOrder'#2 + +#12#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#3#188#0#6'Height'#2'w'#3'Top'#3'`' + +#1#5'Width'#3#210#0#7'Caption'#6#15'Output Options:'#12'ClientHeight'#2'e'#11 + +'ClientWidth'#3#206#0#8'TabOrder'#2#13#0#9'TCheckBox'#6'ObsChk'#4'Left'#2#8#6 + +'Height'#2#19#3'Top'#2#0#5'Width'#3#168#0#7'Caption'#6#25'Show Observed Freq' + +'uencies'#8'TabOrder'#2#0#0#0#9'TCheckBox'#6'ExpChk'#4'Left'#2#8#6'Height'#2 + +#19#3'Top'#2#19#5'Width'#3#165#0#7'Caption'#6#25'Show Expected Frequencies'#8 + +'TabOrder'#2#1#0#0#9'TCheckBox'#8'PropsChk'#4'Left'#2#8#6'Height'#2#19#3'Top' + +#2''''#5'Width'#3#209#0#7'Caption'#6#31'Show Row and Column Proportions'#8'T' + +'abOrder'#2#2#0#0#9'TCheckBox'#10'CellChiChk'#4'Left'#2#8#6'Height'#2#19#3'T' + +'op'#2';'#5'Width'#3#178#0#7'Caption'#6#28'Show Cell Chi-Squared Values'#8'T' + +'abOrder'#2#3#0#0#9'TCheckBox'#8'SaveFChk'#4'Left'#2#8#6'Height'#2#19#3'Top' + +#2'O'#5'Width'#3#173#0#7'Caption'#6#29'Save a File of Frequency Data'#8'TabO' + +'rder'#2#4#0#0#0#7'TButton'#8'ResetBtn'#4'Left'#3'H'#1#6'Height'#2#27#3'Top' + +#3#144#0#5'Width'#2'F'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8 + +'TabOrder'#2#14#0#0#7'TButton'#9'CancelBtn'#4'Left'#3'H'#1#6'Height'#2#27#3 + +'Top'#3#192#0#5'Width'#2'F'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'Tab' + +'Order'#2#15#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3'H'#1#6'Height'#2#27#3'T' + +'op'#3#240#0#5'Width'#2'F'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBt' + +'nClick'#8'TabOrder'#2#16#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'H'#1#6'Heigh' + +'t'#2#27#3'Top'#3' '#1#5'Width'#2'F'#7'Caption'#6#6'Return'#11'ModalResult'#2 + +#1#7'OnClick'#7#14'ReturnBtnClick'#8'TabOrder'#2#17#0#0#0 +]); diff --git a/applications/lazstats/source_orig/COCHRANQUNIT.PAS b/applications/lazstats/source_orig/COCHRANQUNIT.PAS new file mode 100644 index 000000000..5e4e4b87a --- /dev/null +++ b/applications/lazstats/source_orig/COCHRANQUNIT.PAS @@ -0,0 +1,197 @@ +unit CochranQUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, MainUnit, Globals, OutPutUnit, DataProcs, Math, + FunctionsLib, contexthelpunit; + +type + + { TCochranQFrm } + + TCochranQFrm = class(TForm) + HelpBtn: TButton; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + InBtn: TBitBtn; + Label2: TLabel; + ListBox1: TListBox; + OutBtn: TBitBtn; + AllBtn: TBitBtn; + Label1: TLabel; + VarList: TListBox; + procedure AllBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure InBtnClick(Sender: TObject); + procedure OutBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + CochranQFrm: TCochranQFrm; + +implementation + +{ TCochranQFrm } + +procedure TCochranQFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + ListBox1.Clear; + for i := 1 to NoVariables do + begin + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); + end; + InBtn.Visible := true; + OutBtn.Visible := false; +end; + +procedure TCochranQFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TCochranQFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +procedure TCochranQFrm.AllBtnClick(Sender: TObject); +VAR count, index : integer; +begin + count := VarList.Items.Count; + if count = 0 then exit; + for index := 0 to count-1 do + begin + ListBox1.Items.Add(VarList.Items.Strings[index]); + end; + VarList.Clear; + InBtn.Visible := false; + OutBtn.Visible := true; +end; + +procedure TCochranQFrm.ComputeBtnClick(Sender: TObject); +var + i, j, k, col : integer; + ColNoSelected : IntDyneVec; + R1, L1, L2, C1, g1, Q, g2, chiprob : double; + cellstring, outline : string; +begin + SetLength(ColNoSelected,NoVariables); + C1 := 0.0; + k := ListBox1.Items.Count; + // Get column numbers and labels of variables selected + for i := 1 to k do + begin + cellstring := ListBox1.Items.Strings[i-1]; + for j := 1 to NoVariables do + begin + if (cellstring = OS3MainFrm.DataGrid.Cells[j,0]) then + ColNoSelected[i-1] := j; + end; + end; + + // Calculate results + R1 := 0.0; + L1 := 0.0; + L2 := 0.0; + g1 := 0.0; + g2 := 0.0; + for i := 1 to NoCases do + begin + if (not GoodRecord(i,k,ColNoSelected)) then continue; + for j := 1 to k do + begin + col := ColNoSelected[j-1]; + R1 := R1 + StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col,i])); + end; + L1 := L1 + R1; + L2 := L2 + (R1 * R1); + R1 := 0.0; + end; + for j := 1 to k do + begin + for i := 1 to NoCases do + begin + if (not GoodRecord(i,k,ColNoSelected)) then continue; + col := ColNoSelected[j-1]; + C1 := C1 + StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col,i])); + end; + g1 := g1 + C1; + g2 := g2 + (C1 * C1); + C1 := 0.0; + end; + + if ((k * L1) - L2) > 0.0 then + begin + Q := ((k - 1) * ((k * g2) - (g1 * g1))) / ((k * L1) - L2); + chiprob := 1.0 - chisquaredprob(Q, k - 1); + end + else begin + Q := 0.0; + chiprob := 1.0; + ShowMessage('Error in obtaining Q and the probability.'); + end; + + //present results + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Cochran Q Test for Related Samples'); + OutPutFrm.RichEdit.Lines.Add('See pages 161-166 in S. Siegel: Nonparametric Statistics for the Behavioral Sciences'); + OutPutFrm.RichEdit.Lines.Add('McGraw-Hill Book Company, New York, 1956'); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Cochran Q Statistic = %6.3f',[Q]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('which is distributed as chi-square with %d D.F. and probability = %6.4f', + [k-1, chiprob]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + ColNoSelected := nil; +end; + +procedure TCochranQFrm.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 + ListBox1.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 TCochranQFrm.OutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := ListBox1.ItemIndex; + VarList.Items.Add(ListBox1.Items.Strings[index]); + ListBox1.Items.Delete(index); + InBtn.Visible := true; +end; + +initialization + {$I cochranqunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/COCHRANQUNIT.lfm b/applications/lazstats/source_orig/COCHRANQUNIT.lfm new file mode 100644 index 000000000..20583058f --- /dev/null +++ b/applications/lazstats/source_orig/COCHRANQUNIT.lfm @@ -0,0 +1,190 @@ +object CochranQFrm: TCochranQFrm + Left = 138 + Height = 271 + Top = 128 + Width = 505 + Caption = 'Cochran Q Test' + ClientHeight = 271 + ClientWidth = 505 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 7 + Height = 14 + Top = 1 + Width = 90 + Caption = 'Available Variables' + ParentColor = False + end + object Label2: TLabel + Left = 217 + Height = 14 + Top = 2 + Width = 88 + Caption = 'Selected Variables' + ParentColor = False + end + object VarList: TListBox + Left = 7 + Height = 232 + Top = 16 + Width = 149 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object InBtn: TBitBtn + Left = 168 + Height = 29 + Top = 24 + Width = 34 + 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 = 168 + Height = 29 + Top = 56 + Width = 34 + 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 = 168 + Height = 29 + Top = 104 + Width = 34 + Caption = 'ALL' + NumGlyphs = 0 + OnClick = AllBtnClick + TabOrder = 3 + end + object ListBox1: TListBox + Left = 210 + Height = 226 + Top = 22 + Width = 158 + ItemHeight = 0 + TabOrder = 4 + end + object ResetBtn: TButton + Left = 400 + Height = 30 + Top = 55 + Width = 80 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 5 + end + object CancelBtn: TButton + Left = 400 + Height = 30 + Top = 103 + Width = 81 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 6 + end + object ComputeBtn: TButton + Left = 400 + Height = 30 + Top = 152 + Width = 81 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 7 + end + object ReturnBtn: TButton + Left = 400 + Height = 30 + Top = 200 + Width = 81 + Caption = 'Return' + ModalResult = 1 + TabOrder = 8 + end + object HelpBtn: TButton + Tag = 113 + Left = 400 + Height = 32 + Top = 8 + Width = 80 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 9 + end +end diff --git a/applications/lazstats/source_orig/COCHRANQUNIT.lrs b/applications/lazstats/source_orig/COCHRANQUNIT.lrs new file mode 100644 index 000000000..4499f44b4 --- /dev/null +++ b/applications/lazstats/source_orig/COCHRANQUNIT.lrs @@ -0,0 +1,130 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TCochranQFrm','FORMDATA',[ + 'TPF0'#12'TCochranQFrm'#11'CochranQFrm'#4'Left'#3#138#0#6'Height'#3#15#1#3'To' + +'p'#3#128#0#5'Width'#3#249#1#7'Caption'#6#14'Cochran Q Test'#12'ClientHeight' + +#3#15#1#11'ClientWidth'#3#249#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0' + +'.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#7#6'Height'#2#14#3'Top'#2#1#5'Widt' + +'h'#2'Z'#7'Caption'#6#19'Available Variables'#11'ParentColor'#8#0#0#6'TLabel' + +#6'Label2'#4'Left'#3#217#0#6'Height'#2#14#3'Top'#2#2#5'Width'#2'X'#7'Caption' + +#6#18'Selected Variables'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Lef' + +'t'#2#7#6'Height'#3#232#0#3'Top'#2#16#5'Width'#3#149#0#10'ItemHeight'#2#0#11 + +'MultiSelect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#5'InBtn'#4'Left'#3#168#0#6'He' + +'ight'#2#29#3'Top'#2#24#5'Width'#2'"'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM' + +'6'#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#168#0#6'Height'#2#29#3'Top'#2'8'#5'Width'#2'"'#10'Glyph' + +'.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16 + +#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + ,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8'#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['#170'd'#255'G'#153'O'#255 + +'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%i)'#255'!c$' + +#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'#196'{'#200#134#255#156 + +#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255 + +#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255 + +'r'#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0'h'#199't'#201#127#204#138 + +#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207 + +#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}' + +#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0#255#255#255#0 + +'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X'#177'b'#255'S' + +#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';' + +#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'OutBtnClick'#8 + +'TabOrder'#2#2#0#0#7'TBitBtn'#6'AllBtn'#4'Left'#3#168#0#6'Height'#2#29#3'Top' + +#2'h'#5'Width'#2'"'#7'Caption'#6#3'ALL'#9'NumGlyphs'#2#0#7'OnClick'#7#11'All' + +'BtnClick'#8'TabOrder'#2#3#0#0#8'TListBox'#8'ListBox1'#4'Left'#3#210#0#6'Hei' + +'ght'#3#226#0#3'Top'#2#22#5'Width'#3#158#0#10'ItemHeight'#2#0#8'TabOrder'#2#4 + +#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#144#1#6'Height'#2#30#3'Top'#2'7'#5'Wid' + +'th'#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#144#1#6'Height'#2#30#3'Top'#2'g'#5 + +'Width'#2'Q'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#6#0#0#7 + +'TButton'#10'ComputeBtn'#4'Left'#3#144#1#6'Height'#2#30#3'Top'#3#152#0#5'Wid' + +'th'#2'Q'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrde' + +'r'#2#7#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#144#1#6'Height'#2#30#3'Top'#3 + +#200#0#5'Width'#2'Q'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2 + +#8#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2'q'#4'Left'#3#144#1#6'Height'#2' '#3'To' + +'p'#2#8#5'Width'#2'P'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'T' + +'abOrder'#2#9#0#0#0 +]); diff --git a/applications/lazstats/source_orig/COMPRELUNIT.PAS b/applications/lazstats/source_orig/COMPRELUNIT.PAS new file mode 100644 index 000000000..a36c2c008 --- /dev/null +++ b/applications/lazstats/source_orig/COMPRELUNIT.PAS @@ -0,0 +1,289 @@ +unit CompRelUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, MainUnit, OutPutUnit, FunctionsLib, Globals, + DataProcs, Math, MatrixLib, DictionaryUnit, contexthelpunit; + +type + + { TCompRelFrm } + + TCompRelFrm = class(TForm) + HelpBtn: TButton; + InBtn: TBitBtn; + OutBtn: TBitBtn; + AllBtn: TBitBtn; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + RMatChk: TCheckBox; + GridScrChk: TCheckBox; + GroupBox1: TGroupBox; + Label1: TLabel; + Label2: TLabel; + ItemList: TListBox; + Label3: TLabel; + Label4: TLabel; + WeightList: TListBox; + RelList: TListBox; + VarList: TListBox; + procedure AllBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure InBtnClick(Sender: TObject); + procedure OutBtnClick(Sender: TObject); + procedure RelListClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure WeightListClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + CompRelFrm: TCompRelFrm; + +implementation + +{ TCompRelFrm } + +procedure TCompRelFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + ItemList.Clear; + RelList.Clear; + WeightList.Clear; + OutBtn.Visible := false; + InBtn.Visible := true; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TCompRelFrm.WeightListClick(Sender: TObject); +var + response : string; + index : integer; +begin + response := InputBox('Test Weight','Test weight = ','1.0'); + index := WeightList.ItemIndex; + WeightList.Items.Strings[index] := response; +end; + +procedure TCompRelFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TCompRelFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +procedure TCompRelFrm.AllBtnClick(Sender: TObject); +var + i, count : integer; + cellstring : string; +begin + count := VarList.Items.Count; + for i := 1 to count do + begin + ItemList.Items.Add(VarList.Items.Strings[i-1]); + cellstring := '1.0'; + RelList.Items.Add(cellstring); + WeightList.Items.Add(cellstring); + end; + VarList.Clear; + InBtn.Visible := false; + OutBtn.Visible := true; +end; + +procedure TCompRelFrm.ComputeBtnClick(Sender: TObject); +var + i, j, NoVars, count, col : integer; + Rmat, RelMat : DblDyneMat; + Weights, Reliabilities, VectProd, means, variances, stddevs : DblDyneVec; + CompRel, numerator, denominator, compscore : double; + colnoselected : IntDyneVec; + outline, cellstring : string; + title : string; + RowLabels : StrDyneVec; + errorcode : boolean; +begin + SetLength(colnoselected,NoVariables); + SetLength(Rmat,NoVariables+1,NoVariables+1); + SetLength(RelMat,NoVariables+1,NoVariables+1); + SetLength(Weights,NoVariables); + SetLength(Reliabilities,NoVariables); + SetLength(VectProd,NoVariables); + SetLength(means,NoVariables); + SetLength(variances,NoVariables); + SetLength(stddevs,NoVariables); + SetLength(RowLabels,NoVariables); + + OutPutFrm.RichEdit.Clear; + // get variable col. no.s selected + NoVars := ItemList.Items.Count; + for i := 1 to NoVars do + begin + cellstring := ItemList.Items.Strings[i-1]; + for j := 1 to NoVariables do + begin + if (cellstring = OS3MainFrm.DataGrid.Cells[j,0]) then + begin + colnoselected[i-1] := j; + RowLabels[i-1] := cellstring; + end; + end; + end; + count := NoCases; + + OutPutFrm.RichEdit.Lines.Add('Composite Test Reliability'); + OutPutFrm.RichEdit.Lines.Add(''); + outline := 'File Analyzed: ' + OS3MainFrm.FileNameEdit.Text; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + // get correlation matrix + Correlations(NoVars,colnoselected,Rmat,means,variances,stddevs,errorcode,count); + if (errorcode) then + ShowMessage('ERROR! Zero variance found for a variable.'); + if RmatChk.Checked then + begin + title := 'Correlations Among Tests'; + MAT_PRINT(Rmat,NoVars,NoVars,title,RowLabels,RowLabels,count); + title := 'Means'; + DynVectorPrint(means,NoVars,title,RowLabels,count); + title := 'Variances'; + DynVectorPrint(variances,NoVars,title,RowLabels,count); + title := 'Standard Deviations'; + DynVectorPrint(stddevs,NoVars,title,RowLabels,count); + end; + for i := 1 to NoVars do + for j := 1 to NoVars do + RelMat[i-1,j-1] := Rmat[i-1,j-1]; + for i := 1 to NoVars do + begin + Reliabilities[i-1] := StrToFloat(RelList.Items.Strings[i-1]); + RelMat[i-1,i-1] := Reliabilities[i-1]; + Weights[i-1] := StrToFloat(WeightList.Items.Strings[i-1]); + end; + // get numerator and denominator of composite reliability + for i := 1 to NoVars do VectProd[i-1] := 0.0; + numerator := 0.0; + denominator := 0.0; + for i := 1 to NoVars do + for j := 1 to NoVars do + VectProd[i-1] := VectProd[i-1] + (Weights[i-1] * RelMat[j-1,i-1]); + for i := 1 to NoVars do numerator := numerator + (VectProd[i-1] * Weights[i-1]); + + for i := 1 to NoVars do VectProd[i-1] := 0.0; + for i := 1 to NoVars do + for j := 1 to NoVars do + VectProd[i-1] := VectProd[i-1] + (Weights[i-1] * Rmat[j-1,i-1]); + for i := 1 to NoVars do denominator := denominator + + (VectProd[i-1] * Weights[i-1]); + CompRel := numerator / denominator; + OutPutFrm.RichEdit.Lines.Add(''); + title := 'Test Weights'; + DynVectorPrint(Weights,NoVars,title,RowLabels,count); + title := 'Test Reliabilities'; + DynVectorPrint(Reliabilities,NoVars,title,RowLabels,count); + outline := format('Composite reliability = %6.3f',[CompRel]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + if GridScrChk.Checked then + begin + cellstring := 'Composite'; + col := NoVariables + 1; + DictionaryFrm.NewVar(col); + DictionaryFrm.DictGrid.Cells[1,col] := cellstring; + col := NoVariables; + OS3MainFrm.DataGrid.Cells[col,0] := cellstring; + col := NoVariables; + for i := 1 to NoCases do + begin + compscore := 0.0; + if not GoodRecord(i,NoVars,ColNoSelected) then continue; + for j := 1 to NoVars do + begin + compscore := compscore + (Weights[j-1] * + StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[colnoselected[j-1],i]))); + end; + OS3MainFrm.DataGrid.Cells[col,i] := FloatToStr(compscore); + end; + end; + + RowLabels := nil; + stddevs := nil; + variances := nil; + means := nil; + VectProd := nil; + Reliabilities := nil; + Weights := nil; + RelMat := nil; + Rmat := nil; + colnoselected := nil; +end; + +procedure TCompRelFrm.InBtnClick(Sender: TObject); +var + index, i : integer; + cellstring : string; +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]); + cellstring := '1.0'; + RelList.Items.Add(cellstring); + WeightList.Items.Add(cellstring); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + OutBtn.Visible := true; +end; + +procedure TCompRelFrm.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); + RelList.Items.Delete(index); + WeightList.Items.Delete(index); +end; + +procedure TCompRelFrm.RelListClick(Sender: TObject); +var + response : string; + index : integer; +begin + response := InputBox('Reliability','Reliability estimate = ','1.0'); + index := RelList.ItemIndex; + RelList.Items.Strings[index] := response; +end; + +initialization + {$I comprelunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/COMPRELUNIT.lfm b/applications/lazstats/source_orig/COMPRELUNIT.lfm new file mode 100644 index 000000000..298ccd291 --- /dev/null +++ b/applications/lazstats/source_orig/COMPRELUNIT.lfm @@ -0,0 +1,250 @@ +object CompRelFrm: TCompRelFrm + Left = 123 + Height = 347 + Top = 127 + Width = 602 + Caption = 'Composite Test Reliability' + ClientHeight = 347 + ClientWidth = 602 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 6 + Height = 14 + Top = 8 + Width = 90 + Caption = 'Variables Available' + ParentColor = False + end + object Label2: TLabel + Left = 207 + Height = 14 + Top = 8 + Width = 72 + Caption = 'Selected Items' + ParentColor = False + end + object Label3: TLabel + Left = 377 + Height = 14 + Top = 8 + Width = 70 + Caption = 'Test Reliability' + ParentColor = False + end + object Label4: TLabel + Left = 488 + Height = 14 + Top = 8 + Width = 64 + Caption = 'Test Weights' + ParentColor = False + end + object VarList: TListBox + Left = 7 + Height = 230 + Top = 23 + Width = 151 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object InBtn: TBitBtn + Left = 168 + Height = 29 + Top = 24 + 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 = 168 + Height = 29 + 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 = 168 + Height = 29 + Top = 104 + Width = 30 + Caption = 'ALL' + NumGlyphs = 0 + OnClick = AllBtnClick + TabOrder = 3 + end + object ItemList: TListBox + Left = 204 + Height = 228 + Top = 25 + Width = 164 + ItemHeight = 0 + TabOrder = 4 + end + object RelList: TListBox + Left = 374 + Height = 228 + Top = 24 + Width = 105 + ItemHeight = 0 + OnClick = RelListClick + TabOrder = 5 + end + object WeightList: TListBox + Left = 487 + Height = 229 + Top = 25 + Width = 103 + ItemHeight = 0 + OnClick = WeightListClick + TabOrder = 6 + end + object GroupBox1: TGroupBox + Left = 376 + Height = 58 + Top = 262 + Width = 215 + Caption = 'Options' + ClientHeight = 40 + ClientWidth = 211 + TabOrder = 7 + object RMatChk: TCheckBox + Left = 8 + Height = 17 + Top = 2 + Width = 153 + Caption = 'Print Intercorrelation Matrix' + TabOrder = 0 + end + object GridScrChk: TCheckBox + Left = 8 + Height = 17 + Top = 22 + Width = 152 + Caption = 'Put Composite Score in Grid' + TabOrder = 1 + end + end + object ResetBtn: TButton + Left = 104 + Height = 32 + Top = 264 + Width = 78 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 8 + end + object CancelBtn: TButton + Left = 200 + Height = 32 + Top = 264 + Width = 78 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 9 + end + object ComputeBtn: TButton + Left = 8 + Height = 32 + Top = 304 + Width = 78 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 10 + end + object ReturnBtn: TButton + Left = 104 + Height = 32 + Top = 304 + Width = 78 + Caption = 'Return' + ModalResult = 1 + TabOrder = 11 + end + object HelpBtn: TButton + Tag = 114 + Left = 8 + Height = 32 + Top = 264 + Width = 80 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 12 + end +end diff --git a/applications/lazstats/source_orig/COMPRELUNIT.lrs b/applications/lazstats/source_orig/COMPRELUNIT.lrs new file mode 100644 index 000000000..636e3fa1d --- /dev/null +++ b/applications/lazstats/source_orig/COMPRELUNIT.lrs @@ -0,0 +1,141 @@ +LazarusResources.Add('TCompRelFrm','FORMDATA',[ + 'TPF0'#11'TCompRelFrm'#10'CompRelFrm'#4'Left'#2'{'#6'Height'#3'['#1#3'Top'#2 + +#127#5'Width'#3'Z'#2#7'Caption'#6#26'Composite Test Reliability'#12'ClientHe' + +'ight'#3'['#1#11'ClientWidth'#3'Z'#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6 + +#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#6#6'Height'#2#14#3'Top'#2#8#5'W' + +'idth'#2'Z'#7'Caption'#6#19'Variables Available'#11'ParentColor'#8#0#0#6'TLa' + +'bel'#6'Label2'#4'Left'#3#207#0#6'Height'#2#14#3'Top'#2#8#5'Width'#2'H'#7'Ca' + +'ption'#6#14'Selected Items'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Lef' + +'t'#3'y'#1#6'Height'#2#14#3'Top'#2#8#5'Width'#2'F'#7'Caption'#6#16'Test Reli' + +'ability'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#3#232#1#6'Height' + +#2#14#3'Top'#2#8#5'Width'#2'@'#7'Caption'#6#12'Test Weights'#11'ParentColor' + +#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#7#6'Height'#3#230#0#3'Top'#2#23#5'Wi' + +'dth'#3#151#0#10'ItemHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#7'TBi' + +'tBtn'#5'InBtn'#4'Left'#3#168#0#6'Height'#2#29#3'Top'#2#24#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'InBtnCli' + +'ck'#8'TabOrder'#2#1#0#0#7'TBitBtn'#6'OutBtn'#4'Left'#3#168#0#6'Height'#2#29 + ,#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#127#204#138#255#162#216#171#255#158#214#167#255#154 + +#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255 + +#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201 + +#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O' + +#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num' + +'Glyphs'#2#0#7'OnClick'#7#11'OutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#6'A' + +'llBtn'#4'Left'#3#168#0#6'Height'#2#29#3'Top'#2'h'#5'Width'#2#30#7'Caption'#6 + +#3'ALL'#9'NumGlyphs'#2#0#7'OnClick'#7#11'AllBtnClick'#8'TabOrder'#2#3#0#0#8 + +'TListBox'#8'ItemList'#4'Left'#3#204#0#6'Height'#3#228#0#3'Top'#2#25#5'Width' + +#3#164#0#10'ItemHeight'#2#0#8'TabOrder'#2#4#0#0#8'TListBox'#7'RelList'#4'Lef' + +'t'#3'v'#1#6'Height'#3#228#0#3'Top'#2#24#5'Width'#2'i'#10'ItemHeight'#2#0#7 + +'OnClick'#7#12'RelListClick'#8'TabOrder'#2#5#0#0#8'TListBox'#10'WeightList'#4 + +'Left'#3#231#1#6'Height'#3#229#0#3'Top'#2#25#5'Width'#2'g'#10'ItemHeight'#2#0 + +#7'OnClick'#7#15'WeightListClick'#8'TabOrder'#2#6#0#0#9'TGroupBox'#9'GroupBo' + +'x1'#4'Left'#3'x'#1#6'Height'#2':'#3'Top'#3#6#1#5'Width'#3#215#0#7'Caption'#6 + +#7'Options'#12'ClientHeight'#2'('#11'ClientWidth'#3#211#0#8'TabOrder'#2#7#0#9 + +'TCheckBox'#7'RMatChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2#2#5'Width'#3#153#0 + +#7'Caption'#6#29'Print Intercorrelation Matrix'#8'TabOrder'#2#0#0#0#9'TCheck' + +'Box'#10'GridScrChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2#22#5'Width'#3#152#0 + ,#7'Caption'#6#27'Put Composite Score in Grid'#8'TabOrder'#2#1#0#0#0#7'TButto' + +'n'#8'ResetBtn'#4'Left'#2'h'#6'Height'#2' '#3'Top'#3#8#1#5'Width'#2'N'#7'Cap' + +'tion'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#8#0#0#7'TButt' + +'on'#9'CancelBtn'#4'Left'#3#200#0#6'Height'#2' '#3'Top'#3#8#1#5'Width'#2'N'#7 + +'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#9#0#0#7'TButton'#10 + +'ComputeBtn'#4'Left'#2#8#6'Height'#2' '#3'Top'#3'0'#1#5'Width'#2'N'#7'Captio' + +'n'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#10#0#0#7'TBu' + +'tton'#9'ReturnBtn'#4'Left'#2'h'#6'Height'#2' '#3'Top'#3'0'#1#5'Width'#2'N'#7 + +'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#11#0#0#7'TButton'#7 + +'HelpBtn'#3'Tag'#2'r'#4'Left'#2#8#6'Height'#2' '#3'Top'#3#8#1#5'Width'#2'P'#7 + +'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2#12#0#0#0 +]); diff --git a/applications/lazstats/source_orig/CONCORDANCE.PAS b/applications/lazstats/source_orig/CONCORDANCE.PAS new file mode 100644 index 000000000..952cee24b --- /dev/null +++ b/applications/lazstats/source_orig/CONCORDANCE.PAS @@ -0,0 +1,368 @@ +unit Concordance; + +{$MODE Delphi} + +interface + +uses + LCLIntf, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, Buttons, OS3MainUnit, GLOBALS, OUTPUTUNIT, DATAPROCS, Math, + FUNCTIONSLIB, LResources; + +type + TConcordFrm = class(TForm) + Label1: TLabel; + VarList: TListBox; + InBtn: TBitBtn; + OutBtn: TBitBtn; + AllBtn: TBitBtn; + Label2: TLabel; + ListBox1: TListBox; + ResetBtn: TButton; + CancelBtn: TButton; + OKBtn: TButton; + ComputeBtn: TButton; + Memo1: TMemo; + procedure ResetBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure CancelBtnClick(Sender: TObject); + procedure OKBtnClick(Sender: TObject); + procedure InBtnClick(Sender: TObject); + procedure OutBtnClick(Sender: TObject); + procedure AllBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + ConcordFrm: TConcordFrm; + +implementation + + +procedure TConcordFrm.ResetBtnClick(Sender: TObject); +var + i: integer; +begin + VarList.Clear; + ListBox1.Clear; + for i := 1 to NoVariables do + begin + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); + end; + InBtn.Enabled := true; + OutBtn.Enabled := false; +end; +//------------------------------------------------------------------- + +procedure TConcordFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; +//------------------------------------------------------------------- + +procedure TConcordFrm.CancelBtnClick(Sender: TObject); +begin + ConcordFrm.Hide; +end; +//------------------------------------------------------------------- + +procedure TConcordFrm.OKBtnClick(Sender: TObject); +begin + ConcordFrm.Hide; +end; +//------------------------------------------------------------------- + +procedure TConcordFrm.InBtnClick(Sender: TObject); +var + index, i : integer; + +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + ListBox1.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + + OutBtn.Enabled := true; +end; +//------------------------------------------------------------------- + +procedure TConcordFrm.OutBtnClick(Sender: TObject); +var + index: integer; + +begin + index := ListBox1.ItemIndex; + VarList.Items.Add(ListBox1.Items.Strings[index]); + ListBox1.Items.Delete(index); + InBtn.Enabled := true; +end; +//------------------------------------------------------------------- + +procedure TConcordFrm.AllBtnClick(Sender: TObject); +var + count, index : integer; +begin + count := VarList.Items.Count; + if count = 0 then exit; + for index := 0 to count-1 do + begin + ListBox1.Items.Add(VarList.Items.Strings[index]); + end; + VarList.Clear; + InBtn.Visible := false; + OutBtn.Visible := true; +end; +//------------------------------------------------------------------- + +procedure TConcordFrm.ComputeBtnClick(Sender: TObject); +var + i, j, k, index, No_Judges, No_Objects, col, ties, start, last : integer; + NoSelected : integer; + Temp, TotalCorrect, JudgeCorrect, ChiSquare, Probability : double; + TotalRankSums, Concordance, AvgRankCorr, AvgTotalRanks : double; + statistic : double; + scorearray : DblDyneMat; + temprank, ObjRankSums : DblDyneVec; + tempindex : IntDyneVec; + done : boolean; + value, cellstring, outline : string; + ColNoSelected : IntDyneVec; + ColLabels : StrDyneVec; + +begin + No_Judges := 0; + No_Objects := ListBox1.Items.Count; + + // Allocate space for selected variable column no.s + SetLength(scorearray,NoCases,No_Objects); + SetLength(tempindex,No_Objects); + SetLength(temprank,No_Objects); + SetLength(ObjRankSums,No_Objects); + SetLength(ColLabels,NoVariables); + SetLength(ColNoSelected,NoVariables); + + // get columns of variables selected + for i := 0 to No_Objects - 1 do + begin + cellstring := ListBox1.Items.Strings[i]; + for index := 1 to NoVariables do + begin + if (cellstring = OS3MainFrm.DataGrid.Cells[index,0]) then + begin + ColNoSelected[i] := index; + ColLabels[i] := cellstring; + end; + end; + end; + + //Read data from grid + for i := 1 to NoCases do + begin + if (not GoodRecord(i,No_Objects,ColNoSelected)) then continue; + No_Judges := No_Judges + 1; + for j := 1 to No_Objects do + begin + col := ColNoSelected[j-1]; + scorearray[i-1,j-1] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col,i])); + end; + end; + + //Rank the scores in the rows for each judge (column) + TotalCorrect := 0.0; + for i := 0 to No_Judges-1 do + begin + JudgeCorrect := 0.0; + for j := 0 to No_Objects-1 do + begin + tempindex[j] := j; + temprank[j] := scorearray[i,j]; + end; + //Sort the temp arrays + for j := 0 to No_Objects - 2 do + begin + for k := j + 1 to No_Objects - 1 do + begin + if (temprank[j] > temprank[k]) then + begin + Temp := temprank[j]; + temprank[j] := temprank[k]; + temprank[k] := Temp; + index := tempindex[j]; + tempindex[j] := tempindex[k]; + tempindex[k] := index; + end; + end; + end; + + //Now convert temporary score array to ranks (correcting for ties) + j := 0; + while (j <= No_Objects-1) do + begin + ties := 0; + k := j; + done := false; + while (not done) do + begin + k := k + 1; + if (k <= No_Objects-1) then + begin + if (temprank[j] = temprank[k]) then ties := ties + 1; + end + else done := true; + end; + if (ties = 0.0) then + begin + temprank[j] := j+1; + j := j + 1; + end + else begin + for k := j to j + ties do + begin + temprank[k] := (j+1) + (ties / 2.0); + end; + j := j + ties + 1; + ties := ties + 1; + JudgeCorrect := JudgeCorrect + (Power(ties,3) - ties); + end; + end; + + //Now, restore ranks in their position equivalent to original scores + for j := 0 to No_Objects-1 do + begin + k := tempindex[j]; + scorearray[i,k] := temprank[j]; + end; + TotalCorrect := TotalCorrect + (JudgeCorrect / 12.0); + end; // next judge i + + //Calculate statistics + statistic := 0.0; + TotalRankSums := 0.0; + for j := 0 to No_Objects-1 do + begin + ObjRankSums[j] := 0.0; + for i := 0 to No_Judges-1 do ObjRankSums[j] := ObjRankSums[j] + scorearray[i,j]; + TotalRankSums := TotalRankSums + ObjRankSums[j]; + end; + AvgTotalRanks := TotalRankSums / No_Objects; + for j := 0 to No_Objects-1 do + statistic := statistic + Power((ObjRankSums[j] - AvgTotalRanks), 2); + Concordance := statistic / ( ((No_Judges * No_Judges) / 12.0) * + (Power(No_Objects,3) - No_Objects) - (No_Judges * TotalCorrect) ); + AvgRankCorr := (No_Judges * Concordance - 1.0) / (No_Judges - 1); + ChiSquare := No_Judges * Concordance * (No_Objects - 1); + Probability := 1.0 - chisquaredprob(ChiSquare, No_Objects - 1); + + //Report results + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Kendall Coefficient of Concordance Analysis'); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Ranks Assigned to Judge Ratings of Objects'); + OutPutFrm.RichEdit.Lines.Add(''); + + for i := 1 to No_Judges do + begin + done := false; + start := 1; + last := 10; + while (not done) do + begin + if (last > No_Objects)then last := No_Objects; + outline := format('Judge %3d',[i]); + outline := outline + ' Objects'; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + for j := start to last do + begin + col := ColNoSelected[j-1]; + outline := outline + format('%8s',[ColLabels[col-1]]); + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + for j := start to last do + begin + value := format('%8.4f',[scorearray[i-1,j-1]]); + outline := outline + value; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + if (last = No_Objects) then done := true + else begin + start := last; + last := start + 10; + end; + outline := ''; + end; // while end + OutPutFrm.RichEdit.Lines.Add(''); + end; // next i + + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Sum of Ranks for Each Object Judged'); + done := false; + start := 1; + last := 10; + while (not done) do + begin + if (last > No_Objects) then last := No_Objects; + OutPutFrm.RichEdit.Lines.Add(' Objects'); + outline := ' '; + for j := start to last do + begin + col := ColNoSelected[j-1]; + value := format('%8s',[ColLabels[col-1]]); + outline := outline + value; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + for j := start to last do + begin + value := format('%8.4f',[ObjRankSums[j-1]]); + outline := outline + value; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + if (last = No_Objects) then done := true + else begin + start := last; + last := start + 10; + end; + end; + outline := format('Coefficient of concordance := %10.3f',[Concordance]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Average Spearman Rank Correlation := %10.3f',[AvgRankCorr]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Chi-Square Statistic := %8.3f',[ChiSquare]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Probability of a larger Chi-Square := %6.4f',[Probability]); + OutPutFrm.RichEdit.Lines.Add(outline); + if (No_Objects < 7) then + OutPutFrm.RichEdit.Lines.Add('Warning - Above Chi-Square is very approximate with 7 or fewer variables!'); + OutPutFrm.ShowModal; + + // cleanup + ColNoSelected := nil; + ColLabels := nil; + ObjRankSums := nil; + temprank := nil; + tempindex := nil; + scorearray := nil; +end; +//------------------------------------------------------------------- + +initialization + {$i CONCORDANCE.lrs} + {$i CONCORDANCE.lrs} + +end. diff --git a/applications/lazstats/source_orig/CONCORDANCE.lfm b/applications/lazstats/source_orig/CONCORDANCE.lfm new file mode 100644 index 000000000..77109e562 --- /dev/null +++ b/applications/lazstats/source_orig/CONCORDANCE.lfm @@ -0,0 +1,164 @@ +object ConcordFrm: TConcordFrm + Left = 77 + Top = 80 + HelpContext = 1305 + BorderStyle = bsDialog + Caption = 'Kendal''s Coefficient of Concordance' + ClientHeight = 243 + ClientWidth = 536 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + HelpFile = 'OS2Help.hlp' + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 24 + Top = 8 + Width = 92 + Height = 13 + Caption = 'Available Variables:' + end + object Label2: TLabel + Left = 200 + Top = 8 + Width = 91 + Height = 13 + Caption = 'Selected Variables:' + end + object VarList: TListBox + Left = 8 + Top = 24 + Width = 129 + Height = 201 + ItemHeight = 13 + MultiSelect = True + TabOrder = 0 + end + object InBtn: TBitBtn + Left = 144 + Top = 32 + Width = 33 + Height = 33 + TabOrder = 1 + OnClick = InBtnClick + Glyph.Data = { + 76010000424D7601000000000000760000002800000020000000100000000100 + 04000000000000010000120B0000120B00001000000000000000000000000000 + 800000800000008080008000000080008000808000007F7F7F00BFBFBF000000 + FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333 + 3333333333333333333333333333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333FF3333333333333003333 + 3333333333773FF3333333333309003333333333337F773FF333333333099900 + 33333FFFFF7F33773FF30000000999990033777777733333773F099999999999 + 99007FFFFFFF33333F7700000009999900337777777F333F7733333333099900 + 33333333337F3F77333333333309003333333333337F77333333333333003333 + 3333333333773333333333333333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333333333333 + } + NumGlyphs = 2 + end + object OutBtn: TBitBtn + Left = 144 + Top = 72 + Width = 33 + Height = 33 + TabOrder = 2 + OnClick = OutBtnClick + Glyph.Data = { + 76010000424D7601000000000000760000002800000020000000100000000100 + 04000000000000010000120B0000120B00001000000000000000000000000000 + 800000800000008080008000000080008000808000007F7F7F00BFBFBF000000 + FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333 + 3333333333333333333333333333333333333333333333333333333333333333 + 3333333333333FF3333333333333003333333333333F77F33333333333009033 + 333333333F7737F333333333009990333333333F773337FFFFFF330099999000 + 00003F773333377777770099999999999990773FF33333FFFFF7330099999000 + 000033773FF33777777733330099903333333333773FF7F33333333333009033 + 33333333337737F3333333333333003333333333333377333333333333333333 + 3333333333333333333333333333333333333333333333333333333333333333 + 3333333333333333333333333333333333333333333333333333 + } + NumGlyphs = 2 + end + object AllBtn: TBitBtn + Left = 144 + Top = 136 + Width = 33 + Height = 33 + Caption = 'ALL' + TabOrder = 3 + OnClick = AllBtnClick + end + object ListBox1: TListBox + Left = 184 + Top = 24 + Width = 137 + Height = 201 + ItemHeight = 13 + TabOrder = 4 + end + object ResetBtn: TButton + Left = 336 + Top = 179 + Width = 65 + Height = 25 + Caption = 'Reset' + TabOrder = 5 + OnClick = ResetBtnClick + end + object CancelBtn: TButton + Left = 456 + Top = 179 + Width = 65 + Height = 25 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 6 + OnClick = CancelBtnClick + end + object OKBtn: TButton + Left = 456 + Top = 211 + Width = 65 + Height = 25 + Caption = 'Return' + ModalResult = 1 + TabOrder = 7 + OnClick = OKBtnClick + end + object ComputeBtn: TButton + Left = 336 + Top = 211 + Width = 65 + Height = 25 + Caption = 'Compute' + TabOrder = 8 + OnClick = ComputeBtnClick + end + object Memo1: TMemo + Left = 336 + Top = 0 + Width = 185 + Height = 169 + Lines.Strings = ( + 'Directions: A Judge''s ratings or ' + 'observations are recorded' + 'as Variables (columns) 1 through k. ' + 'Each line corresponds to a different ' + 'judge (person making the rating.) ' + 'Select the variables from the left list ' + 'to analyze and click on the right ' + 'arrow.' + 'Click on the left arrow to remove any ' + 'variables NOT to be analyzed. Click ' + 'on the Compute button to obtain the' + 'results. ' + ) + TabOrder = 9 + end +end diff --git a/applications/lazstats/source_orig/CONCORDANCE.lrs b/applications/lazstats/source_orig/CONCORDANCE.lrs new file mode 100644 index 000000000..4556a2aea --- /dev/null +++ b/applications/lazstats/source_orig/CONCORDANCE.lrs @@ -0,0 +1,56 @@ +LazarusResources.Add('TConcordFrm','FORMDATA',[ + 'TPF0'#11'TConcordFrm'#10'ConcordFrm'#4'Left'#2'M'#3'Top'#2'P'#11'HelpContext' + +#3#25#5#11'BorderStyle'#7#8'bsDialog'#7'Caption'#6'#Kendal''s Coefficient of' + +' Concordance'#12'ClientHeight'#3#243#0#11'ClientWidth'#3#24#2#5'Color'#7#9 + +'clBtnFace'#12'Font.Charset'#7#15'DEFAULT_CHARSET'#10'Font.Color'#7#12'clWin' + +'dowText'#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans Serif'#10'Font.Sty' + +'le'#11#0#8'HelpFile'#6#11'OS2Help.hlp'#6'OnShow'#7#8'FormShow'#13'PixelsPer' + +'Inch'#2'`'#10'TextHeight'#2#13#0#6'TLabel'#6'Label1'#4'Left'#2#24#3'Top'#2#8 + +#5'Width'#2'\'#6'Height'#2#13#7'Caption'#6#20'Available Variables:'#0#0#6'TL' + +'abel'#6'Label2'#4'Left'#3#200#0#3'Top'#2#8#5'Width'#2'['#6'Height'#2#13#7'C' + +'aption'#6#19'Selected Variables:'#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#3 + +'Top'#2#24#5'Width'#3#129#0#6'Height'#3#201#0#10'ItemHeight'#2#13#11'MultiSe' + +'lect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#5'InBtn'#4'Left'#3#144#0#3'Top'#2' ' + +#5'Width'#2'!'#6'Height'#2'!'#8'TabOrder'#2#1#7'OnClick'#7#10'InBtnClick'#10 + +'Glyph.Data'#10'z'#1#0#0'v'#1#0#0'BMv'#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0' '#0#0 + +#0#16#0#0#0#1#0#4#0#0#0#0#0#0#1#0#0#18#11#0#0#18#11#0#0#16#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0''#0 + +#191#191#191#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255 + +#0#0#255#255#255#0'333333333333333333333333333333333333333333333333333333333' + +'33?'#243'333333'#0'3333333w?'#243'33333'#9#0'333333w?'#243'3333'#9#153#0'3' + +'3?'#255#255'3w?'#243#0#0#0#9#153#153#0'3wwws33w?'#9#153#153#153#153#153#153 + +#0''#255#255#255'33?w'#0#0#0#9#153#153#0'3www3?w3333'#9#153#0'33333?w3333' + +'3'#9#0'333333w333333'#0'3333333w333333333333333333333333333333333333333333' + +'3333333333'#9'NumGlyphs'#2#2#0#0#7'TBitBtn'#6'OutBtn'#4'Left'#3#144#0#3'Top' + +#2'H'#5'Width'#2'!'#6'Height'#2'!'#8'TabOrder'#2#2#7'OnClick'#7#11'OutBtnCli' + +'ck'#10'Glyph.Data'#10'z'#1#0#0'v'#1#0#0'BMv'#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0 + +' '#0#0#0#16#0#0#0#1#0#4#0#0#0#0#0#0#1#0#0#18#11#0#0#18#11#0#0#16#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0 + +''#0#191#191#191#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0 + +#255#255#0#0#255#255#255#0'33333333333333333333333333333333333333333333?'#243 + +'333333'#0'333333?w'#243'33333'#0#144'33333?w7'#243'3333'#0#153#144'3333?w37' + +#255#255#255'3'#0#153#153#144#0#0#0'?w337www'#0#153#153#153#153#153#153#144 + +'w?'#243'33'#255#255#247'3'#0#153#153#144#0#0#0'3w?'#243'7www33'#0#153#144'3' + +'3333w?'#247#243'33333'#0#144'333333w7'#243'333333'#0'3333333w33333333333333' + +'33333333333333333333333333333333333333333333333333333'#9'NumGlyphs'#2#2#0#0 + +#7'TBitBtn'#6'AllBtn'#4'Left'#3#144#0#3'Top'#3#136#0#5'Width'#2'!'#6'Height' + +#2'!'#7'Caption'#6#3'ALL'#8'TabOrder'#2#3#7'OnClick'#7#11'AllBtnClick'#0#0#8 + +'TListBox'#8'ListBox1'#4'Left'#3#184#0#3'Top'#2#24#5'Width'#3#137#0#6'Height' + +#3#201#0#10'ItemHeight'#2#13#8'TabOrder'#2#4#0#0#7'TButton'#8'ResetBtn'#4'Le' + +'ft'#3'P'#1#3'Top'#3#179#0#5'Width'#2'A'#6'Height'#2#25#7'Caption'#6#5'Reset' + +#8'TabOrder'#2#5#7'OnClick'#7#13'ResetBtnClick'#0#0#7'TButton'#9'CancelBtn'#4 + +'Left'#3#200#1#3'Top'#3#179#0#5'Width'#2'A'#6'Height'#2#25#7'Caption'#6#6'Ca' + +'ncel'#11'ModalResult'#2#2#8'TabOrder'#2#6#7'OnClick'#7#14'CancelBtnClick'#0 + +#0#7'TButton'#5'OKBtn'#4'Left'#3#200#1#3'Top'#3#211#0#5'Width'#2'A'#6'Height' + +#2#25#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#7#7'OnClick'#7 + +#10'OKBtnClick'#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3'P'#1#3'Top'#3#211#0#5 + +'Width'#2'A'#6'Height'#2#25#7'Caption'#6#7'Compute'#8'TabOrder'#2#8#7'OnClic' + +'k'#7#15'ComputeBtnClick'#0#0#5'TMemo'#5'Memo1'#4'Left'#3'P'#1#3'Top'#2#0#5 + +'Width'#3#185#0#6'Height'#3#169#0#13'Lines.Strings'#1#6'#Directions: A Jud' + +'ge''s ratings or '#6#25'observations are recorded'#6'%as Variables (columns' + +') 1 through k. '#6'%Each line corresponds to a different '#6'#judge (perso' + +'n making the rating.) '#6'(Select the variables from the left list '#6'"to' + +' analyze and click on the right '#6#6'arrow.'#6'&Click on the left arrow to' + +' remove any '#6'%variables NOT to be analyzed. Click '#6'#on the Compute b' + +'utton to obtain the'#6#9'results. '#0#8'TabOrder'#2#9#0#0#0 +]); diff --git a/applications/lazstats/source_orig/CompTestUnit.lfm b/applications/lazstats/source_orig/CompTestUnit.lfm new file mode 100644 index 000000000..26d96610f --- /dev/null +++ b/applications/lazstats/source_orig/CompTestUnit.lfm @@ -0,0 +1,124 @@ +object CompTestFrm: TCompTestFrm + Left = 32 + Top = 62 + Width = 389 + Height = 235 + Caption = 'Computer Administered Test' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OnShow = FormShow + PixelsPerInch = 96 + object Label1: TLabel + Left = 8 + Top = 48 + Width = 110 + Height = 13 + Caption = 'Enter your LAST name:' + end + object Label2: TLabel + Left = 8 + Top = 144 + Width = 150 + Height = 13 + Caption = 'Save the results in a file named:' + end + object Label3: TLabel + Left = 8 + Top = 80 + Width = 114 + Height = 13 + Caption = 'Enter your FIRST name:' + end + object Label4: TLabel + Left = 8 + Top = 112 + Width = 154 + Height = 13 + Caption = 'Enter your Identification Number:' + end + object LastNameEdit: TEdit + Left = 192 + Top = 40 + Width = 177 + Height = 21 + TabOrder = 2 + end + object TestNameEdit: TEdit + Left = 192 + Top = 8 + Width = 177 + Height = 21 + TabOrder = 1 + end + object CancelBtn: TButton + Left = 8 + Top = 176 + Width = 73 + Height = 25 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 7 + OnClick = CancelBtnClick + end + object StartBtn: TButton + Left = 152 + Top = 176 + Width = 73 + Height = 25 + Caption = 'Start Test' + TabOrder = 6 + OnClick = StartBtnClick + end + object ExitBtn: TButton + Left = 296 + Top = 176 + Width = 73 + Height = 25 + Caption = 'Exit' + ModalResult = 1 + TabOrder = 8 + OnClick = ExitBtnClick + end + object Button1: TButton + Left = 8 + Top = 8 + Width = 145 + Height = 25 + Caption = 'Click to find test files' + TabOrder = 0 + OnClick = Button1Click + end + object SaveFileEdit: TEdit + Left = 192 + Top = 136 + Width = 177 + Height = 21 + TabOrder = 5 + end + object FirstNameEdit: TEdit + Left = 192 + Top = 72 + Width = 177 + Height = 21 + TabOrder = 3 + end + object IDnoEdit: TEdit + Left = 192 + Top = 104 + Width = 177 + Height = 21 + TabOrder = 4 + end + object OpenDialog1: TOpenDialog + Left = 240 + Top = 176 + end + object SaveDialog1: TSaveDialog + Left = 104 + Top = 176 + end +end diff --git a/applications/lazstats/source_orig/CompletionItemUnit.lfm b/applications/lazstats/source_orig/CompletionItemUnit.lfm new file mode 100644 index 000000000..604b06a1e --- /dev/null +++ b/applications/lazstats/source_orig/CompletionItemUnit.lfm @@ -0,0 +1,288 @@ +object CompletionItemFrm: TCompletionItemFrm + Left = 100 + Top = 108 + HelpContext = 1850 + BorderStyle = bsDialog + Caption = 'Blank Completion Item Specification' + ClientHeight = 384 + ClientWidth = 591 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + HelpFile = 'ITEMBANKHELP.HLP' + OnShow = FormShow + PixelsPerInch = 96 + object Label2: TLabel + Left = 16 + Top = 8 + Width = 63 + Height = 13 + Caption = 'Item Number:' + end + object Label1: TLabel + Left = 160 + Top = 8 + Width = 281 + Height = 13 + Caption = 'Click on the Item Classification Code listed in the box below.' + end + object Label14: TLabel + Left = 16 + Top = 64 + Width = 89 + Height = 13 + Caption = 'Bit Map File Name:' + end + object Label15: TLabel + Left = 16 + Top = 88 + Width = 72 + Height = 13 + Caption = 'Image (if used):' + end + object Label16: TLabel + Left = 120 + Top = 80 + Width = 97 + Height = 13 + Caption = '(Thumb Nail Sketch)' + end + object BMPImage: TImage + Left = 112 + Top = 96 + Width = 121 + Height = 97 + Center = True + Stretch = True + end + object Label18: TLabel + Left = 248 + Top = 96 + Width = 60 + Height = 13 + Caption = 'Item Weight:' + end + object Label3: TLabel + Left = 16 + Top = 200 + Width = 47 + Height = 13 + Caption = 'Item Stem' + end + object Label4: TLabel + Left = 16 + Top = 312 + Width = 89 + Height = 13 + Caption = 'Suggested Answer' + end + object ItemNoEdit: TEdit + Left = 104 + Top = 0 + Width = 41 + Height = 21 + TabOrder = 0 + end + object ItemNoScroll: TScrollBar + Left = 16 + Top = 28 + Width = 129 + Height = 16 + Max = 1000 + PageSize = 0 + TabOrder = 1 + OnScroll = ItemNoScrollScroll + end + object CodeCombo: TComboBox + Left = 160 + Top = 24 + Width = 417 + Height = 21 + ItemHeight = 13 + TabOrder = 2 + Text = 'Classification Code' + end + object BMPFileEdit: TEdit + Left = 112 + Top = 56 + Width = 465 + Height = 21 + TabOrder = 3 + Text = 'BMPFileEdit' + end + object BrowseBtn: TButton + Left = 24 + Top = 112 + Width = 57 + Height = 25 + Caption = 'Browse' + TabOrder = 4 + OnClick = BrowseBtnClick + end + object ClearBtn: TButton + Left = 24 + Top = 144 + Width = 57 + Height = 25 + Caption = 'Clear' + TabOrder = 5 + OnClick = ClearBtnClick + end + object ItemWeightEdit: TEdit + Left = 312 + Top = 96 + Width = 33 + Height = 21 + TabOrder = 6 + Text = 'ItemWeightEdit' + end + object Panel1: TPanel + Left = 408 + Top = 80 + Width = 169 + Height = 137 + TabOrder = 7 + object Label9: TLabel + Left = 6 + Top = 14 + Width = 78 + Height = 13 + Caption = 'Percent Passed:' + end + object Label10: TLabel + Left = 6 + Top = 38 + Width = 97 + Height = 13 + Caption = 'Log Difficulty (IRT1):' + end + object Label11: TLabel + Left = 6 + Top = 62 + Width = 86 + Height = 13 + Caption = 'Item Slope (IRT2):' + end + object Label12: TLabel + Left = 6 + Top = 86 + Width = 96 + Height = 13 + Caption = 'Item Chance (IRT3):' + end + object Label13: TLabel + Left = 6 + Top = 110 + Width = 76 + Height = 13 + Caption = 'Times Selected:' + end + object PcntEdit: TEdit + Left = 110 + Top = 6 + Width = 41 + Height = 21 + TabOrder = 0 + end + object IRT1Edit: TEdit + Left = 110 + Top = 30 + Width = 41 + Height = 21 + TabOrder = 1 + end + object IRT2Edit: TEdit + Left = 110 + Top = 54 + Width = 41 + Height = 21 + TabOrder = 2 + end + object IRT3Edit: TEdit + Left = 110 + Top = 78 + Width = 41 + Height = 21 + TabOrder = 3 + end + object NoSelEdit: TEdit + Left = 110 + Top = 102 + Width = 41 + Height = 21 + TabOrder = 4 + end + end + object StemMemo: TMemo + Left = 16 + Top = 224 + Width = 561 + Height = 73 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [] + MaxLength = 1000 + ParentFont = False + ScrollBars = ssVertical + TabOrder = 8 + WantTabs = True + WordWrap = False + end + object NewBtn: TButton + Left = 16 + Top = 355 + Width = 73 + Height = 25 + Caption = 'New Item' + TabOrder = 9 + OnClick = NewBtnClick + end + object SaveBtn: TButton + Left = 112 + Top = 355 + Width = 73 + Height = 25 + Caption = 'Save Item' + TabOrder = 10 + OnClick = SaveBtnClick + end + object DeleteBtn: TButton + Left = 208 + Top = 355 + Width = 73 + Height = 25 + Caption = 'Delete' + TabOrder = 11 + OnClick = DeleteBtnClick + end + object ReturnBtn: TButton + Left = 504 + Top = 355 + Width = 73 + Height = 25 + Caption = 'Return' + ModalResult = 1 + TabOrder = 12 + OnClick = ReturnBtnClick + end + object AnswerEdit: TEdit + Left = 16 + Top = 328 + Width = 561 + Height = 21 + TabOrder = 13 + end + object OpenPictureDialog1: TOpenPictureDialog + Left = 328 + Top = 352 + end + object OpenDialog1: TOpenDialog + Left = 384 + Top = 352 + end +end diff --git a/applications/lazstats/source_orig/CompletionItemUnit.pas b/applications/lazstats/source_orig/CompletionItemUnit.pas new file mode 100644 index 000000000..bd4c97b3d --- /dev/null +++ b/applications/lazstats/source_orig/CompletionItemUnit.pas @@ -0,0 +1,336 @@ +unit CompletionItemUnit; + +{$MODE Delphi} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, ItemBankGlobals, ExtDlgs, FunctionsUnit; + +type + TCompletionItemFrm = class(TForm) + Label2: TLabel; + ItemNoEdit: TEdit; + ItemNoScroll: TScrollBar; + Label1: TLabel; + CodeCombo: TComboBox; + Label14: TLabel; + BMPFileEdit: TEdit; + Label15: TLabel; + BrowseBtn: TButton; + ClearBtn: TButton; + Label16: TLabel; + BMPImage: TImage; + Label18: TLabel; + ItemWeightEdit: TEdit; + Panel1: TPanel; + Label9: TLabel; + Label10: TLabel; + Label11: TLabel; + Label12: TLabel; + Label13: TLabel; + PcntEdit: TEdit; + IRT1Edit: TEdit; + IRT2Edit: TEdit; + IRT3Edit: TEdit; + NoSelEdit: TEdit; + Label3: TLabel; + StemMemo: TMemo; + NewBtn: TButton; + SaveBtn: TButton; + DeleteBtn: TButton; + ReturnBtn: TButton; + AnswerEdit: TEdit; + Label4: TLabel; + OpenPictureDialog1: TOpenPictureDialog; + OpenDialog1: TOpenDialog; + procedure FormShow(Sender: TObject); + procedure ShowBlankItem(Sender: TObject; itemno : integer); + procedure ReturnBtnClick(Sender: TObject); + procedure NewBtnClick(Sender: TObject); + procedure SaveBtnClick(Sender: TObject); + procedure LoadRecord(VAR NewRcd : BlankItemRcd; Sender : TObject); + procedure DeleteBtnClick(Sender: TObject); + procedure BrowseBtnClick(Sender: TObject); + procedure ItemNoScrollScroll(Sender: TObject; ScrollCode: TScrollCode; + var ScrollPos: Integer); + procedure ClearBtnClick(Sender: TObject); + private + { Private declarations } + maxitems : integer; + ARcd : BlankItemRcd; + public + { Public declarations } + end; + +var + CompletionItemFrm: TCompletionItemFrm; + +implementation + +{$R *.lfm} + +procedure TCompletionItemFrm.FormShow(Sender: TObject); +var + F : TextFile; + S : string; + TF : File of BlankItemRcd; +begin + StemMemo.Clear; + AnswerEdit.Text := ''; + ItemNoScroll.Min := 1; + ItemNoScroll.Max := 1; + ItemNoEdit.Text := '1'; + ItemNoScroll.Position := 1; + CodeCombo.Text := ''; + BMPFileEdit.Text := ''; + PcntEdit.Text := '0'; + IRT1Edit.Text := '0'; + IRT2Edit.Text := '0'; + IRT3Edit.Text := '0'; + NoSelEdit.Text := '0'; + ItemWeightEdit.Text := '0'; + maxitems := 0; + OpenDialog1.DefaultExt := '.COD'; + OpenDialog1.Filter := 'Code files (*.cod)|*.COD|Text files (*.txt)|*.TXT|All files (*.*)|*.*'; + OpenDialog1.FilterIndex := 1; + OpenDialog1.FileName := BankPath + ExtractFileName(BankName) + '.COD'; + OpenDialog1.Title := 'Name of Item Code File:'; + if OpenDialog1.Execute then + begin + AssignFile(F,OpenDialog1.filename); + ReSet(F); + while not EOF(F) do + begin + readln(F,S); + CodeCombo.Items.Add(S); + end; + end + else begin + ShowMessage('You must first open a file of item codes.'); + exit; + end; + CloseFile(F); + S := BankPath + 'BlankFile' + ExtractFileName(BankName); + BlankFName := S; + if FileExists(S) { *Converted from FileExists* } then + begin + AssignFile(TF,S); + Reset(TF); + while not EOF(TF) do + begin + read(TF,ARcd); + maxitems := maxitems + 1; + end; + CloseFile(TF); + if maxitems > ItemNoScroll.Max then + ItemNoScroll.Max := maxitems; + ItemNoScroll.Min := 1; + end + else begin // create empty file + AssignFile(TF,S); + rewrite(TF); + CloseFile(TF); + end; + ARcd.BestAns := ''; + if maxitems > 0 then + begin + ItemNoScroll.Position := 1; + ShowBlankItem(self,1); + end; +end; +//------------------------------------------------------------------- +procedure TCompletionItemFrm.ShowBlankItem(Sender: TObject; itemno : integer); +var + S : string; + F : File of BlankItemRcd; + where : longint; + Frecd : BlankItemRcd; + i : integer; + +begin + ItemNoEdit.Text := IntToStr(ItemNoScroll.Position); + S := BankPath + 'BlankFile' + ExtractFileName(BankName); + AssignFile(F,S); + Reset(F); + where := itemno-1; + Seek(F,where); + read(F,FRecd); + CloseFile(F); + CodeCombo.Text := Frecd.Code; + BMPFileEdit.Text := Frecd.Picture; + PcntEdit.Text := FloatToStr(Frecd.PcntPass); + if BMPFileEdit.Text <> '' then + begin + if FileExists(Frecd.Picture) { *Converted from FileExists* } then + begin + BMPImage.Picture.LoadFromFile(Frecd.Picture); + BMPImage.Visible := true; + end + else begin +// ShowMessage('Image ' + Frecd.Picture + ' not found.'); + BMPFileEdit.Text := ''; + Frecd.Picture := ''; + end; + end + else BMPImage.Visible := false; + ItemWeightEdit.Text := IntToStr(Frecd.ItemWeight); + IRT1Edit.Text := FloatToStr(Frecd.IRT[1]); + IRT2Edit.Text := FloatToStr(Frecd.IRT[2]); + IRT3Edit.Text := FLoatToStr(Frecd.IRT[3]); + StemMemo.Clear; + for i := 1 to 10 do + begin + S := Frecd.ItemStem[i]; + if length(S) > 0 then StemMemo.Lines.Add(S); + end; + AnswerEdit.Text := Frecd.BestAns; + +end; +//------------------------------------------------------------------- + +procedure TCompletionItemFrm.ReturnBtnClick(Sender: TObject); +begin + CompletionItemFrm.Hide; +end; +//------------------------------------------------------------------- + +procedure TCompletionItemFrm.NewBtnClick(Sender: TObject); +begin + StemMemo.Clear; + AnswerEdit.Text := ''; + ItemNoScroll.Max := maxitems + 1; + ItemNoScroll.Position := ItemNoScroll.Max; + ItemNoEdit.Text := IntToStr(ItemNoScroll.Position); + CodeCombo.Text := ''; + BMPFileEdit.Text := ''; + BMPImage.Visible := false; + PcntEdit.Text := '0'; + IRT1Edit.Text := '0'; + IRT2Edit.Text := '0'; + IRT3Edit.Text := '0'; + NoSelEdit.Text := '0'; + ItemWeightEdit.Text := '0'; + BMPImage.Visible := false; +end; +//------------------------------------------------------------------- + +procedure TCompletionItemFrm.SaveBtnClick(Sender: TObject); +var + NewRcd : BlankItemRcd; + itemno : integer; +begin + itemno := ItemNoScroll.Position; + LoadRecord(NewRcd,self); + WriteCOItem(itemno,NewRcd); + if itemno > maxitems then + begin + maxitems := itemno; + ItemNoScroll.Max := maxitems+1; + end; +end; +//------------------------------------------------------------------- +procedure TCompletionItemFrm.LoadRecord(VAR NewRcd : BlankItemRcd; Sender : TObject); +var + i : integer; + S : string; +begin + NewRcd.ItemNo := ItemNoScroll.Position; + NewRcd.Code := CodeCombo.Text; + for i := 0 to StemMemo.Lines.Count-1 do + begin + S := Trim(StemMemo.Lines[i]); + NewRcd.ItemStem[i+1] := S; + end; + if StemMemo.Lines.Count < 10 then + for i := StemMemo.Lines.Count+1 to 10 do NewRcd.ItemStem[i] := ''; + NewRcd.BestAns := AnswerEdit.Text; + NewRcd.ItemWeight := StrToInt(ItemWeightEdit.Text); + NewRcd.Picture := BMPFileEdit.Text; + NewRcd.PcntPass := StrToFloat(PcntEdit.Text); + NewRcd.IRT[1] := StrToFloat(IRT1Edit.Text); + NewRcd.IRT[2] := StrToFloat(IRT2Edit.Text); + NewRcd.IRT[3] := StrToFloat(IRT3Edit.Text); + NewRcd.FreqElect := StrToInt(NoSelEdit.Text); +end; +//------------------------------------------------------------------- + +procedure TCompletionItemFrm.DeleteBtnClick(Sender: TObject); +var + FOld : File of BlankItemRcd; + FNew : File of BlankItemRcd; + itemno : integer; + i : integer; + SOld : string; + SNew : string; +begin + itemno := ItemNoScroll.Position; + SOld := BankPath + 'BlankFile' + ExtractFileName(BankName); + AssignFile(FOld,SOld); + ReSet(FOld); + SNew := BankPath + 'TempBlankFile'; + AssignFile(FNew,SNew); + Rewrite(FNew); + // copy up to itemno from old file to new file + for i := 1 to itemno-1 do + begin + if not EOF(FOld) then + begin + read(FOld,ARcd); + write(FNew,ARcd); + end; + end; + // read past itemno to delete + if not EOF(FOld) then read(FOld,ARcd); + // write remaining records, if any, from old to new + if not EOF(FOld) then + begin + while not EOF(FOld) do + begin + read(FOld,ARcd); + write(FNew,ARcd); + end; + end; + CloseFile(FOld); + CloseFile(FNew); + // delete old file and rename temp file to old file name + DeleteFile(SOld); { *Converted from DeleteFile* } + RenameFile(SNew, Sold); { *Converted from RenameFile* } + maxitems := maxitems - 1; + if maxitems > 0 then ItemNoScroll.Max := maxitems else + ItemNoScroll.Max := 1; +end; +//------------------------------------------------------------------- + +procedure TCompletionItemFrm.BrowseBtnClick(Sender: TObject); +begin + if OpenPictureDialog1.Execute then + begin + BMPFileEdit.Text := OpenPictureDialog1.FileName; + BMPImage.Picture.LoadFromFile(BMPFileEdit.Text); + BMPImage.Visible := true; + end; +end; +//------------------------------------------------------------------- + +procedure TCompletionItemFrm.ItemNoScrollScroll(Sender: TObject; + ScrollCode: TScrollCode; var ScrollPos: Integer); +var + itemno : integer; +begin + itemno := ScrollPos; + if (itemno > maxitems) or (itemno < 1) then exit; + ItemNoEdit.Text := IntToStr(itemno); + ShowBlankItem(self,itemno); +end; +//------------------------------------------------------------------- + +procedure TCompletionItemFrm.ClearBtnClick(Sender: TObject); +begin + BMPFileEdit.Text := ''; + BMPImage.Visible := false; +end; +//------------------------------------------------------------------- + +end. diff --git a/applications/lazstats/source_orig/bnestaunit.lfm b/applications/lazstats/source_orig/bnestaunit.lfm new file mode 100644 index 000000000..d9e1a6772 --- /dev/null +++ b/applications/lazstats/source_orig/bnestaunit.lfm @@ -0,0 +1,435 @@ +object BNestedAForm: TBNestedAForm + Left = 288 + Height = 402 + Top = 161 + Width = 686 + Caption = 'Factor B Nested in Factor A Analysis of Variance' + ClientHeight = 402 + ClientWidth = 686 + 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 = 255 + Height = 16 + Top = 24 + Width = 90 + Caption = 'Factor A Variable' + ParentColor = False + end + object Label3: TLabel + Left = 255 + Height = 16 + Top = 96 + Width = 116 + Caption = 'Factor B (Nested in A)' + ParentColor = False + end + object Label4: TLabel + Left = 256 + Height = 16 + Top = 197 + Width = 104 + Caption = 'Dependent Variable' + ParentColor = False + end + object VarList: TListBox + Left = 16 + Height = 239 + Top = 24 + Width = 181 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object AInBtn: TBitBtn + Left = 211 + Height = 26 + Top = 24 + 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 = AInBtnClick + TabOrder = 1 + end + object AOutBtn: TBitBtn + Left = 211 + Height = 26 + 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 = AOutBtnClick + TabOrder = 2 + end + object BInBtn: TBitBtn + Left = 210 + Height = 26 + Top = 96 + 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 = BInBtnClick + TabOrder = 3 + end + object BOutBtn: TBitBtn + Left = 210 + Height = 26 + Top = 128 + 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 = BOutBtnClick + TabOrder = 4 + end + object DepInBtn: 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 = DepInBtnClick + TabOrder = 5 + end + object DepOutBtn: 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 = DepOutBtnClick + TabOrder = 6 + end + object ACodes: TEdit + Left = 255 + Height = 23 + Top = 40 + Width = 139 + TabOrder = 7 + Text = 'ACodes' + end + object BCodes: TEdit + Left = 255 + Height = 23 + Top = 112 + Width = 138 + TabOrder = 8 + Text = 'BCodes' + end + object ResetBtn: TButton + Left = 24 + Height = 27 + Top = 296 + Width = 89 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 9 + end + object CancelBtn: TButton + Left = 24 + Height = 27 + Top = 344 + Width = 89 + Cancel = True + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 10 + end + object ComputeBtn: TButton + Left = 240 + Height = 27 + Top = 296 + Width = 89 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 11 + end + object ReturnBtn: TButton + Left = 240 + Height = 27 + Top = 344 + Width = 89 + Caption = 'Return' + ModalResult = 1 + TabOrder = 12 + end + object DepEdit: TEdit + Left = 255 + Height = 23 + Top = 216 + Width = 132 + TabOrder = 13 + Text = 'DepEdit' + end + object OptionsBox: TRadioGroup + Left = 400 + Height = 131 + Top = 240 + Width = 273 + AutoFill = True + Caption = 'OptionsBox' + 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 = 269 + 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 = 14 + end + object Memo1: TMemo + Left = 400 + Height = 197 + Top = 16 + Width = 272 + Lines.Strings = ( + 'Directions: This analysis assumes that levels of ' + 'Factor B are Nested within levels of Factor A.' + 'Unless otherwise specified, it is assumed that' + 'Factors A and B are fixed level factors. If Factor B' + 'is a random variable, check the provided box to' + 'indicate this.' + '' + 'The number of cases for each B group should be' + 'equal and the number of B treatements in each ' + 'A level should be equal.' + ) + TabOrder = 15 + end + object RandomBChk: TCheckBox + Left = 211 + Height = 19 + Top = 168 + Width = 135 + Caption = 'B is random, not fixed' + TabOrder = 16 + end +end diff --git a/applications/lazstats/source_orig/bnestaunit.lrs b/applications/lazstats/source_orig/bnestaunit.lrs new file mode 100644 index 000000000..500828f4e --- /dev/null +++ b/applications/lazstats/source_orig/bnestaunit.lrs @@ -0,0 +1,359 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TBNestedAForm','FORMDATA',[ + 'TPF0'#13'TBNestedAForm'#12'BNestedAForm'#4'Left'#3' '#1#6'Height'#3#146#1#3 + +'Top'#3#161#0#5'Width'#3#174#2#7'Caption'#6'0Factor B Nested in Factor A Ana' + +'lysis of Variance'#12'ClientHeight'#3#146#1#11'ClientWidth'#3#174#2#6'OnSho' + +'w'#7#13'ResetBtnClick'#10'LCLVersion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'L' + +'eft'#2#16#6'Height'#2#16#3'Top'#2#8#5'Width'#2'f'#7'Caption'#6#20'Available' + +' Variables:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#3#255#0#6'He' + +'ight'#2#16#3'Top'#2#24#5'Width'#2'Z'#7'Caption'#6#17'Factor A Variable'#11 + +'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#255#0#6'Height'#2#16#3'Top' + +#2'`'#5'Width'#2't'#7'Caption'#6#22'Factor B (Nested in A)'#11'ParentColor'#8 + +#0#0#6'TLabel'#6'Label4'#4'Left'#3#0#1#6'Height'#2#16#3'Top'#3#197#0#5'Width' + +#2'h'#7'Caption'#6#18'Dependent Variable'#11'ParentColor'#8#0#0#8'TListBox'#7 + +'VarList'#4'Left'#2#16#6'Height'#3#239#0#3'Top'#2#24#5'Width'#3#181#0#10'Ite' + +'mHeight'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#6'AInBtn'#4'L' + +'eft'#3#211#0#6'Height'#2#26#3'Top'#2#24#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#11'AInBtnClick'#8'TabOrde' + ,'r'#2#1#0#0#7'TBitBtn'#7'AOutBtn'#4'Left'#3#211#0#6'Height'#2#26#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#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#12'AOutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#6'BInB' + +'tn'#4'Left'#3#210#0#6'Height'#2#26#3'Top'#2'`'#5'Width'#2#30#10'Glyph.Data' + +#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0 + +#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + ,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^' + +' '#6#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177 + +'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255 + +'5'#128';'#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255 + +#0#255#255#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255 + +#152#211#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142 + +#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J' + +#255'!c$'#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162 + +#216#171#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255 + +#142#204#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130 + +#255'J'#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199 + +'t'#255'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255 + +'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5' + +#209#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11'BInBtnClick'#8 + +'TabOrder'#2#3#0#0#7'TBitBtn'#7'BOutBtn'#4'Left'#3#210#0#6'Height'#2#26#3'To' + +'p'#3#128#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'Num' + +'Glyphs'#2#0#7'OnClick'#7#12'BOutBtnClick'#8'TabOrder'#2#4#0#0#7'TBitBtn'#8 + +'DepInBtn'#4'Left'#3#211#0#6'Height'#2#26#3'Top'#3#200#0#5'Width'#2#30#10'Gl' + +'yph.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'DepInBtnClick' + +#8'TabOrder'#2#5#0#0#7'TBitBtn'#9'DepOutBtn'#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'DepOutBtnClick'#8'TabOrder'#2#6#0#0#5 + +'TEdit'#6'ACodes'#4'Left'#3#255#0#6'Height'#2#23#3'Top'#2'('#5'Width'#3#139#0 + +#8'TabOrder'#2#7#4'Text'#6#6'ACodes'#0#0#5'TEdit'#6'BCodes'#4'Left'#3#255#0#6 + +'Height'#2#23#3'Top'#2'p'#5'Width'#3#138#0#8'TabOrder'#2#8#4'Text'#6#6'BCode' + +'s'#0#0#7'TButton'#8'ResetBtn'#4'Left'#2#24#6'Height'#2#27#3'Top'#3'('#1#5'W' + +'idth'#2'Y'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder' + +#2#9#0#0#7'TButton'#9'CancelBtn'#4'Left'#2#24#6'Height'#2#27#3'Top'#3'X'#1#5 + +'Width'#2'Y'#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrd' + +'er'#2#10#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#240#0#6'Height'#2#27#3'Top' + +#3'('#1#5'Width'#2'Y'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeBtnClic' + +'k'#8'TabOrder'#2#11#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#240#0#6'Height'#2 + +#27#3'Top'#3'X'#1#5'Width'#2'Y'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8 + +'TabOrder'#2#12#0#0#5'TEdit'#7'DepEdit'#4'Left'#3#255#0#6'Height'#2#23#3'Top' + +#3#216#0#5'Width'#3#132#0#8'TabOrder'#2#13#4'Text'#6#7'DepEdit'#0#0#11'TRadi' + +'oGroup'#10'OptionsBox'#4'Left'#3#144#1#6'Height'#3#131#0#3'Top'#3#240#0#5'W' + +'idth'#3#17#1#8'AutoFill'#9#7'Caption'#6#10'OptionsBox'#28'ChildSizing.LeftR' + +'ightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.Enlarg' + +'eHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical' + +#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsSca' + +'leChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizin' + +'g.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLin' + +'e'#2#1#12'ClientHeight'#2'q'#11'ClientWidth'#3#13#1#13'Items.Strings'#1#6'#' + +'Plot means using 2D Horizontal Bars'#6'#Plot means using 3D Horizontal Bars' + +#6'!Plot means using 2D Vertical Bars'#6'!Plot means using 3D Vertical Bars' + +#0#8'TabOrder'#2#14#0#0#5'TMemo'#5'Memo1'#4'Left'#3#144#1#6'Height'#3#197#0#3 + +'Top'#2#16#5'Width'#3#16#1#13'Lines.Strings'#1#6'2Directions: This analysis' + +' assumes that levels of '#6'.Factor B are Nested within levels of Factor A.' + +#6'.Unless otherwise specified, it is assumed that'#6'5Factors A and B are f' + +'ixed level factors. If Factor B'#6'/is a random variable, check the provid' + +'ed box to'#6#14'indicate this.'#6#0#6'.The number of cases for each B group' + +' should be'#6'.equal and the number of B treatements in each '#6#24'A level' + +' should be equal.'#0#8'TabOrder'#2#15#0#0#9'TCheckBox'#10'RandomBChk'#4'Lef' + +'t'#3#211#0#6'Height'#2#19#3'Top'#3#168#0#5'Width'#3#135#0#7'Caption'#6#22'B' + +' is random, not fixed'#8'TabOrder'#2#16#0#0#0 +]); diff --git a/applications/lazstats/source_orig/bnestaunit.pas b/applications/lazstats/source_orig/bnestaunit.pas new file mode 100644 index 000000000..9ed87b971 --- /dev/null +++ b/applications/lazstats/source_orig/bnestaunit.pas @@ -0,0 +1,540 @@ +unit BNestAUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, ExtCtrls, MainUnit, OutPutUnit, FunctionsLib, GraphLib, + Globals, DataProcs, MatrixLib; + +type + + { TBNestedAForm } + + TBNestedAForm = class(TForm) + ACodes: TEdit; + AInBtn: TBitBtn; + AOutBtn: TBitBtn; + BCodes: TEdit; + BInBtn: TBitBtn; + BOutBtn: TBitBtn; + CancelBtn: TButton; + RandomBChk: TCheckBox; + DepInBtn: TBitBtn; + ComputeBtn: TButton; + DepOutBtn: TBitBtn; + DepEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Memo1: TMemo; + OptionsBox: TRadioGroup; + ResetBtn: TButton; + ReturnBtn: TButton; + VarList: TListBox; + procedure AInBtnClick(Sender: TObject); + procedure AOutBtnClick(Sender: TObject); + procedure BInBtnClick(Sender: TObject); + procedure BOutBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure DepInBtnClick(Sender: TObject); + procedure DepOutBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + SS, SumSqr, CellMeans, CellSDs : DblDyneMat; + CellCount : IntDyneMat; + ASS, BSS, ASumSqr, BSumSqr, AMeans, BMeans, ASDs : DblDyneVec; + ACount, BCount : IntDyneVec; + MinA, MinB, MaxA, MaxB, NoALevels, NoBLevels, ACol, BCol, YCol : integer; + DepVar, FactorA, FactorB : string; + SSTot, SumSqrTot, TotMean, MSTot, SSA, MSA, SSB, MSB, SSW, MSW : double; + TotN, dfA, dfBwA, dfwcell, dftotal : integer; + + procedure GetVars(Sender: TObject); + procedure GetMemory(Sender: TOBject); + procedure GetSums(Sender: TObject); + procedure ShowMeans(Sender: TObject); + procedure GetResults(Sender: TObject); + procedure ShowResults(Sender: TObject); + procedure ReleaseMemory(Sender: TObject); + procedure TwoWayPlot(Sender: TObject); + + public + { public declarations } + end; + +var + BNestedAForm: TBNestedAForm; + +implementation + +{ TBNestedAForm } + +procedure TBNestedAForm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Items.Clear; + ACodes.Text := ''; + BCodes.Text := ''; + DepEdit.Text := ''; + AInBtn.Visible := true; + AOutBtn.Visible := false; + BInBtn.Visible := true; + BOutBtn.Visible := false; + DepInBtn.Visible := true; + DepoutBtn.Visible := false; + OptionsBox.ItemIndex := 0; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); + OptionsBox.ItemIndex := 3; +end; + +procedure TBNestedAForm.AInBtnClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + ACodes.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + AinBtn.Visible := false; + AOutBtn.Visible := true; +end; + +procedure TBNestedAForm.AOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(ACodes.Text); + ACodes.Text := ''; + AinBtn.Visible := true; + AOutBtn.Visible := false; +end; + +procedure TBNestedAForm.BInBtnClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + BCodes.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + BInBtn.Visible := false; + BOutBtn.Visible := true; +end; + +procedure TBNestedAForm.BOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(BCodes.Text); + BCodes.Text := ''; + BInBtn.Visible := true; + BOutBtn.Visible := false; +end; + +procedure TBNestedAForm.ComputeBtnClick(Sender: TObject); +begin + GetVars(self); + GetMemory(self); + GetSums(self); + ShowMeans(self); + GetResults(self); + ShowResults(self); + TwoWayPlot(self); + ReleaseMemory(self); +end; + +procedure TBNestedAForm.DepInBtnClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + DepEdit.Text := VarList.Items.Strings[index]; + VarList.Items.Delete(index); + DepOutBtn.Visible := true; + DepInBtn.Visible := false; +end; + +procedure TBNestedAForm.DepOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(DepEdit.Text); + DepEdit.Text := ''; + DepInBtn.Visible := true; + DepOutBtn.Visible := false; +end; + +procedure TBNestedAForm.GetVars(Sender: TObject); +VAR + result, intvalue, i, group : integer; + AValue, BValue : integer; + strvalue, cellstring : string; +begin + DepVar := DepEdit.Text; + FactorA := ACodes.Text; + FactorB := BCodes.Text; + ACol := 0; + BCol := 0; + YCol := 0; + MinA := 1000; + MaxA := -1000; + MinB := 1000; + MaxB := -1000; + for i := 1 to NoVariables do + begin + strvalue := Trim(OS3MainFrm.DataGrid.Cells[i,0]); + if FactorA = strvalue then ACol := i; + if FactorB = strvalue then BCol := i; + if DepVar = strvalue then YCol := i; + end; + if (ACol = 0) or (BCol = 0) or (YCol = 0) then + begin + ShowMessage('ERROR! Select a variable for each entry box.'); + exit; + end; + // get number of levels for Factors + for i := 1 to NoCases do + begin + cellstring := Trim(OS3MainFrm.DataGrid.Cells[ACol,i]); + group := round(StrToFloat(cellstring)); + if (group > MaxA) then MaxA := group; + if (group < MinA) then MinA := group; + cellstring := Trim(OS3MainFrm.DataGrid.Cells[BCol,i]); + group := round(StrToFLoat(cellstring)); + if (group > MaxB) then MaxB := group; + if (group < MinB) then MinB := group; + end; + NoALevels := MaxA - MinA + 1; + NoBLevels := MaxB - MinB + 1; + +end; + +procedure TBNestedAForm.GetMemory(Sender: TOBject); +begin + SetLength(SS,NoBLevels,NoALevels); + SetLength(SumSqr,NoBLevels,NoALevels); + SetLength(CellCount,NoBLevels,NoALevels); + SetLength(CellMeans,NoBLevels,NoALevels); + SetLength(CellSDs,NoBLevels,NoALevels); + SetLength(ASS,NoALevels); + SetLength(BSS,NoBLevels); + SetLength(ASumSqr,NoALevels); + SetLength(BSumSqr,NoBLevels); + SetLength(AMeans,NoALevels); + SetLength(BMeans,NoBLevels); + SetLength(ACount,NoALevels); + SetLength(BCount,NoBLevels); + SetLength(ASDs,NoALevels); +end; + +procedure TBNestedAForm.GetSums(Sender: TObject); +VAR + Aindex, Bindex, result, intvalue, i, j : integer; + YValue : double; + strvalue : string; +begin + // initialize memory + for i := 0 to NoBLevels-1 do + begin + for j := 0 to NoALevels-1 do + begin + SS[i,j] := 0.0; + SumSqr[i,j] := 0.0; + CellCount[i,j] := 0; + end; + end; + for i := 0 to NoALevels-1 do + begin + ACount[i] := 0; + AMeans[i] := 0.0; + ASS[i] := 0.0; + ASumSqr[i] := 0.0; + end; + for j := 0 to NoBLevels-1 do + begin + BCount[i] := 0; + BMeans[i] := 0.0; + BSS[i] := 0.0; + BSumSqr[i] := 0.0; + end; + // Accumulate sums and sums of squared values + for i := 1 to NoCases do + begin + strvalue := Trim(OS3MainFrm.DataGrid.Cells[ACol,i]); + Aindex := round(StrToFloat(strvalue)); + strvalue := Trim(OS3MainFrm.DataGrid.Cells[BCol,i]); + Bindex := round(StrToFloat(strvalue)); + strvalue := Trim(OS3MainFrm.DataGrid.Cells[YCol,i]); + YValue := StrToFloat(strvalue); + Aindex := Aindex - MinA; + Bindex := Bindex - MinB; + SS[Bindex,Aindex] := SS[Bindex,Aindex] + YValue * YValue; + SumSqr[Bindex,Aindex] := SumSqr[Bindex,Aindex] + YValue; + CellCount[Bindex,Aindex] := CellCount[Bindex,Aindex] + 1; + ACount[Aindex] := ACount[Aindex] + 1; + BCount[Bindex] := BCount[Bindex] + 1; + ASS[Aindex] := ASS[Aindex] + YValue * YValue; + BSS[Bindex] := BSS[Bindex] + YValue * YValue; + ASumSqr[Aindex] := ASumSqr[Aindex] + YValue; + BSumSqr[Bindex] := BSumSqr[Bindex] + YValue; + SSTot := SSTot + YValue * YValue; + SumSqrTot := SumSqrTot + YValue; + TotN := TotN + 1; + end; + //get cell means and marginal means, SDs plus square of sums + for i := 0 to NoBlevels-1 do + begin + for j := 0 to NoALevels-1 do + begin + if CellCount[i,j] > 0 then + begin + CellMeans[i,j] := SumSqr[i,j] / CellCount[i,j]; + SumSqr[i,j] := SumSqr[i,j] * SumSqr[i,j]; + CellSDs[i,j] := SS[i,j] - (SumSqr[i,j] / CellCount[i,j]); + CellSDs[i,j] := CellSDs[i,j] / (CellCount[i,j] - 1); + CellSDs[i,j] := Sqrt(CellSDs[i,j]); + end; + end; + end; + for i := 0 to NoBLevels-1 do + begin + BMeans[i] := BSumSqr[i] / BCount[i]; + BSumSqr[i] := BSumSqr[i] * BSumSqr[i]; + end; + for i := 0 to NoALevels-1 do + begin + AMeans[i] := ASumSqr[i] / ACount[i]; + ASumSqr[i] := ASumSqr[i] * ASumSqr[i]; + ASDs[i] := ASS[i] - (ASumSqr[i] / ACount[i]); + ASDs[i] := ASDs[i] / (ACount[i] - 1); + ASDs[i] := Sqrt(ASDs[i]); + end; + TotMean := SumSqrTot / TotN; + SumSqrTot := SumSqrTot * SumSqrTot; +end; + +procedure TBNestedAForm.ShowMeans(Sender: TObject); +VAR + outvalue : string; + i, j : integer; +begin + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Nested ANOVA by Bill Miller'); + outvalue := format('File Analyzed = %s',[OS3MainFrm.FileNameEdit.Text]); + OutPutFrm.RichEdit.Lines.Add(outvalue); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('CELL MEANS'); + OutPutFrm.RichEdit.Lines.Add('A LEVEL BLEVEL MEAN STD.DEV.'); + for i := 0 to NoALevels-1 do + begin + for j := 0 to NoBLevels-1 do + begin + if CellCount[j,i] > 0 then + begin + outvalue := format('%5d %5d %10.3f %10.3f', + [i+MinA,j+MinB,CellMeans[j,i],CellSDs[j,i]]); + OutPutFrm.RichEdit.Lines.Add(outvalue); + end; + end; + end; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('A MARGIN MEANS'); + OutPutFrm.RichEdit.Lines.Add('A LEVEL MEAN STD.DEV.'); + for i := 0 to NoALevels-1 do + begin + outvalue := format('%5d %10.3f %10.3f',[i+MinA,AMeans[i],ASDs[i]]); + OutPutFrm.RichEdit.Lines.Add(outvalue); + end; + OutPutFrm.RichEdit.Lines.Add(''); + outvalue := format('GRAND MEAN = %10.3f',[TotMean]); + OutPutFrm.RichEdit.Lines.Add(outvalue); + OutPutFrm.RichEdit.Lines.Add(''); +// OutPutFrm.ShowModal; +end; + +procedure TBNestedAForm.GetResults(Sender: TObject); +VAR + temp, constant : double; + NoBLevelsInA, BLevCount, i, j, celln : integer; + strvalue : string; +begin + celln := 0; + for i := 0 to NoALevels-1 do + begin + for j := 0 to NoBLevels-1 do + begin + if CellCount[j,i] > celln then celln := CellCount[j,i]; + end; + end; + // assume all cells have same n size + // get no. of levels in A + BLevCount := 0; + for i := 0 to NoALevels-1 do + begin + NoBLevelsInA := 0; + for j := 0 to NoBLevels-1 do + begin + if CellCount[j,i] > 0 then NoBLevelsInA := NoBLevelsInA + 1; + end; + if NoBLevelsInA > BLevCount then BLevCount := NoBLevelsInA; + end; + dfA := NoALevels - 1; + dfBwA := NoALevels * (BLevCount - 1); + dfwcell := NoALevels * BLevCount * (celln - 1); + dftotal := TotN - 1; + constant := SumSqrTot / TotN; + SSTot := SSTot - constant; + MSTot := SSTot / dftotal; + SSA := 0.0; + for i := 0 to NoALevels-1 do SSA := SSA + (ASumSqr[i] / ACount[i]); + temp := SSA; + SSA := SSA - constant; + MSA := SSA / dfA; + SSB := 0.0; + for i := 0 to NoALevels - 1 do + begin + for j := 0 to NoBLevels-1 do + begin + if CellCount[j,i] > 0 then SSB := SSB + (SumSqr[j,i] / CellCount[j,i]); + end; + end; + SSB := SSB - temp; + MSB := SSB / dfBwA; + SSW := SSTot - SSA - SSB; + MSW := SSW / dfwcell; + (* + OutPutFrm.RichEdit.Clear; + strvalue := format('SSA = %10.3f MSA = %10.3f SSB = %10.3f MSB = %10.3f', + [SSA,MSA,SSB,MSB]); + OutPutFrm.RichEdit.Lines.Add(strvalue); + strvalue := format('SSW = %10.3f MSW = %10.3f',[SSW,MSW]); + OutPutFrm.RichEdit.Lines.Add(strvalue); + OutPutFrm.ShowModal; +*) +end; + +procedure TBNestedAForm.ShowResults(Sender: TObject); +VAR + outvalue : string; + F, PF : double; +begin + OutPutFrm.RichEdit.Lines.Add('ANOVA TABLE'); + OutPutFrm.RichEdit.Lines.Add('SOURCE D.F. SS MS F PROB.'); + if RandomBChk.Checked then + begin + F := MSA / MSB; + PF := probf(F,dfA,dfBwA); + end else + begin + F := MSA / MSW; + PF := probf(F,dfA,dfwcell); + end; + outvalue := format('A %4D %10.3f%10.3f%10.3f%10.3f',[dfA,SSA,MSA,F,PF]); + OutPutFrm.RichEdit.Lines.Add(outvalue); + F := MSB / MSW; + PF := probf(F,dfBwA,dfwcell); + outvalue := format('B(W) %4D %10.3f%10.3f%10.3f%10.3f',[dfBwA,SSB,MSB,F,PF]); + OutPutFrm.RichEdit.Lines.Add(outvalue); + outvalue := format('w.cells %4D %10.3f%10.3f',[dfwcell,SSW,MSW]); + OutPutFrm.RichEdit.Lines.Add(outvalue); + outvalue := format('Total %4D %10.3f',[dftotal,SSTot]); + OutPutFrm.RichEdit.Lines.Add(outvalue); + OutPutFrm.ShowModal; +end; + +procedure TBNestedAForm.ReleaseMemory(Sender: TObject); +begin + ASDs := nil; + BCount := nil; + ACount := nil; + BMeans := nil; + AMeans := nil; + BSumSqr := nil; + ASumSqr := nil; + BSS := nil; + ASS := nil; + CellSDs := nil; + CellMeans := nil; + CellCount := nil; + SumSqr := nil; + SS := nil; +end; + +procedure TBNestedAForm.TwoWayPlot(Sender: TObject); +VAR + plottype, i, j : integer; + maxmean, XBar : double; + title, setstring : string; + XValue : DblDyneVec; +begin + maxmean := -1000.0; + SetLength(XValue,NoALevels+NoBLevels); + setstring := 'FACTOR A'; + 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; + GraphFrm.SetLabels[1] := setstring; + SetLength(GraphFrm.Xpoints,1,NoALevels); + SetLength(GraphFrm.Ypoints,1,NoALevels); + for i := 1 to NoALevels do + begin + GraphFrm.Ypoints[0,i-1] := AMeans[i-1]; + if AMeans[i-1] > maxmean then maxmean := AMeans[i-1]; + XValue[i-1] := MinA + i -1; + GraphFrm.Xpoints[0,i-1] := XValue[i-1]; + end; + GraphFrm.nosets := 1; + GraphFrm.nbars := NoALevels; + GraphFrm.Heading := FactorA; + title := FactorA + ' Group Codes'; + GraphFrm.XTitle := title; + GraphFrm.YTitle := 'Mean'; + GraphFrm.barwideprop := 0.5; + GraphFrm.AutoScale := false; + GraphFrm.miny := 0.0; + GraphFrm.maxy := maxmean; + GraphFrm.GraphType := plottype; + GraphFrm.BackColor := clYellow; + GraphFrm.WallColor := clBlack; + GraphFrm.FloorColor := clLtGray; + GraphFrm.ShowBackWall := true; + GraphFrm.ShowModal; + GraphFrm.Xpoints := nil; + GraphFrm.Ypoints := nil; + + // Factor B next + setstring := 'FACTOR B'; + GraphFrm.SetLabels[1] := setstring; + maxmean := 0.0; + SetLength(GraphFrm.Xpoints,1,NoBLevels); + SetLength(GraphFrm.Ypoints,1,NoBLevels); + for i := 1 to NoBLevels do + begin + GraphFrm.Ypoints[0,i-1] := BMeans[i-1]; + if BMeans[i-1] > maxmean then maxmean := BMeans[i-1]; + XValue[i-1] := MinB + i - 1; + GraphFrm.Xpoints[0,i-1] := XValue[i-1]; + end; + GraphFrm.nosets := 1; + GraphFrm.nbars := NoBLevels; + GraphFrm.Heading := 'FACTOR B'; + title := FactorB + ' Group Codes'; + GraphFrm.XTitle := title; + GraphFrm.YTitle := 'Mean'; + GraphFrm.barwideprop := 0.5; + GraphFrm.AutoScale := false; + GraphFrm.miny := 0.0; + GraphFrm.maxy := maxmean; + GraphFrm.GraphType := plottype; + GraphFrm.BackColor := clYellow; + GraphFrm.WallColor := clBlack; + GraphFrm.FloorColor := clLtGray; + GraphFrm.ShowBackWall := true; + GraphFrm.ShowModal; + GraphFrm.Xpoints := nil; + GraphFrm.Ypoints := nil; + XValue := nil; +end; + +initialization + {$I bnestaunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/boxplotunit.lfm b/applications/lazstats/source_orig/boxplotunit.lfm new file mode 100644 index 000000000..e323d45cc --- /dev/null +++ b/applications/lazstats/source_orig/boxplotunit.lfm @@ -0,0 +1,134 @@ +object BoxPlotFrm: TBoxPlotFrm + Left = 258 + Height = 254 + Top = 105 + Width = 420 + Caption = 'Box Plot' + ClientHeight = 254 + ClientWidth = 420 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 8 + Height = 14 + Top = 8 + Width = 90 + Caption = 'Available Variables' + ParentColor = False + end + object Label2: TLabel + Left = 167 + Height = 14 + Top = 24 + Width = 71 + Caption = 'Group Variable' + ParentColor = False + end + object Label3: TLabel + Left = 167 + Height = 14 + Top = 112 + Width = 102 + Caption = 'Meaurement Variable' + ParentColor = False + end + object VarList: TListBox + Left = 8 + Height = 208 + Top = 24 + Width = 142 + ItemHeight = 0 + OnClick = VarListClick + TabOrder = 0 + end + object GroupEdit: TEdit + Left = 166 + Height = 21 + Top = 40 + Width = 129 + TabOrder = 1 + Text = 'GroupEdit' + end + object MeasEdit: TEdit + Left = 167 + Height = 21 + Top = 128 + Width = 130 + TabOrder = 2 + Text = 'MeasEdit' + end + object GroupBox1: TGroupBox + Left = 166 + Height = 65 + Top = 168 + Width = 129 + Caption = 'Options' + ClientHeight = 47 + ClientWidth = 125 + TabOrder = 3 + object PrintChk: TCheckBox + Left = 8 + Height = 17 + Top = 4 + Width = 84 + Caption = 'Print Box Plot' + TabOrder = 0 + end + object ShowChk: TCheckBox + Left = 8 + Height = 17 + Top = 23 + Width = 107 + Caption = 'Show Frequencies' + TabOrder = 1 + end + end + object ResetBtn: TButton + Left = 315 + Height = 32 + Top = 56 + Width = 78 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 4 + end + object CancelBtn: TButton + Left = 315 + Height = 32 + Top = 104 + Width = 79 + Caption = 'Cancel' + ModalResult = 2 + OnClick = CancelBtnClick + TabOrder = 5 + end + object ComputeBtn: TButton + Left = 315 + Height = 32 + Top = 152 + Width = 79 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 6 + end + object OKBtn: TButton + Left = 315 + Height = 33 + Top = 200 + Width = 79 + Caption = 'Return' + ModalResult = 1 + OnClick = OKBtnClick + TabOrder = 7 + end + object HelpBtn: TButton + Tag = 108 + Left = 315 + Height = 32 + Top = 8 + Width = 78 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 8 + end +end diff --git a/applications/lazstats/source_orig/boxplotunit.lrs b/applications/lazstats/source_orig/boxplotunit.lrs new file mode 100644 index 000000000..e24a6f0d2 --- /dev/null +++ b/applications/lazstats/source_orig/boxplotunit.lrs @@ -0,0 +1,35 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TBoxPlotFrm','FORMDATA',[ + 'TPF0'#11'TBoxPlotFrm'#10'BoxPlotFrm'#4'Left'#3#2#1#6'Height'#3#254#0#3'Top'#2 + +'i'#5'Width'#3#164#1#7'Caption'#6#8'Box Plot'#12'ClientHeight'#3#254#0#11'Cl' + +'ientWidth'#3#164#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2'#0#6 + +'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#14#3'Top'#2#8#5'Width'#2'Z'#7'Cap' + +'tion'#6#19'Available Variables'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4 + +'Left'#3#167#0#6'Height'#2#14#3'Top'#2#24#5'Width'#2'G'#7'Caption'#6#14'Grou' + +'p Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Left'#3#167#0#6'Hei' + +'ght'#2#14#3'Top'#2'p'#5'Width'#2'f'#7'Caption'#6#19'Meaurement Variable'#11 + +'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#6'Height'#3#208#0#3'T' + +'op'#2#24#5'Width'#3#142#0#10'ItemHeight'#2#0#7'OnClick'#7#12'VarListClick'#8 + +'TabOrder'#2#0#0#0#5'TEdit'#9'GroupEdit'#4'Left'#3#166#0#6'Height'#2#21#3'To' + +'p'#2'('#5'Width'#3#129#0#8'TabOrder'#2#1#4'Text'#6#9'GroupEdit'#0#0#5'TEdit' + +#8'MeasEdit'#4'Left'#3#167#0#6'Height'#2#21#3'Top'#3#128#0#5'Width'#3#130#0#8 + +'TabOrder'#2#2#4'Text'#6#8'MeasEdit'#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#3 + +#166#0#6'Height'#2'A'#3'Top'#3#168#0#5'Width'#3#129#0#7'Caption'#6#7'Options' + +#12'ClientHeight'#2'/'#11'ClientWidth'#2'}'#8'TabOrder'#2#3#0#9'TCheckBox'#8 + +'PrintChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#2#4#5'Width'#2'T'#7'Caption'#6 + +#14'Print Box Plot'#8'TabOrder'#2#0#0#0#9'TCheckBox'#7'ShowChk'#4'Left'#2#8#6 + +'Height'#2#17#3'Top'#2#23#5'Width'#2'k'#7'Caption'#6#16'Show Frequencies'#8 + +'TabOrder'#2#1#0#0#0#7'TButton'#8'ResetBtn'#4'Left'#3';'#1#6'Height'#2' '#3 + +'Top'#2'8'#5'Width'#2'N'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick' + +#8'TabOrder'#2#4#0#0#7'TButton'#9'CancelBtn'#4'Left'#3';'#1#6'Height'#2' '#3 + +'Top'#2'h'#5'Width'#2'O'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#7'OnClic' + +'k'#7#14'CancelBtnClick'#8'TabOrder'#2#5#0#0#7'TButton'#10'ComputeBtn'#4'Lef' + +'t'#3';'#1#6'Height'#2' '#3'Top'#3#152#0#5'Width'#2'O'#7'Caption'#6#7'Comput' + +'e'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#6#0#0#7'TButton'#5'OKBtn' + +#4'Left'#3';'#1#6'Height'#2'!'#3'Top'#3#200#0#5'Width'#2'O'#7'Caption'#6#6'R' + +'eturn'#11'ModalResult'#2#1#7'OnClick'#7#10'OKBtnClick'#8'TabOrder'#2#7#0#0#7 + +'TButton'#7'HelpBtn'#3'Tag'#2'l'#4'Left'#3';'#1#6'Height'#2' '#3'Top'#2#8#5 + +'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8'TabOrder'#2 + +#8#0#0#0 +]); diff --git a/applications/lazstats/source_orig/boxplotunit.pas b/applications/lazstats/source_orig/boxplotunit.pas new file mode 100644 index 000000000..d8d4dab55 --- /dev/null +++ b/applications/lazstats/source_orig/boxplotunit.pas @@ -0,0 +1,676 @@ +unit BoxPlotUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, MainUnit, Globals, DataProcs, OutPutUnit, + GraphLib, Printers, BlankFrmUnit, contexthelpunit; + + +type + + { TBoxPlotFrm } + + TBoxPlotFrm = class(TForm) + HelpBtn: TButton; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + OKBtn: TButton; + ShowChk: TCheckBox; + PrintChk: TCheckBox; + GroupBox1: TGroupBox; + MeasEdit: TEdit; + GroupEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + VarList: TListBox; + procedure CancelBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure OKBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure VarListClick(Sender: TObject); + private + { private declarations } + function Percentile(nscrgrps : integer; + pcnt : double; + VAR freq : DblDyneVec; + VAR cumfreq : DblDyneVec; + VAR scores : DblDyneVec) : double; + procedure pBoxPlot(nbars : integer; + max, min : double; + VAR lowqrtl : DblDyneVec; + VAR hiqrtl : DblDyneVec; + VAR tenpcnt : DblDyneVec; + VAR ninetypcnt : DblDyneVec; + VAR means : DblDyneVec; + VAR median : DblDyneVec); + procedure BoxPlot(nbars : integer; + max, min : double; + VAR lowqrtl : DblDyneVec; + VAR hiqrtl : DblDyneVec; + VAR tenpcnt : DblDyneVec; + VAR ninetypcnt : DblDyneVec; + VAR means : DblDyneVec; + VAR median : DblDyneVec); + + public + { public declarations } + end; + +var + BoxPlotFrm: TBoxPlotFrm; + +implementation + +{ TBoxPlotFrm } + +procedure TBoxPlotFrm.ResetBtnClick(Sender: TObject); +var i : integer; + +begin + VarList.Clear; + GroupEdit.Text := ''; + MeasEdit.Text := ''; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TBoxPlotFrm.VarListClick(Sender: TObject); +var + index : integer; + +begin + index := VarList.ItemIndex; + if GroupEdit.Text = '' then GroupEdit.Text := VarList.Items.Strings[index] + else MeasEdit.Text := VarList.Items.Strings[index]; +end; + +procedure TBoxPlotFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TBoxPlotFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +procedure TBoxPlotFrm.OKBtnClick(Sender: TObject); +begin + BoxPlotFrm.Hide; +end; + +procedure TBoxPlotFrm.CancelBtnClick(Sender: TObject); +begin + BoxPlotFrm.Hide; +end; + +procedure TBoxPlotFrm.ComputeBtnClick(Sender: TObject); +label cleanup; +var + i, j, k, GrpVar, MeasVar, mingrp, maxgrp, G, NoGrps, cnt : integer; + nscrgrps : integer; + X, tenpcnt, ninepcnt, qrtile1, qrtile2, qrtile3 : double; + minscr, maxscr, intvlsize, lastX : double; + cellstring, outline : string; + means, lowqrtl, hiqrtl, tenpcntile, ninetypcntile, median : DblDyneVec; + freq : DblDyneVec; + Scores : DblDyneVec; + cumfreq : DblDyneVec; + prank : DblDyneVec; + grpsize : IntDyneVec; + scrgrp : DblDyneVec; + done : boolean; + NoSelected : integer; + ColNoSelected : IntDyneVec; + +begin + SetLength(ColNoSelected,NoVariables); + SetLength(freq,2 * NoCases + 1); + SetLength(Scores,2 * NoCases + 1); + SetLength(cumfreq,2 * NoCases + 1); + SetLength(prank,2 * NoCases + 1); + + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Box Plot of Groups'); + OutPutFrm.RichEdit.Lines.Add(''); + + GrpVar := 1; + MeasVar := 2; + for i := 1 to NoVariables do + begin + cellstring := OS3MainFrm.DataGrid.Cells[i,0]; + if cellstring = GroupEdit.Text then GrpVar := i; + if cellstring = MeasEdit.Text then MeasVar := i; + end; + NoSelected := 2; + ColNoSelected[0] := GrpVar; + ColNoSelected[1] := MeasVar; + + // get minimum and maximum group values + mingrp := 10000; + maxgrp := -10000; + for i := 1 to NoCases do + begin + if Not GoodRecord(i,NoSelected,ColNoSelected) then continue; + G := round(StrToFloat(OS3MainFrm.DataGrid.Cells[GrpVar,i])); + if G < mingrp then mingrp := G; + if G > maxgrp then maxgrp := G; + end; + NoGrps := maxgrp - mingrp + 1; + if NoGrps > 30 then + begin + ShowMessage('ERROR! Too many groups for meaningful plot.'); + goto cleanup; + end; + SetLength(grpsize,NoGrps+1); + SetLength(means,NoGrps+1); + SetLength(lowqrtl,NoGrps+1); + SetLength(hiqrtl,NoGrps+1); + SetLength(tenpcntile,NoGrps+1); + SetLength(ninetypcntile,NoGrps+1); + SetLength(median,NoGrps+1); + SetLength(scrgrp,NoGrps+1); + + // initialize + for j := 1 to NoGrps do + begin + means[j-1] := 0.0; + grpsize[j-1] := 0; + end; + + // get minimum and maximum scores and score interval + intvlsize := 10000.0; + lastX := 0.0; + X := StrToFloat(OS3MainFrm.DataGrid.Cells[MeasVar,1]); + minscr := X; + maxscr := X; + for i := 1 to NoCases do + begin + if Not GoodRecord(i,NoSelected,ColNoSelected) then continue; + X := StrToFloat(OS3MainFrm.DataGrid.Cells[MeasVar,i]); + if X > maxscr then maxscr := X; + if X < minscr then minscr := X; + if i > 1 then // get interval size as minimum difference between 2 scores + begin + if (X <> lastX) and (abs(X - lastX) < intvlsize) then + intvlsize := abs(X - lastX); + lastX := X; + end + else lastX := X; + end; + + // check for excess no. of intervals and reset if needed + nscrgrps := round((maxscr - minscr) / intvlsize); + if nscrgrps > (2 * NoCases) then + intvlsize := (maxscr - minscr) / NoCases; + + // setup score groups + done := false; + Scores[0] := minscr - (intvlsize / 2.0); + nscrgrps := 0; + lastX := maxscr + intvlsize + (intvlsize / 2.0); + + while not done do + begin + nscrgrps := nscrgrps + 1; + Scores[nscrgrps] := minscr + (nscrgrps * intvlsize) - (intvlsize / 2.0); + if Scores[nscrgrps] > lastX then done := true; + end; + Scores[nscrgrps+1] := Scores[nscrgrps] + intvlsize; + if Scores[0] < minscr then minscr := Scores[0]; + if Scores[nscrgrps] > maxscr then maxscr := Scores[nscrgrps]; + + // do analysis for each group + for j := 1 to NoGrps do // group + begin + // get score groups for this group j + for i := 0 to nscrgrps do + begin + cumfreq[i] := 0.0; + freq[i] := 0.0; + end; + cnt := 0; + for i := 1 to NoCases do + begin // get scores for this group j + if Not GoodRecord(i,NoSelected,ColNoSelected) then continue; + G := round(StrToFloat(OS3MainFrm.DataGrid.Cells[GrpVar,i])); + G := G - mingrp + 1; + if G = j then // subject in this group + begin + cnt := cnt + 1; + X := StrToFloat(OS3MainFrm.DataGrid.Cells[MeasVar,i]); + means[j-1] := means[j-1] + X; + // find score interval and add to the frequency + for k := 0 to nscrgrps do + if (X >= Scores[k]) and (X < Scores[k+1]) then + freq[k] := freq[k] + 1; + end; + end; + grpsize[j-1] := cnt; + if grpsize[j-1] > 0 then means[j-1] := means[j-1] / grpsize[j-1]; + + // accumulate frequencies + cumfreq[0] := freq[0]; + for i := 1 to nscrgrps-1 do + cumfreq[i] := cumfreq[i-1] + freq[i]; + cumfreq[nscrgrps] := cumfreq[nscrgrps-1]; + + // get percentile ranks + prank[0] := ((cumfreq[0] / 2.0) / grpsize[j-1]) * 100.0; + for i := 1 to nscrgrps-1 do + prank[i] := ((cumfreq[i-1] + (freq[i] / 2.0)) / grpsize[j-1]) * 100.0; + + // get centiles required. + tenpcnt := 0.10 * grpsize[j-1]; + tenpcntile[j-1] := Percentile(nscrgrps,tenpcnt,freq,cumfreq,scores); + ninepcnt := 0.90 * grpsize[j-1]; + ninetypcntile[j-1] := Percentile(nscrgrps,ninepcnt,freq,cumfreq,scores); + qrtile1 := 0.25 * grpsize[j-1]; + lowqrtl[j-1] := Percentile(nscrgrps,qrtile1,freq,cumfreq,scores); + qrtile2 := 0.50 * grpsize[j-1]; + median[j-1] := Percentile(nscrgrps,qrtile2,freq,cumfreq,scores); + qrtile3 := 0.75 * grpsize[j-1]; + hiqrtl[j-1] := Percentile(nscrgrps,qrtile3,freq,cumfreq,scores); + if ShowChk.Checked then + begin + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Results for group %d, mean = %8.3f',[j, means[j-1]]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add('Centile Value'); + outline := format('Ten %6.3f',[tenpcntile[j-1]]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Twenty five %6.3f',[lowqrtl[j-1]]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Median %6.3f',[median[j-1]]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Seventy five %6.3f',[hiqrtl[j-1]]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Ninety %6.3f',[ninetypcntile[j-1]]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add('Score Range Frequency Cum.Freq. Percentile Rank'); + OutPutFrm.RichEdit.Lines.Add('______________ _________ _________ _______________'); + for i := 0 to nscrgrps-1 do + begin + outline := format('%6.2f - %6.2f %6.2f %6.2f %6.2f', + [Scores[i],Scores[i+1],freq[i],cumfreq[i],prank[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + end; + end; // get values for next group + if ShowChk.Checked then OutPutFrm.ShowModal; + + // plot the boxes + BoxPlot(NoGrps,maxscr,minscr,lowqrtl,hiqrtl,tenpcntile,ninetypcntile,means,median); + if PrintChk.Checked then + pBoxPlot(NoGrps,maxscr,minscr,lowqrtl,hiqrtl,tenpcntile,ninetypcntile,means,median); + + //cleanup the heap + cleanup: + scrgrp := nil; + median := nil; + ninetypcntile := nil; + tenpcntile := nil; + hiqrtl := nil; + lowqrtl := nil; + means := nil; + grpsize := nil; + cumfreq := nil; + scores := nil; + freq := nil; + ColNoSelected := nil; +end; + +function TBoxPlotFrm.Percentile(nscrgrps : integer; + pcnt : double; + VAR freq : DblDyneVec; + VAR cumfreq : DblDyneVec; + VAR scores : DblDyneVec) : double; +var + i, interval : integer; + pcntile, Llimit, Ulimit, cumlower, intvlfreq : double; + +begin + interval := 0; + for i := 0 to nscrgrps-1 do + begin + if cumfreq[i] > pcnt then + begin + interval := i; + Break; + end; + end; + if interval > 0 then + begin + Llimit := Scores[interval]; + Ulimit := Scores[interval+1]; + cumlower := cumfreq[interval-1]; + intvlfreq := freq[interval]; + end + else + begin // Percentile in first interval + Llimit := Scores[0]; + Ulimit := Scores[1]; + cumlower := 0.0; + intvlfreq := freq[0]; + end; + if intvlfreq > 0 then + pcntile := Llimit + ((pcnt - cumlower) / intvlfreq) * (Ulimit- Llimit) + else pcntile := Llimit; + Result := pcntile; +end; +//------------------------------------------------------------------- + +procedure TBoxPlotFrm.pBoxPlot(nbars : integer; + max, min : double; + VAR lowqrtl : DblDyneVec; + VAR hiqrtl : DblDyneVec; + VAR tenpcnt : DblDyneVec; + VAR ninetypcnt : DblDyneVec; + VAR means : DblDyneVec; + VAR median : DblDyneVec); +var + i, HTickSpace, imagewide, imagehi, vtop, vbottom, offset : integer; + vhi, hleft, hright, hwide, barwidth, Xpos, Ypos, strhi, strwide : integer; +// coords : array [1..5] of TPoint; + X, Y, colcycle : integer; + X1, X2, X3, X9, X10 : integer; // X coordinates for box and lines + Y1, Y2, Y3, Y4, Y9 : integer; // Y coordinates for box and lines + Title : string; + valincr, Yvalue : double; + +begin + Printer.Orientation := poLandscape; + Printer.BeginDoc; + Title := 'BOXPLOT FOR : ' + OS3MainFrm.FileNameEdit.Text; + imagewide := Printer.PageWidth; + imagehi := Printer.PageHeight; + vtop := 400; + vbottom := round(imagehi) - 400; +// vhi := vbottom - vtop; + hleft := 400; + hright := imagewide - 40; + hwide := hright - hleft; + + // show title + Printer.Canvas.Brush.Color := clWhite; + strhi := Printer.Canvas.TextWidth(Title) div 2; + strhi := imagewide div 2 - strhi; + Printer.Canvas.TextOut(strhi,50,Title); + + // show legend + Y := Printer.Canvas.TextHeight(Title) * 2; + Y := Y + 50; + Title := 'RED: mean, BLACK: median, BOX: 25th to 75th percentile, WISKERS: 10th and 90th percentile'; + X := imagewide div 2 - Printer.Canvas.TextWidth(Title) div 2; + Printer.Canvas.TextOut(X,Y,Title); + + Printer.Canvas.Pen.Color := clBlack; + Printer.Canvas.Brush.Color := clWhite; + + // Draw chart border + Printer.Canvas.Rectangle(hleft,vtop,hright,vbottom); + vbottom := vbottom - 400; // decrease bottom + vhi := vbottom - vtop; + + // Draw vertical axis + valincr := (max - min) / 20.0; + for i := 1 to 21 do + begin + Title := format('%8.2f',[max - ((i-1)*valincr)]); + strwide := Printer.Canvas.TextWidth(Title); + strhi := Printer.Canvas.TextHeight(Title); + xpos := 20 + hleft; + Yvalue := max - (valincr * (i-1)); + ypos := round(vhi * ( (max - Yvalue) / (max - min))); + ypos := ypos + vtop - strhi div 2; + Printer.Canvas.TextOut(xpos,ypos,Title); + end; + Printer.Canvas.MoveTo(hleft + strwide + 50,vtop); + Printer.Canvas.LineTo(hleft + strwide + 50,vbottom+20); + hwide := hwide - (strwide + 50); + hleft := hleft + strwide + 50; + HTickSpace := hwide div (nbars + 1); + barwidth := HTickSpace div 2; + + // draw horizontal axis + Printer.Canvas.MoveTo(hleft,vbottom + 20); + Printer.Canvas.LineTo(hright,vbottom + 20); + for i := 1 to nbars do + begin + ypos := vbottom + 10; + xpos := round((hwide / (nbars+1))* i + hleft); + Printer.Canvas.MoveTo(xpos,ypos); + ypos := ypos + 10; + Printer.Canvas.LineTo(xpos,ypos); + Title := format('%d',[i]); + offset := Printer.Canvas.TextWidth(Title) div 2; + strhi := Printer.Canvas.TextHeight(Title); + xpos := xpos - offset; + ypos := ypos + strhi; + Printer.Canvas.Pen.Color := clBlack; + Printer.Canvas.TextOut(xpos,ypos,Title); + xpos := hleft; + Printer.Canvas.TextOut(xpos,ypos,'GROUPS:'); + end; + + for i := 1 to nbars do + begin + colcycle := i mod 4; // select a color for box + if (colcycle = 0) then Printer.Canvas.Brush.Color := clBlue; + if (colcycle = 1) then Printer.Canvas.Brush.Color := clGreen; + if (colcycle = 2) then Printer.Canvas.Brush.Color := clFuchsia; + if (colcycle = 3) then Printer.Canvas.Brush.Color := clLime; + + // plot the box front face + X9 := round(hleft + ((i) * HTickSpace) - (barwidth / 2)); + X10 := X9 + barwidth; + X1 := X9; + X2 := X10; + Ypos:= round((((max - hiqrtl[i-1]) / (max - min)) * vhi) + vtop); + Y1 := Ypos; + Ypos := round((((max - lowqrtl[i-1]) / (max - min)) * vhi) + vtop); + Y2 := Ypos; + Printer.Canvas.Rectangle(X1,Y1,X2,Y2); + + // draw upper 90th percentile line and end + X3 := round(X1 + barwidth / 2); + Printer.Canvas.MoveTo(X3,Y1); + Ypos := round((((max - ninetypcnt[i-1]) / (max - min)) * vhi) + vtop); + Y3 := Ypos; + Printer.Canvas.LineTo(X3,Y3); + Printer.Canvas.MoveTo(X1,Y3); + Printer.Canvas.LineTo(X2,Y3); + + // draw lower 10th percentile line and end + Printer.Canvas.MoveTo(X3,Y2); + Ypos := round((((max - tenpcnt[i-1]) / (max - min)) * vhi) + vtop); + Y4 := Ypos; + Printer.Canvas.LineTo(X3,Y4); + Printer.Canvas.MoveTo(X1,Y4); + Printer.Canvas.LineTo(X2,Y4); + + //plot the mean line + Printer.Canvas.Pen.Width := 10; + Printer.Canvas.Pen.Color := clRed; + Printer.Canvas.Pen.Style := psDot; + Ypos := round((((max - means[i-1]) / (max - min)) * vhi) + vtop); + Y9 := Ypos; + Printer.Canvas.MoveTo(X9,Y9); + Printer.Canvas.LineTo(X10,Y9); + Printer.Canvas.Pen.Color := clBlack; + Printer.Canvas.Pen.Style := psSolid; + + //plot the median line + Printer.Canvas.Pen.Color := clBlack; + Ypos := round((((max - median[i-1]) / (max - min)) * vhi) + vtop); + Y9 := Ypos; + Printer.Canvas.MoveTo(X9,Y9); + Printer.Canvas.LineTo(X10,Y9); + Printer.Canvas.Pen.Color := clBlack; + + end; + Printer.EndDoc; + Printer.Orientation := poPortrait; +end; +//-------------------------------------------------------------------------- + +procedure TBoxPlotFrm.BoxPlot(nbars : integer; + max, min : double; + VAR lowqrtl : DblDyneVec; + VAR hiqrtl : DblDyneVec; + VAR tenpcnt : DblDyneVec; + VAR ninetypcnt : DblDyneVec; + VAR means : DblDyneVec; + VAR median : DblDyneVec); +var + i, HTickSpace, imagewide, imagehi, vtop, vbottom, offset : integer; + vhi, hleft, hright, hwide, barwidth, Xpos, Ypos, strhi : integer; + XOffset, YOffset : integer; +// coords : array [1..5] of TPoint; + X, Y, colcycle : integer; + X1, X2, X3, X9, X10 : integer; // X coordinates for box and lines + Y1, Y2, Y3, Y4, Y9 : integer; // Y coordinates for box and lines + Title : string; + valincr, Yvalue : double; + +begin + BlankFrm.Show; + BlankFrm.Image1.Canvas.Clear; + Title := 'BOXPLOT FOR : ' + OS3MainFrm.FileNameEdit.Text; + imagewide := BlankFrm.width; + imagehi := BlankFrm.Height; + XOffset := imagewide div 10; + YOffset := imagehi div 10; + + vtop := YOffset; + vbottom := imagehi - YOffset; + vhi := vbottom - vtop; + hleft := XOffset; + hright := imagewide - hleft - XOffset; + hwide := hright - hleft; + BlankFrm.Image1.Canvas.Brush.Color := clWhite; + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + // Show title + BlankFrm.Caption := Title; + // show legend + Y := BlankFrm.Image1.Canvas.TextHeight(Title) * 2; + Y := Y + vtop; + Title := 'RED: mean, BLACK: median, BOX: 25th to 75th percentile, WISKERS: 10th and 90th percentile'; + X := imagewide div 2 - BlankFrm.Canvas.TextWidth(Title) div 2; + BlankFrm.Image1.Canvas.TextOut(X,Y,Title); + + HTickSpace := hwide div nbars; + barwidth := HTickSpace div 2; + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + BlankFrm.Image1.Canvas.Brush.Color := clWhite; + + // Draw chart border + BlankFrm.Image1.Canvas.Rectangle(0,0,imagewide,imagehi); + + // Draw vertical axis + valincr := (max - min) / 20.0; + for i := 1 to 21 do + begin + Title := format('%8.2f',[max - ((i-1)*valincr)]); + strhi := BlankFrm.Image1.Canvas.TextHeight(Title); + xpos := XOffset; + Yvalue := max - (valincr * (i-1)); + ypos := round(vhi * ( (max - Yvalue) / (max - min))); + ypos := ypos + vtop - strhi div 2; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title); + end; + BlankFrm.Image1.Canvas.MoveTo(hleft,vtop); + BlankFrm.Image1.Canvas.LineTo(hleft,vbottom); + + // draw horizontal axis + BlankFrm.Image1.Canvas.MoveTo(hleft,vbottom + 10 ); + BlankFrm.Image1.Canvas.LineTo(hright,vbottom + 10); + for i := 1 to nbars do + begin + ypos := vbottom + 10; + xpos := round((hwide / nbars)* i + hleft); + BlankFrm.Image1.Canvas.MoveTo(xpos,ypos); + ypos := ypos + 10; + BlankFrm.Image1.Canvas.LineTo(xpos,ypos); + Title := format('%d',[i]); + offset := BlankFrm.Image1.Canvas.TextWidth(Title) div 2; + strhi := BlankFrm.Image1.Canvas.TextHeight(Title); + xpos := xpos - offset; + ypos := ypos + strhi; + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title); + xpos := 20; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,'GROUPS:'); + end; + + for i := 1 to nbars do + begin + colcycle := i mod 4; // select a color for box + if (colcycle = 0) then BlankFrm.Image1.Canvas.Brush.Color := clBlue; + if (colcycle = 1) then BlankFrm.Image1.Canvas.Brush.Color := clGreen; + if (colcycle = 2) then BlankFrm.Image1.Canvas.Brush.Color := clFuchsia; + if (colcycle = 3) then BlankFrm.Image1.Canvas.Brush.Color := clLime; + + // plot the box front face + X9 := round(hleft + ((i) * HTickSpace) - (barwidth / 2)); + X10 := X9 + barwidth; + X1 := X9; + X2 := X10; + Ypos:= round((((max - hiqrtl[i-1]) / (max - min)) * vhi) + vtop); + Y1 := Ypos; + Ypos := round((((max - lowqrtl[i-1]) / (max - min)) * vhi) + vtop); + Y2 := Ypos; + BlankFrm.Image1.Canvas.Rectangle(X1,Y1,X2,Y2); + + // draw upper 90th percentile line and end + X3 := round(X1 + barwidth / 2); + BlankFrm.Image1.Canvas.MoveTo(X3,Y1); + Ypos := round((((max - ninetypcnt[i-1]) / (max - min)) * vhi) + vtop); + Y3 := Ypos; + BlankFrm.Image1.Canvas.LineTo(X3,Y3); + BlankFrm.Image1.Canvas.MoveTo(X1,Y3); + BlankFrm.Image1.Canvas.LineTo(X2,Y3); + + // draw lower 10th percentile line and end + BlankFrm.Image1.Canvas.MoveTo(X3,Y2); + Ypos := round((((max - tenpcnt[i-1]) / (max - min)) * vhi) + vtop); + Y4 := Ypos; + BlankFrm.Image1.Canvas.LineTo(X3,Y4); + BlankFrm.Image1.Canvas.MoveTo(X1,Y4); + BlankFrm.Image1.Canvas.LineTo(X2,Y4); + + //plot the means line + BlankFrm.Image1.Canvas.Pen.Color := clRed; + BlankFrm.Image1.Canvas.Pen.Style := psDot; + Ypos := round((((max - means[i-1]) / (max - min)) * vhi) + vtop); + Y9 := Ypos; + BlankFrm.Image1.Canvas.MoveTo(X9,Y9); + BlankFrm.Image1.Canvas.LineTo(X10,Y9); + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + BlankFrm.Image1.Canvas.Pen.Style := psSolid; + + //plot the median line + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + Ypos := round((((max - median[i-1]) / (max - min)) * vhi) + vtop); + Y9 := Ypos; + BlankFrm.Image1.Canvas.MoveTo(X9,Y9); + BlankFrm.Image1.Canvas.LineTo(X10,Y9); + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + + end; +end; +//-------------------------------------------------------------------------- + +initialization + {$I boxplotunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/breakdownunit.lfm b/applications/lazstats/source_orig/breakdownunit.lfm new file mode 100644 index 000000000..e4ca296eb --- /dev/null +++ b/applications/lazstats/source_orig/breakdownunit.lfm @@ -0,0 +1,302 @@ +object BreakDownFrm: TBreakDownFrm + Left = 180 + Height = 292 + Top = 103 + Width = 599 + Caption = 'Breakdown' + ClientHeight = 292 + ClientWidth = 599 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object AvailLabel: TLabel + Left = 7 + Height = 14 + Top = 7 + Width = 90 + Caption = 'Available Variables' + ParentColor = False + end + object AnalLabel: TLabel + Left = 231 + Height = 14 + Top = 7 + Width = 98 + Caption = 'Variables to Analyze' + ParentColor = False + end + object SelLabel: TLabel + Left = 231 + Height = 14 + Top = 224 + Width = 140 + Caption = 'Selected Continuous Variable' + ParentColor = False + end + object VarList: TListBox + Left = 6 + Height = 256 + Top = 24 + Width = 168 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object ListBox1: TListBox + Left = 232 + Height = 185 + Top = 23 + Width = 176 + ItemHeight = 0 + TabOrder = 1 + end + object DepVar: TEdit + Left = 231 + Height = 21 + Top = 240 + Width = 175 + TabOrder = 2 + Text = 'DepVar' + end + object CheckGroup1: TCheckGroup + Left = 424 + Height = 41 + Top = 8 + Width = 167 + AutoFill = True + Caption = 'Option' + ChildSizing.LeftRightSpacing = 6 + ChildSizing.TopBottomSpacing = 6 + ChildSizing.EnlargeHorizontal = crsHomogenousChildResize + ChildSizing.EnlargeVertical = crsHomogenousChildResize + ChildSizing.ShrinkHorizontal = crsScaleChilds + ChildSizing.ShrinkVertical = crsScaleChilds + ChildSizing.Layout = cclLeftToRightThenTopToBottom + ChildSizing.ControlsPerLine = 1 + Items.Strings = ( + 'One Way ANOVA' + ) + TabOrder = 3 + Data = { + 0100000002 + } + end + object ResetBtn: TButton + Left = 464 + Height = 29 + Top = 112 + Width = 78 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 4 + end + object CancelBtn: TButton + Left = 464 + Height = 29 + Top = 160 + Width = 78 + Caption = 'Cancel' + ModalResult = 2 + OnClick = CancelBtnClick + TabOrder = 5 + end + object OKBtn: TButton + Left = 464 + Height = 29 + Top = 209 + Width = 78 + Caption = 'Continue' + ModalResult = 1 + OnClick = OKBtnClick + TabOrder = 6 + end + object InBtn: TBitBtn + Left = 184 + Height = 30 + Top = 26 + Width = 34 + 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 = 7 + end + object OutBtn: TBitBtn + Left = 184 + Height = 30 + Top = 56 + Width = 34 + 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 = 8 + end + object SelVarInBtn: TBitBtn + Left = 184 + Height = 30 + Top = 216 + Width = 34 + 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 = SelVarInBtnClick + TabOrder = 9 + end + object SelVarOutBtn: TBitBtn + Left = 184 + Height = 30 + Top = 248 + Width = 34 + 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 = SelVarOutBtnClick + TabOrder = 10 + end + object HelpBtn: TButton + Tag = 109 + Left = 464 + Height = 28 + Top = 64 + Width = 78 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 11 + end +end diff --git a/applications/lazstats/source_orig/breakdownunit.lrs b/applications/lazstats/source_orig/breakdownunit.lrs new file mode 100644 index 000000000..acf94ddd2 --- /dev/null +++ b/applications/lazstats/source_orig/breakdownunit.lrs @@ -0,0 +1,242 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TBreakDownFrm','FORMDATA',[ + 'TPF0'#13'TBreakDownFrm'#12'BreakDownFrm'#4'Left'#3#180#0#6'Height'#3'$'#1#3 + +'Top'#2'g'#5'Width'#3'W'#2#7'Caption'#6#9'Breakdown'#12'ClientHeight'#3'$'#1 + +#11'ClientWidth'#3'W'#2#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.9.28.2' + +#0#6'TLabel'#10'AvailLabel'#4'Left'#2#7#6'Height'#2#14#3'Top'#2#7#5'Width'#2 + +'Z'#7'Caption'#6#19'Available Variables'#11'ParentColor'#8#0#0#6'TLabel'#9'A' + +'nalLabel'#4'Left'#3#231#0#6'Height'#2#14#3'Top'#2#7#5'Width'#2'b'#7'Caption' + +#6#20'Variables to Analyze'#11'ParentColor'#8#0#0#6'TLabel'#8'SelLabel'#4'Le' + +'ft'#3#231#0#6'Height'#2#14#3'Top'#3#224#0#5'Width'#3#140#0#7'Caption'#6#28 + +'Selected Continuous Variable'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4 + +'Left'#2#6#6'Height'#3#0#1#3'Top'#2#24#5'Width'#3#168#0#10'ItemHeight'#2#0#11 + +'MultiSelect'#9#8'TabOrder'#2#0#0#0#8'TListBox'#8'ListBox1'#4'Left'#3#232#0#6 + +'Height'#3#185#0#3'Top'#2#23#5'Width'#3#176#0#10'ItemHeight'#2#0#8'TabOrder' + +#2#1#0#0#5'TEdit'#6'DepVar'#4'Left'#3#231#0#6'Height'#2#21#3'Top'#3#240#0#5 + +'Width'#3#175#0#8'TabOrder'#2#2#4'Text'#6#6'DepVar'#0#0#11'TCheckGroup'#11'C' + +'heckGroup1'#4'Left'#3#168#1#6'Height'#2')'#3'Top'#2#8#5'Width'#3#167#0#8'Au' + +'toFill'#9#7'Caption'#6#6'Option'#28'ChildSizing.LeftRightSpacing'#2#6#28'Ch' + +'ildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsH' + +'omogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChi' + +'ldResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSiz' + +'ing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLef' + +'tToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#13'Items.Strin' + +'gs'#1#6#13'One Way ANOVA'#0#8'TabOrder'#2#3#4'Data'#10#5#0#0#0#1#0#0#0#2#0#0 + +#7'TButton'#8'ResetBtn'#4'Left'#3#208#1#6'Height'#2#29#3'Top'#2'p'#5'Width'#2 + +'N'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8'TabOrder'#2#4#0#0 + +#7'TButton'#9'CancelBtn'#4'Left'#3#208#1#6'Height'#2#29#3'Top'#3#160#0#5'Wid' + +'th'#2'N'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#7'OnClick'#7#14'CancelB' + +'tnClick'#8'TabOrder'#2#5#0#0#7'TButton'#5'OKBtn'#4'Left'#3#208#1#6'Height'#2 + +#29#3'Top'#3#209#0#5'Width'#2'N'#7'Caption'#6#8'Continue'#11'ModalResult'#2#1 + +#7'OnClick'#7#10'OKBtnClick'#8'TabOrder'#2#6#0#0#7'TBitBtn'#5'InBtn'#4'Left' + +#3#184#0#6'Height'#2#30#3'Top'#2#26#5'Width'#2'"'#10'Glyph.Data'#10':'#4#0#0 + +'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0 + +#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'!c$'#184#29'^ '#6#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0'*p/8%i)'#247'!c$'#217#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S' + +#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';' + +#255'?'#136'E'#255'Y'#161'^'#255'D'#139'I'#255'!c$'#207#255#255#255#0#255#255 + +#255#0#255#255#255#0'e'#195'q'#255#160#215#169#255#156#213#165#255#152#211 + +#161#255#148#208#157#255#144#206#152#255#139#203#147#255#135#201#142#255#130 + +#198#137#255'~'#195#132#255'z'#193#128#255'v'#190'|'#255'E'#140'J'#255'!c$' + +#196#255#255#255#0#255#255#255#0'h'#199't'#255#165#218#174#255#162#216#171 + +#255#158#214#167#255#154#212#163#255#150#210#159#255#147#207#154#255#142#204 + +#149#255#137#202#144#255#133#199#139#255#129#197#135#255'}'#194#130#255'J' + +#145'P'#255'%i)'#201#255#255#255#0#255#255#255#0'h'#199't'#255'h'#199't'#255 + +'e'#195'q'#255'a'#190'm'#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161 + +'V'#255'G'#153'O'#255'A'#145'I'#255'Z'#163'b'#255'U'#157'\'#255'/x5'#209#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0'A'#145'I'#247';'#136'B'#219#255#255#255#0#255 + ,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0'G'#153'O'#187'A'#145'I'#6#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#10'InBtnClick'#8'TabOrder' + +#2#7#0#0#7'TBitBtn'#6'OutBtn'#4'Left'#3#184#0#6'Height'#2#30#3'Top'#2'8'#5'W' + +'idth'#2'"'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0 + +'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0 + +#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O' + +#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V' + +#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255 + +'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5' + +#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195 + +'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144 + +#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255 + +'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255 + +#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154#212 + +#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255#133 + +#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255 + +#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135 + +#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A' + +#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + ,#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyp' + +'hs'#2#0#7'OnClick'#7#11'OutBtnClick'#8'TabOrder'#2#8#0#0#7'TBitBtn'#11'SelV' + +'arInBtn'#4'Left'#3#184#0#6'Height'#2#30#3'Top'#3#216#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#16'SelVarInBtnCli' + +'ck'#8'TabOrder'#2#9#0#0#7'TBitBtn'#12'SelVarOutBtn'#4'Left'#3#184#0#6'Heigh' + +'t'#2#30#3'Top'#3#248#0#5'Width'#2'"'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM' + +'6'#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#17'SelVarOutBtnClick'#8'TabOrder'#2 + +#10#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2'm'#4'Left'#3#208#1#6'Height'#2#28#3'T' + +'op'#2'@'#5'Width'#2'N'#7'Caption'#6#4'Help'#7'OnClick'#7#12'HelpBtnClick'#8 + +'TabOrder'#2#11#0#0#0 +]); diff --git a/applications/lazstats/source_orig/breakdownunit.pas b/applications/lazstats/source_orig/breakdownunit.pas new file mode 100644 index 000000000..c8a7e3fab --- /dev/null +++ b/applications/lazstats/source_orig/breakdownunit.pas @@ -0,0 +1,559 @@ +unit BreakDownUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, ExtCtrls, Buttons, MainUnit, Globals, functionsLib, OutPutUnit, + DataProcs, contexthelpunit; + +type + + { TBreakDownFrm } + + TBreakDownFrm = class(TForm) + HelpBtn: TButton; + InBtn: TBitBtn; + OutBtn: TBitBtn; + SelVarInBtn: TBitBtn; + SelVarOutBtn: TBitBtn; + ResetBtn: TButton; + CancelBtn: TButton; + OKBtn: TButton; + CheckGroup1: TCheckGroup; + DepVar: TEdit; + AvailLabel: TLabel; + AnalLabel: TLabel; + SelLabel: TLabel; + ListBox1: TListBox; + VarList: TListBox; + procedure CancelBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure InBtnClick(Sender: TObject); + procedure OKBtnClick(Sender: TObject); + procedure OutBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure SelVarInBtnClick(Sender: TObject); + procedure SelVarOutBtnClick(Sender: TObject); + private + { private declarations } + { Private declarations } + Minimum, Maximum, levels, displace, subscript : IntDyneVec; + Freq : IntDyneVec; + Selected : IntDyneVec; + mean, variance, Stddev, SS : DblDyneVec; + index, NoSelected, ListSize, Dependentvar, X, length_array : integer; + ptr1, ptr2, sum, grandsum : integer; + xsumtotal, xsqrtotal, grandsumx, grandsumx2, value, SD : double; + SST, SSW, SSB, MSW, MSB, F, FProb, DF1, DF2 : double; + cellstring : string; + outline : string; + valstr : string; + dataread : boolean; + function Index_Pos(VAR X1 : IntDyneVec; + VAR displace1 : IntDyneVec; + ListSize1 : integer; + Sender: TObject) : integer; + + public + { public declarations } + end; + +var + BreakDownFrm: TBreakDownFrm; + +implementation + +{ TBreakDownFrm } + +procedure TBreakDownFrm.ResetBtnClick(Sender: TObject); +var + i : integer; + +begin + VarList.Clear; + ListBox1.Clear; + DepVar.Text := ''; + InBtn.Visible := true; + OutBtn.Visible := false; + SelVarInBtn.Visible := true; + SelVarOutBtn.Visible := false; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TBreakDownFrm.SelVarInBtnClick(Sender: TObject); +var + index1 : integer; +begin + index1 := VarList.ItemIndex; + DepVar.Text := VarList.Items.Strings[index1]; + SelVarInBtn.Visible := false; + SelVarOutBtn.Visible := true; +end; + +procedure TBreakDownFrm.SelVarOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(DepVar.Text); + SelVarOutBtn.Visible := false; + SelVarInBtn.Visible := true; +end; + +procedure TBreakDownFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TBreakDownFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +procedure TBreakDownFrm.CancelBtnClick(Sender: TObject); +begin + BreakDownFrm.Hide; +end; + +procedure TBreakDownFrm.InBtnClick(Sender: TObject); +var + index1, i : integer; + +begin + index1 := VarList.Items.Count; + i := 0; + while i < index1 do + begin + if (VarList.Selected[i]) then + begin + ListBox1.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index1 := index1 - 1; + i := 0; + end + else i := i + 1; + end; + OutBtn.Visible := true; + if VarList.Items.Count = 0 then InBtn.Visible := false; +end; + +procedure TBreakDownFrm.OKBtnClick(Sender: TObject); +label Label1, Label3, Label4, NextStep, FirstOne, SecondOne, ThirdOne, LastStep; +var + i, j : integer; + tempval : string; + +begin + // Identify columns of variables to analyze and the dependent var. + NoSelected := ListBox1.Items.Count; + + // Get column no. of dependent variable + cellstring := DepVar.Text; + for i := 1 to NoVariables do + if cellstring = OS3MainFrm.DataGrid.Cells[i,0] then dependentvar := i; + + // Allocate heap + SetLength(Minimum,NoVariables); + SetLength(Maximum,NoVariables); + SetLength(levels,NoVariables); + SetLength(displace,NoVariables); + SetLength(subscript,NoVariables); + SetLength(Selected,NoVariables); + + // Get selected variables + for i := 1 to NoSelected do + begin + cellstring := ListBox1.Items.Strings[i-1]; + for j := 1 to NoVariables do + if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then Selected[i-1] := j; + end; + Selected[NoSelected] := dependentvar; + ListSize := NoSelected; + + // Get maximum and minimum levels in each variable + for i := 1 to ListSize do + begin + index := Selected[i-1]; + Minimum[i-1] := round(StrToFloat(OS3MainFrm.DataGrid.Cells[index,1])); + Maximum[i-1] := Minimum[i-1]; + for j := 1 to NoCases do + begin + if GoodRecord(j,NoSelected,Selected) then + begin + X := round(StrToFloat(OS3MainFrm.DataGrid.Cells[index,j])); + if X < Minimum[i-1] then Minimum[i-1] := X; + if X > Maximum[i-1] then Maximum[i-1] := X; + end; + end; + end; + + // Calculate number of levels for each variable + for i := 1 to ListSize do + levels[i-1] := Maximum[i-1] - Minimum[i-1] + 1; + displace[ListSize-1] := 1; + if ListSize > 1 then + begin + for i := ListSize-1 downto 1 do + displace[i-1] := levels[i] * displace[i]; + end; + + // Now, tabulate + length_array := 1; + for i := 1 to ListSize do length_array := Length_array * levels[i-1]; + + // initialize values + SetLength(Freq,length_array+1); + SetLength(mean,length_array+1); + SetLength(variance,length_array+1); + SetLength(Stddev,length_array+1); + SetLength(SS,length_array+1); + + for i := 0 to length_array do + begin + Freq[i] := 0; + mean[i] := 0.0; + variance[i] := 0.0; + Stddev[i] := 0.0; + SS[i] := 0.0; + end; + + // tabulate + for i := 1 to NoCases do + begin + dataread := false; + if GoodRecord(i,NoSelected,Selected) then + begin + for j := 1 to ListSize do + begin + index := Selected[j-1]; + X := round(StrToFLoat(OS3MainFrm.DataGrid.Cells[index,i])); + X := X - Minimum[j-1] + 1; + subscript[j-1] := X; + dataread := true; + end; + end; + if dataread then + begin + j := Index_Pos(subscript,displace,ListSize, self); + Freq[j] := Freq[j] + 1; + index := dependentvar; + tempval := Trim(OS3MainFrm.DataGrid.Cells[index,i]); + if tempval <> '' then + begin + value := StrToFloat(tempval); + mean[j] := mean[j] + value; + variance[j] := variance[j] + (value * value); + end; + end; + end; + + // setup the output + OutPutFrm.RichEdit.Clear; +// OutPutFrm.RichEdit.ParaGraph.Alignment := taLeftJustify; + OutPutFrm.RichEdit.Lines.Add('BREAKDOWN ANALYSIS PROGRAM'); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('VARIABLE SEQUENCE FOR THE BREAKDOWN:'); + for i := 1 to ListSize do + begin + index := Selected[i-1]; + outline := format('%-10s (Variable %3d) Lowest level = %2d Highest level = %2d', + [OS3MainFrm.DataGrid.Cells[index,0],i, Minimum[i-1], Maximum[i-1]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + //OutPutFrm.ShowModal; + + // Breakdown the data + ptr1 := ListSize - 1; + ptr2 := ListSize; + for i := 1 to ListSize do subscript[i-1] := 1; + sum := 0; + xsumtotal := 0.0; + xsqrtotal := 0.0; + grandsum := 0; + grandsumx := 0.0; + grandsumx2 := 0.0; + +Label1: + index := Index_Pos(subscript,displace,ListSize,self); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Variable levels: '); + for i := 1 to ListSize do + begin + j := Selected[i-1]; + outline := format('%-10s level = %3d', + [OS3MainFrm.DataGrid.Cells[j,0], + Minimum[i-1] + subscript[i-1] - 1]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.RichEdit.Lines.Add(''); + sum := sum + Freq[index]; + xsumtotal := xsumtotal + mean[index]; + xsqrtotal := xsqrtotal + variance[index]; + OutPutFrm.RichEdit.Lines.Add('Freq. Mean Std. Dev.'); + outline := format('%3d',[Freq[index]]); + if Freq[index] > 0 then + begin + valstr := format(' %8.3f ',[mean[index] / Freq[index]]); + outline := outline + valstr; + end + else outline := outline +' ******** '; + if Freq[index] > 1 then + begin + SS[index] := variance[index]; + variance[index] := variance[index] - (mean[index] * mean[index] / Freq[index]); + variance[index] := variance[index] / (Freq[index] - 1); + Stddev[index] := sqrt(variance[index]); + valstr := format('%8.3f ',[Stddev[index]]); + outline := outline + valstr; + end + else outline := outline + '********'; + OutPutFrm.RichEdit.Lines.Add(outline); + + subscript[ptr2-1] := subscript[ptr2-1] + 1; + if subscript[ptr2-1] <= levels[ptr2-1] then goto Label1; + outline := format('Number of observations accross levels = %3d',[sum]); + OutPutFrm.RichEdit.Lines.Add(outline); + if sum > 0 then + begin + outline := format('Mean accross levels = %8.3f',[ xsumtotal / sum]); + OutPutFrm.RichEdit.Lines.Add(outline); + end + else OutPutFrm.RichEdit.Lines.Add('Mean accross levels = ********'); + if sum > 1 then + begin + SD := sqrt( (xsqrtotal - (xsumtotal * xsumtotal) / sum) / (sum - 1)); + outline := format('Std. Dev. accross levels = %8.3f',[SD]); + OutPutFrm.RichEdit.Lines.Add(outline); + end + else OutPutFrm.RichEdit.Lines.Add('Std. Dev. accross levels = *******'); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + grandsum := grandsum + sum; + grandsumx := grandsumx + xsumtotal; + grandsumx2 := grandsumx2 + xsqrtotal; + sum := 0; + xsumtotal := 0.0; + xsqrtotal := 0.0; + if ptr1 < 1 then goto NextStep; + subscript[ptr1-1] :=subscript[ptr1-1] + 1; + if subscript[ptr1-1] <= levels[ptr1-1] then goto Label4; + +Label3: + ptr1 := ptr1 - 1; + if ptr1 < 1 then goto NextStep; + if subscript[ptr1-1] > levels[ptr1-1] then goto Label3; + subscript[ptr1-1] := subscript[ptr1-1] + 1; + if subscript[ptr1-1] > levels[ptr1-1] then goto Label3; + +Label4: + for i := ptr1+1 to ListSize do subscript[i-1] := 1; + ptr1 := ListSize - 1; + if ptr1 < 1 then goto NextStep; + goto Label1; + +NextStep: + outline := format('Grand number of observations accross all categories = %3d', + [grandsum]); + OutPutFrm.RichEdit.Lines.Add(outline); + if grandsum > 0 then + begin + outline := format('Overall Mean = %8.3f',[grandsumx / grandsum]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + if grandsum > 1 then + begin + SD := sqrt((grandsumx2 - (grandsumx * grandsumx) / grandsum) / (grandsum - 1)); + outline := format('Overall standard deviation = %8.3f',[SD]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + // Do ANOVA's if requested + if CheckGroup1.CheckEnabled[0] then + begin + OutPutFrm.RichEdit.Lines.Add('ANALYSES OF VARIANCE SUMMARY TABLES'); + OutPutFrm.RichEdit.Lines.Add(''); + ptr1 := ListSize - 1; + ptr2 := ListSize; + for i := 1 to ListSize do subscript[i-1] := 1; + SSB := 0.0; + SSW := 0.0; + MSB := 0.0; + MSW := 0.0; + grandsum := 0; + grandsumx := 0.0; + grandsumx2 := 0.0; + DF1 := 0.0; + DF2 := 0.0; +FirstOne: + index := Index_Pos(subscript,displace,ListSize, self); + if Freq[index] > 0 then + begin + OutPutFrm.RichEdit.Lines.Add('Variable levels: '); + for i := 1 to ListSize do + begin + j := Selected[i-1]; + outline := format('%-10s level = %3d', + [OS3MainFrm.DataGrid.Cells[j,0], Minimum[i-1] + subscript[i-1] - 1]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.RichEdit.Lines.Add(''); + // build sumsof squares for this set + DF1 := DF1 + 1; + DF2 := DF2 + Freq[index] - 1; + grandsum := grandsum + Freq[index]; + grandsumx := grandsumx + mean[index]; + grandsumx2 := grandsumx2 + SS[index]; + SSW := SSW + SS[index] - (mean[index] * mean[index] / Freq[index]); + end; + subscript[ptr2-1] := subscript[ptr2-1] + 1; + if subscript[ptr2-1] <= levels[ptr2-1] then goto FirstOne; + + if ((grandsum > 0.0) and (DF1 > 1) and (DF2 > 1) and (SSW > 0.0)) then + begin + // build and show anova table + SST := grandsumx2 - (grandsumx * grandsumx / grandsum); + SSB := SST - SSW; + DF1 := DF1 - 1.0; // no. of groups - 1 + MSB := SSB / DF1; + MSW := SSW / DF2; + F := MSB / MSW; + FProb := probf(DF1,DF2,F); + OutPutFrm.RichEdit.Lines.Add('SOURCE D.F. SS MS F Prob.>F'); + outline := format('GROUPS %2.0f %8.2f %8.2f %8.3f %6.4f', + [DF1,SSB,MSB,F,FProb]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('WITHIN %2.0f %8.2f %8.2f', + [DF2,SSW,MSW]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('TOTAL %2d %8.2f',[grandsum-1,SST]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end + else begin + OutPutFrm.RichEdit.Lines.Add('Insufficient data for ANOVA'); + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + end; + SSB := 0.0; + SSW := 0.0; + MSB := 0.0; + MSW := 0.0; + grandsum := 0; + grandsumx := 0.0; + grandsumx2 := 0.0; + DF1 := 0.0; + DF2 := 0.0; + if ptr1 < 1 then goto LastStep; + subscript[ptr1-1] := subscript[ptr1-1] + 1; + if subscript[ptr1-1] <= levels[ptr1-1] then goto ThirdOne; +SecondOne: + ptr1 := ptr1 - 1; + if ptr1 < 1 then goto LastStep; + if subscript[ptr1-1] > levels[ptr1-1] then goto SecondOne; + subscript[ptr1-1] := subscript[ptr1-1] + 1; + if subscript[ptr1-1] > levels[ptr1-1] then goto SecondOne; +ThirdOne: + for i := ptr1+1 to ListSize do subscript[i-1] := 1; + ptr1 := ListSize - 1; + if ptr1 < 1 then goto LastStep; + goto FirstOne; +LastStep: + // do anova for all cells + OutPutFrm.RichEdit.Lines.Add('ANOVA FOR ALL CELLS'); + OutPutFrm.RichEdit.Lines.Add(''); + SST := 0.0; + SSW := 0.0; + DF2 := 0.0; + DF1 := 0.0; + grandsumx := 0.0; + grandsum := 0; + for i := 1 to length_array do + begin + if Freq[i] > 0 then + begin + SST := SST + SS[i]; + grandsum := grandsum + Freq[i]; + grandsumx := grandsumx + mean[i]; + SSW := SSW + (SS[i] - (mean[i] * mean[i] / Freq[i])); + DF1 := DF1 + 1.0; + DF2 := DF2 + (Freq[i] - 1); + end; + end; + if ( (DF1 > 1.0) and (DF2 > 1.0) and (SSW > 0.0)) then + begin + SST := SST - (grandsumx * grandsumx / grandsum); + SSB := SST - SSW; + DF1 := DF1 - 1; + MSB := SSB / DF1; + MSW := SSW / DF2; + F := MSB / MSW; + FProb := probf(DF1, DF2, F); + OutPutFrm.RichEdit.Lines.Add('SOURCE D.F. SS MS F Prob.>F'); + outline := format('GROUPS %2.0f %8.2f %8.2f %8.3f %6.4f', + [DF1,SSB,MSB,F,FProb]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('WITHIN %2.0f %8.2f %8.2f', + [DF2,SSW,MSW]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('TOTAL %2d %8.2f',[grandsum-1,SST]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add('FINISHED'); + OutPutFrm.ShowModal; + end + else + begin + OutPutFrm.RichEdit.Lines.Add('Only 1 group. No ANOVA possible.'); + OutPutFrm.ShowModal; + end; + end; + + SS := nil; + Stddev := nil; + variance := nil; + mean := nil; + Freq := nil; + selected := nil; + subscript := nil; + displace := nil; + levels := nil; + Maximum := nil; + Minimum := nil; + + BreakDownFrm.Hide; +end; + +procedure TBreakDownFrm.OutBtnClick(Sender: TObject); +var + index1: integer; + +begin + index1 := ListBox1.ItemIndex; + VarList.Items.Add(ListBox1.Items.Strings[index1]); + ListBox1.Items.Delete(index1); + InBtn.Visible := true; + if ListBox1.Items.Count = 0 then OutBtn.Visible := false; +end; + +function TBreakDownFrm.Index_Pos(var X1: IntDyneVec; var displace1: IntDyneVec; + ListSize1: integer; Sender: TObject): integer; +var + index1, i : integer; + +begin + index1 := X1[ListSize-1]; + for i := 1 to ListSize - 1 do + index1 := index1 + ((X1[i-1] - 1) * displace[i-1]); + Result := index1; +end; + +initialization + {$I breakdownunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/bubbleplotunit.lfm b/applications/lazstats/source_orig/bubbleplotunit.lfm new file mode 100644 index 000000000..597819b8d --- /dev/null +++ b/applications/lazstats/source_orig/bubbleplotunit.lfm @@ -0,0 +1,553 @@ +object BubbleForm: TBubbleForm + Left = 133 + Height = 412 + Top = 122 + Width = 550 + Caption = 'Repeated Measures Bubble Plot' + ClientHeight = 412 + ClientWidth = 550 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 8 + Height = 14 + Top = 16 + Width = 48 + Caption = 'Variables:' + ParentColor = False + end + object Label2: TLabel + Left = 230 + Height = 14 + Top = 32 + Width = 172 + Caption = 'Bubble Identification Nuber Variable' + ParentColor = False + end + object Label3: TLabel + Left = 231 + Height = 14 + Top = 104 + Width = 77 + Caption = 'X Value Variable' + ParentColor = False + end + object Label4: TLabel + Left = 230 + Height = 14 + Top = 176 + Width = 77 + Caption = 'Y Value Variable' + ParentColor = False + end + object Label5: TLabel + Left = 230 + Height = 14 + Top = 248 + Width = 96 + Caption = 'Bubble Size Variable' + ParentColor = False + end + object Label6: TLabel + Left = 8 + Height = 14 + Top = 328 + Width = 50 + Caption = 'Main Title:' + ParentColor = False + end + object Label7: TLabel + Left = 8 + Height = 14 + Top = 360 + Width = 39 + Caption = 'X Label:' + ParentColor = False + end + object Label8: TLabel + Left = 240 + Height = 14 + Top = 360 + Width = 39 + Caption = 'Y Label:' + ParentColor = False + end + object VarList: TListBox + Left = 8 + Height = 274 + Top = 32 + Width = 173 + ItemHeight = 0 + TabOrder = 0 + end + object IDInBtn: TBitBtn + Left = 192 + Height = 26 + Top = 32 + Width = 29 + 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 = IDInBtnClick + TabOrder = 1 + end + object IDOutBtn: TBitBtn + Left = 192 + Height = 26 + Top = 64 + Width = 29 + 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 = IDOutBtnClick + TabOrder = 2 + end + object XInBtn: TBitBtn + Left = 192 + Height = 26 + Top = 104 + Width = 29 + 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 = XInBtnClick + TabOrder = 3 + end + object XOutBtn: TBitBtn + Left = 192 + Height = 26 + Top = 136 + Width = 29 + 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 = XOutBtnClick + TabOrder = 4 + end + object YInBtn: TBitBtn + Left = 192 + Height = 26 + Top = 176 + Width = 29 + 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 = YInBtnClick + TabOrder = 5 + end + object YOutBtn: TBitBtn + Left = 192 + Height = 26 + Top = 208 + Width = 29 + 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 = YOutBtnClick + TabOrder = 6 + end + object SizeInBtn: TBitBtn + Left = 192 + Height = 26 + Top = 248 + Width = 29 + 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 = SizeInBtnClick + TabOrder = 7 + end + object SizeOutBtn: TBitBtn + Left = 192 + Height = 26 + Top = 280 + Width = 29 + 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 = SizeOutBtnClick + TabOrder = 8 + end + object BubbleEdit: TEdit + Left = 232 + Height = 21 + Top = 48 + Width = 167 + TabOrder = 9 + Text = 'BubbleEdit' + end + object XEdit: TEdit + Left = 230 + Height = 21 + Top = 120 + Width = 166 + TabOrder = 10 + Text = 'XEdit' + end + object YEdit: TEdit + Left = 230 + Height = 21 + Top = 192 + Width = 165 + TabOrder = 11 + Text = 'YEdit' + end + object SizeEdit: TEdit + Left = 230 + Height = 21 + Top = 264 + Width = 166 + TabOrder = 12 + Text = 'SizeEdit' + end + object ResetBtn: TButton + Left = 443 + Height = 40 + Top = 80 + Width = 94 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 13 + end + object CancelBtn: TButton + Left = 440 + Height = 38 + Top = 144 + Width = 98 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 14 + end + object ComputeBtn: TButton + Left = 440 + Height = 38 + Top = 208 + Width = 98 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 15 + end + object ReturnBtn: TButton + Left = 440 + Height = 38 + Top = 272 + Width = 98 + Caption = 'Return' + ModalResult = 1 + TabOrder = 16 + end + object TitleEdit: TEdit + Left = 63 + Height = 21 + Top = 321 + Width = 332 + TabOrder = 17 + Text = 'TitleEdit' + end + object XLabelEdit: TEdit + Left = 63 + Height = 21 + Top = 353 + Width = 157 + TabOrder = 18 + Text = 'XLabelEdit' + end + object YLabelEdit: TEdit + Left = 280 + Height = 21 + Top = 353 + Width = 159 + TabOrder = 19 + Text = 'YLabelEdit' + end + object TransformChk: TCheckBox + Left = 8 + Height = 17 + Top = 384 + Width = 335 + Caption = 'Transform Data Grid for ANOVA (Treatments by Subjects ANOVA)' + TabOrder = 20 + end + object HelpBtn: TButton + Tag = 110 + Left = 440 + Height = 42 + Top = 16 + Width = 96 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 21 + end +end diff --git a/applications/lazstats/source_orig/bubbleplotunit.lrs b/applications/lazstats/source_orig/bubbleplotunit.lrs new file mode 100644 index 000000000..c04421d41 --- /dev/null +++ b/applications/lazstats/source_orig/bubbleplotunit.lrs @@ -0,0 +1,460 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TBubbleForm','FORMDATA',[ + 'TPF0'#11'TBubbleForm'#10'BubbleForm'#4'Left'#3#133#0#6'Height'#3#156#1#3'Top' + +#2'z'#5'Width'#3'&'#2#7'Caption'#6#29'Repeated Measures Bubble Plot'#12'Clie' + +'ntHeight'#3#156#1#11'ClientWidth'#3'&'#2#6'OnShow'#7#8'FormShow'#10'LCLVers' + +'ion'#6#8'0.9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'#2#14#3'Top'#2 + +#16#5'Width'#2'0'#7'Caption'#6#10'Variables:'#11'ParentColor'#8#0#0#6'TLabel' + +#6'Label2'#4'Left'#3#230#0#6'Height'#2#14#3'Top'#2' '#5'Width'#3#172#0#7'Cap' + +'tion'#6'$Bubble Identification Nuber Variable'#11'ParentColor'#8#0#0#6'TLab' + +'el'#6'Label3'#4'Left'#3#231#0#6'Height'#2#14#3'Top'#2'h'#5'Width'#2'M'#7'Ca' + +'ption'#6#16'X Value Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'L' + +'eft'#3#230#0#6'Height'#2#14#3'Top'#3#176#0#5'Width'#2'M'#7'Caption'#6#16'Y ' + +'Value Variable'#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#3#230#0#6 + +'Height'#2#14#3'Top'#3#248#0#5'Width'#2'`'#7'Caption'#6#20'Bubble Size Varia' + +'ble'#11'ParentColor'#8#0#0#6'TLabel'#6'Label6'#4'Left'#2#8#6'Height'#2#14#3 + +'Top'#3'H'#1#5'Width'#2'2'#7'Caption'#6#11'Main Title:'#11'ParentColor'#8#0#0 + +#6'TLabel'#6'Label7'#4'Left'#2#8#6'Height'#2#14#3'Top'#3'h'#1#5'Width'#2'''' + +#7'Caption'#6#8'X Label:'#11'ParentColor'#8#0#0#6'TLabel'#6'Label8'#4'Left'#3 + +#240#0#6'Height'#2#14#3'Top'#3'h'#1#5'Width'#2''''#7'Caption'#6#8'Y Label:' + +#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#8#6'Height'#3#18#1#3 + +'Top'#2' '#5'Width'#3#173#0#10'ItemHeight'#2#0#8'TabOrder'#2#0#0#0#7'TBitBtn' + +#7'IDInBtn'#4'Left'#3#192#0#6'Height'#2#26#3'Top'#2' '#5'Width'#2#29#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#255#255#255#0#255#255#255#0#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#12'IDInBtnClick'#8 + +'TabOrder'#2#1#0#0#7'TBitBtn'#8'IDOutBtn'#4'Left'#3#192#0#6'Height'#2#26#3'T' + +'op'#2'@'#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0 + +#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0 + +#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G' + +#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161 + +'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131 + +#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/' + +'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e' + +#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255 + +#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132 + +#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255 + +#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154 + +#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255 + +#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201 + +#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O' + +#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num' + +'Glyphs'#2#0#7'OnClick'#7#13'IDOutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#6 + +'XInBtn'#4'Left'#3#192#0#6'Height'#2#26#3'Top'#2'h'#5'Width'#2#29#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#11'XInBtnClick'#8 + +'TabOrder'#2#3#0#0#7'TBitBtn'#7'XOutBtn'#4'Left'#3#192#0#6'Height'#2#26#3'To' + +'p'#3#136#0#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0 + +#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd' + +#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G' + +#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161 + ,'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131 + +#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/' + +'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e' + +#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255 + +#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132 + +#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255 + +#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154 + +#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255 + +#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201 + +#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O' + +#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num' + +'Glyphs'#2#0#7'OnClick'#7#12'XOutBtnClick'#8'TabOrder'#2#4#0#0#7'TBitBtn'#6 + +'YInBtn'#4'Left'#3#192#0#6'Height'#2#26#3'Top'#3#176#0#5'Width'#2#29#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#255#255#255#0#255#255#255#0#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'YInBtnClick'#8 + +'TabOrder'#2#5#0#0#7'TBitBtn'#7'YOutBtn'#4'Left'#3#192#0#6'Height'#2#26#3'To' + +'p'#3#208#0#5'Width'#2#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0 + +#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd' + +#0#0#0#0#0#0#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G' + +#153'O'#184#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161 + +'V'#247'G'#153'O8'#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131 + +#255'['#170'd'#255'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/' + +'x5'#255'*p/'#255'%i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e' + +#195'q'#196'{'#200#134#255#156#213#165#255#152#211#161#255#148#208#157#255 + +#144#206#152#255#139#203#147#255#135#201#142#255#130#198#137#255'~'#195#132 + +#255'z'#193#128#255'v'#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255 + +#255#255#0'h'#199't'#201#127#204#138#255#162#216#171#255#158#214#167#255#154 + +#212#163#255#150#210#159#255#147#207#154#255#142#204#149#255#137#202#144#255 + +#133#199#139#255#129#197#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255 + +#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201 + +#135#255']'#184'h'#255'X'#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O' + +#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255 + +#0#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + ,#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#9'Num' + +'Glyphs'#2#0#7'OnClick'#7#12'YOutBtnClick'#8'TabOrder'#2#6#0#0#7'TBitBtn'#9 + +'SizeInBtn'#4'Left'#3#192#0#6'Height'#2#26#3'Top'#3#248#0#5'Width'#2#29#10'G' + +'lyph.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'SizeInBt' + +'nClick'#8'TabOrder'#2#7#0#0#7'TBitBtn'#10'SizeOutBtn'#4'Left'#3#192#0#6'Hei' + +'ght'#2#26#3'Top'#3#24#1#5'Width'#2#29#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 + +'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'SizeOutBtnClick'#8'TabOrder'#2#8 + +#0#0#5'TEdit'#10'BubbleEdit'#4'Left'#3#232#0#6'Height'#2#21#3'Top'#2'0'#5'Wi' + +'dth'#3#167#0#8'TabOrder'#2#9#4'Text'#6#10'BubbleEdit'#0#0#5'TEdit'#5'XEdit' + +#4'Left'#3#230#0#6'Height'#2#21#3'Top'#2'x'#5'Width'#3#166#0#8'TabOrder'#2#10 + +#4'Text'#6#5'XEdit'#0#0#5'TEdit'#5'YEdit'#4'Left'#3#230#0#6'Height'#2#21#3'T' + +'op'#3#192#0#5'Width'#3#165#0#8'TabOrder'#2#11#4'Text'#6#5'YEdit'#0#0#5'TEdi' + +'t'#8'SizeEdit'#4'Left'#3#230#0#6'Height'#2#21#3'Top'#3#8#1#5'Width'#3#166#0 + +#8'TabOrder'#2#12#4'Text'#6#8'SizeEdit'#0#0#7'TButton'#8'ResetBtn'#4'Left'#3 + +#187#1#6'Height'#2'('#3'Top'#2'P'#5'Width'#2'^'#7'Caption'#6#5'Reset'#7'OnCl' + +'ick'#7#13'ResetBtnClick'#8'TabOrder'#2#13#0#0#7'TButton'#9'CancelBtn'#4'Lef' + +'t'#3#184#1#6'Height'#2'&'#3'Top'#3#144#0#5'Width'#2'b'#7'Caption'#6#6'Cance' + +'l'#11'ModalResult'#2#2#8'TabOrder'#2#14#0#0#7'TButton'#10'ComputeBtn'#4'Lef' + +'t'#3#184#1#6'Height'#2'&'#3'Top'#3#208#0#5'Width'#2'b'#7'Caption'#6#7'Compu' + +'te'#7'OnClick'#7#15'ComputeBtnClick'#8'TabOrder'#2#15#0#0#7'TButton'#9'Retu' + +'rnBtn'#4'Left'#3#184#1#6'Height'#2'&'#3'Top'#3#16#1#5'Width'#2'b'#7'Caption' + +#6#6'Return'#11'ModalResult'#2#1#8'TabOrder'#2#16#0#0#5'TEdit'#9'TitleEdit'#4 + +'Left'#2'?'#6'Height'#2#21#3'Top'#3'A'#1#5'Width'#3'L'#1#8'TabOrder'#2#17#4 + +'Text'#6#9'TitleEdit'#0#0#5'TEdit'#10'XLabelEdit'#4'Left'#2'?'#6'Height'#2#21 + ,#3'Top'#3'a'#1#5'Width'#3#157#0#8'TabOrder'#2#18#4'Text'#6#10'XLabelEdit'#0#0 + +#5'TEdit'#10'YLabelEdit'#4'Left'#3#24#1#6'Height'#2#21#3'Top'#3'a'#1#5'Width' + +#3#159#0#8'TabOrder'#2#19#4'Text'#6#10'YLabelEdit'#0#0#9'TCheckBox'#12'Trans' + +'formChk'#4'Left'#2#8#6'Height'#2#17#3'Top'#3#128#1#5'Width'#3'O'#1#7'Captio' + +'n'#6' SizeEdit.Text) then SizeCol := i; + end; + if ((BubbleCol = 0) or (XCol = 0) or (YCol = 0) or (SizeCol = 0)) then + begin + ShowMessage('ERROR! One or more variables not found!'); + Exit; + end; + + // get number of bubbles and replications per bubble (number of bubble id's) + minrep := 1000; + maxrep := -1; + for i := 1 to NoCases do + begin + intcell := StrToInt(OS3MainFrm.DataGrid.Cells[BubbleCol,i]); + if (intcell > maxrep) then maxrep := intcell; + if (intcell < minrep) then minrep := intcell; + end; + nobubbles := maxrep - minrep + 1; + noreplications := 1; + intcell := StrToInt(OS3MainFrm.DataGrid.Cells[BubbleCol,1]); + for i := 2 to NoCases do + begin + cell := StrToInt(OS3MainFrm.DataGrid.Cells[BubbleCol,i]); + if (cell = intcell) then noreplications := noreplications + 1; + end; + + // get min, max and range of Y + Ymin := 1.0e300; + Ymax := -1.0e300; + for i := 1 to NoCases do + begin + cellvalue := StrToFloat(OS3MainFrm.DataGrid.Cells[YCol,i]); + if (cellvalue > Ymax) then Ymax := cellvalue; + if (cellvalue < Ymin) then Ymin := cellvalue; + end; + Yrange := Ymax - Ymin; + Ystep := Yrange / 10; + + // get min, max and range of X + Xmin := 10000; + Xmax := -1; + for i := 1 to NoCases do + begin + intcell := StrToInt(OS3MainFrm.DataGrid.Cells[XCol,i]); + if (intcell > Xmax) then Xmax := intcell; + if (intcell < Xmin) then Xmin := intcell; + end; + Xrange := Xmax - Xmin; + Xstep := Xrange div (noreplications-1); + + // get min, max, range, and increment of bubble sizes + BubMin := 1.0e300; + BubMax := -1.0e300; + for i := 1 to NoCases do + begin + cellvalue := StrToFloat(OS3MainFrm.DataGrid.Cells[SizeCol,i]); + if (cellvalue > BubMax) then BubMax := cellvalue; + if (cellvalue < BubMin) then BubMin := cellvalue; + end; + BubRange := BubMax - BubMin; + + // Display basic statistics + ncases := NoCases div noreplications; + GrandYMean := 0.0; + GrandSizeMean := 0.0; + SetLength(CaseYMeans,ncases); + SetLength(CaseSizeMeans,ncases); + SetLength(Ymeans,noreplications); + SetLength(SizeMeans,noreplications); + for i := 0 to ncases - 1 do + begin + CaseYMeans[i] := 0.0; + CaseSizeMeans[i] := 0.0; + end; + for i := 0 to noreplications - 1 do + begin + Ymeans[i] := 0.0; + SizeMeans[i] := 0.0; + end; + i := 1; + + while ( i <= NoCases) do + begin + for j := 1 to noreplications do + begin + bubbleID := StrToInt(OS3MainFrm.DataGrid.Cells[BubbleCol,i]); + yvalue := StrToFloat(OS3MainFrm.DataGrid.Cells[YCol,i]); + sizevalue := StrToFloat(OS3MainFrm.DataGrid.Cells[SizeCol,i]); + GrandYMean:= GrandYMean + yvalue; + GrandSizeMean := GrandSizeMean + sizevalue; + Ymeans[j-1] := Ymeans[j-1] + yvalue; + SizeMeans[j-1] := SizeMeans[j-1] + sizevalue; + CaseYMeans[bubbleID-1] := CaseYMeans[bubbleID-1] + yvalue; + CaseSizeMeans[bubbleID-1] := CaseSizeMeans[bubbleID-1] + sizevalue; + i := i + 1; + end; + end; + + GrandYMean := GrandYMean / (ncases * noreplications); + GrandSizeMean := GrandSizeMean / (ncases * noreplications); + for j := 0 to noreplications - 1 do + begin + Ymeans[j] := Ymeans[j] / ncases; + SizeMeans[j] := SizeMeans[j] / ncases; + end; + for i := 0 to ncases - 1 do + begin + CaseYMeans[i] := CaseYMeans[i] / noreplications; + CaseSizeMeans[i] := CaseSizeMeans[i] / noreplications; + end; + + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('MEANS FOR Y AND SIZE VARIABLES'); + OutPutFrm.RichEdit.Lines.Add(''); + outline := format('Grand Mean for Y := %8.3f',[GrandYMean]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Grand Mean for Size := %8.3f',[GrandSizeMean]); + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('REPLICATION MEAN Y VALUES (ACROSS OBJECTS)'); + for j := 0 to noreplications - 1 do + begin + outline := format('Replication %5d Mean := %8.3f',[j+1,Ymeans[j]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('REPLICATION MEAN SIZE VALUES (ACROSS OBJECTSend;'); + for j := 0 to noreplications - 1 do + begin + outline := format('Replication %5d Mean := %8.3f',[j+1,SizeMeans[j]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.RichEdit.Lines.Add(''); + + OutPutFrm.RichEdit.Lines.Add('MEAN Y VALUES FOR EACH BUBBLE (OBJECT)'); + for i := 0 to ncases - 1 do + begin + outline := format('Object %5d Mean := %8.3f',[i+1,CaseYMeans[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('MEAN SIZE VALUES FOR EACH BUBBLE (OBJECT)'); + for i := 0 to ncases - 1 do + begin + outline := format('Object %5d Mean := %8.3f',[i+1,CaseSizeMeans[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + + OutPutFrm.ShowModal; + OutPutFrm.RichEdit.Clear; + + SizeMeans := nil; + Ymeans := nil; + CaseSizeMeans := nil; + CaseYMeans := nil; +//-------------------------------------------------------------------------- +// Plotting Section +//--------------------------------------------------------------------------- + BlankFrm.Image1.Canvas.Clear; + BlankFrm.Show; + BlankFrm.Caption := 'Bubble Plot of ' + OS3MainFrm.FileNameEdit.Text; + Xlabel := XlabelEdit.Text; + Ylabel := YlabelEdit.Text; + Title := TitleEdit.Text; + ImageHi := BlankFrm.Image1.Height; + ImageWide := BlankFrm.Image1.Width; + Xstart := ImageWide div 10; + Xend := (ImageWide * 9) div 10; + Ystart := ImageHi div 10; + Yend := (ImageHi * 8) div 10; + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + BlankFrm.Image1.Canvas.Brush.Color := clWhite; + BlankFrm.Image1.Canvas.Rectangle(0,0,ImageWide,ImageHi); + BlankFrm.Image1.Canvas.FloodFill(0,0,clWhite,fsBorder); + BlankFrm.Image1.Canvas.TextOut(Xstart-10,Ystart-30,Ylabel); + LabelWide := BlankFrm.Image1.Canvas.TextWidth(Xlabel); + BlankFrm.Image1.Canvas.TextOut((Xend-Xstart) div 2 - LabelWide,Yend + 40,Xlabel); + LabelWide := BlankFrm.Image1.Canvas.TextWidth(Title); + BlankFrm.Image1.Canvas.TextOut((Xend-Xstart) div 2 - LabelWide div 2, Ystart - 40,Title); + + // draw axis lines + BlankFrm.Image1.Canvas.MoveTo(Xstart,Yend); + BlankFrm.Image1.Canvas.LineTo(Xend,Yend); + BlankFrm.Image1.Canvas.MoveTo(Xstart,Yend); + BlankFrm.Image1.Canvas.LineTo(Xstart,Ystart); + + + // create y axis values + Yincr := (Yend - Ystart) div 10; + for i := 0 to 10 do // print Y axis values + begin + place := Yend - (i * Yincr); + value := Ymin + (Ystep * i); + valstr := format('%4.2f',[value]); + astring := valstr; + TextHi := BlankFrm.Image1.Canvas.TextHeight(astring); + BlankFrm.Image1.Canvas.TextOut(Xstart-30,place-TextHi,astring); + end; + + // create x axis values + for i := 1 to noreplications do // print x axis + begin + value := Xmin + ((i-1) * Xstep); + ratio := i / noreplications; + Xpos := round(ratio * (Xend - Xstart)); + valstr := format('%4.0f',[value]); + astring := valstr; + BlankFrm.Image1.Canvas.TextOut(Xpos,Yend + 20,astring); + end; + + // Plot the bubbles + for i := 1 to NoCases do + begin + intcell := StrToInt(OS3MainFrm.DataGrid.Cells[BubbleCol,i]); + xvalue := StrToFloat(OS3MainFrm.DataGrid.Cells[XCol,i]); + cellvalue := StrToFloat(OS3MainFrm.DataGrid.Cells[YCol,i]); + yprop := Yend - round(((cellvalue-Ymin) / Yrange) * (Yend - Ystart)); + cellvalue := StrToFloat(OS3MainFrm.DataGrid.Cells[SizeCol,i]); + astring := Trim(OS3MainFrm.DataGrid.Cells[BubbleCol,i]); + cellvalue := ((cellvalue - BubMin) / BubRange) * 20; + cellvalue := cellvalue + 10; + ratio := ((xvalue - Xmin) / Xstep) + 1; + ratio := (ratio / noreplications) * (Xend - Xstart); + Xpos := ceil(ratio); + Bubcolor := intcell - 1; + while (Bubcolor > 11) do Bubcolor := 12 - Bubcolor; + BlankFrm.Image1.Canvas.Brush.Color := Colors[Bubcolor]; + X1 := Xpos - ceil(cellvalue); + Y1 := yprop - ceil(cellvalue); + X2 := Xpos + ceil(cellvalue); + Y2 := yprop + ceil(cellvalue); + BlankFrm.Image1.Canvas.Ellipse(X1,Y1,X2,Y2); + BlankFrm.Image1.Canvas.Brush.Color := clWhite; + BlankFrm.Image1.Canvas.TextOut(Xpos,yprop,astring); + end; + + // Transform data matrix if elected + if (TransformChk.Checked = true) then + begin + ncases := nobubbles; + ncols := noreplications * 3 + 1; + // Note - columns: 1:=object ID, 2 to noreplications := X, + // next noreplications := Y, next noreplications := size + SetLength(Data,ncases,ncols); + i := 1; + while (i <= NoCases) do + begin + for j := 1 to noreplications do + begin + bubbleID := StrToInt(OS3MainFrm.DataGrid.Cells[BubbleCol,i]); + xvalue := StrToFloat(OS3MainFrm.DataGrid.Cells[XCol,i]); + yvalue := StrToFloat(OS3MainFrm.DataGrid.Cells[YCol,i]); + sizevalue := StrToFloat(OS3MainFrm.DataGrid.Cells[SizeCol,i]); + Data[bubbleID-1,0] := bubbleID; + Data[bubbleID-1,j] := xvalue; + Data[bubbleID-1,noreplications+j] := yvalue; + Data[bubbleID-1,noreplications*2+j] := sizevalue; + i := i + 1; + end; + end; + SetLength(labels,NoVariables+1); + for i := 1 to NoVariables do labels[i] := OS3MainFrm.DataGrid.Cells[i,0]; + ClearGrid; + OS3MainFrm.DataGrid.RowCount := ncases + 1; + OS3MainFrm.DataGrid.ColCount := ncols + 1; + for i := 1 to ncases do + begin + OS3MainFrm.DataGrid.Cells[0,i] := IntToStr(i); + for j := 1 to ncols do + OS3MainFrm.DataGrid.Cells[j,i] := FloatToStr(Data[i-1,j-1]); + end; + OS3MainFrm.DataGrid.Cells[1,0] := labels[1]; + for j := 2 to NoVariables do // clear dictionary + begin + for i := 0 to 7 do DictionaryFrm.DictGrid.Cells[i,j] := ''; + DictionaryFrm.DictGrid.RowCount := DictionaryFrm.DictGrid.RowCount - 1; + VarDefined[j] := false; + end; + DictionaryFrm.DictGrid.Cells[1,1] := labels[1]; + for j := 1 to noreplications do + begin + outline := labels[2] + IntToStr(j); + newcol := j + 1; + if (newcol+1 > DictionaryFrm.DictGrid.RowCount) then + DictionaryFrm.DictGrid.RowCount := DictionaryFrm.DictGrid.RowCount + 1; + DictionaryFrm.Defaults(Self,newcol); + VarDefined[newcol] := true; + DictionaryFrm.DictGrid.Cells[1,newcol] := outline; + OS3MainFrm.DataGrid.Cells[newcol,0] := outline; + end; + for j := 1 to noreplications do + begin + outline := labels[3] + IntToStr(j); + newcol := j + 1 + noreplications; + OS3MainFrm.DataGrid.Cells[newcol,0] := outline; + if (newcol+1 > DictionaryFrm.DictGrid.RowCount) then + DictionaryFrm.DictGrid.RowCount := DictionaryFrm.DictGrid.RowCount + 1; + DictionaryFrm.Defaults(Self,newcol); + VarDefined[newcol] := true; + DictionaryFrm.DictGrid.Cells[1,newcol] := outline; + end; + for j := 1 to noreplications do + begin + outline := labels[4] + IntToStr(j); + newcol := j + 1 + noreplications * 2; + OS3MainFrm.DataGrid.Cells[newcol,0] := outline; + if (newcol+1 > DictionaryFrm.DictGrid.RowCount) then + DictionaryFrm.DictGrid.RowCount := DictionaryFrm.DictGrid.RowCount + 1; + DictionaryFrm.Defaults(Self,newcol); + VarDefined[newcol] := true; + + DictionaryFrm.DictGrid.Cells[1,newcol] := outline; + end; + NoVariables := ncols; + NoCases := ncases; + OS3MainFrm.NoCasesEdit.Text := IntToStr(NoCases); + OS3MainFrm.NoVarsEdit.Text := IntToStr(NoVariables); + Data := nil; + labels := nil; + end; +end; + +procedure TBubbleForm.IDOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(BubbleEdit.Text); + IDInBtn.Visible := true; + IDOutBtn.Visible := false; +end; + +procedure TBubbleForm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + BubbleEdit.Text := ''; + XEdit.Text := ''; + YEdit.Text := ''; + SizeEdit.Text := ''; + IDInBtn.Visible := true; + IDOutBtn.Visible := false; + XInBtn.Visible := true; + XOutBtn.Visible := false; + YInBtn.Visible := true; + YOutBtn.Visible := false; + SizeInBtn.Visible := true; + SizeOutBtn.Visible := false; + VarList.Clear; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TBubbleForm.SizeInBtnClick(Sender: TObject); +VAR + index, i : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + SizeEdit.Text := VarList.Items.Strings[i]; + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + SizeOutBtn.Visible := true; + SizeInBtn.Visible := false; +end; + +procedure TBubbleForm.SizeOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(SizeEdit.Text); + SizeInBtn.Visible := true; + SizeOutBtn.Visible := false; +end; + +procedure TBubbleForm.XInBtnClick(Sender: TObject); +VAR + i, index : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + XEdit.Text := VarList.Items.Strings[i]; + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + XOutBtn.Visible := true; + XInBtn.Visible := false; +end; + +procedure TBubbleForm.XOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(XEdit.Text); + XInBtn.Visible := true; + XOutBtn.Visible := false; +end; + +procedure TBubbleForm.YInBtnClick(Sender: TObject); +VAR + index, i : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + YEdit.Text := VarList.Items.Strings[i]; + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + YOutBtn.Visible := true; + YInBtn.Visible := false; +end; + +procedure TBubbleForm.YOutBtnClick(Sender: TObject); +begin + VarList.Items.Add(YEdit.Text); + YInBtn.Visible := true; + YOutBtn.Visible := false; +end; + +initialization + {$I bubbleplotunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/calculatorunit.lfm b/applications/lazstats/source_orig/calculatorunit.lfm new file mode 100644 index 000000000..e89f77704 --- /dev/null +++ b/applications/lazstats/source_orig/calculatorunit.lfm @@ -0,0 +1,434 @@ +object CalculatorForm: TCalculatorForm + Left = 259 + Height = 486 + Top = 104 + Width = 344 + Caption = 'Calculator' + ClientHeight = 486 + ClientWidth = 344 + OnShow = FormShow + LCLVersion = '0.9.30' + object GroupBox1: TGroupBox + Left = 7 + Height = 226 + Top = 216 + Width = 243 + Caption = 'KeyPad' + ClientHeight = 208 + ClientWidth = 239 + TabOrder = 0 + object sevenbtn: TButton + Left = 7 + Height = 35 + Top = 16 + Width = 41 + Caption = '7' + OnClick = sevenbtnClick + TabOrder = 0 + end + object dividebtn: TButton + Left = 191 + Height = 35 + Top = 16 + Width = 41 + Caption = '/' + OnClick = dividebtnClick + TabOrder = 1 + end + end + object eightbtn: TButton + Left = 72 + Height = 35 + Top = 248 + Width = 41 + Caption = '8' + OnClick = eightbtnClick + TabOrder = 1 + end + object ninebtn: TButton + Left = 128 + Height = 35 + Top = 248 + Width = 41 + Caption = '9' + OnClick = ninebtnClick + TabOrder = 2 + end + object fourbtn: TButton + Left = 16 + Height = 35 + Top = 296 + Width = 41 + Caption = '4' + OnClick = fourbtnClick + TabOrder = 3 + end + object fivebtn: TButton + Left = 72 + Height = 35 + Top = 296 + Width = 41 + Caption = '5' + OnClick = fivebtnClick + TabOrder = 4 + end + object sixbtn: TButton + Left = 128 + Height = 35 + Top = 296 + Width = 41 + Caption = '6' + OnClick = sixbtnClick + TabOrder = 5 + end + object onebtn: TButton + Left = 16 + Height = 35 + Top = 344 + Width = 41 + Caption = '1' + OnClick = onebtnClick + TabOrder = 6 + end + object twobtn: TButton + Left = 72 + Height = 35 + Top = 344 + Width = 41 + Caption = '2' + OnClick = twobtnClick + TabOrder = 7 + end + object threebtn: TButton + Left = 128 + Height = 35 + Top = 344 + Width = 41 + Caption = '3' + OnClick = threebtnClick + TabOrder = 8 + end + object multbtn: TButton + Left = 200 + Height = 35 + Top = 296 + Width = 41 + Caption = '*' + OnClick = multbtnClick + TabOrder = 9 + end + object subtractbtn: TButton + Left = 200 + Height = 35 + Top = 344 + Width = 41 + Caption = '-' + OnClick = subtractbtnClick + TabOrder = 10 + end + object Addbtn: TButton + Left = 200 + Height = 35 + Top = 392 + Width = 41 + Caption = '+' + OnClick = AddbtnClick + TabOrder = 11 + end + object ZeroBtn: TButton + Left = 16 + Height = 35 + Top = 392 + Width = 41 + Caption = '0' + OnClick = ZeroBtnClick + TabOrder = 12 + end + object ChangeSignBtn: TButton + Left = 72 + Height = 35 + Top = 392 + Width = 41 + Caption = '+/-' + OnClick = ChangeSignBtnClick + TabOrder = 13 + end + object PeriodBtn: TButton + Left = 128 + Height = 35 + Top = 392 + Width = 41 + Caption = '.' + OnClick = PeriodBtnClick + TabOrder = 14 + end + object GroupBox2: TGroupBox + Left = 258 + Height = 227 + Top = 216 + Width = 71 + Caption = 'Memory' + TabOrder = 15 + end + object MemInBtn: TButton + Left = 272 + Height = 35 + Top = 248 + Width = 41 + Caption = 'X->M' + OnClick = MemInBtnClick + TabOrder = 16 + end + object MemOutBtn: TButton + Left = 272 + Height = 35 + Top = 296 + Width = 41 + Caption = 'M->X' + OnClick = MemOutBtnClick + TabOrder = 17 + end + object MemPlusBtn: TButton + Left = 272 + Height = 35 + Top = 344 + Width = 41 + Caption = 'M+' + OnClick = MemPlusBtnClick + TabOrder = 18 + end + object EqualBtn: TButton + Left = 272 + Height = 35 + Top = 392 + Width = 41 + Caption = '=' + OnClick = EqualBtnClick + TabOrder = 19 + end + object XEdit: TEdit + Left = 7 + Height = 23 + Top = 176 + Width = 322 + OnKeyPress = XEditKeyPress + TabOrder = 20 + Text = 'XEdit' + end + object GroupBox3: TGroupBox + Left = 0 + Height = 149 + Top = 8 + Width = 328 + Caption = 'Functions' + ClientHeight = 131 + ClientWidth = 324 + TabOrder = 21 + object sinbtn: TButton + Left = 14 + Height = 25 + Top = 8 + Width = 48 + Caption = 'sin' + OnClick = sinbtnClick + TabOrder = 0 + end + end + object cosbtn: TButton + Left = 72 + Height = 25 + Top = 32 + Width = 48 + Caption = 'cos' + OnClick = cosbtnClick + TabOrder = 22 + end + object tanbtn: TButton + Left = 128 + Height = 25 + Top = 32 + Width = 48 + Caption = 'tan' + OnClick = tanbtnClick + TabOrder = 23 + end + object Combobtn: TButton + Left = 184 + Height = 25 + Top = 32 + Width = 48 + Caption = 'nCr' + OnClick = CombobtnClick + TabOrder = 24 + end + object ClearEntryBtn: TButton + Left = 240 + Height = 25 + Top = 32 + Width = 48 + Caption = 'CE' + OnClick = ClearEntryBtnClick + TabOrder = 25 + end + object MeanBtn: TButton + Left = 16 + Height = 25 + Top = 64 + Width = 48 + Caption = 'Mean' + OnClick = MeanBtnClick + TabOrder = 26 + end + object VarBtn: TButton + Left = 72 + Height = 25 + Top = 64 + Width = 48 + Caption = 'VAR.' + OnClick = VarBtnClick + TabOrder = 27 + end + object StdDevBtn: TButton + Left = 128 + Height = 25 + Top = 64 + Width = 48 + Caption = 'Std.Dev.' + OnClick = StdDevBtnClick + TabOrder = 28 + end + object natlogbtn: TButton + Left = 184 + Height = 25 + Top = 64 + Width = 48 + Caption = 'ln' + OnClick = natlogbtnClick + TabOrder = 29 + end + object log10btn: TButton + Left = 240 + Height = 25 + Top = 64 + Width = 48 + Caption = 'log10' + OnClick = log10btnClick + TabOrder = 30 + end + object sqrbtn: TButton + Left = 16 + Height = 24 + Top = 96 + Width = 48 + Caption = 'x^2' + OnClick = sqrbtnClick + TabOrder = 31 + end + object sqrtbtn: TButton + Left = 72 + Height = 25 + Top = 95 + Width = 48 + Caption = 'sqrt' + OnClick = sqrtbtnClick + TabOrder = 32 + end + object ytopowerxbtn: TButton + Left = 128 + Height = 25 + Top = 95 + Width = 48 + Caption = 'y^x' + OnClick = ytopowerxbtnClick + TabOrder = 33 + end + object etoxbtn: TButton + Left = 184 + Height = 25 + Top = 96 + Width = 48 + Caption = 'e^x' + OnClick = etoxbtnClick + TabOrder = 34 + end + object tentoxbtn: TButton + Left = 240 + Height = 25 + Top = 96 + Width = 48 + Caption = '10^x' + OnClick = tentoxbtnClick + TabOrder = 35 + end + object expbtn: TButton + Left = 16 + Height = 25 + Top = 128 + Width = 48 + Caption = 'exp' + OnClick = expbtnClick + TabOrder = 36 + end + object absbtn: TButton + Left = 72 + Height = 24 + Top = 128 + Width = 48 + Caption = 'abs' + OnClick = absbtnClick + TabOrder = 37 + end + object PiBtn: TButton + Left = 128 + Height = 25 + Top = 127 + Width = 48 + Caption = 'Pi' + OnClick = PiBtnClick + TabOrder = 38 + end + object nPrbtn: TButton + Left = 184 + Height = 25 + Top = 128 + Width = 48 + Caption = 'nPr' + OnClick = nPrbtnClick + TabOrder = 39 + end + object nfactorialbtn: TButton + Left = 240 + Height = 25 + Top = 128 + Width = 48 + Caption = 'n!' + OnClick = nfactorialbtnClick + TabOrder = 40 + end + object Label1: TLabel + Left = 18 + Height = 16 + Top = 450 + Width = 155 + Caption = 'No. in memory stack (M+) = ' + ParentColor = False + end + object NEdit: TEdit + Left = 175 + Height = 23 + Top = 450 + Width = 48 + TabOrder = 41 + Text = 'NEdit' + end + object ReturnBtn: TButton + Left = 241 + Height = 26 + Top = 449 + Width = 69 + Caption = 'Return' + ModalResult = 1 + OnClick = ReturnBtnClick + TabOrder = 42 + end +end diff --git a/applications/lazstats/source_orig/calculatorunit.lrs b/applications/lazstats/source_orig/calculatorunit.lrs new file mode 100644 index 000000000..0366917e0 --- /dev/null +++ b/applications/lazstats/source_orig/calculatorunit.lrs @@ -0,0 +1,102 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TCalculatorForm','FORMDATA',[ + 'TPF0'#15'TCalculatorForm'#14'CalculatorForm'#4'Left'#3#3#1#6'Height'#3#230#1 + +#3'Top'#2'h'#5'Width'#3'X'#1#7'Caption'#6#10'Calculator'#12'ClientHeight'#3 + +#230#1#11'ClientWidth'#3'X'#1#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#6'0.9' + +'.30'#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#7#6'Height'#3#226#0#3'Top'#3#216 + +#0#5'Width'#3#243#0#7'Caption'#6#6'KeyPad'#12'ClientHeight'#3#208#0#11'Clien' + +'tWidth'#3#239#0#8'TabOrder'#2#0#0#7'TButton'#8'sevenbtn'#4'Left'#2#7#6'Heig' + +'ht'#2'#'#3'Top'#2#16#5'Width'#2')'#7'Caption'#6#1'7'#7'OnClick'#7#13'sevenb' + +'tnClick'#8'TabOrder'#2#0#0#0#7'TButton'#9'dividebtn'#4'Left'#3#191#0#6'Heig' + +'ht'#2'#'#3'Top'#2#16#5'Width'#2')'#7'Caption'#6#1'/'#7'OnClick'#7#14'divide' + +'btnClick'#8'TabOrder'#2#1#0#0#0#7'TButton'#8'eightbtn'#4'Left'#2'H'#6'Heigh' + +'t'#2'#'#3'Top'#3#248#0#5'Width'#2')'#7'Caption'#6#1'8'#7'OnClick'#7#13'eigh' + +'tbtnClick'#8'TabOrder'#2#1#0#0#7'TButton'#7'ninebtn'#4'Left'#3#128#0#6'Heig' + +'ht'#2'#'#3'Top'#3#248#0#5'Width'#2')'#7'Caption'#6#1'9'#7'OnClick'#7#12'nin' + +'ebtnClick'#8'TabOrder'#2#2#0#0#7'TButton'#7'fourbtn'#4'Left'#2#16#6'Height' + +#2'#'#3'Top'#3'('#1#5'Width'#2')'#7'Caption'#6#1'4'#7'OnClick'#7#12'fourbtnC' + +'lick'#8'TabOrder'#2#3#0#0#7'TButton'#7'fivebtn'#4'Left'#2'H'#6'Height'#2'#' + +#3'Top'#3'('#1#5'Width'#2')'#7'Caption'#6#1'5'#7'OnClick'#7#12'fivebtnClick' + +#8'TabOrder'#2#4#0#0#7'TButton'#6'sixbtn'#4'Left'#3#128#0#6'Height'#2'#'#3'T' + +'op'#3'('#1#5'Width'#2')'#7'Caption'#6#1'6'#7'OnClick'#7#11'sixbtnClick'#8'T' + +'abOrder'#2#5#0#0#7'TButton'#6'onebtn'#4'Left'#2#16#6'Height'#2'#'#3'Top'#3 + +'X'#1#5'Width'#2')'#7'Caption'#6#1'1'#7'OnClick'#7#11'onebtnClick'#8'TabOrde' + +'r'#2#6#0#0#7'TButton'#6'twobtn'#4'Left'#2'H'#6'Height'#2'#'#3'Top'#3'X'#1#5 + +'Width'#2')'#7'Caption'#6#1'2'#7'OnClick'#7#11'twobtnClick'#8'TabOrder'#2#7#0 + +#0#7'TButton'#8'threebtn'#4'Left'#3#128#0#6'Height'#2'#'#3'Top'#3'X'#1#5'Wid' + +'th'#2')'#7'Caption'#6#1'3'#7'OnClick'#7#13'threebtnClick'#8'TabOrder'#2#8#0 + +#0#7'TButton'#7'multbtn'#4'Left'#3#200#0#6'Height'#2'#'#3'Top'#3'('#1#5'Widt' + +'h'#2')'#7'Caption'#6#1'*'#7'OnClick'#7#12'multbtnClick'#8'TabOrder'#2#9#0#0 + +#7'TButton'#11'subtractbtn'#4'Left'#3#200#0#6'Height'#2'#'#3'Top'#3'X'#1#5'W' + +'idth'#2')'#7'Caption'#6#1'-'#7'OnClick'#7#16'subtractbtnClick'#8'TabOrder'#2 + +#10#0#0#7'TButton'#6'Addbtn'#4'Left'#3#200#0#6'Height'#2'#'#3'Top'#3#136#1#5 + +'Width'#2')'#7'Caption'#6#1'+'#7'OnClick'#7#11'AddbtnClick'#8'TabOrder'#2#11 + +#0#0#7'TButton'#7'ZeroBtn'#4'Left'#2#16#6'Height'#2'#'#3'Top'#3#136#1#5'Widt' + +'h'#2')'#7'Caption'#6#1'0'#7'OnClick'#7#12'ZeroBtnClick'#8'TabOrder'#2#12#0#0 + +#7'TButton'#13'ChangeSignBtn'#4'Left'#2'H'#6'Height'#2'#'#3'Top'#3#136#1#5'W' + +'idth'#2')'#7'Caption'#6#3'+/-'#7'OnClick'#7#18'ChangeSignBtnClick'#8'TabOrd' + +'er'#2#13#0#0#7'TButton'#9'PeriodBtn'#4'Left'#3#128#0#6'Height'#2'#'#3'Top'#3 + +#136#1#5'Width'#2')'#7'Caption'#6#1'.'#7'OnClick'#7#14'PeriodBtnClick'#8'Tab' + +'Order'#2#14#0#0#9'TGroupBox'#9'GroupBox2'#4'Left'#3#2#1#6'Height'#3#227#0#3 + +'Top'#3#216#0#5'Width'#2'G'#7'Caption'#6#6'Memory'#8'TabOrder'#2#15#0#0#7'TB' + +'utton'#8'MemInBtn'#4'Left'#3#16#1#6'Height'#2'#'#3'Top'#3#248#0#5'Width'#2 + +')'#7'Caption'#6#4'X->M'#7'OnClick'#7#13'MemInBtnClick'#8'TabOrder'#2#16#0#0 + +#7'TButton'#9'MemOutBtn'#4'Left'#3#16#1#6'Height'#2'#'#3'Top'#3'('#1#5'Width' + +#2')'#7'Caption'#6#4'M->X'#7'OnClick'#7#14'MemOutBtnClick'#8'TabOrder'#2#17#0 + +#0#7'TButton'#10'MemPlusBtn'#4'Left'#3#16#1#6'Height'#2'#'#3'Top'#3'X'#1#5'W' + +'idth'#2')'#7'Caption'#6#2'M+'#7'OnClick'#7#15'MemPlusBtnClick'#8'TabOrder'#2 + +#18#0#0#7'TButton'#8'EqualBtn'#4'Left'#3#16#1#6'Height'#2'#'#3'Top'#3#136#1#5 + +'Width'#2')'#7'Caption'#6#1'='#7'OnClick'#7#13'EqualBtnClick'#8'TabOrder'#2 + +#19#0#0#5'TEdit'#5'XEdit'#4'Left'#2#7#6'Height'#2#23#3'Top'#3#176#0#5'Width' + +#3'B'#1#10'OnKeyPress'#7#13'XEditKeyPress'#8'TabOrder'#2#20#4'Text'#6#5'XEdi' + +'t'#0#0#9'TGroupBox'#9'GroupBox3'#4'Left'#2#0#6'Height'#3#149#0#3'Top'#2#8#5 + +'Width'#3'H'#1#7'Caption'#6#9'Functions'#12'ClientHeight'#3#131#0#11'ClientW' + +'idth'#3'D'#1#8'TabOrder'#2#21#0#7'TButton'#6'sinbtn'#4'Left'#2#14#6'Height' + +#2#25#3'Top'#2#8#5'Width'#2'0'#7'Caption'#6#3'sin'#7'OnClick'#7#11'sinbtnCli' + +'ck'#8'TabOrder'#2#0#0#0#0#7'TButton'#6'cosbtn'#4'Left'#2'H'#6'Height'#2#25#3 + +'Top'#2' '#5'Width'#2'0'#7'Caption'#6#3'cos'#7'OnClick'#7#11'cosbtnClick'#8 + +'TabOrder'#2#22#0#0#7'TButton'#6'tanbtn'#4'Left'#3#128#0#6'Height'#2#25#3'To' + +'p'#2' '#5'Width'#2'0'#7'Caption'#6#3'tan'#7'OnClick'#7#11'tanbtnClick'#8'Ta' + +'bOrder'#2#23#0#0#7'TButton'#8'Combobtn'#4'Left'#3#184#0#6'Height'#2#25#3'To' + +'p'#2' '#5'Width'#2'0'#7'Caption'#6#3'nCr'#7'OnClick'#7#13'CombobtnClick'#8 + +'TabOrder'#2#24#0#0#7'TButton'#13'ClearEntryBtn'#4'Left'#3#240#0#6'Height'#2 + +#25#3'Top'#2' '#5'Width'#2'0'#7'Caption'#6#2'CE'#7'OnClick'#7#18'ClearEntryB' + +'tnClick'#8'TabOrder'#2#25#0#0#7'TButton'#7'MeanBtn'#4'Left'#2#16#6'Height'#2 + +#25#3'Top'#2'@'#5'Width'#2'0'#7'Caption'#6#4'Mean'#7'OnClick'#7#12'MeanBtnCl' + +'ick'#8'TabOrder'#2#26#0#0#7'TButton'#6'VarBtn'#4'Left'#2'H'#6'Height'#2#25#3 + ,'Top'#2'@'#5'Width'#2'0'#7'Caption'#6#4'VAR.'#7'OnClick'#7#11'VarBtnClick'#8 + +'TabOrder'#2#27#0#0#7'TButton'#9'StdDevBtn'#4'Left'#3#128#0#6'Height'#2#25#3 + +'Top'#2'@'#5'Width'#2'0'#7'Caption'#6#8'Std.Dev.'#7'OnClick'#7#14'StdDevBtnC' + +'lick'#8'TabOrder'#2#28#0#0#7'TButton'#9'natlogbtn'#4'Left'#3#184#0#6'Height' + +#2#25#3'Top'#2'@'#5'Width'#2'0'#7'Caption'#6#2'ln'#7'OnClick'#7#14'natlogbtn' + +'Click'#8'TabOrder'#2#29#0#0#7'TButton'#8'log10btn'#4'Left'#3#240#0#6'Height' + +#2#25#3'Top'#2'@'#5'Width'#2'0'#7'Caption'#6#5'log10'#7'OnClick'#7#13'log10b' + +'tnClick'#8'TabOrder'#2#30#0#0#7'TButton'#6'sqrbtn'#4'Left'#2#16#6'Height'#2 + +#24#3'Top'#2'`'#5'Width'#2'0'#7'Caption'#6#3'x^2'#7'OnClick'#7#11'sqrbtnClic' + +'k'#8'TabOrder'#2#31#0#0#7'TButton'#7'sqrtbtn'#4'Left'#2'H'#6'Height'#2#25#3 + +'Top'#2'_'#5'Width'#2'0'#7'Caption'#6#4'sqrt'#7'OnClick'#7#12'sqrtbtnClick'#8 + +'TabOrder'#2' '#0#0#7'TButton'#12'ytopowerxbtn'#4'Left'#3#128#0#6'Height'#2 + +#25#3'Top'#2'_'#5'Width'#2'0'#7'Caption'#6#3'y^x'#7'OnClick'#7#17'ytopowerxb' + +'tnClick'#8'TabOrder'#2'!'#0#0#7'TButton'#7'etoxbtn'#4'Left'#3#184#0#6'Heigh' + +'t'#2#25#3'Top'#2'`'#5'Width'#2'0'#7'Caption'#6#3'e^x'#7'OnClick'#7#12'etoxb' + +'tnClick'#8'TabOrder'#2'"'#0#0#7'TButton'#9'tentoxbtn'#4'Left'#3#240#0#6'Hei' + +'ght'#2#25#3'Top'#2'`'#5'Width'#2'0'#7'Caption'#6#4'10^x'#7'OnClick'#7#14'te' + +'ntoxbtnClick'#8'TabOrder'#2'#'#0#0#7'TButton'#6'expbtn'#4'Left'#2#16#6'Heig' + +'ht'#2#25#3'Top'#3#128#0#5'Width'#2'0'#7'Caption'#6#3'exp'#7'OnClick'#7#11'e' + +'xpbtnClick'#8'TabOrder'#2'$'#0#0#7'TButton'#6'absbtn'#4'Left'#2'H'#6'Height' + +#2#24#3'Top'#3#128#0#5'Width'#2'0'#7'Caption'#6#3'abs'#7'OnClick'#7#11'absbt' + +'nClick'#8'TabOrder'#2'%'#0#0#7'TButton'#5'PiBtn'#4'Left'#3#128#0#6'Height'#2 + +#25#3'Top'#2#127#5'Width'#2'0'#7'Caption'#6#2'Pi'#7'OnClick'#7#10'PiBtnClick' + +#8'TabOrder'#2'&'#0#0#7'TButton'#6'nPrbtn'#4'Left'#3#184#0#6'Height'#2#25#3 + +'Top'#3#128#0#5'Width'#2'0'#7'Caption'#6#3'nPr'#7'OnClick'#7#11'nPrbtnClick' + +#8'TabOrder'#2''''#0#0#7'TButton'#13'nfactorialbtn'#4'Left'#3#240#0#6'Height' + +#2#25#3'Top'#3#128#0#5'Width'#2'0'#7'Caption'#6#2'n!'#7'OnClick'#7#18'nfacto' + +'rialbtnClick'#8'TabOrder'#2'('#0#0#6'TLabel'#6'Label1'#4'Left'#2#18#6'Heigh' + +'t'#2#16#3'Top'#3#194#1#5'Width'#3#155#0#7'Caption'#6#27'No. in memory stack' + +' (M+) = '#11'ParentColor'#8#0#0#5'TEdit'#5'NEdit'#4'Left'#3#175#0#6'Height' + +#2#23#3'Top'#3#194#1#5'Width'#2'0'#8'TabOrder'#2')'#4'Text'#6#5'NEdit'#0#0#7 + +'TButton'#9'ReturnBtn'#4'Left'#3#241#0#6'Height'#2#26#3'Top'#3#193#1#5'Width' + +#2'E'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#7'OnClick'#7#14'ReturnBtnCl' + +'ick'#8'TabOrder'#2'*'#0#0#0 +]); diff --git a/applications/lazstats/source_orig/calculatorunit.pas b/applications/lazstats/source_orig/calculatorunit.pas new file mode 100644 index 000000000..c10b94c43 --- /dev/null +++ b/applications/lazstats/source_orig/calculatorunit.pas @@ -0,0 +1,504 @@ +unit CalculatorUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Math, functionsLib, Globals; + +type + + { TCalculatorForm } + + TCalculatorForm = class(TForm) + ReturnBtn: TButton; + NEdit: TEdit; + Label1: TLabel; + sevenbtn: TButton; + dividebtn: TButton; + multbtn: TButton; + subtractbtn: TButton; + Addbtn: TButton; + ZeroBtn: TButton; + ChangeSignBtn: TButton; + PeriodBtn: TButton; + MemInBtn: TButton; + MemOutBtn: TButton; + MemPlusBtn: TButton; + eightbtn: TButton; + EqualBtn: TButton; + sinbtn: TButton; + cosbtn: TButton; + tanbtn: TButton; + Combobtn: TButton; + ClearEntryBtn: TButton; + MeanBtn: TButton; + VarBtn: TButton; + StdDevBtn: TButton; + natlogbtn: TButton; + ninebtn: TButton; + log10btn: TButton; + sqrbtn: TButton; + sqrtbtn: TButton; + ytopowerxbtn: TButton; + etoxbtn: TButton; + tentoxbtn: TButton; + expbtn: TButton; + absbtn: TButton; + PiBtn: TButton; + nPrbtn: TButton; + fourbtn: TButton; + nfactorialbtn: TButton; + fivebtn: TButton; + sixbtn: TButton; + onebtn: TButton; + twobtn: TButton; + threebtn: TButton; + XEdit: TEdit; + GroupBox1: TGroupBox; + GroupBox2: TGroupBox; + GroupBox3: TGroupBox; + procedure absbtnClick(Sender: TObject); + procedure AddbtnClick(Sender: TObject); + procedure ChangeSignBtnClick(Sender: TObject); + procedure etoxbtnClick(Sender: TObject); + procedure PiBtnClick(Sender: TObject); + procedure VarBtnClick(Sender: TObject); + procedure MeanBtnClick(Sender: TObject); + procedure StdDevBtnClick(Sender: TObject); + procedure ClearEntryBtnClick(Sender: TObject); + procedure CombobtnClick(Sender: TObject); + procedure cosbtnClick(Sender: TObject); + procedure dividebtnClick(Sender: TObject); + procedure eightbtnClick(Sender: TObject); + procedure EqualBtnClick(Sender: TObject); + procedure expbtnClick(Sender: TObject); + procedure fivebtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure fourbtnClick(Sender: TObject); + procedure log10btnClick(Sender: TObject); + procedure MemInBtnClick(Sender: TObject); + procedure MemOutBtnClick(Sender: TObject); + procedure MemPlusBtnClick(Sender: TObject); + procedure multbtnClick(Sender: TObject); + procedure natlogbtnClick(Sender: TObject); + procedure nfactorialbtnClick(Sender: TObject); + procedure ninebtnClick(Sender: TObject); + procedure nPrbtnClick(Sender: TObject); + procedure onebtnClick(Sender: TObject); + procedure PeriodBtnClick(Sender: TObject); + procedure ReturnBtnClick(Sender: TObject); + procedure sevenbtnClick(Sender: TObject); + procedure sinbtnClick(Sender: TObject); + procedure sixbtnClick(Sender: TObject); + procedure sqrbtnClick(Sender: TObject); + procedure sqrtbtnClick(Sender: TObject); + procedure subtractbtnClick(Sender: TObject); + procedure tanbtnClick(Sender: TObject); + procedure tentoxbtnClick(Sender: TObject); + procedure threebtnClick(Sender: TObject); + procedure twobtnClick(Sender: TObject); + procedure XEditKeyPress(Sender: TObject; var Key: char); + procedure ytopowerxbtnClick(Sender: TObject); + procedure ZeroBtnClick(Sender: TObject); + private + { private declarations } + Xmemory : double; // value in the memory + X : double; // value in register + TempX : double; // temporary storage of last entry + keyentered : double; // numeric key press value + operation : integer; // operation to be performed upon press of equal sign + NoStack : integer; // no. in memory stack + stack : DblDyneVec; + Xint, Xint2 : integer; + public + { public declarations } + end; + +var + CalculatorForm: TCalculatorForm; + +implementation + +{ TCalculatorForm } + +procedure TCalculatorForm.FormShow(Sender: TObject); +begin + XEdit.Text := ''; + Xmemory := 0.0; + X := 0.0; + keyentered := 0.0; + NoStack := 0; + SetLength(stack,1000); + NEdit.Text := '0'; + XEdit.SetFocus; +end; + +procedure TCalculatorForm.fourbtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '4'; +end; + +procedure TCalculatorForm.log10btnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := log10(X); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.MemInBtnClick(Sender: TObject); +begin + Xmemory := StrToFloat(XEdit.Text); + XEdit.Text := ''; +end; + +procedure TCalculatorForm.MemOutBtnClick(Sender: TObject); +begin + XEdit.Text := FloatToStr(Xmemory); +end; + +procedure TCalculatorForm.MemPlusBtnClick(Sender: TObject); +begin + stack[NoStack] := stack[NoStack] + StrToFloat(XEdit.Text); + NoStack := NoStack + 1; + NEdit.Text := IntToStr(NoStack); + XEdit.Text := ''; +end; + +procedure TCalculatorForm.multbtnClick(Sender: TObject); +begin + TempX := StrToFloat(XEdit.Text); + XEdit.Text := ''; + operation := 2; // multiply +end; + +procedure TCalculatorForm.natlogbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := ln(X); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.nfactorialbtnClick(Sender: TObject); +var n : integer; +begin + n := StrToInt(XEdit.Text); + n := factorial(n); + XEdit.Text := IntToStr(n); +end; + +procedure TCalculatorForm.ninebtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '9'; +end; + +procedure TCalculatorForm.nPrbtnClick(Sender: TObject); +begin + operation := 7; + Xint := StrToInt(XEdit.Text); + XEdit.Text := ''; +end; + +procedure TCalculatorForm.onebtnClick(Sender: TObject); +begin +XEdit.Text := XEdit.Text + '1'; +end; + +procedure TCalculatorForm.PeriodBtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '.'; +end; + +procedure TCalculatorForm.ReturnBtnClick(Sender: TObject); +begin + stack := nil; +end; + +procedure TCalculatorForm.sevenbtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '7'; +end; + +procedure TCalculatorForm.sinbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := sin(DegToRad(X)); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.sixbtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '6'; +end; + +procedure TCalculatorForm.sqrbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := X * X; + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.sqrtbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := sqrt(X); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.subtractbtnClick(Sender: TObject); +begin + TempX := StrToFloat(XEdit.Text); + XEdit.Text := ''; + operation := 3; // subtract +end; + +procedure TCalculatorForm.tanbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := tan(DegToRad(X)); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.tentoxbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := power(10,X); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.threebtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '3'; +end; + +procedure TCalculatorForm.twobtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '2'; +end; + +procedure TCalculatorForm.XEditKeyPress(Sender: TObject; var Key: char); +begin +// XEdit.Text := XEdit.Text + Key; +end; + +procedure TCalculatorForm.ytopowerxbtnClick(Sender: TObject); +begin + operation := 5; + tempX := StrToFloat(XEdit.Text); + XEdit.Text := ''; +end; + +procedure TCalculatorForm.ZeroBtnClick(Sender: TObject); +begin +XEdit.text := XEdit.Text + '0'; +end; + +procedure TCalculatorForm.ClearEntryBtnClick(Sender: TObject); +begin + XEdit.Text := ''; +end; + +procedure TCalculatorForm.CombobtnClick(Sender: TObject); +begin + operation := 6; + tempX := StrToFloat(XEdit.Text); + XEdit.Text := ''; +end; + +procedure TCalculatorForm.cosbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := cos(DegToRad(X)); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.AddbtnClick(Sender: TObject); +begin + TempX := StrToFloat(XEdit.Text); + XEdit.Text := ''; + operation := 4; // add +end; + +procedure TCalculatorForm.ChangeSignBtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := -1.0 * X; + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.etoxbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := power(2.71828182845905,X); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.PiBtnClick(Sender: TObject); +begin + X := Pi; + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.absbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := abs(X); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.VarBtnClick(Sender: TObject); +VAR + Sum, SSQ : double; + Ncount : double; + i, index : integer; +begin + Ncount := StrToFloat(NEdit.Text); + index := StrToInt(NEdit.Text); + Sum := 0.0; + SSQ := 0.0; + if Ncount < 1 then + begin + ShowMessage('No values in stack memory'); + exit; + end + else + begin + for i := 0 to index - 1 do + begin + Sum := Sum + stack[i]; + SSQ := SSQ + (stack[i] * stack[i]); + end; +// Sum := Sum / Ncount; // mean +// SSQ := SSQ / Ncount; + SSQ := SSQ - (Sum * Sum) / Ncount; + SSQ := SSQ / (Ncount - 1.0); + XEdit.Text := FloatToStr(SSQ); + end; +end; + +procedure TCalculatorForm.MeanBtnClick(Sender: TObject); +Var + Sum : double; + Ncount : double; + i, index : integer; +begin + Ncount := StrToFloat(NEdit.Text); + index := StrToInt(NEdit.Text); + Sum := 0.0; + if Ncount < 1 then + begin + ShowMessage('No values in stack memory'); + exit; + end + else + begin + for i := 0 to index - 1 do Sum := Sum + stack[i]; + Sum := Sum / Ncount; + XEdit.Text := FloatToStr(Sum); + end; +end; + +procedure TCalculatorForm.StdDevBtnClick(Sender: TObject); +VAR + Sum, SSQ : double; + Ncount : double; + i, index : integer; +begin + Ncount := StrToFloat(NEdit.Text); + index := StrToInt(NEdit.Text); + Sum := 0.0; + SSQ := 0.0; + if Ncount < 1 then + begin + ShowMessage('No values in stack memory'); + exit; + end + else + begin + for i := 0 to index - 1 do + begin + Sum := Sum + stack[i]; + SSQ := SSQ + (stack[i] * stack[i]); + end; +// Sum := Sum / Ncount; // mean +// SSQ := SSQ / Ncount; + SSQ := SSQ - (Sum * Sum) / Ncount; + SSQ := SSQ / (Ncount - 1.0); + SSQ := sqrt(SSQ); + XEdit.Text := FloatToStr(SSQ); + end; +end; + +procedure TCalculatorForm.dividebtnClick(Sender: TObject); +begin + TempX := StrToFloat(XEdit.Text); + XEdit.Text := ''; + operation := 1; // //divide +end; + +procedure TCalculatorForm.eightbtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '8'; +end; + +procedure TCalculatorForm.EqualBtnClick(Sender: TObject); +Var x1, x2 : double; +begin + case (operation) of + 1 : begin // divide operation + x1 := tempX; + x2 := x1 / StrToFloat(XEdit.Text); + XEdit.Text := FloatToStr(x2); + end; + 2 : begin // nultiply operation + x1 := tempX; + x2 := x1 * StrToFloat(XEdit.Text); + XEdit.Text := FloatToStr(x2); + end; + 3 : begin + x1 := tempX; // subtract operation + x2 := x1 - StrToFloat(XEdit.Text); + XEdit.Text := FloatToStr(x2); + end; + 4 : begin + x1 := tempX; // Add operation + x2 := x1 + StrToFloat(XEdit.Text); + XEdit.Text := FloatToStr(x2); + end; + 5 : begin // y to the X power (Y stored in tempx first, x in register) + X := StrToFloat(XEdit.Text); + X := power(tempX,X); + XEdit.Text := FloatToStr(X); + end; + 6 : begin // combinations of x things out of N + X := StrToFloat(XEdit.Text); + X := combos(X,tempX); + XEdit.Text := FloatToStr(X); + end; + 7 : begin // permutations of x things out of N + Xint2 := StrToInt(XEdit.Text); + Xint := factorial(Xint) div (factorial(Xint - Xint2)); + XEdit.Text := IntToStr(Xint); + end; + end; +end; + +procedure TCalculatorForm.expbtnClick(Sender: TObject); +begin + X := StrToFloat(XEdit.Text); + X := exp(X); + XEdit.Text := FloatToStr(X); +end; + +procedure TCalculatorForm.fivebtnClick(Sender: TObject); +begin + XEdit.Text := XEdit.Text + '5'; +end; + +initialization + {$I calculatorunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/cchartunit.pas b/applications/lazstats/source_orig/cchartunit.pas new file mode 100644 index 000000000..10bf366a5 --- /dev/null +++ b/applications/lazstats/source_orig/cchartunit.pas @@ -0,0 +1,280 @@ +unit CCHARTUNIT; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, ExtCtrls, MainUnit, Globals, DataProcs, Math, OutPutUnit, Buttons, + FunctionsLib, BlankFrmUnit, contexthelpunit; + +type + + { TcChartFrm } + + TcChartFrm = class(TForm) + HelpBtn: TButton; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + XSigmaEdit: TEdit; + MeasEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + VarList: TListBox; + SigmaOpts: TRadioGroup; + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure VarListClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + procedure PlotMeans(VAR means : DblDyneVec; + NoGrps : integer; + UCL, LCL, GrandMean : double; + Sender: TObject); + public + { public declarations } + end; + +var + cChartFrm: TcChartFrm; + +implementation + +{ TcChartFrm } + +procedure TcChartFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + MeasEdit.Text := ''; + XSigmaEdit.Text := ''; + SigmaOpts.ItemIndex := 0; + for i := 1 to NoVariables do + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); +end; + +procedure TcChartFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TcChartFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +procedure TcChartFrm.ComputeBtnClick(Sender: TObject); +var + i, MeasVar : integer; + X, size, UCL, LCL, Sigma : double; + GrandMean, meanc, stddevc : double; + means : DblDyneVec; + cellstring, outline : string; + ColNoSelected : IntDyneVec; + NoSelected : integer; +begin + SetLength(ColNoSelected,1); + MeasVar := 1; + Sigma := 3.0; + for i := 1 to NoVariables do + begin + cellstring := OS3MainFrm.DataGrid.Cells[i,0]; + if cellstring = MeasEdit.Text then MeasVar := i; + end; + NoSelected := 1; + ColNoSelected[0] := MeasVar; + + if SigmaOpts.ItemIndex = 3 then + Sigma := StrToFloat(XSigmaEdit.Text); + if SigmaOpts.ItemIndex = 0 then Sigma := 3.0; + if SigmaOpts.ItemIndex = 1 then Sigma := 2.0; + if SigmaOpts.ItemIndex = 2 then Sigma := 1.0; + + SetLength(means,NoCases + 1); + GrandMean := 0.0; + size := 0; + + for i := 1 to NoCases do + begin + if Not GoodRecord(i,NoSelected,ColNoSelected) then continue; + X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[MeasVar,i])); + means[i] := X; + GrandMean := GrandMean + X; + size := size + 1; + end; + + meanc := GrandMean / size; + stddevc := sqrt(meanc); + UCL := meanc + (Sigma * stddevc); + LCL := meanc - (Sigma * stddevc); + + // printed results + OutPutFrm.RichEdit.Lines.Add('Defects c Control Chart Results'); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Sample Number of '); + OutPutFrm.RichEdit.Lines.Add(' Noncomformities'); + OutPutFrm.RichEdit.Lines.Add('______ _______________'); + for i := 1 to NoCases do + begin + outline := format(' %3d %8.2f',[i,means[i]]); + OutPutFrm.RichEdit.Lines.Add(outline); + end; + outline := format('Total Nonconformities = %8.2f',[GrandMean]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('No. of samples = %d',[NoCases]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Poisson mean and variance = %8.3f',[meanc]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Lower Control Limit = %8.3f, Upper Control Limit = %8.3f', + [LCL, UCL]); + OutPutfrm.RichEdit.Lines.Add(outline); + OutPutFrm.ShowModal; + + // show graph + PlotMeans(means,NoCases,UCL,LCL,meanc,self); + + means := nil; + ColNoSelected := nil; +end; + +procedure TcChartFrm.VarListClick(Sender: TObject); +VAR index : integer; +begin + index := VarList.ItemIndex; + MeasEdit.Text := VarList.Items.Strings[index]; +end; + +procedure TcChartFrm.PlotMeans(var means: DblDyneVec; NoGrps: integer; UCL, + LCL, GrandMean: double; Sender: TObject); +var + i, xpos, ypos, hleft, hright, vtop, vbottom, imagewide : integer; + vhi, hwide, offset, strhi : integer; + imagehi, maxval, minval, valincr, Yvalue : double; + Title : string; +begin + maxval := -10000.0; + minval := 10000.0; + for i := 1 to NoGrps do + begin + if means[i] > maxval then maxval := means[i]; + if means[i] < minval then minval := means[i]; + end; + if UCL > maxval then maxval := UCL; + if LCL < minval then minval := LCL; + BlankFrm.Image1.Canvas.Clear; + BlankFrm.Show; + Title := 'DEFECT CONTROL (c) CHART FOR : ' + OS3MainFrm.FileNameEdit.Text; + BlankFrm.Caption := Title; + imagewide := BlankFrm.Image1.Width; + imagehi := BlankFrm.Image1.Height; + vtop := 20; + vbottom := round(imagehi) - 80; + vhi := vbottom - vtop; + hleft := 100; + hright := imagewide - 80; + hwide := hright - hleft; + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + BlankFrm.Image1.Canvas.Brush.Color := clWhite; + + // Draw chart border + BlankFrm.Image1.Canvas.Rectangle(hleft,vtop-10,hleft+hwide,vtop+vhi+10); + + // draw Grand Mean + ypos := round(vhi * ( (maxval - GrandMean) / (maxval - minval))); + ypos := ypos + vtop; + xpos := hleft; + BlankFrm.Image1.Canvas.Pen.Color := clRed; + BlankFrm.Image1.Canvas.Brush.Color := clLtGray; + BlankFrm.Image1.Canvas.MoveTo(xpos,ypos); + xpos := hright; + BlankFrm.Image1.Canvas.LineTo(xpos,ypos); + Title := 'MEAN'; + strhi := BlankFrm.Image1.Canvas.TextHeight(Title); + ypos := ypos - strhi div 2; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title); + + // draw horizontal axis + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + BlankFrm.Image1.Canvas.MoveTo(hleft,vbottom + 20); + BlankFrm.Image1.Canvas.LineTo(hright,vbottom + 20); + for i := 1 to NoGrps do + begin + ypos := vbottom + 10; + xpos := round((hwide / NoGrps)* i + hleft); + BlankFrm.Image1.Canvas.MoveTo(xpos,ypos); + ypos := ypos + 10; + BlankFrm.Image1.Canvas.LineTo(xpos,ypos); + Title := format('%d',[i]); + offset := BlankFrm.Image1.Canvas.TextWidth(Title) div 2; + strhi := BlankFrm.Image1.Canvas.TextHeight(Title); + xpos := xpos - offset; + ypos := ypos + strhi; + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title); + xpos := 10; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,'GROUPS:'); + end; + + // Draw vertical axis + valincr := (maxval - minval) / 10.0; + for i := 1 to 11 do + begin + Title := format('%8.2f',[maxval - ((i-1)*valincr)]); + strhi := BlankFrm.Image1.Canvas.TextHeight(Title); + xpos := 10; + Yvalue := maxval - (valincr * (i-1)); + ypos := round(vhi * ( (maxval - Yvalue) / (maxval - minval))); + ypos := ypos + vtop - strhi div 2; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title); + end; + + // draw lines for means of the groups + ypos := round(vhi * ( (maxval - means[1]) / (maxval - minval))); + ypos := ypos + vtop; + xpos := round((hwide / NoGrps) + hleft); + BlankFrm.Image1.Canvas.MoveTo(xpos,ypos); + BlankFrm.Image1.Canvas.Pen.Color := clBlack; + for i := 2 to NoGrps do + begin + ypos := round(vhi * ( (maxval - means[i]) / (maxval - minval))); + ypos := ypos + vtop; + xpos := round((hwide / NoGrps)* i + hleft); + BlankFrm.Image1.Canvas.LineTo(xpos,ypos); + end; + + // Draw upper and lower confidence intervals + ypos := round(vhi * ( (maxval - UCL) / (maxval - minval))); + ypos := ypos + vtop; + xpos := hleft; + BlankFrm.Image1.Canvas.MoveTo(xpos,ypos); + xpos := hright; + BlankFrm.Image1.Canvas.Pen.Color := clRed; + BlankFrm.Image1.Canvas.LineTo(xpos,ypos); + Title := 'UCL'; + strhi := BlankFrm.Image1.Canvas.TextHeight(Title); + ypos := ypos - strhi div 2; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title); + + ypos := round(vhi * ( (maxval - LCL) / (maxval - minval))); + ypos := ypos + vtop; + xpos := hleft; + BlankFrm.Image1.Canvas.MoveTo(xpos,ypos); + xpos := hright; + BlankFrm.Image1.Canvas.Pen.Color := clRed; + BlankFrm.Image1.Canvas.LineTo(xpos,ypos); + Title := 'LCL'; + strhi := BlankFrm.Image1.Canvas.TextHeight(Title); + ypos := ypos - strhi div 2; + BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title); +end; + +initialization + {$I cchartunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/colinsertunit.lfm b/applications/lazstats/source_orig/colinsertunit.lfm new file mode 100644 index 000000000..6ad09d13f --- /dev/null +++ b/applications/lazstats/source_orig/colinsertunit.lfm @@ -0,0 +1,77 @@ +object colinsertfrm: Tcolinsertfrm + Left = 221 + Height = 149 + Top = 125 + Width = 217 + Caption = 'Column Insert' + ClientHeight = 149 + ClientWidth = 217 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 9 + Height = 14 + Top = 15 + Width = 148 + Caption = 'Insert a column in which grid ? ' + ParentColor = False + end + object Label2: TLabel + Left = 8 + Height = 14 + Top = 48 + Width = 113 + Caption = 'Insert Before Column : ' + ParentColor = False + end + object Label3: TLabel + Left = 9 + Height = 14 + Top = 82 + Width = 106 + Caption = 'Insert After Column : ' + ParentColor = False + end + object GridNoEdit: TEdit + Left = 160 + Height = 21 + Top = 6 + Width = 45 + TabOrder = 0 + Text = 'GridNoEdit' + end + object BeforeColEdit: TEdit + Left = 160 + Height = 21 + Top = 41 + Width = 45 + TabOrder = 1 + Text = 'Edit1' + end + object AfterColEdit: TEdit + Left = 160 + Height = 21 + Top = 75 + Width = 45 + TabOrder = 2 + Text = 'Edit1' + end + object CancelBtn: TButton + Left = 8 + Height = 30 + Top = 110 + Width = 70 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 3 + end + object ReturnBtn: TButton + Left = 135 + Height = 30 + Top = 110 + Width = 70 + Caption = 'Return' + ModalResult = 1 + TabOrder = 4 + end +end diff --git a/applications/lazstats/source_orig/colinsertunit.lrs b/applications/lazstats/source_orig/colinsertunit.lrs new file mode 100644 index 000000000..ac90f7748 --- /dev/null +++ b/applications/lazstats/source_orig/colinsertunit.lrs @@ -0,0 +1,22 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('Tcolinsertfrm','FORMDATA',[ + 'TPF0'#13'Tcolinsertfrm'#12'colinsertfrm'#4'Left'#3#221#0#6'Height'#3#149#0#3 + +'Top'#2'}'#5'Width'#3#217#0#7'Caption'#6#13'Column Insert'#12'ClientHeight'#3 + +#149#0#11'ClientWidth'#3#217#0#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#8'0.' + +'9.28.2'#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2#14#3'Top'#2#15#5'Widt' + +'h'#3#148#0#7'Caption'#6' Insert a column in which grid ? '#11'ParentColor'#8 + +#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#14#3'Top'#2'0'#5'Width'#2'q' + +#7'Caption'#6#23'Insert Before Column : '#11'ParentColor'#8#0#0#6'TLabel'#6 + +'Label3'#4'Left'#2#9#6'Height'#2#14#3'Top'#2'R'#5'Width'#2'j'#7'Caption'#6#22 + +'Insert After Column : '#11'ParentColor'#8#0#0#5'TEdit'#10'GridNoEdit'#4'Lef' + +'t'#3#160#0#6'Height'#2#21#3'Top'#2#6#5'Width'#2'-'#8'TabOrder'#2#0#4'Text'#6 + +#10'GridNoEdit'#0#0#5'TEdit'#13'BeforeColEdit'#4'Left'#3#160#0#6'Height'#2#21 + +#3'Top'#2')'#5'Width'#2'-'#8'TabOrder'#2#1#4'Text'#6#5'Edit1'#0#0#5'TEdit'#12 + +'AfterColEdit'#4'Left'#3#160#0#6'Height'#2#21#3'Top'#2'K'#5'Width'#2'-'#8'Ta' + +'bOrder'#2#2#4'Text'#6#5'Edit1'#0#0#7'TButton'#9'CancelBtn'#4'Left'#2#8#6'He' + +'ight'#2#30#3'Top'#2'n'#5'Width'#2'F'#7'Caption'#6#6'Cancel'#11'ModalResult' + +#2#2#8'TabOrder'#2#3#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#135#0#6'Height'#2 + +#30#3'Top'#2'n'#5'Width'#2'F'#7'Caption'#6#6'Return'#11'ModalResult'#2#1#8'T' + +'abOrder'#2#4#0#0#0 +]); diff --git a/applications/lazstats/source_orig/colinsertunit.pas b/applications/lazstats/source_orig/colinsertunit.pas new file mode 100644 index 000000000..dfa644de6 --- /dev/null +++ b/applications/lazstats/source_orig/colinsertunit.pas @@ -0,0 +1,48 @@ +unit colinsertunit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls; + +type + + { Tcolinsertfrm } + + Tcolinsertfrm = class(TForm) + CancelBtn: TButton; + ReturnBtn: TButton; + GridNoEdit: TEdit; + BeforeColEdit: TEdit; + AfterColEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + procedure FormShow(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + colinsertfrm: Tcolinsertfrm; + +implementation +uses matmanunit; + +{ Tcolinsertfrm } + +procedure Tcolinsertfrm.FormShow(Sender: TObject); +begin + GridNoEdit.Text := matmanfrm.GridNoEdit.Text; +end; + +initialization + {$I colinsertunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/comparedistunit.lfm b/applications/lazstats/source_orig/comparedistunit.lfm new file mode 100644 index 000000000..fb89a6130 --- /dev/null +++ b/applications/lazstats/source_orig/comparedistunit.lfm @@ -0,0 +1,371 @@ +object CompareDistFrm: TCompareDistFrm + Left = 242 + Height = 378 + Top = 127 + Width = 613 + Caption = 'Compare Cumulative Distributions' + ClientHeight = 378 + ClientWidth = 613 + OnShow = FormShow + LCLVersion = '0.9.30' + object Label1: TLabel + Left = 9 + Height = 16 + Top = 8 + Width = 51 + Caption = 'Variables:' + ParentColor = False + end + object Label2: TLabel + Left = 249 + Height = 16 + Top = 22 + Width = 68 + Caption = 'Variable One' + ParentColor = False + end + object Label3: TLabel + Left = 248 + Height = 16 + Top = 135 + Width = 69 + Caption = 'Variable Two' + ParentColor = False + end + object VarList: TListBox + Left = 9 + Height = 270 + Top = 24 + Width = 176 + ItemHeight = 0 + TabOrder = 0 + end + object Var1InBtn: TBitBtn + Left = 200 + Height = 30 + Top = 25 + Width = 36 + 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 = Var1InBtnClick + TabOrder = 1 + end + object Var1OutBtn: TBitBtn + Left = 200 + Height = 30 + Top = 64 + Width = 36 + 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 = Var1OutBtnClick + TabOrder = 2 + end + object Var2InBtn: TBitBtn + Left = 200 + Height = 30 + Top = 136 + Width = 36 + 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 = Var2InBtnClick + TabOrder = 3 + end + object Var2OutBtn: TBitBtn + Left = 200 + Height = 30 + Top = 176 + Width = 36 + 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 = Var2OutBtnClick + TabOrder = 4 + end + object VarOneEdit: TEdit + Left = 250 + Height = 23 + Top = 38 + Width = 142 + TabOrder = 5 + Text = 'VarOneEdit' + end + object VarTwoEdit: TEdit + Left = 248 + Height = 23 + Top = 152 + Width = 142 + TabOrder = 6 + Text = 'Edit1' + end + object CompareGroup: TRadioGroup + Left = 409 + Height = 81 + Top = 7 + Width = 187 + AutoFill = True + Caption = 'Compare To:' + 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 = 183 + ItemIndex = 0 + Items.Strings = ( + 'A Theoretical Distribution' + 'Another Variable' + ) + OnClick = CompareGroupClick + TabOrder = 7 + end + object DistGroup: TRadioGroup + Left = 409 + Height = 169 + Top = 96 + Width = 190 + AutoFill = True + Caption = 'Theoretical Distributions:' + 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 = 151 + ClientWidth = 186 + Items.Strings = ( + 'Normal Distribution' + 't-Distribution' + 'Chi Square Distribution' + 'F Distribution' + 'Poisson Distribution' + ) + OnClick = DistGroupClick + TabOrder = 8 + end + object CancelBtn: TButton + Left = 200 + Height = 30 + Top = 224 + Width = 74 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 9 + end + object ResetBtn: TButton + Left = 318 + Height = 30 + Top = 224 + Width = 74 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 10 + end + object ComputeBtn: TButton + Left = 200 + Height = 30 + Top = 264 + Width = 74 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 11 + end + object ReturnBtn: TButton + Left = 318 + Height = 30 + Top = 264 + Width = 74 + Caption = 'Return' + ModalResult = 1 + TabOrder = 12 + end + object PlotTypeGrp: TGroupBox + Left = 409 + Height = 65 + Top = 292 + Width = 187 + Caption = 'Plot Type:' + ClientHeight = 47 + ClientWidth = 183 + TabOrder = 13 + object PointsChk: TCheckBox + Left = 8 + Height = 19 + Top = 2 + Width = 67 + Caption = '3DPoints' + Checked = True + OnClick = PointsChkClick + State = cbChecked + TabOrder = 0 + end + object LinesChk: TCheckBox + Left = 8 + Height = 19 + Top = 25 + Width = 61 + Caption = '3DLines' + OnClick = LinesChkClick + TabOrder = 1 + end + end + object GroupBox1: TGroupBox + Left = 5 + Height = 50 + Top = 307 + Width = 331 + Caption = 'Option:' + ClientHeight = 32 + ClientWidth = 327 + TabOrder = 14 + object BothChk: TCheckBox + Left = 4 + Height = 19 + Top = 5 + Width = 270 + Caption = 'Plot both Frequency and cumulative Frequency' + TabOrder = 0 + end + end +end diff --git a/applications/lazstats/source_orig/comparedistunit.lrs b/applications/lazstats/source_orig/comparedistunit.lrs new file mode 100644 index 000000000..7031dca5a --- /dev/null +++ b/applications/lazstats/source_orig/comparedistunit.lrs @@ -0,0 +1,263 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TCompareDistFrm','FORMDATA',[ + 'TPF0'#15'TCompareDistFrm'#14'CompareDistFrm'#4'Left'#3#242#0#6'Height'#3'z'#1 + +#3'Top'#2#127#5'Width'#3'e'#2#7'Caption'#6' Compare Cumulative Distributions' + +#12'ClientHeight'#3'z'#1#11'ClientWidth'#3'e'#2#6'OnShow'#7#8'FormShow'#10'L' + +'CLVersion'#6#6'0.9.30'#0#6'TLabel'#6'Label1'#4'Left'#2#9#6'Height'#2#16#3'T' + +'op'#2#8#5'Width'#2'3'#7'Caption'#6#10'Variables:'#11'ParentColor'#8#0#0#6'T' + +'Label'#6'Label2'#4'Left'#3#249#0#6'Height'#2#16#3'Top'#2#22#5'Width'#2'D'#7 + +'Caption'#6#12'Variable One'#11'ParentColor'#8#0#0#6'TLabel'#6'Label3'#4'Lef' + +'t'#3#248#0#6'Height'#2#16#3'Top'#3#135#0#5'Width'#2'E'#7'Caption'#6#12'Vari' + +'able Two'#11'ParentColor'#8#0#0#8'TListBox'#7'VarList'#4'Left'#2#9#6'Height' + +#3#14#1#3'Top'#2#24#5'Width'#3#176#0#10'ItemHeight'#2#0#8'TabOrder'#2#0#0#0#7 + +'TBitBtn'#9'Var1InBtn'#4'Left'#3#200#0#6'Height'#2#30#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#7'OnClick'#7#14'Var1InBtnClick'#8 + +'TabOrder'#2#1#0#0#7'TBitBtn'#10'Var1OutBtn'#4'Left'#3#200#0#6'Height'#2#30#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#15'Var1OutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#9'Var2InBtn'#4'L' + +'eft'#3#200#0#6'Height'#2#30#3'Top'#3#136#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#14'Var2InBtnClick'#8'TabOrder'#2#3 + +#0#0#7'TBitBtn'#10'Var2OutBtn'#4'Left'#3#200#0#6'Height'#2#30#3'Top'#3#176#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#7'OnClick' + +#7#15'Var2OutBtnClick'#8'TabOrder'#2#4#0#0#5'TEdit'#10'VarOneEdit'#4'Left'#3 + +#250#0#6'Height'#2#23#3'Top'#2'&'#5'Width'#3#142#0#8'TabOrder'#2#5#4'Text'#6 + +#10'VarOneEdit'#0#0#5'TEdit'#10'VarTwoEdit'#4'Left'#3#248#0#6'Height'#2#23#3 + +'Top'#3#152#0#5'Width'#3#142#0#8'TabOrder'#2#6#4'Text'#6#5'Edit1'#0#0#11'TRa' + +'dioGroup'#12'CompareGroup'#4'Left'#3#153#1#6'Height'#2'Q'#3'Top'#2#7#5'Widt' + +'h'#3#187#0#8'AutoFill'#9#7'Caption'#6#11'Compare To:'#28'ChildSizing.LeftRi' + +'ghtSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.Enlarge' + +'Horizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7 + +#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScale' + +'Childs'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.' + +'Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine' + +#2#1#12'ClientHeight'#2'?'#11'ClientWidth'#3#183#0#9'ItemIndex'#2#0#13'Items' + +'.Strings'#1#6#26'A Theoretical Distribution'#6#16'Another Variable'#0#7'OnC' + +'lick'#7#17'CompareGroupClick'#8'TabOrder'#2#7#0#0#11'TRadioGroup'#9'DistGro' + +'up'#4'Left'#3#153#1#6'Height'#3#169#0#3'Top'#2'`'#5'Width'#3#190#0#8'AutoFi' + +'ll'#9#7'Caption'#6#26'Theoretical Distributions:'#28'ChildSizing.LeftRightS' + +'pacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHori' + +'zontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24 + +'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChi' + +'lds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Lay' + +'out'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1 + +#12'ClientHeight'#3#151#0#11'ClientWidth'#3#186#0#13'Items.Strings'#1#6#19'N' + +'ormal Distribution'#6#14't-Distribution'#6#23'Chi Square Distribution'#6#14 + +'F Distribution'#6#20'Poisson Distribution'#0#7'OnClick'#7#14'DistGroupClick' + +#8'TabOrder'#2#8#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#200#0#6'Height'#2#30#3 + +'Top'#3#224#0#5'Width'#2'J'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'Tab' + +'Order'#2#9#0#0#7'TButton'#8'ResetBtn'#4'Left'#3'>'#1#6'Height'#2#30#3'Top'#3 + +#224#0#5'Width'#2'J'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnClick'#8 + +'TabOrder'#2#10#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#200#0#6'Height'#2#30 + +#3'Top'#3#8#1#5'Width'#2'J'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeB' + +'tnClick'#8'TabOrder'#2#11#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3'>'#1#6'Heig' + +'ht'#2#30#3'Top'#3#8#1#5'Width'#2'J'#7'Caption'#6#6'Return'#11'ModalResult'#2 + +#1#8'TabOrder'#2#12#0#0#9'TGroupBox'#11'PlotTypeGrp'#4'Left'#3#153#1#6'Heigh' + +'t'#2'A'#3'Top'#3'$'#1#5'Width'#3#187#0#7'Caption'#6#10'Plot Type:'#12'Clien' + +'tHeight'#2'/'#11'ClientWidth'#3#183#0#8'TabOrder'#2#13#0#9'TCheckBox'#9'Poi' + +'ntsChk'#4'Left'#2#8#6'Height'#2#19#3'Top'#2#2#5'Width'#2'C'#7'Caption'#6#8 + +'3DPoints'#7'Checked'#9#7'OnClick'#7#14'PointsChkClick'#5'State'#7#9'cbCheck' + +'ed'#8'TabOrder'#2#0#0#0#9'TCheckBox'#8'LinesChk'#4'Left'#2#8#6'Height'#2#19 + +#3'Top'#2#25#5'Width'#2'='#7'Caption'#6#7'3DLines'#7'OnClick'#7#13'LinesChkC' + +'lick'#8'TabOrder'#2#1#0#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#5#6'Height' + +#2'2'#3'Top'#3'3'#1#5'Width'#3'K'#1#7'Caption'#6#7'Option:'#12'ClientHeight' + ,#2' '#11'ClientWidth'#3'G'#1#8'TabOrder'#2#14#0#9'TCheckBox'#7'BothChk'#4'Le' + +'ft'#2#4#6'Height'#2#19#3'Top'#2#5#5'Width'#3#14#1#7'Caption'#6',Plot both F' + +'requency and cumulative Frequency'#8'TabOrder'#2#0#0#0#0#0 +]); diff --git a/applications/lazstats/source_orig/comparedistunit.pas b/applications/lazstats/source_orig/comparedistunit.pas new file mode 100644 index 000000000..7c7de5fcd --- /dev/null +++ b/applications/lazstats/source_orig/comparedistunit.pas @@ -0,0 +1,515 @@ +unit CompareDistUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, ExtCtrls, BlankFrmUnit, OutPutUnit, FunctionsLib, Globals, + Math, GraphLib, DataProcs, FreqSpecsUnit, MainUnit; + +type + + { TCompareDistFrm } + + TCompareDistFrm = class(TForm) + CancelBtn: TButton; + BothChk: TCheckBox; + GroupBox1: TGroupBox; + LinesChk: TCheckBox; + PointsChk: TCheckBox; + PlotTypeGrp: TGroupBox; + ResetBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + CompareGroup: TRadioGroup; + DistGroup: TRadioGroup; + VarOneEdit: TEdit; + VarTwoEdit: TEdit; + Label2: TLabel; + Label3: TLabel; + Var1InBtn: TBitBtn; + Var1OutBtn: TBitBtn; + Var2InBtn: TBitBtn; + Var2OutBtn: TBitBtn; + Label1: TLabel; + VarList: TListBox; + procedure CompareGroupClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure DistGroupClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure LinesChkClick(Sender: TObject); + procedure PointsChkClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + procedure Var1InBtnClick(Sender: TObject); + procedure Var1OutBtnClick(Sender: TObject); + procedure Var2InBtnClick(Sender: TObject); + procedure Var2OutBtnClick(Sender: TObject); + private + { private declarations } + compareto : integer; + disttype : integer; + public + { public declarations } + end; + +var + CompareDistFrm: TCompareDistFrm; + +implementation + +{ TCompareDistFrm } + +procedure TCompareDistFrm.FormShow(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + VarOneEdit.Text := ''; + VarTwoEdit.Text := ''; + for i := 1 to NoVariables do + begin + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); + end; + Var1InBtn.Visible := true; + Var1OutBtn.Visible := false; + Label3.Visible := false; + VarTwoEdit.Visible := false; + Var2InBtn.Visible := false; + Var2OutBtn.Visible := false; + CompareGroup.ItemIndex := 0; + DistGroup.ItemIndex := 0; + LinesChk.Checked := false; + PointsChk.Checked := true; +end; + +procedure TCompareDistFrm.LinesChkClick(Sender: TObject); +begin + PointsChk.Checked := false; +end; + +procedure TCompareDistFrm.PointsChkClick(Sender: TObject); +begin + LinesChk.Checked := false; +end; + +procedure TCompareDistFrm.CompareGroupClick(Sender: TObject); +begin + compareto := CompareGroup.ItemIndex; + if compareto = 0 then + begin + Label3.Visible := false; + VarTwoEdit.Visible := false; + Var2InBtn.Visible := false; + Var2OutBtn.Visible := false; + end + else + begin + Label3.Visible := true; + VarTwoEdit.Visible := true; + Var2InBtn.Visible := true; + Var2OutBtn.Visible := false; + end; +end; + +procedure TCompareDistFrm.ComputeBtnClick(Sender: TObject); +VAR + Var1Freq : IntDyneVec; + Var2Freq : IntDyneVec; + XValue1 : DblDyneVec; + XValue2 : DblDyneVec; + Cumfreq1 : DblDyneVec; + Cumfreq2 : DblDyneVec; + i, j, k, col1, col2, Ncases, noints1, noints2, noints : integer; + min1, max1, min2, max2, range1, range2, incrsize, value : double; + incrsize1, incrsize2, prob1,prob2, KS, mean, DegFree : double; + cellval, name1, name2 : string; + df1, df2 : integer; + xtitle : string; + +label again1, again2; + +begin + SetLength(Var1Freq,NoCases+1); + SetLength(Var2Freq,NoCases+1); + SetLength(XValue1, NoCases + 1); + SetLength(XValue2, NoCases + 1); + SetLength(Cumfreq1,NoCases + 1); + SetLength(Cumfreq2,NoCases + 1); + // Get columns of the variables + for i := 1 to NoVariables do + begin + if VarOneEdit.Text = OS3MainFrm.DataGrid.Cells[i,0] then col1 := i; + if compareto = 1 then + begin + if VarTwoEdit.Text = OS3MainFrm.DataGrid.Cells[i,0] then col2 := i; + end; + end; + // get min and max values for variable in col1 + min1 := 1.0e32; + max1 := -1.0e32; + Ncases := 0; + for j := 1 to NoCases do + begin + if Not ValidValue(j,col1) then continue; + value := StrToFloat(OS3MainFrm.DataGrid.Cells[col1,j]); + if value > max1 then max1 := value; + if value < min1 then min1 := value; + Ncases := Ncases + 1; + end; + range1 := max1 - min1 + 1.0; + if compareto = 1 then + begin + min2 := 1.0e32; + max2 := -1.0e32; + for j := 1 to NoCases do + begin + if Not ValidValue(j,col2) then continue; + value := StrToFloat(OS3MainFrm.DataGrid.Cells[col2,j]); + if value > max2 then max2 := value; + if value < min2 then min2 := value; + end; + range2 := max2 - min2 + 1.0; + name2 := VarTwoEdit.Text; + end; + noints := NoCases-1; + if noints > 20 then noints := 20; + incrsize1 := range1 / noints; + incrsize2 := range2 / noints; + + //Now, get frequency of cases in each interval + for j := 1 to noints+1 do Var1Freq[j-1] := 0; + for j := 1 to NoCases do + begin + if Not ValidValue(j,col1) then continue; + value := StrToFloat(OS3MainFrm.DataGrid.Cells[col1,j]); + for k := 1 to noints do + begin + if (value >= min1 + ((k-1) * incrsize1)) and + (value < min1 + (k * incrsize1)) then Var1Freq[k-1] := Var1Freq[k-1] + 1; + end; + end; + Cumfreq1[0] := Var1Freq[0]; + for j := 1 to noints+1 do XValue1[j-1] := min1 + (j-1) * incrsize1; + for j := 1 to noints do Cumfreq1[j] := Cumfreq1[j-1] + Var1Freq[j]; + if compareto = 1 then // do same for second variable + begin + for j := 1 to noints+1 do Var2Freq[j-1] := 0; + for j := 1 to NoCases do + begin + if Not ValidValue(j,col2) then continue; + value := StrToFloat(OS3MainFrm.DataGrid.Cells[col2,j]); + for k := 1 to noints do + begin + if (value >= min2 + ((k-1) * incrsize2)) and + (value < min2 + (k * incrsize2)) then Var2Freq[k-1] := Var2Freq[k-1] + 1; + end; + end; + Cumfreq2[0] := Var2Freq[0]; + for j := 1 to noints+1 do XValue2[j-1] := min2 + (j-1) * incrsize2; + for j := 1 to noints do Cumfreq2[j] := Cumfreq2[j-1] + Var2Freq[j]; + end; + + if compareto = 0 then // get theoretical distribution frequencies for selected dist. + begin + if DistGroup.ItemIndex = 0 then // normal curve + begin + name2 := 'Normal'; + min2 := -3.0; + max2 := 3.0; + range2 := max2 - min2; + incrsize2 := range2 / noints; + Xvalue2[0] := min2; + Xvalue2[noints] := max2; + for i := 1 to noints do + begin + Xvalue2[i-1] := min2 + (i-1) * incrsize2; + Xvalue2[i] := min2 + (i) * incrsize2; + prob1 := probz(abs(Xvalue2[i-1])); + prob2 := probz(abs(Xvalue2[i])); + if prob1 > prob2 then + Var2Freq[i-1] := round((prob1-prob2) * Ncases) + else Var2Freq[i-1] := round((prob2-prob1) * Ncases) + end; + Cumfreq2[0] := Var2Freq[0]; + for i := 1 to noints do Cumfreq2[i] := Cumfreq2[i-1] + Var2Freq[i]; + end; + if DistGroup.ItemIndex = 1 then // t-distribution + begin + name2 := 't-Dist.'; + min2 := -3.0; + max2 := 3.0; + df1 := Ncases - 1; + range2 := max2 - min2; + incrsize2 := range2 / noints; + Xvalue2[0] := min2; + Xvalue2[noints] := max2; + for i := 1 to noints do + begin + Xvalue2[i-1] := min2 + (i-1) * incrsize2; + Xvalue2[i] := min2 + (i) * incrsize2; + prob1 := 0.5 * probt(Xvalue2[i-1],df1); + prob2 := 0.5 * probt(Xvalue2[i],df1); + if prob1 > prob2 then + Var2Freq[i-1] := round((prob1-prob2) * Ncases) + else Var2Freq[i-1] := round((prob2-prob1) * Ncases) + end; + Cumfreq2[0] := Var2Freq[0]; + for i := 1 to noints do Cumfreq2[i] := Cumfreq2[i-1] + Var2Freq[i]; + end; + if DistGroup.ItemIndex = 2 then // chi squared distribution + begin + cellval := InputBox('Deg. Freedom 1 Entry','DF 1',''); + df1 := StrToInt(cellval); + name2 := 'Chi Sqrd'; + min2 := 0.0; + max2 := 20.0; + range2 := max2 - min2; + incrsize2 := range2 / noints; + Xvalue2[0] := min2; + Xvalue2[noints] := max2; + for i := 1 to noints do + begin + Xvalue2[i-1] := min2 + (i-1) * incrsize2; + Xvalue2[i] := min2 + (i) * incrsize2; + prob1 := chisquaredprob(Xvalue2[i-1],df1); + prob2 := chisquaredprob(Xvalue2[i],df1); + if prob1 > prob2 then + Var2Freq[i-1] := round((prob1-prob2) * Ncases) + else Var2Freq[i-1] := round((prob2-prob1) * Ncases) + end; + Cumfreq2[0] := Var2Freq[0]; + for i := 1 to noints do Cumfreq2[i] := Cumfreq2[i-1] + Var2Freq[i]; + end; + if DistGroup.ItemIndex = 3 then // F distribution + begin + // get degrees of freedom + cellval := InputBox('Deg. Freedom 1 Entry','DF 1',''); + df1 := StrToInt(cellval); + cellval := InputBox('Deg. Freedom 2 Entry','DF 2',''); + df2 := StrToInt(cellval); + name2 := 'F Dist.'; + min2 := 0.0; + max2 := 3.0; + range2 := max2 - min2; + incrsize2 := range2 / noints; + Xvalue2[0] := min2; + Xvalue2[noints] := max2; + for i := 1 to noints do + begin + Xvalue2[i-1] := min2 + (i-1) * incrsize2; + Xvalue2[i] := min2 + (i) * incrsize2; + prob1 := probf(Xvalue2[i-1],df1,df2); + prob2 := probf(Xvalue2[i],df1,df2); + if prob1 > prob2 then + Var2Freq[i-1] := round((prob1-prob2) * Ncases) + else Var2Freq[i-1] := round((prob2-prob1) * Ncases) + end; + Cumfreq2[0] := Var2Freq[0]; + for i := 1 to noints do Cumfreq2[i] := Cumfreq2[i-1] + Var2Freq[i]; + end; + + if DistGroup.ItemIndex = 4 then // Poisson distribution + begin + name2 := 'Poisson'; + mean := 0; // use as parameter a in pdf call + min2 := min1; + max2 := max1; + if max2 > 13 then + begin + ShowMessage('Value > 13 found. Factorial too large - exiting.'); + exit; + end; + for i := 1 to Ncases do + mean := mean + StrToFloat(OS3MainFrm.DataGrid.Cells[col1,i]); + mean := mean / Ncases; + cellval := IntToStr(round(mean)); + cellval := InputBox('Parameter Entry (mean)','DF 1',cellval); + degfree := StrToFloat(cellval); + range2 := max2 - min2; + incrsize2 := range2 / noints; +// Xvalue2[0] := min2; + Xvalue2[noints] := max2; + for i := 1 to noints do + begin + Xvalue2[i-1] := min2 + (i-1) * incrsize2; + Xvalue2[i] := min2 + (i) * incrsize2; + poisson_pdf ( round(Xvalue2[i-1]), degfree, prob1 ); +// prob1 := (Xvalue2[i-1],df1); +// prob2 := chisquaredprob(Xvalue2[i],df1); +// if prob1 > prob2 then + Var2Freq[i-1] := round((prob1) * Ncases); +// else Var2Freq[i-1] := round((prob2-prob1) * Ncases) + end; + Cumfreq2[0] := Var2Freq[0]; + for i := 1 to noints do Cumfreq2[i] := Cumfreq2[i-1] + Var2Freq[i]; + end; + end; + + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Distribution comparison by Bill Miller'); + OutPutFrm.RichEdit.Lines.Add(''); + cellval := format('%10s %10s %10s %10s %10s %10s', + [name1, name1, name1,name2,name2,name2]); + OutPutFrm.RichEdit.Lines.Add(cellval); + cellval := format('%10s %10s %10s %10s %10s %10s', + ['X1 Value','Frequency','Cum. Freq.','X2 Value','Frequency','Cum. Freq.']); + OutPutFrm.RichEdit.Lines.Add(cellval); + for i := 1 to noints do + begin + cellval := format('%10.3f %10d %10.3f %10.3f %10d %10.3f', + [XValue1[i-1],Var1Freq[i-1],Cumfreq1[i-1],XValue2[i-1],Var2Freq[i-1],Cumfreq2[i-1]]); + OutPutFrm.RichEdit.Lines.Add(cellval); + end; + cellval := 'D'; + KS := KolmogorovTest(noints, Cumfreq1,noints, Cumfreq2, cellval); +// cellval := format('Kolmogorov-Smirnov statistic := %5.3f',[KS]); +// OutPutFrm.RichEdit.Lines.Add(cellval); + OutPutFrm.ShowModal; + + // plot the cdfs + xtitle := 'Red = ' + VarOneEdit.Text + ' Blue = ' + name2; + cellval := 'Plot of Cum. Distributions'; + if LinesChk.Checked then GraphFrm.barwideprop := 1.0 + else GraphFrm.barwideprop := 0.5; + GraphFrm.nosets := 2; + GraphFrm.nbars := noints+1; + GraphFrm.Heading := cellval; + GraphFrm.XTitle := xtitle; + GraphFrm.YTitle := 'Frequency'; + SetLength(GraphFrm.Ypoints,2,noints+1); + SetLength(GraphFrm.Xpoints,1,noints+1); + for k := 1 to noints+1 do + begin + GraphFrm.Ypoints[0,k-1] := Cumfreq1[k-1]; + GraphFrm.Ypoints[1,k-1] := CumFreq2[k-1]; + GraphFrm.Xpoints[0,k-1] := k; + end; + GraphFrm.AutoScale := true; + if LinesChk.Checked then GraphFrm.GraphType := 6 // 3d lines + else GraphFrm.GraphType := 8; // 3D points + GraphFrm.BackColor := clYellow; + GraphFrm.WallColor := clBlue; + GraphFrm.FloorColor := clGray; + GraphFrm.ShowLeftWall := true; + GraphFrm.ShowRightWall := true; + GraphFrm.ShowBottomWall := true; + GraphFrm.ShowBackWall := true; + GraphFrm.ShowModal; + GraphFrm.Xpoints := nil; + GraphFrm.Ypoints := nil; + + if BothChk.Checked then // plot the frequencies + begin + xtitle := 'Red = ' + VarOneEdit.Text + ' Blue = ' + name2; + cellval := 'Plot of Cum. Distributions'; + if LinesChk.Checked then GraphFrm.barwideprop := 1.0 + else GraphFrm.barwideprop := 0.5; + GraphFrm.nosets := 2; + GraphFrm.nbars := noints+1; + GraphFrm.Heading := cellval; + GraphFrm.XTitle := xtitle; + GraphFrm.YTitle := 'Frequency'; + SetLength(GraphFrm.Ypoints,2,noints+1); + SetLength(GraphFrm.Xpoints,1,noints+1); + for k := 1 to noints+1 do + begin + GraphFrm.Ypoints[0,k-1] := Var1Freq[k-1]; + GraphFrm.Ypoints[1,k-1] := Var2Freq[k-1]; + GraphFrm.Xpoints[0,k-1] := k; + end; + GraphFrm.AutoScale := true; + if LinesChk.Checked then GraphFrm.GraphType := 6 // 3d lines + else GraphFrm.GraphType := 8; // 3D points + GraphFrm.BackColor := clYellow; + GraphFrm.WallColor := clBlue; + GraphFrm.FloorColor := clGray; + GraphFrm.ShowLeftWall := true; + GraphFrm.ShowRightWall := true; + GraphFrm.ShowBottomWall := true; + GraphFrm.ShowBackWall := true; + GraphFrm.ShowModal; + GraphFrm.Xpoints := nil; + GraphFrm.Ypoints := nil; + + end; + // clean up + Cumfreq2 := nil; + Cumfreq1 := nil; + XValue1 := nil; + XValue2 := nil; + Var2Freq := nil; + Var1Freq := nil; +end; + +procedure TCompareDistFrm.DistGroupClick(Sender: TObject); +begin + disttype := DistGroup.ItemIndex; +end; + +procedure TCompareDistFrm.ResetBtnClick(Sender: TObject); +begin + FormShow(self); +end; + +procedure TCompareDistFrm.Var1InBtnClick(Sender: TObject); +VAR i, index : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + VarOneEdit.Text := VarList.Items.Strings[i]; + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + Var1OutBtn.Visible := true; + Var1InBtn.Visible := false; +end; + +procedure TCompareDistFrm.Var1OutBtnClick(Sender: TObject); +begin + VarList.Items.Add(VarOneEdit.Text); + VarOneEdit.Text := ''; + Var1OutBtn.Visible := false; + Var1InBtn.Visible := true; +end; + +procedure TCompareDistFrm.Var2InBtnClick(Sender: TObject); +VAR i, index : integer; +begin + index := VarList.Items.Count; + i := 0; + while i < index do + begin + if (VarList.Selected[i]) then + begin + VarTwoEdit.Text := VarList.Items.Strings[i]; + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + Var2OutBtn.Visible := true; + Var2InBtn.Visible := false; +end; + +procedure TCompareDistFrm.Var2OutBtnClick(Sender: TObject); +begin + VarList.Items.Add(VarTwoEdit.Text); + VarTwoEdit.Text := ''; + Var2OutBtn.Visible := false; + Var2InBtn.Visible := true; +end; + +initialization + {$I comparedistunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/concordanceunit.lfm b/applications/lazstats/source_orig/concordanceunit.lfm new file mode 100644 index 000000000..6e60363a4 --- /dev/null +++ b/applications/lazstats/source_orig/concordanceunit.lfm @@ -0,0 +1,190 @@ +object ConcordFrm: TConcordFrm + Left = 176 + Height = 272 + Top = 123 + Width = 516 + Caption = 'Kendal''s Coefficient of Concordance' + ClientHeight = 272 + ClientWidth = 516 + OnShow = FormShow + LCLVersion = '0.9.28.2' + object Label1: TLabel + Left = 6 + Height = 14 + Top = 0 + Width = 90 + Caption = 'Avialable Variables' + ParentColor = False + end + object Label2: TLabel + Left = 216 + Height = 14 + Top = 0 + Width = 88 + Caption = 'Selected Variables' + ParentColor = False + end + object VarList: TListBox + Left = 7 + Height = 237 + Top = 16 + Width = 161 + ItemHeight = 0 + MultiSelect = True + TabOrder = 0 + end + object InBtn: TBitBtn + Left = 176 + Height = 29 + Top = 24 + Width = 29 + 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 = 176 + Height = 29 + Top = 56 + Width = 29 + 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 = 176 + Height = 29 + Top = 104 + Width = 29 + Caption = 'ALL' + NumGlyphs = 0 + OnClick = AllBtnClick + TabOrder = 3 + end + object ListBox1: TListBox + Left = 216 + Height = 239 + Top = 18 + Width = 165 + ItemHeight = 0 + TabOrder = 4 + end + object ResetBtn: TButton + Left = 408 + Height = 30 + Top = 112 + Width = 81 + Caption = 'Reset' + OnClick = ResetBtnClick + TabOrder = 5 + end + object CancelBtn: TButton + Left = 408 + Height = 30 + Top = 64 + Width = 83 + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 6 + end + object ComputeBtn: TButton + Left = 408 + Height = 30 + Top = 160 + Width = 83 + Caption = 'Compute' + OnClick = ComputeBtnClick + TabOrder = 7 + end + object ReturnBtn: TButton + Left = 408 + Height = 30 + Top = 208 + Width = 80 + Caption = 'Return' + ModalResult = 1 + TabOrder = 8 + end + object HelpBtn: TButton + Tag = 115 + Left = 408 + Height = 32 + Top = 16 + Width = 80 + Caption = 'Help' + OnClick = HelpBtnClick + TabOrder = 9 + end +end diff --git a/applications/lazstats/source_orig/concordanceunit.lrs b/applications/lazstats/source_orig/concordanceunit.lrs new file mode 100644 index 000000000..add907099 --- /dev/null +++ b/applications/lazstats/source_orig/concordanceunit.lrs @@ -0,0 +1,130 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TConcordFrm','FORMDATA',[ + 'TPF0'#11'TConcordFrm'#10'ConcordFrm'#4'Left'#3#176#0#6'Height'#3#16#1#3'Top' + +#2'{'#5'Width'#3#4#2#7'Caption'#6'#Kendal''s Coefficient of Concordance'#12 + +'ClientHeight'#3#16#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'#2#6#6'Height'#2#14#3'Top' + +#2#0#5'Width'#2'Z'#7'Caption'#6#19'Avialable Variables'#11'ParentColor'#8#0#0 + +#6'TLabel'#6'Label2'#4'Left'#3#216#0#6'Height'#2#14#3'Top'#2#0#5'Width'#2'X' + +#7'Caption'#6#18'Selected Variables'#11'ParentColor'#8#0#0#8'TListBox'#7'Var' + +'List'#4'Left'#2#7#6'Height'#3#237#0#3'Top'#2#16#5'Width'#3#161#0#10'ItemHei' + +'ght'#2#0#11'MultiSelect'#9#8'TabOrder'#2#0#0#0#7'TBitBtn'#5'InBtn'#4'Left'#3 + +#176#0#6'Height'#2#29#3'Top'#2#24#5'Width'#2#29#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#176#0#6'Height'#2#29#3'Top'#2'8'#5'Width'#2 + +#29#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0 + +#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + ,#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0'M'#161'V'#6'G'#153'O'#184#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0'S'#169'\'#217'M'#161'V'#247'G'#153'O8' + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0']'#184'h'#207'q'#190'{'#255'z'#193#131#255'['#170'd'#255 + +'G'#153'O'#255'A'#145'I'#255';'#136'B'#255'5'#128';'#255'/x5'#255'*p/'#255'%' + +'i)'#255'!c$'#255#29'^ '#255#255#255#255#0#255#255#255#0'e'#195'q'#196'{'#200 + +#134#255#156#213#165#255#152#211#161#255#148#208#157#255#144#206#152#255#139 + +#203#147#255#135#201#142#255#130#198#137#255'~'#195#132#255'z'#193#128#255'v' + +#190'|'#255'r'#189'x'#255'!c$'#255#255#255#255#0#255#255#255#0'h'#199't'#201 + +#127#204#138#255#162#216#171#255#158#214#167#255#154#212#163#255#150#210#159 + +#255#147#207#154#255#142#204#149#255#137#202#144#255#133#199#139#255#129#197 + +#135#255'}'#194#130#255'x'#192'~'#255'%i)'#255#255#255#255#0#255#255#255#0 + +#255#255#255#0'h'#199't'#209#128#205#139#255'|'#201#135#255']'#184'h'#255'X' + +#177'b'#255'S'#169'\'#255'M'#161'V'#255'G'#153'O'#255'A'#145'I'#255';'#136'B' + +#255'5'#128';'#255'/x5'#255'*p/'#255#255#255#255#0#255#255#255#0#255#255#255 + +#0#255#255#255#0'h'#199't'#219'e'#195'q'#247#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0'h'#199't'#6'h'#199't'#187#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255 + +#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255 + +#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0 + +#255#255#255#0#255#255#255#0#255#255#255#0#9'NumGlyphs'#2#0#7'OnClick'#7#11 + +'OutBtnClick'#8'TabOrder'#2#2#0#0#7'TBitBtn'#6'AllBtn'#4'Left'#3#176#0#6'Hei' + +'ght'#2#29#3'Top'#2'h'#5'Width'#2#29#7'Caption'#6#3'ALL'#9'NumGlyphs'#2#0#7 + +'OnClick'#7#11'AllBtnClick'#8'TabOrder'#2#3#0#0#8'TListBox'#8'ListBox1'#4'Le' + +'ft'#3#216#0#6'Height'#3#239#0#3'Top'#2#18#5'Width'#3#165#0#10'ItemHeight'#2 + +#0#8'TabOrder'#2#4#0#0#7'TButton'#8'ResetBtn'#4'Left'#3#152#1#6'Height'#2#30 + +#3'Top'#2'p'#5'Width'#2'Q'#7'Caption'#6#5'Reset'#7'OnClick'#7#13'ResetBtnCli' + +'ck'#8'TabOrder'#2#5#0#0#7'TButton'#9'CancelBtn'#4'Left'#3#152#1#6'Height'#2 + +#30#3'Top'#2'@'#5'Width'#2'S'#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'T' + +'abOrder'#2#6#0#0#7'TButton'#10'ComputeBtn'#4'Left'#3#152#1#6'Height'#2#30#3 + +'Top'#3#160#0#5'Width'#2'S'#7'Caption'#6#7'Compute'#7'OnClick'#7#15'ComputeB' + +'tnClick'#8'TabOrder'#2#7#0#0#7'TButton'#9'ReturnBtn'#4'Left'#3#152#1#6'Heig' + +'ht'#2#30#3'Top'#3#208#0#5'Width'#2'P'#7'Caption'#6#6'Return'#11'ModalResult' + +#2#1#8'TabOrder'#2#8#0#0#7'TButton'#7'HelpBtn'#3'Tag'#2's'#4'Left'#3#152#1#6 + +'Height'#2' '#3'Top'#2#16#5'Width'#2'P'#7'Caption'#6#4'Help'#7'OnClick'#7#12 + +'HelpBtnClick'#8'TabOrder'#2#9#0#0#0 +]); diff --git a/applications/lazstats/source_orig/concordanceunit.pas b/applications/lazstats/source_orig/concordanceunit.pas new file mode 100644 index 000000000..0c59111d2 --- /dev/null +++ b/applications/lazstats/source_orig/concordanceunit.pas @@ -0,0 +1,351 @@ +unit ConcordanceUnit; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, MainUnit, Globals, OutPutUnit, DataProcs, Math, + FunctionsLib, contexthelpunit; + +type + + { TConcordFrm } + + TConcordFrm = class(TForm) + HelpBtn: TButton; + ResetBtn: TButton; + CancelBtn: TButton; + ComputeBtn: TButton; + ReturnBtn: TButton; + InBtn: TBitBtn; + OutBtn: TBitBtn; + AllBtn: TBitBtn; + Label1: TLabel; + Label2: TLabel; + ListBox1: TListBox; + VarList: TListBox; + procedure AllBtnClick(Sender: TObject); + procedure ComputeBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure HelpBtnClick(Sender: TObject); + procedure InBtnClick(Sender: TObject); + procedure OutBtnClick(Sender: TObject); + procedure ResetBtnClick(Sender: TObject); + private + { private declarations } + public + { public declarations } + end; + +var + ConcordFrm: TConcordFrm; + +implementation + +{ TConcordFrm } + +procedure TConcordFrm.ResetBtnClick(Sender: TObject); +VAR i : integer; +begin + VarList.Clear; + ListBox1.Clear; + for i := 1 to NoVariables do + begin + VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); + end; + InBtn.Enabled := true; + OutBtn.Enabled := false; +end; + +procedure TConcordFrm.FormShow(Sender: TObject); +begin + ResetBtnClick(self); +end; + +procedure TConcordFrm.HelpBtnClick(Sender: TObject); +begin + ContextHelpForm.HelpMessage((Sender as TButton).tag); +end; + +procedure TConcordFrm.AllBtnClick(Sender: TObject); +VAR count, index : integer; +begin + count := VarList.Items.Count; + if count = 0 then exit; + for index := 0 to count-1 do + begin + ListBox1.Items.Add(VarList.Items.Strings[index]); + end; + VarList.Clear; + InBtn.Visible := false; + OutBtn.Visible := true; +end; + +procedure TConcordFrm.ComputeBtnClick(Sender: TObject); +var + i, j, k, index, No_Judges, No_Objects, col, ties, start, last : integer; + NoSelected : integer; + Temp, TotalCorrect, JudgeCorrect, ChiSquare, Probability : double; + TotalRankSums, Concordance, AvgRankCorr, AvgTotalRanks : double; + statistic : double; + scorearray : DblDyneMat; + temprank, ObjRankSums : DblDyneVec; + tempindex : IntDyneVec; + done : boolean; + value, cellstring, outline : string; + ColNoSelected : IntDyneVec; + ColLabels : StrDyneVec; +begin + No_Judges := 0; + No_Objects := ListBox1.Items.Count; + + // Allocate space for selected variable column no.s + SetLength(scorearray,NoCases,No_Objects); + SetLength(tempindex,No_Objects); + SetLength(temprank,No_Objects); + SetLength(ObjRankSums,No_Objects); + SetLength(ColLabels,NoVariables); + SetLength(ColNoSelected,NoVariables); + + // get columns of variables selected + for i := 0 to No_Objects - 1 do + begin + cellstring := ListBox1.Items.Strings[i]; + for index := 1 to NoVariables do + begin + if (cellstring = OS3MainFrm.DataGrid.Cells[index,0]) then + begin + ColNoSelected[i] := index; + ColLabels[i] := cellstring; + end; + end; + end; + + //Read data from grid + for i := 1 to NoCases do + begin + if (not GoodRecord(i,No_Objects,ColNoSelected)) then continue; + No_Judges := No_Judges + 1; + for j := 1 to No_Objects do + begin + col := ColNoSelected[j-1]; + scorearray[i-1,j-1] := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[col,i])); + end; + end; + + //Rank the scores in the rows for each judge (column) + TotalCorrect := 0.0; + for i := 0 to No_Judges-1 do + begin + JudgeCorrect := 0.0; + for j := 0 to No_Objects-1 do + begin + tempindex[j] := j; + temprank[j] := scorearray[i,j]; + end; + //Sort the temp arrays + for j := 0 to No_Objects - 2 do + begin + for k := j + 1 to No_Objects - 1 do + begin + if (temprank[j] > temprank[k]) then + begin + Temp := temprank[j]; + temprank[j] := temprank[k]; + temprank[k] := Temp; + index := tempindex[j]; + tempindex[j] := tempindex[k]; + tempindex[k] := index; + end; + end; + end; + + //Now convert temporary score array to ranks (correcting for ties) + j := 0; + while (j <= No_Objects-1) do + begin + ties := 0; + k := j; + done := false; + while (not done) do + begin + k := k + 1; + if (k <= No_Objects-1) then + begin + if (temprank[j] = temprank[k]) then ties := ties + 1; + end + else done := true; + end; + if (ties = 0.0) then + begin + temprank[j] := j+1; + j := j + 1; + end + else begin + for k := j to j + ties do + begin + temprank[k] := (j+1) + (ties / 2.0); + end; + j := j + ties + 1; + ties := ties + 1; + JudgeCorrect := JudgeCorrect + (Power(ties,3) - ties); + end; + end; + + //Now, restore ranks in their position equivalent to original scores + for j := 0 to No_Objects-1 do + begin + k := tempindex[j]; + scorearray[i,k] := temprank[j]; + end; + TotalCorrect := TotalCorrect + (JudgeCorrect / 12.0); + end; // next judge i + + //Calculate statistics + statistic := 0.0; + TotalRankSums := 0.0; + for j := 0 to No_Objects-1 do + begin + ObjRankSums[j] := 0.0; + for i := 0 to No_Judges-1 do ObjRankSums[j] := ObjRankSums[j] + scorearray[i,j]; + TotalRankSums := TotalRankSums + ObjRankSums[j]; + end; + AvgTotalRanks := TotalRankSums / No_Objects; + for j := 0 to No_Objects-1 do + statistic := statistic + Power((ObjRankSums[j] - AvgTotalRanks), 2); + Concordance := statistic / ( ((No_Judges * No_Judges) / 12.0) * + (Power(No_Objects,3) - No_Objects) - (No_Judges * TotalCorrect) ); + AvgRankCorr := (No_Judges * Concordance - 1.0) / (No_Judges - 1); + ChiSquare := No_Judges * Concordance * (No_Objects - 1); + Probability := 1.0 - chisquaredprob(ChiSquare, No_Objects - 1); + + //Report results + OutPutFrm.RichEdit.Clear; + OutPutFrm.RichEdit.Lines.Add('Kendall Coefficient of Concordance Analysis'); + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Ranks Assigned to Judge Ratings of Objects'); + OutPutFrm.RichEdit.Lines.Add(''); + + for i := 1 to No_Judges do + begin + done := false; + start := 1; + last := 10; + while (not done) do + begin + if (last > No_Objects)then last := No_Objects; + outline := format('Judge %3d',[i]); + outline := outline + ' Objects'; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + for j := start to last do + begin + col := ColNoSelected[j-1]; + outline := outline + format('%8s',[ColLabels[col-1]]); + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + for j := start to last do + begin + value := format('%8.4f',[scorearray[i-1,j-1]]); + outline := outline + value; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + if (last = No_Objects) then done := true + else begin + start := last; + last := start + 10; + end; + outline := ''; + end; // while end + OutPutFrm.RichEdit.Lines.Add(''); + end; // next i + + OutPutFrm.RichEdit.Lines.Add(''); + OutPutFrm.RichEdit.Lines.Add('Sum of Ranks for Each Object Judged'); + done := false; + start := 1; + last := 10; + while (not done) do + begin + if (last > No_Objects) then last := No_Objects; + OutPutFrm.RichEdit.Lines.Add(' Objects'); + outline := ' '; + for j := start to last do + begin + col := ColNoSelected[j-1]; + value := format('%8s',[ColLabels[col-1]]); + outline := outline + value; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + outline := ' '; + for j := start to last do + begin + value := format('%8.4f',[ObjRankSums[j-1]]); + outline := outline + value; + end; + OutPutFrm.RichEdit.Lines.Add(outline); + OutPutFrm.RichEdit.Lines.Add(''); + if (last = No_Objects) then done := true + else begin + start := last; + last := start + 10; + end; + end; + outline := format('Coefficient of concordance := %10.3f',[Concordance]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Average Spearman Rank Correlation := %10.3f',[AvgRankCorr]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Chi-Square Statistic := %8.3f',[ChiSquare]); + OutPutFrm.RichEdit.Lines.Add(outline); + outline := format('Probability of a larger Chi-Square := %6.4f',[Probability]); + OutPutFrm.RichEdit.Lines.Add(outline); + if (No_Objects < 7) then + OutPutFrm.RichEdit.Lines.Add('Warning - Above Chi-Square is very approximate with 7 or fewer variables!'); + OutPutFrm.ShowModal; + + // cleanup + ColNoSelected := nil; + ColLabels := nil; + ObjRankSums := nil; + temprank := nil; + tempindex := nil; + scorearray := nil; +end; + +procedure TConcordFrm.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 + ListBox1.Items.Add(VarList.Items.Strings[i]); + VarList.Items.Delete(i); + index := index - 1; + i := 0; + end + else i := i + 1; + end; + + OutBtn.Enabled := true; +end; + +procedure TConcordFrm.OutBtnClick(Sender: TObject); +VAR index : integer; +begin + index := ListBox1.ItemIndex; + VarList.Items.Add(ListBox1.Items.Strings[index]); + ListBox1.Items.Delete(index); + InBtn.Enabled := true; +end; + +initialization + {$I concordanceunit.lrs} + +end. + diff --git a/applications/lazstats/source_orig/contexthelpunit.lfm b/applications/lazstats/source_orig/contexthelpunit.lfm new file mode 100644 index 000000000..0b34b9307 --- /dev/null +++ b/applications/lazstats/source_orig/contexthelpunit.lfm @@ -0,0 +1,43 @@ +object ContextHelpForm: TContextHelpForm + Left = 240 + Height = 438 + Top = 134 + Width = 578 + Caption = 'Contextual Help' + ClientHeight = 438 + ClientWidth = 578 + Position = poScreenCenter + LCLVersion = '0.9.30' + object Panel1: TPanel + Left = 0 + Height = 50 + Top = 388 + Width = 578 + Align = alBottom + ClientHeight = 50 + ClientWidth = 578 + TabOrder = 0 + object Button1: TButton + Left = 248 + Height = 25 + Top = 12 + Width = 75 + Caption = 'OK' + ModalResult = 1 + OnClick = Button1Click + TabOrder = 0 + end + end + object Memo1: TMemo + Left = 0 + Height = 388 + Top = 0 + Width = 578 + Align = alClient + Lines.Strings = ( + 'Memo1' + ) + ScrollBars = ssVertical + TabOrder = 1 + end +end diff --git a/applications/lazstats/source_orig/contexthelpunit.lrs b/applications/lazstats/source_orig/contexthelpunit.lrs new file mode 100644 index 000000000..693bb02df --- /dev/null +++ b/applications/lazstats/source_orig/contexthelpunit.lrs @@ -0,0 +1,15 @@ +{ This is an automatically generated lazarus resource file } + +LazarusResources.Add('TContextHelpForm','FORMDATA',[ + 'TPF0'#16'TContextHelpForm'#15'ContextHelpForm'#4'Left'#3#240#0#6'Height'#3 + +#182#1#3'Top'#3#134#0#5'Width'#3'B'#2#7'Caption'#6#15'Contextual Help'#12'Cl' + +'ientHeight'#3#182#1#11'ClientWidth'#3'B'#2#8'Position'#7#14'poScreenCenter' + +#10'LCLVersion'#6#6'0.9.30'#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6'Height'#2'2' + +#3'Top'#3#132#1#5'Width'#3'B'#2#5'Align'#7#8'alBottom'#12'ClientHeight'#2'2' + +#11'ClientWidth'#3'B'#2#8'TabOrder'#2#0#0#7'TButton'#7'Button1'#4'Left'#3#248 + +#0#6'Height'#2#25#3'Top'#2#12#5'Width'#2'K'#7'Caption'#6#2'OK'#11'ModalResul' + +'t'#2#1#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2#0#0#0#0#5'TMemo'#5'Memo1' + +#4'Left'#2#0#6'Height'#3#132#1#3'Top'#2#0#5'Width'#3'B'#2#5'Align'#7#8'alCli' + +'ent'#13'Lines.Strings'#1#6#5'Memo1'#0#10'ScrollBars'#7#10'ssVertical'#8'Tab' + +'Order'#2#1#0#0#0 +]);