[S] Box's M mystery solved

Marc R. Feldesman (feldesmanm@pdx.edu)
Mon, 08 Jun 1998 18:13:47 -0700


Thanks to all who helped point me in the right direction of solving the
mystery of "Box's M meets SPlus". I had numerous suggestions from various
people concerning the possible cause of the errors. The algorithm turns
out to be perfect (if perhaps inefficient at this point) and the
calculations are absolutely correct. It took Doug Grove to do a quick and
dirty calculation with the data I provided in my lengthy post to show me
where to look for the error. It turns out that I had made a very small
programming error which only showed up when the data weren't sorted by
group. The textbook cases all involved sorted data; the real data were
unsorted. I did nothing in my function to deal with this. Consequently,
the vector storing the group counts was permuted relative to the list
holding the data. Doug, either by trial and error, and/or because he's a
heck of lot brighter than I am, saw this and showed me that changing the
ordering of the group count vector, the calculations turn out to be exactly
what they were supposed to be. I then went back and could instantly see
where the problem was. I never saw this with the test data because the
data got entered in group order from the beginning.

This has been a wonderful learning exercise and I greatly appreciate all
the time and energy people have put into helping me not only solve this
problem but become more proficient in my use of S-Plus.

I'm moving on to make the function more object-oriented with "pretty"
output, and to document what I did.

Thanks again.

Dr. Marc R. Feldesman
email: feldesmanm@pdx.edu
email: feldesman@ibm.net
pager: 503-870-2515
fax: 503-725-3905

"If ignorance is bliss then why aren't there more happy people?" Lawrence
Peter

Powered by: Monstrochoerus - the 300 MHz Pentium II
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news