View source: R/k.sample.test.R
k.sample.test | R Documentation |
Performs a K independent sample test.
k.sample.test(formula,data,test=oneway.test,...)
formula |
A formula, the left hand side of which indicated the outcomes, and the right hand side of which contains the factor |
data |
A data.frame |
test |
A function whose first argument is a formula with the outcome on the lhs and the factor on the rhs.
The second argument should be the data to be used for the formula. The result of the function should be an object of class |
... |
further arguments for func |
A multi.test
object, representing a table of the results of func
applied to each of the variables.
oneway.test
kruskal.test
wilcox.test
dat<-data.frame(a=rnorm(100),b=rnorm(100),c=rnorm(100),d=cut(rnorm(100),4))
k.sample.test(d(a,b)~d,dat)
k.sample.test(dat[,-4]~dat$d,var.equal=TRUE)
k.sample.test(d(a,c)~d,dat,kruskal.test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.