t.test(x, y = NULL,
alternative = c("two.sided", "less", "greater"),
mu = 0, paired = FALSE, var.equal = FALSE,
conf.level = 0.95, ...)
1. mu: 指定原假设H0使用的平均值。y=NULL时,就以x和mu做t-test检验; 此时x的元素数目必须大于2,不然df<1。
2. paired:指定配对检验。配对检验中x,y的个数必须相同,实际是以 x-y ( the difference of x a nd y )和mu做t-test检验
3. alternative: 单侧检验和双侧检验的区别,"greater"假设x的平均值比y大。
4. var.equal: False 用Welch方法矫正df(Welch t-test);TRUE用 pooled estimate of the variance。影响stderr。