R - Kruskall-Wallis test

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • R script download (script has been slightly modified (/updated) compared to the video):
    rstatisticsand...
    Real-life example
    Assumptions
    Output interpretation
    R studio tutorial
    Kruskall-Wallis test

Комментарии • 48

  • @sudiptapaul2919
    @sudiptapaul2919 4 года назад +4

    A perfect demo! Thank you very much.

  • @muathalmoslem5803
    @muathalmoslem5803 5 лет назад +12

    This is great. clear short and to the point. I just have one question. what to do when homogeneity p-value is lower than 0.05?

    • @gabrielrojas1023
      @gabrielrojas1023 3 года назад

      Yes, I have the same question :(

    • @axelalebe4814
      @axelalebe4814 3 года назад

      @@gabrielrojas1023 did you find a answer ?????????????

    • @camjo6397
      @camjo6397 2 года назад

      I am new to statistics but someone online told me that you can still do Kruskal-Wallis test even if you do not meet the homogeneity assumption. However the results of the test are weaker without it (can only determine stochastic dominance of median, and not quantiles).. Not entirely sure what that means but that's what I was told haha

  • @Wilki_J
    @Wilki_J 5 лет назад

    Excellent tutorial very clear and easy to follow. I successfully applied this approach to my data - looking at differences in sediment C/N ratio between locations. Thanks very much.

  • @yuhangsun8977
    @yuhangsun8977 3 года назад

    Thank you!! Help me a lot ! Anticipate more video about PCA or CCA interpretation

  • @ivanxtc3
    @ivanxtc3 5 лет назад +12

    what could an option for non parametic test of samples with unequal variances?

  • @TimSter15
    @TimSter15 3 года назад +1

    Thanks. Very useful set of lessons you run here! Liked and subbed

  • @ryanjohnson4953
    @ryanjohnson4953 4 года назад +1

    you want P-value of bartlett to be less than 0.05 to run a nonparametric. Your video states that you want p-value to be greater than 0.05. Greater means you use parametric ANOVA, and less than mean you use non-parametric Kruskal wallis. The null for Bartlett is that the variances are equal, so you want to fail to reject null to run parametric, and you want to reject null if you want to use nonparametric.

    • @RStatisticsandResearch
      @RStatisticsandResearch  3 года назад

      A bartlett test is used for testing of homogeneity of variances, not for testing normality. Other than that, a bartlett test does assume normality, which is why it should (in this particular case) be replaced by a better suited test, this one slipped through. Script will be updated as such.

  • @mieaband7759
    @mieaband7759 4 года назад +2

    thanks a lot, best video.

  • @shishirpandey1014
    @shishirpandey1014 5 лет назад

    Recapitulated and Clear.

  • @jenniferschulze2849
    @jenniferschulze2849 6 лет назад +2

    Thank you for the very nice info. I would like to ask you how would you recommend as a substitute test for a two-way ANOVA if my data is not normally distributed? I have two variables (Temperature and Salinity) and one response variable (settlement). I used the Kruskall-wallis test to compare the settlement in the different groups not considering the interactions.
    Would this be a possible solution?

  • @dsreyal5987
    @dsreyal5987 2 года назад

    Very nice and clearly explained

  • @gurcaykvancakyldz
    @gurcaykvancakyldz 5 лет назад +1

    Thank you very much for this helpful video. My question is, I knew as a very first assumption that we have to use (or prefer to use) Kruskal Wallis test when we have a rank/ordinal data (non-parametric), but in here I see an interval data with a relative value (length) and distance in cm (parametric). So I would prefer to use Ona-Way ANOVA as usual. How should we decide at this stage, is there any assumption about this idea (ordinal vs. interval)? Thank you

    • @mustafagunes5740
      @mustafagunes5740 4 года назад +1

      Normal distribution is not necessary for Kruskall. ( Skewed distributions )
      Anova used for normal distribution a.k.a Gaussian.

  • @kasunpathirana9410
    @kasunpathirana9410 2 года назад

    So understandable

  • @maryoluwaroye2368
    @maryoluwaroye2368 3 года назад

    Thank you very much...Very helpful

  • @Jonpaulim
    @Jonpaulim 3 года назад

    Hi Great Video I have subscribed. Do you mind if I ask a question please

  • @maryoluwaroye2368
    @maryoluwaroye2368 3 года назад

    Very helpful.....Thank you verey much

  • @bkarim7349
    @bkarim7349 Год назад

    Thank you

  • @DesireeCortezThomas
    @DesireeCortezThomas 3 года назад

    Thank you VERY much

  • @pratibhacdri
    @pratibhacdri 6 лет назад +1

    what if the bartlett. test p value is

    • @RStatisticsandResearch
      @RStatisticsandResearch  6 лет назад

      That depends... You could e.g. first try to transform your data prior to analysis, e.g. log10-transformation, and see if that makes a difference.

  • @MrEkballo
    @MrEkballo 4 года назад

    I've also looked up online that for Bartlett Test the data must be normally distributed (www.datanovia.com/en/lessons/homogeneity-of-variance-test-in-r/) . I am so confused now.

    • @RStatisticsandResearch
      @RStatisticsandResearch  4 года назад

      You are right, this inconsistency slipped through. An alternative would be to investigate residual plots instead. Also don't put too much weight on this assumption: you only need to worry when it's massively off.

  • @lacomealgas
    @lacomealgas 6 лет назад

    Hi, thanks for the video! quick question, I though you could use K-W when the assumption of homoscedasticity was not fulfil, even after log transformation. Is that correct? otherways I am a bit confused about which test to use when there is no normality neither homoscedasticity.
    Another question that arises to me is the fact of using Bartlett test to check if there is or not heterogenity. though that Barlett test is suppose to be used when your data is distributed normaly
    Thank you in advance for your answer

    • @RStatisticsandResearch
      @RStatisticsandResearch  6 лет назад

      Hello Irene,
      Thanks for your comments.
      To answer your first question: homoscedasticity is a prerequisite even for KW (but not normality), that's quite important.
      To answer your second question: you are actually right that Bartlett's test is not the best choice with non-normal data, it is slightly more vulnerable to deviations than, for instance, Levene's test. Thanks for pointing that out. I have therefore adapted the script (in the download link) accordingly.

    • @lacomealgas
      @lacomealgas 6 лет назад

      Thank you for your answer and for all changes on the script. Could you advice me about a test which will run with data that does not have homoscedasticity neither normality?

  • @storieswithBethany1
    @storieswithBethany1 4 года назад

    Would it also be appropriate to use a pairwise test, rather than a DunnTest for post hoc comparisons? If not, why is that, please?

    • @RStatisticsandResearch
      @RStatisticsandResearch  4 года назад

      Hello, I'm not sure if I understand your question properly (which pairwise test?), but most likely that is not a sound alternative. One has to correct for multiple comparisons, and therefore one cannot simply run multiple pairwise tests.

    • @storieswithBethany1
      @storieswithBethany1 4 года назад

      @@RStatisticsandResearch I mean: pairwise.wilcox.test() with Bonferroni correction method.

  • @mozimshafi6505
    @mozimshafi6505 3 года назад +1

    My p value in bartlett test come

  • @Asceticyogi
    @Asceticyogi 6 лет назад

    Sorry, to bother - but after Dunn Test, it is said that Wall Lizard is larger than Viviparous Lizard - This statement is on the basis of Dunn Test or the Boxplot?
    Please Guide....!

    • @RStatisticsandResearch
      @RStatisticsandResearch  6 лет назад

      The Dunn test will tell you which groups are significantly different (p < 0.05), but also the direction of this difference (= the first-line z-value, if positive, then wall lizard is larger than viviparous lizard). The boxplot can be used to visualize this difference, but it does not contain any info on statistical significance.

    • @Asceticyogi
      @Asceticyogi 6 лет назад

      Thank you, and if the Z value is -ve ?

  • @MrEkballo
    @MrEkballo 4 года назад

    If I test the affect on pH on bacteria growth in a non-normal distribution, should I make my pH values factors too even though they are continuous, numeric?

    • @RStatisticsandResearch
      @RStatisticsandResearch  4 года назад

      You would need a different test for that, as they indeed are continuous variables. A test for group differences does not apply then.

  • @mohsentakesh2524
    @mohsentakesh2524 5 лет назад

    Thank you very very much for this great informative video

  • @brazilfootball
    @brazilfootball 2 года назад

    Can you provide a peer reviewed publication that says this test requires homogeneity of variance, please?

    • @dennismunetsi614
      @dennismunetsi614 Год назад

      I thought a Kruskal Wallis was for when homogeneity of variances was not equal. If they are equal, why not a one-way anova?

  • @nikaeloliveira2093
    @nikaeloliveira2093 3 года назад

    Why the R have two calls foi dun test ? dunnTest and dunn.test, and this two calls give me different results

  • @storieswithBethany1
    @storieswithBethany1 4 года назад

    I am needing to run a Kruskal wallace test on six groups but having run the Bartlett and the Levene Test it's clear I have unequal variances. So What Test Do I Use Now Please?

    • @RStatisticsandResearch
      @RStatisticsandResearch  4 года назад +2

      When variances are unequal, you can e.g. look into (1) transforming your data prior to analysis , or (2) look for other tests such as Welch's ANOVA

    • @storieswithBethany1
      @storieswithBethany1 4 года назад

      @@RStatisticsandResearch Thank you