Description Usage Arguments Value See Also Examples
View source: R/k.sample.test.R
Performs a K independent sample test.
1 | 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
1 2 3 4 | 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)
|
Loading required package: ggplot2
Loading required package: JGR
Loading required package: rJava
Loading required package: JavaGD
OpenJDK 64-Bit Server VM warning: Can't detect primordial thread stack location - find_vma failed
Please type JGR() to launch console. Platform specific launchers (.exe and .app) can also be obtained at http://www.rforge.net/JGR/files/.
Loading required package: car
Loading required package: carData
Loading required package: MASS
Registered S3 methods overwritten by 'lme4':
method from
cooks.distance.influence.merMod car
influence.merMod car
dfbeta.influence.merMod car
dfbetas.influence.merMod car
Note Non-JGR console detected:
Deducer is best used from within JGR (http://jgr.markushelbig.org/).
To Bring up GUI dialogs, type deducer().
One-way analysis of means (not assuming equal variances)
F (num df,denom df) p-value
a 0.2847171 (3,29.448) 0.8360161
b 0.9424806 (3,27.932) 0.4333996
One-way analysis of means
F (num df,denom df) p-value
a 0.25930987 (3,96) 0.8545284
b 1.02719291 (3,96) 0.3841560
c 0.08189569 (3,96) 0.9697294
Kruskal-Wallis rank sum test
Kruskal-Wallis chi-squared df p-value
a 0.98574196 3 0.8047019
c 0.09134593 3 0.9928553
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.