Recent

Author Topic: LazStats - A new statistics package  (Read 18396 times)

wgmiller

  • Newbie
  • Posts: 2
LazStats - A new statistics package
« on: January 19, 2010, 06:31:14 pm »
I have converted a previous Delphi program to Lazarus.  It currently is only compiled for Windows and can be obtained at:
http://statpages.org/miller/LazStats
I do not have Linux or other platforms to attempt to compile it for these other platforms.  If any of you are willing, I would appreciate your participation.

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: LazStats - A new statistics package
« Reply #1 on: January 19, 2010, 07:04:01 pm »
Impressive work!

I do not have Linux or other platforms to attempt to compile it for these other platforms.  If any of you are willing, I would appreciate your participation.

To develop for Linux, you can install VirtualBox for Windows as host and Linux Ubuntu as client. They are both available free of charge.
« Last Edit: January 19, 2010, 07:42:37 pm by Troodon »
Lazarus/FPC on Linux

kamischi

  • Full Member
  • ***
  • Posts: 177
Re: LazStats - A new statistics package
« Reply #2 on: January 19, 2010, 08:03:39 pm »
I had a quick try on Mc OS X: The windows unit is not available. According to this part of the lazarus wiki conversion page:

http://wiki.freepascal.org/Code_Conversion_Guide#Converting_Delphi_projects.2Fforms.2Funits_to_Lazarus

I replaced the windows unit by LCLIntf.

Also, the case sensitivity of the filesystem gives problems. BLKANOVAUNIT.lrs and many more .lrs files. After correcting them i could get the program to start. As usual, the positions of texts and boxes need adjustments. Still some more warnings and stuff, but good enough for a screen shot.

Mischi.
fpc 2.6.4, lazarus 1.4.0, Mac OS X, fink

crorden

  • New Member
  • *
  • Posts: 36
Re: LazStats - A new statistics package
« Reply #3 on: January 20, 2010, 02:44:32 am »
Fantastic. OpenStat is a terrific tool. LazStats looks great. This looks like a very mature conversion - you already have the graphs and charts looking great.

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: LazStats - A new statistics package
« Reply #4 on: January 20, 2010, 04:46:32 am »
It currently is only compiled for Windows

You may wish to follow the suggestions in this thread http://www.lazarus.freepascal.org/index.php/topic,6244.0.html to minimize the size of your executable (I got around 4.2 MB on win32 and 5.4 MB on lnx32).

Please consider adding LazStats to the Lazarus application gallery http://wiki.freepascal.org/Lazarus_Application_Gallery (BTW, perhaps the Lazarus and FPC galleries should be merged).
« Last Edit: January 20, 2010, 05:29:23 am by Troodon »
Lazarus/FPC on Linux

wgmiller

  • Newbie
  • Posts: 2
Re: LazStats - A new statistics package
« Reply #5 on: January 23, 2010, 01:18:49 am »
Chris Rorden has compiled versions for Linux (32 bit and 64 bit) as well as Mac OSX.  He also "cleaned up" the code and made valuable suggestions.  You can download these at
http://statpages.org/miller/LazStats/

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: LazStats - A new statistics package
« Reply #6 on: January 29, 2020, 10:25:00 am »
Hello, is LazStats still actively maintained by mr. Miller? Are there any recent forks or similar developments?
Is there any Lazarus software dealing specifically with DOE (Design Of Experiments)?
Are there any books or other materials covering specifically how to use LazStats for DOE?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: LazStats - A new statistics package
« Reply #7 on: January 29, 2020, 11:03:33 am »
Hello, is LazStats still actively maintained by mr. Miller? Are there any recent forks or similar developments?
Is there any Lazarus software dealing specifically with DOE (Design Of Experiments)?
Are there any books or other materials covering specifically how to use LazStats for DOE?

A newer url seems to be https://openstat.info/LazStatsMain.htm

wp

  • Hero Member
  • *****
  • Posts: 11855
Re: LazStats - A new statistics package
« Reply #8 on: January 29, 2020, 11:14:40 am »
Hello, is LazStats still actively maintained by mr. Miller?
Does not look like that, even the link in the previous post is not working any more. I finally could download the Windows (*) sources from https://openstat.info/LazStatsMain.htm. Compilation did work after some changes (replaced GraphFrm.AutoScale by .AutoScaled due to a naming conflict), but at runtime I get a grid error that "FixedRows can't be > RowCount." which can be resolved by setting "DictionaryFrm.DictGrid.RowCount := DictionaryFrm.DictGrid.FixedRows;" in TOS3MainFrm.FormShow, unit MainUnit.

