Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1449

Statistics in VB6

$
0
0
Alright, I'm embarking on this endeavor as one of those "spare time" projects. I've long thought that there should be a good VB6 open-source program for doing various statistical analyses, and I've actually got VB6 pieces to a great many of them. I'm going to take my time with this though, and paste updates to this #1 (OP) post as things progress. Also, thoughts and ideas are more than welcome.

My philosophy is going to be that the actual data massaging will take place in Excel. And then, when the data are ready to analyze, it'll be moved into this VB6 program and analyzed. This obviates the need for data massaging/manipulation routines. Excel already does all of this quite well. (Just as an FYI, yes, I know that Excel also does primitive hypothesis testing, but I hope that this will expand well beyond the abilities of Excel, possibly approaching the abilities of something like SPSS. Also, many may want to incorporate these routines into their existing VB6 projects.)

Here's a brainstorm list of what I'd like to see:
  • parametric hypotheses:
    • two-way ANOVA
    • Pearson's correlation
    • simple linear regression
    • multiple linear regression
    • general linear model analysis
      • overall analysis
      • forward, backward, and stepwise best fit models
    • Kolmogorov Smirnov test
    • Shapiro-Wilk test
    • Levene test
    • Satterwaite t-test
  • logistic regression hypotheses
  • non-parametric hypotheses:
    • Mann-Whitney
    • Wilcoxon sign-rank
    • Kruskal-Wallis
    • Cochran test
    • Friedman test


Here's a list of statistics it currently does:
  • Descriptives
    • none at moment
  • Assumptions
    • none at moment
  • Inferential
    • one group z-test
    • one group t-test
    • two group t-test
    • one-way ANOVA


Clearly, there's much to do. However, even if a subset of the above could be accomplished, this may very well become a teaching tool for intro-stats classes, possibly giving VB6 a bit more clout. I'm not saying I'll complete the above list, but I do have sizable chunks of that code lying around, and I do have a strong knowledge of what's going on with this stuff.

Reverse chronological log:
1/14/17: Update version 1.03. Added two group t-test and one-way ANOVA.
1/13/17: First update, version 1.02. A great deal of clean-up and organization for going forward. Just briefly, organized the statistical distribution modules, added a Save/Open for datasets, added an Output for which includes printing and saving, made forms sizable and work well, and added drag-n-drop for selecting variables to analyze. Also, the one group z-test was added just to keep some headway on the actual statistical analysis.
1/11/17: Made first post, a start. It includes mechanisms for moving things back and forth from Excel, and it provides output (to Immediate window) for a one sample t-test.

The main dataset form:

Name:  main.gif
Views: 5
Size:  18.3 KB

The one group t-test form:

Name:  t.gif
Views: 5
Size:  13.8 KB

Sample of Output form:

Name:  Image1o.jpg
Views: 5
Size:  38.6 KB

If you know anything about statistics, hopefully you can see that this could be useful.

Again, I welcome assistance with anyone who would like to participate in this project. Here are some ideas that I'd welcome help on:
  • A bulletproof routine that would allow double-click editing of the dataset grid (including variable names, but excluding the record number column). Just editing of existing data. We'll take a look at adding rows/columns later.
  • A hard look at the routine that converts the Kolmogorov-Smirnov D to a p-value. This can be improved.
  • Beta testing, and reporting back with any errors/suspicions/suggestions.
  • For the Kolmogorov-Smirnov, I had to sort an array. I just threw together a primitive sort. Someone is welcome to slip in a quick-sort or some other better sort.

If you do decide to participate, possibly post your changes in posts below in-between [code][/code] with your changes highlighted in red. If they make sense, I'll absolutely incorporate them.

Just as an FYI, I know that my passion will be adding additional hypothesis test procedures to the project.

I'm going to save a couple of subsequent posts, just in case this thing actually takes off.

Best Regards to All,
Elroy
Attached Images
   
Attached Files

Viewing all articles
Browse latest Browse all 1449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>