Artificial dataset to show that the p-value obtained for the Kruskal Wallis is only valid _after_ the distributional form has been checked to be the same for all groups.
An artificial data frame with 18 observations in each of three groups.
measurements for group 1
measurements for group 2
measurements for group 3
Data example found on the internet
data(kwdata)
newdata <- stack(kwdata)
kruskal.test(values ~ ind, newdata)
#>
#> Kruskal-Wallis rank sum test
#>
#> data: values by ind
#> Kruskal-Wallis chi-squared = 7.3553, df = 2, p-value = 0.02528
#>