From 557689575439c082e6e0f5f74ffaec60872f3ace Mon Sep 17 00:00:00 2001 From: Alboukadel Kassambara Date: Sat, 13 Feb 2021 21:35:18 +0100 Subject: [PATCH] dunn_test doc updated #50 --- NEWS.md | 1 + R/dunn_test.R | 21 ++++++++++++++------- man/dunn_test.Rd | 20 +++++++++++++------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/NEWS.md b/NEWS.md index 2664446..86d09d4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,6 +9,7 @@ ## Bug fixes +- The `dunn_test()` documentation is updated to describe the discrepancy between the default behaviour of the `rstatix::dunn_test()` comapred to other packages (`dunn.test` and `jamovi`). The default of the rstatix::dunn_test() function is to perform a two-sided Dunn test like the well known commercial softwares, such as SPSS and GraphPad. This is not the case for some other R packages (dunn.test and jamovi), where the default is to perform one-sided test (#50). - Now, the function `get_summary_stats()` handles the user defined probabilities for grouped data (#78) diff --git a/R/dunn_test.R b/R/dunn_test.R index 202a508..c407545 100644 --- a/R/dunn_test.R +++ b/R/dunn_test.R @@ -5,18 +5,25 @@ NULL #'@description Performs Dunn's test for pairwise multiple comparisons of the #' ranked data. The mean rank of the different groups is compared. Used for #' post-hoc test following Kruskal-Wallis test. +#' +#' The default of the \code{rstatix::dunn_test()} function is to perform a +#' two-sided Dunn test like the well known commercial softwares, such as SPSS +#' and GraphPad. This is not the case for some other R packages +#' (\code{dunn.test} and \code{jamovi}), where the default is to perform +#' one-sided test. This discrepancy is documented at +#' \href{https://github.com/kassambara/rstatix/issues/50}{https://github.com/kassambara/rstatix/issues/50}. +#' #'@inheritParams t_test #'@return return a data frame with some of the following columns: \itemize{ #' \item \code{.y.}: the y (outcome) variable used in the test. \item #' \code{group1,group2}: the compared groups in the pairwise tests. \item #' \code{n1,n2}: Sample counts. \item \code{estimate}: mean ranks difference. -#' \item \code{estimate1, estimate2}: show the mean rank values of -#' the two groups, respectively. -#' \item \code{statistic}: Test statistic (z-value) used to compute the -#' p-value. \item \code{p}: p-value. \item \code{p.adj}: the adjusted p-value. -#' \item \code{method}: the statistical test used to compare groups. \item -#' \code{p.signif, p.adj.signif}: the significance level of p-values and -#' adjusted p-values, respectively. } +#' \item \code{estimate1, estimate2}: show the mean rank values of the two +#' groups, respectively. \item \code{statistic}: Test statistic (z-value) used +#' to compute the p-value. \item \code{p}: p-value. \item \code{p.adj}: the +#' adjusted p-value. \item \code{method}: the statistical test used to compare +#' groups. \item \code{p.signif, p.adj.signif}: the significance level of +#' p-values and adjusted p-values, respectively. } #' #' The \strong{returned object has an attribute called args}, which is a list #' holding the test arguments. diff --git a/man/dunn_test.Rd b/man/dunn_test.Rd index a53c854..d739319 100644 --- a/man/dunn_test.Rd +++ b/man/dunn_test.Rd @@ -27,13 +27,12 @@ return a data frame with some of the following columns: \itemize{ \item \code{.y.}: the y (outcome) variable used in the test. \item \code{group1,group2}: the compared groups in the pairwise tests. \item \code{n1,n2}: Sample counts. \item \code{estimate}: mean ranks difference. - \item \code{estimate1, estimate2}: show the mean rank values of - the two groups, respectively. - \item \code{statistic}: Test statistic (z-value) used to compute the - p-value. \item \code{p}: p-value. \item \code{p.adj}: the adjusted p-value. - \item \code{method}: the statistical test used to compare groups. \item - \code{p.signif, p.adj.signif}: the significance level of p-values and - adjusted p-values, respectively. } + \item \code{estimate1, estimate2}: show the mean rank values of the two + groups, respectively. \item \code{statistic}: Test statistic (z-value) used + to compute the p-value. \item \code{p}: p-value. \item \code{p.adj}: the + adjusted p-value. \item \code{method}: the statistical test used to compare + groups. \item \code{p.signif, p.adj.signif}: the significance level of + p-values and adjusted p-values, respectively. } The \strong{returned object has an attribute called args}, which is a list holding the test arguments. @@ -42,6 +41,13 @@ return a data frame with some of the following columns: \itemize{ Performs Dunn's test for pairwise multiple comparisons of the ranked data. The mean rank of the different groups is compared. Used for post-hoc test following Kruskal-Wallis test. + + The default of the \code{rstatix::dunn_test()} function is to perform a + two-sided Dunn test like the well known commercial softwares, such as SPSS + and GraphPad. This is not the case for some other R packages + (\code{dunn.test} and \code{jamovi}), where the default is to perform + one-sided test. This discrepancy is documented at + \href{https://github.com/kassambara/rstatix/issues/50}{https://github.com/kassambara/rstatix/issues/50}. } \details{ DunnTest performs the post hoc pairwise multiple comparisons