Skip to contents

Wilcoxon Signed Rank Test with Plain-English Interpretation

Usage

wilcoxon_interpret(
  x,
  y,
  conf.level = 0.95,
  var_name = "Variable",
  context = NULL
)

Arguments

x

A numeric vector (first measurement)

y

A numeric vector (second measurement)

conf.level

Confidence level. Default 0.95.

var_name

Optional label for the report. Default "Variable"

context

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

Value

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

Examples

x <- c(23, 45, 12, 67, 34, 89, 56)
y <- c(19, 38, 22, 51, 29, 74, 44)
result <- wilcoxon_interpret(x, y)
#> Warning: Sample size is small (n < 10). Interpret results with caution.
print(result)
#> 
#> -- statease Wilcoxon Signed Rank Test Report --------------------
#>   Variable     : Variable
#>   N (pairs)    : 7
#>   Pre Median   : 38.00
#>   Post Median  : 45.00
#> -----------------------------------------------------------------
#>   V statistic  : 24.000
#>   p-value      : 0.1094
#>   95% CI      : [-2.500, 15.000]
#>   Effect size  : 0.605 (large)
#> -----------------------------------------------------------------
#>   Assumption Checks:
#>     Sample size (pairs)     : NOTE     (n = 7)
#>     Test method used        : NOTE     (Wilcoxon signed rank exact test)
#>     Independence of pairs   : 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.1094 > alpha 0.05).
#>   Post-measurement values appear stochastically greater than pre-measurement values. (Reported medians: Post = 45.00, Pre = 38.00)
#>   Effect size is large (r = 0.605).
#>   Note: Wilcoxon test compares groups using ranked values.
#>   A significant result suggests one group tends to have larger or smaller observation than the other.
#>   This can be interpreted as evidence of stochastic superiority, but only under typical distribution assumptions.
#>   It does not specifically test differences in medians.
#> -----------------------------------------------------------------
#>