Is there any Lazarus software dealing specifically with DOE (Design Of Experiments)?
I don't think so. Isn't it true that DOE in the end comes down to linear regression? In this case you could try the fitting routins built into TAChart. Or try DMath available via Online Package Manager, or JediMath (https://sourceforge.net/projects/jedimath/). Some forms require some redesign.

(*) The windows unit is used by some units. In all of them it can be removed. There is a variable named RichEdit in the code but this already has been replaced by a TMemo.
« Last Edit: January 29, 2020, 11:34:57 am by wp »

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: LazStats - A new statistics package
« Reply #9 on: March 29, 2020, 11:20:11 am »
I think there is a possible bug in LazStats BlkANOVAUnit or ANOVATestUnit, namely it seems that Post-Hoc comparisons are not working with One-Way ANOVA in LazStats.
I couldn't figure out what is the reason, can somebody please take a look?

Test dataset is here:
https://drive.google.com/file/d/1qsJE1sOHFYYkizcK7W0nbiTgpAQK2dUn/view?usp=sharing
"Etch Rate (A/min)" is a dependent response variable, while "RF Power (W)" is independent input variable.

My LazStats source code (CodeTyphon version) is here:
https://drive.google.com/file/d/1FnAZqaZrhwBYgr9luYSytCucRhi_nmmt/view?usp=sharing

Could somebody please test it?

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: LazStats - A new statistics package
« Reply #10 on: March 29, 2020, 11:35:15 am »
Chris Rorden has compiled versions for Linux (32 bit and 64 bit) as well as Mac OSX.  He also "cleaned up" the code and made valuable suggestions.  You can download these at
http://statpages.org/miller/LazStats/
Unfortunately, this URL doesn't seem to be correct. Under the URL posted by @marcov I can't find the source code for macOS. Is there a source code repository (VCS, SVN, git etc.) available?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: LazStats - A new statistics package
« Reply #11 on: March 29, 2020, 12:13:13 pm »
The code (found at https://openstat.info/LazStatsMain.htm) is GPL (at least that is what license.lfm says), so we could host it on lazarus-ccr?

Bart

wp

  • Hero Member
  • *****
  • Posts: 11855
Re: LazStats - A new statistics package
« Reply #12 on: March 29, 2020, 12:13:50 pm »
Chris Rorden has compiled versions for Linux (32 bit and 64 bit) as well as Mac OSX.  He also "cleaned up" the code and made valuable suggestions.  You can download these at
http://statpages.org/miller/LazStats/
Unfortunately, this URL doesn't seem to be correct. Under the URL posted by @marcov I can't find the source code for macOS. Is there a source code repository (VCS, SVN, git etc.) available?
I have begun porting my own version, see https://github.com/wp-xyz/LazStats. All forms have consistent layout now, independent of widgetset. I have begun refactoring the code, adding validation of input parameters to avoid the frequent crashes of the program, checking the examples, rebuilding help files etc. With 100+ forms this will keep me busy for a while... The program must have been thesis for quite a lot of students.

@Bart: I could move it to ccr/applications...
« Last Edit: March 29, 2020, 12:15:52 pm by wp »

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: LazStats - A new statistics package
« Reply #13 on: March 30, 2020, 10:00:27 am »
Chris Rorden has compiled versions for Linux (32 bit and 64 bit) as well as Mac OSX.  He also "cleaned up" the code and made valuable suggestions.  You can download these at
http://statpages.org/miller/LazStats/
Unfortunately, this URL doesn't seem to be correct. Under the URL posted by @marcov I can't find the source code for macOS. Is there a source code repository (VCS, SVN, git etc.) available?
I have begun porting my own version, see https://github.com/wp-xyz/LazStats. All forms have consistent layout now, independent of widgetset. I have begun refactoring the code, adding validation of input parameters to avoid the frequent crashes of the program, checking the examples, rebuilding help files etc. With 100+ forms this will keep me busy for a while... The program must have been thesis for quite a lot of students.

@Bart: I could move it to ccr/applications...
Great!
For your info, there is a bug in LSMRUnit.
Code: Pascal  [Select][+][-]
  1.     { get independendent variable columns }
  2.      for i := 0 to IndepVars.Count-1 do
  3.      begin
  4.          {
  5.           cellstring := OS3Mainfrm.DataGrid.Cells[i+1,0];   //This is a bug!
  6.          }
  7.          cellstring := IndepVars.Items.Strings[i];   //Bugfix
  8.          for j := 1 to NoVariables do
  9.          begin
  10.              if cellstring = OS3MainFrm.DataGrid.Cells[j,0] then
  11.              begin
  12.                 IndepVarsCols[i] := j;
  13.                 ColEntered[i] := j;
  14.                 NEntered := NEntered + 1;
  15.                 IndRowLabels[NEntered-1] := cellstring;
  16.                 IndColLabels[NEntered-1] := cellstring;
  17.              end;
  18.          end;
  19.      end;                                                    
  20.  

wp

  • Hero Member
  • *****
  • Posts: 11855
Re: LazStats - A new statistics package
« Reply #14 on: March 30, 2020, 11:16:41 am »
Thanks. I just refactored the unit to my current standard. But I cannot find the position in the code, there is no comment "get independent variable columns" in my copy, only a "get dependent variaible columns". Except for this difference, a few lines later there are lines which seem to match. Just to make sure: What is the name of the procedure? TLSMregForm.ComputeBtnClick? Near the beginning after the bunch of SetLength instructions?

Did you happen to find the help file related to this form? The pdf usually contains a tested example of OpenStat which allows me to check the routine.

If there is not help file and no demo can you submit a sample file with the expected results?

 

TinyPortal © 2005-2018