Making text expression for non-parametric 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",
...
)

## Arguments

data A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted. The grouping variable from the dataframe data. The response (a.k.a. outcome or dependent) variable from the dataframe data. In case of repeated measures design (paired = TRUE, i.e.), this argument specifies the subject or repeated measures id. Note that if this argument is NULL (which is the default), the function assumes that the data has already been sorted by such an id by the user and creates an internal identifier. So if your data is not sorted and you leave this argument unspecified, the results can be inaccurate. Logical that decides whether the experimental design is repeated measures/within-subjects or between-subjects. The default is FALSE. Number of digits after decimal point (should be an integer) (Default: k = 2L). Scalar between 0 and 1. If unspecified, the defaults return 95% lower and upper confidence intervals (0.95). A vector of character strings representing the type of intervals required. The value should be any subset of the values "norm", "basic", "perc", "bca". For more, see ?boot::boot.ci. Number of bootstrap samples for computing confidence interval for the effect size (Default: 100). If "expression", will return expression with statistical details, while "dataframe" will return a dataframe containing the results. Additional arguments (currently ignored).

## Value

For more details, see- https://indrajeetpatil.github.io/statsExpressions/articles/stats_details.html

## Details

For paired designs, the effect size is Kendall's coefficient of concordance (W), while for between-subjects designs, the effect size is epsilon-squared (for more, see ?rcompanion::epsilonSquared and ?rcompanion::kendallW).

## Examples

# setup
set.seed(123)
library(statsExpressions)

# -------------- within-subjects 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.56e-12", ", ", widehat(italic("W"))["Kendall"],
#>     " = ", "0.61", ", CI"["99%"], " [", "0.61", ", ", "1.00",
#>     "]", ", ", italic("n")["pairs"], " = ", 88L)
# -------------- between-subjects 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["Kruskal-Wallis"]^2, "(", "3", ") = ", "9.06", ", ",
#>     italic("p"), " = ", "0.028", ", ", widehat(epsilon^2), " = ",
#>     "0.16", ", CI"["99%"], " [", "0.04", ", ", "0.48", "]", ", ",
#>     italic("n")["obs"], " = ", 56L)