Skip to contents

Kruskal-Wallis Test with Plain-English Interpretation

Usage

kruskal_interpret(formula, data, conf.level = 0.95, context = NULL)

Arguments

formula

A formula of the form outcome ~ group

data

A data frame containing the variables

conf.level

Confidence level. Default 0.95.

context

Optional description of the study design or sampling method, echoed back in the printed report. Default NULL.

Value

An object of class statease_kruskal containing test results and interpretation. Use print() to display the formatted report.

Examples

df <- data.frame(
  score = c(23,45,12,67,34,89,56,43,78,90,11,34),
  group = rep(c("A","B","C"), each = 4)
)
result <- kruskal_interpret(score ~ group, data = df)
#> Warning: One or more groups have very small sample sizes (n < 5).
print(result)
#> 
#> -- statease Kruskal-Wallis Test Report --------------------------
#>   Outcome      : score
#>   Group        : group  (3 levels)
#>   N            : 12
#> -----------------------------------------------------------------
#>   Group Medians:
#>     A            : Median = 34.00  (n = 4)
#>     B            : Median = 49.50  (n = 4)
#>     C            : Median = 56.00  (n = 4)
#> -----------------------------------------------------------------
#>   H statistic  : 0.762
#>   df           : 2
#>   p-value      : 0.6831
#>   Eta squared  : 0.0000 (negligible effect)
#> -----------------------------------------------------------------
#>   Assumption Checks:
#>     Minimum group size      : NOTE     (smallest group n = 4; consider this when assessing the chi-square approximation)
#>     Independence            : NOTE     (assumed from study design, not testable from data)
#> 
#>   NOTE: These are contextual notes rather than pass/fail checks.
#>   They describe aspects of the data and test method relevant to
#>   interpretation, but are not automatically verifiable by the
#>   package.
#> -----------------------------------------------------------------
#>   Interpretation:
#>   The result is not statistically significant (p = 0.6831 > alpha 0.05).
#>   Effect size is negligible (eta^2 = 0.0000).
#>   Note: Kruskal-Wallis test compares multiple groups using ranked values
#>   not differences in medians.
#>   Medians are reported for descriptive purposes only.
#> 
#>   Post-hoc tests not run (overall result not significant).
#> -----------------------------------------------------------------
#>