[Rd] Printing the null hypothesis

Liviu Andronic landronimirc at gmail.com
Sun Aug 16 12:38:40 CEST 2009

Dear R developers,
Currently many (all?) test functions in R describe the alternative
hypothesis, but not the the null hypothesis being tested. For example,
> require(boot)
> data(mtcars)
> with(mtcars, cor.test(mpg, wt, met="kendall"))

	Kendall's rank correlation tau

data:  mpg and wt
z = -5.7981, p-value = 0.000000006706
alternative hypothesis: true tau is not equal to 0
sample estimates:

Warning message:
In cor.test.default(mpg, wt, met = "kendall") :
  Cannot compute exact p-value with ties

In this example,
H0: (not printed)
Ha: true tau is not equal to 0

This should be fine for the advanced users and expert statisticians,
but not for beginners. The help page will also often not explicitely
state the null hypothesis. Personally, I often find myself in front of
an htest object guessing what the null should have reasonably sounded

Are there compelling reasons for not printing out the null being
tested, along with the rest of the results? Thank you

Do you know how to read?
Do you know how to write?

More information about the R-devel mailing list