Learn R Programming

Deducer (version 0.9-1)

k.sample.test: K Sample Test

Description

Performs a K independent sample test.

Usage

k.sample.test(formula,data,test=oneway.test,...)

Value

A multi.test object, representing a table of the results of func applied to each of the variables.

Arguments

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

...

further arguments for func

See Also

Examples

Run this code
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)

Run the code above in your browser using DataLab