[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,
cor.test:
> 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:
     tau
-0.72783

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
like.

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





-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail



More information about the R-devel mailing list