Questions tagged [kruskal-wallis]

The Kruskal–Wallis one-way analysis of variance by ranks is a non-parametric method for testing whether samples originate from the same distribution. It is used for comparing more than two samples that are independent, or not related.

102 questions
1
vote
1 answer

How to find meaningful boundaries between two continuous variables in R

To find the relationship between two columns of the iris dataset, I am performing kruskal.test and p.value shows a meaningful relationship between these two columns. data(iris) kruskal.test(iris$Petal.Length, iris$Sepal.Width) Here are the…
Saurabh
  • 1,566
  • 10
  • 23
1
vote
1 answer

How do I perform a loop for kruskal wallis test comparing 3 groups over multiple columns without changing the pvalue?

I am fairly new to R and I am trying to run a kruskal wallis test to see if there is a difference between three groups when looking at different genes. I have 3 groups and 127 proteins. I have been able to create a code that will do…
RRookie
  • 11
  • 4
1
vote
1 answer

Kruskal-wallis test in R gives an error: Error in model.frame.default: variable lengths differ

I am trying to run Kruskal wallis tests for multiple columns in my example dataframe (df) in R, but I am stuck with the following error: Error in model.frame.default(formula = as.numeric(x) ~ as.factor(Groups), : variable lengths differ (found…
Letin
  • 1,255
  • 5
  • 20
  • 36
1
vote
0 answers

Does Dunn's test (particularly the Z-statistic) say anything about direction?

I have conducted a Dunn's test to compare the distribution of factor scores across three nominal variables. How do I interpret the signs of the Z-statistic? Do Z-statistics say anything about direction?
Jo3
  • 11
  • 1
1
vote
0 answers

What is the best way to manage/store result from either posthoc.krukal.dunn.test() or dunn.test() - where my input data is in dataframe format?

I am a newbie in R programming and seek help in analyzing the Metabolomics data - 118 metabolites with 4 conditions (3 replicates per condition). I would like to know, for each metabolite, which condition(s) is significantly different from which.…
Pearl_Lo
  • 11
  • 3
1
vote
1 answer

Kruskal-Wallis rank test between different subsets of data table

I have a table like this: chr start end con1_1_1 con1_2_1 con1_3_1 con2_1_4 con2_2_4 con2_3_4 1 1 1 7512 0.45180723 0.21982759 0.06666667 0.4105960 0.1024735 0.2284710 2 1 13169 20070 0.07142857 0.77631579 0.90434783…
user3683485
  • 115
  • 1
  • 8
1
vote
0 answers

Test for difference by outcome (Yes/No) by each level of a factor - with one outcome level missing in a factor level

I need a method to divide a vector (bloodsample values) by each level of a factor of time intervals (gacat) and compare these data (by t.test/ANOVA or Kruskal Wallis) between two levels in an outcome factor variable (EPL (yes/no)) In the mtcars…
1
vote
1 answer

Pandas apply kruskal-wallis to numeric columns

I have a dataframe of 27 columns (26 are numeric variables and the 27th column tells me which group each row is associated with). There are 7 groups in total I'm trying to apply the Kruskal-Wallis test to each variable, split by group, to determine…
kynnemall
  • 855
  • 9
  • 26
1
vote
0 answers

Can Kruskal-Wallis test be used to test significance of multiple groups within multiple factors?

I have tried to read what I can on Kruskal-Wallis and while I have found some useful information, I still seem to not find the answer to my question. I am trying to use the Kruskal-Wallis test to determine the significance of multiple groups,…
1
vote
2 answers

Kruskal-Wallis test between a list sublists in R

I'm pretty new to R. I'm trying to run a Kruskal-Wallis test between data-framed sub-lists (containing numeric data) within one list but I keep on getting errors. Each sub-list has one column but an unequal number of rows (hence, they can't be…
Keity
  • 143
  • 1
  • 10
1
vote
1 answer

Kruskal test Error in kruskal.test.default(e, f) : 'x' and 'g' must have the same length

I am trying to do a kruskal wallis test on the following datasets: e<-c(0.0018, 0.0021, 0.0028, 0.0029, 0.0044, 0.0045, 0.0074, 0.00325140981291511,0.00325140981291511, 0.00325140981291511, 0.0079, 0.001978252063446,0.00684016798870973,…
John
  • 11
  • 1
  • 3
1
vote
1 answer

Difference between posthoc.kruskal.dunn.test and dunn.test

I am currently searching a way to perform a dunn test in R. While doing that I came across multiple functions that have the Dunn test implemented. library(dunn.test) library(PMCMR) dunn.test(x=mtcars[,"wt"], g=…
ELHL
  • 137
  • 2
  • 12
1
vote
0 answers

Optimize Kruskal Wallis Test Spotfire

On spotfire i had created several Kruskal Wallis test. First i had created a pivot table and after i did a data relationship (Kruskal Wallis). Then i reflate my tests with a button (script python). That is my code : kruskal =…
Laurent Cesaro
  • 341
  • 1
  • 3
  • 17
1
vote
1 answer

Dealing with ties in agricolae Kruskal test, R

I am running a kruskal.test on some non-normal data with the agricolae package. Some groups have exactly the same value as each other. The kruskal test doesn't handle this well, I receive the error Error in if (s) { : missing value where TRUE/FALSE…
J.Con
  • 4,101
  • 4
  • 36
  • 64
1
vote
1 answer

R Kruskal-Wallis with multiple factors

I'm looking for help on performing the Kruskal-Wallis test on my set of data for a large number of factors. I can perform the test for a single factor, like AD_1yr: kruskal.test(Shannon ~ AD_1y, data=comm) But I have over 50 factors I want to test,…
user2988430
  • 73
  • 2
  • 6