getPvalWilcox | R Documentation |
getDescriptionStatsBy
These functions are the base functions for getting the description p-values. You can provide your own functions but all functions should take two arguments and return a p-value (numeric, non-formatted)
getPvalWilcox(x, by)
getPvalAnova(x, by)
getPvalFisher(x, by)
getPvalChiSq(x, by)
getPvalKruskal(x, by)
x |
The main variable of interest |
by |
The variable for the stratification |
numeric
Returns the p-value from that particular test
Performs a two-sample two-sided Wilcoxon test (also known as the Mann-Whitney test),
see wilcox.test
.
Performs a standard Analysis of Variance model
through anova(lm(x ~ by))
Performs Fisher's exact test through the fisher.test
.
Performs a standard Chi-Squares analysis
through chisq.test
Performs a Kruskal-Wallis rank sum test
through kruskal.test
Other descriptive functions:
describeFactors()
,
describeMean()
,
describeMedian()
,
describeProp()
,
getDescriptionStatsBy()
set.seed(123)
getPvalFisher(
sample(letters[1:3], size = 100, replace = TRUE),
sample(LETTERS[1:3], size = 100, replace = TRUE)
)
getPvalWilcox(
rnorm(100),
sample(LETTERS[1:2], size = 100, replace = TRUE)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.