R/helpers_anova.R
expr_anova_nonparametric.Rd
Making text expression for nonparametric ANOVA.
expr_anova_nonparametric( data, x, y, subject.id = NULL, paired = FALSE, k = 2L, conf.level = 0.95, conf.type = "perc", nboot = 100L, output = "expression", ... )
data  A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted. 

x  The grouping variable from the dataframe 
y  The response (a.k.a. outcome or dependent) variable from the
dataframe 
subject.id  In case of repeated measures design ( 
paired  Logical that decides whether the experimental design is
repeated measures/withinsubjects or betweensubjects. The default is

k  Number of digits after decimal point (should be an integer)
(Default: 
conf.level  Scalar between 0 and 1. If unspecified, the defaults return

conf.type  A vector of character strings representing the type of
intervals required. The value should be any subset of the values 
nboot  Number of bootstrap samples for computing confidence interval
for the effect size (Default: 
output  If 
...  Additional arguments (currently ignored). 
For more details, see https://indrajeetpatil.github.io/statsExpressions/articles/stats_details.html
For paired designs, the effect size is Kendall's coefficient of
concordance (W), while for betweensubjects designs, the effect size is
epsilonsquared (for more, see ?rcompanion::epsilonSquared
and
?rcompanion::kendallW
).
# setup set.seed(123) library(statsExpressions) #  withinsubjects design  # creating the expression expr_anova_nonparametric( data = bugs_long, x = condition, y = desire, paired = TRUE, conf.level = 0.99, k = 2 )#> Warning: extreme order statistics used as endpoints#> paste(chi["Friedman"]^2, "(", "3", ") = ", "55.83", ", ", italic("p"), #> " = ", "4.56e12", ", ", widehat(italic("W"))["Kendall"], #> " = ", "0.61", ", CI"["99%"], " [", "0.61", ", ", "1.00", #> "]", ", ", italic("n")["pairs"], " = ", 88L)#  betweensubjects design  expr_anova_nonparametric( data = ggplot2::msleep, x = vore, y = sleep_rem, paired = FALSE, conf.level = 0.99, conf.type = "perc" )#> Warning: extreme order statistics used as endpoints#> paste(chi["KruskalWallis"]^2, "(", "3", ") = ", "9.06", ", ", #> italic("p"), " = ", "0.028", ", ", widehat(epsilon^2), " = ", #> "0.16", ", CI"["99%"], " [", "0.04", ", ", "0.48", "]", ", ", #> italic("n")["obs"], " = ", 56L)