Description Usage Arguments Value Examples
Performs a Kruskal-Wallis rank sum test.
1 2 | ## S3 method for class 'FLVector'
kruskal.test(x, g, ...)
|
x |
FLVector with data values |
g |
FLVector giving the group for the corresponding elements of y |
... |
The additional arguments used by FL function:
|
formula |
a formula of the form response ~ group where response gives the data values and group a vector or factor of the corresponding groups. Not applicable if FLVector is input. |
data |
FLTable or FLTableMD objects. |
subset |
Not currently used. |
na.action |
na values omitted always. |
A list with class htest
.
A list of htest
objects if the input is a FLTableMD object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | x <- c(2.9, 3.0, 2.5, 2.6, 3.2) # normal subjects
y <- c(3.8, 2.7, 4.0, 2.4) # with obstructive airway disease
z <- c(2.8, 3.4, 3.7, 2.2, 2.0) # with asbestosis
x <- c(x, y, z)
g <- factor(rep(1:3, c(5, 4, 5)),
labels = c("Normal subjects",
"Subjects with obstructive airway disease",
"Subjects with asbestosis"))
x <- as.FLVector(x)
g <- as.FLVector(g)
result1 <- kruskal.test(x, g)
print(result1)
FLTableObj <- as.FLTable(airquality,tableName="ARBaseTestTempTable",drop=TRUE)
result2 <- kruskal.test(Ozone ~ Month, data = FLTableObj)
print(result2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.