kruskal.test.FLVector: Kruskal-Wallis Rank Sum Test

Description Usage Arguments Value Examples

Description

Performs a Kruskal-Wallis rank sum test.

Usage

1
2
## S3 method for class 'FLVector'
kruskal.test(x, g, ...)

Arguments

x

FLVector with data values

g

FLVector giving the group for the corresponding elements of y

...

The additional arguments used by FL function: whereconditions WhereConditions to subset data GroupBy Column names defining the different groups in data, if any.

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.

Value

A list with class htest. A list of htest objects if the input is a FLTableMD object.

Examples

 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)

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.