home *** CD-ROM | disk | FTP | other *** search
- ----------------------------------------------------------------------------
-
- Chi-Square STATS:
- A program to calculate the Chi-Square statistic
- and p value from a data file
-
- written, and compiled in HiSoft BASIC Professional by
- C. Niederberger 2/91
-
- ----------------------------------------------------------------------------
-
-
- Ever want a simple, portable program to calculate the Chi-Square statistic
- and p value from a data table created by your favorite spreadsheet or
- word processor on your Amiga? And couldn't find one? Well, neither
- could I.
-
- So I wrote this simple basic program to take an ASCII file (choose "general"
- on your word processor when saving the file, or "print to file" on your
- spreadsheet) and perform the Chi-Square test.
-
- Just make a data file starting with the number of columns followed by the
- number of rows (**must** be integers) followed by the data table."
-
- For example, an acceptable table would be:
-
- 4 3
- 11 12 13 10
- 19 21 11 3
- 1 4 67 91
-
- An example table is included in this archive under "TestData".
-
- Note that the program does not care about spaces in the data file. It is"
- **critical**, however, that extra carriage returns are not present in
- the data file. The program will treat extra carriage returns as zeros,
- and it will not perform the test if it thinks you have too much data.
- So, IF YOU HAVE EXTRA CARRIAGE RETURNS IN YOUR DATA FILE, REMOVE THEM.
-
- The program will ask you where the file is, e.g. ram:testdata, and then will
- print the results. Simple!!
-
- I use this kind of analysis a lot, and I thought that someone out there
- could possibly use this program. I don't believe in selling public
- domain programs myself--I do something else for a living, and I program
- for fun. But I would appreciate feedback, so just send me some
- EMAIL if you download this program.
-
- I intend to keep writing code for statistics tests, and as long as there is
- any interest, I'll keep downloading these programs. I don't believe in
- using commercial statistics packages (I don't believe in a lot of
- things) because I think the scientist or whoever distances him/herself
- from the analysis, and I HATE seeing commercial statistics programs
- referenced in the scientific literature instead of the actual test.
- HOW TACKY! So I included the HiSoft BASIC code in this archive as well
- as the program--modify it in any way that you see fit.
-
- Remember--send feedback!
-
- Craig Niederberger 2/91
-
- ----------------------------------------------------------------
-
- Notes:
- Includes file selector (Thanks Jeff Glatt and Steven Kapplin!)
- note: requires requester.library and requester.bmap
- (included in this archive) to be placed in
- libs:
- Routines to calculate p value for the Chi-Square statistic were
- imported from "Numberical Recipes in Pascal: The Art of Scientific
- Computing", W.H. Press et. al. What a great book!
-