Last chance! 50% off unlimited learning
Sale ends in
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)
The main variable of interest
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 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
# NOT RUN {
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))
# }
Run the code above in your browser using DataLab