R-alpha: another ctest question

Kurt Hornik
Thu, 21 Aug 1997 21:02:07 -0000

I have the following problem.  Consider a `classical' test which works
for k .ge. 2 samples.  Possible interfaces are e.g.

	xxx.test(x, g)	    x ... all data, g ... corresponding groups
	xxx.test(x1, ..., xk)
	xxx.test(list(x1, ..., xk))

etc etc.

Clearly, the first and the second one are nice, but cannot be combined
without making `g' (i.e., `group') a named argument.

Hence, in e.g. my current version of kruskal.test() I've combined the
first (by compatibility with S-PLUS) and third interfaces.  Perhaps this
is not optimal, though ...

What I'd like to do now is to extend var.test() as follows.

* With one data arg, perform a chisq-based test for a certain value of
the variance, as specified by an optional var argument
* With two data args, do the usual F test
* With more than two data args, perform some test for the homogeneity of
variances, as specified by an optional method (default "Bartlett")
arg.

What is the right interface then?  Should we have

  var.test(x, y = NULL, ..., group = NULL, alternative = "two.sided",
	   conf.level = 0.95, var = 1, ratio = 1, method = "Bartlett")

???

If so, should the interface to kruskal.test be changed accordingly?

Please advise me here.

-k
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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:
r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-