R-alpha: new class for chisquare tests?
Peter Dalgaard BSA
22 Aug 1997 00:13:15 +0200
Kurt Hornik <firstname.lastname@example.org> writes:
> I sort of asked this before, but perhaps not explicitly enough.
> In my ctest collection, there are several chisquare-based tests. For
> some of them, it may be useful to also return information on expected
> (and observed) counts. The question is, how should this be done. Of
> course, there is no problem adding the corresponding components to the
> list returned by the functions. However, as these are of class `htest',
> the components don't show up in the printed output.
> (Of course, one can easily obtain them if they are in the list, but I
> think Peter is with me when I say that this is not the right thing in an
> intro course.)
> * Should we extend print.htest() to display info on expected and
> observed counts in case it is there?
> * (Should we have an extra argument to control this behavior?)
> * Or should there be a class "chisqtest" with a slightly different print
> and perhaps also summary method?
> * Or ...?
Couldn't the basic logic of print.lm/summary.lm/anova.lm be applied
here too? I.e.
This might be implemented simply by adding items to the return list,
and have fitted.htest() extract the relevant item if it is there.
Or maybe slightly safer from a name-space point of view: add *one*
extra item ("comp", say) which is a list containing the other stuff.
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (email@example.com) FAX: (+45) 35327907
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: firstname.lastname@example.org