R - Kruskall-Wallis test

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

КОМЕНТАРІ • 48

  • @ivanxtc3
    @ivanxtc3 4 роки тому +12

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

  • @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.

  • @sudiptapaul2919
    @sudiptapaul2919 4 роки тому +4

    A perfect demo! Thank you very much.

  • @yuhangsun8977
    @yuhangsun8977 3 роки тому

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

  • @TimSter15
    @TimSter15 3 роки тому +1

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

  • @dsreyal5987
    @dsreyal5987 2 роки тому

    Very nice and clearly explained

  • @mieaband7759
    @mieaband7759 4 роки тому +2

    thanks a lot, best video.

  • @maryoluwaroye2368
    @maryoluwaroye2368 3 роки тому

    Thank you very much...Very helpful

  • @maryoluwaroye2368
    @maryoluwaroye2368 3 роки тому

    Very helpful.....Thank you verey much

  • @shishirpandey1014
    @shishirpandey1014 5 років тому

    Recapitulated and Clear.

  • @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

  • @bkarim7349
    @bkarim7349 Рік тому

    Thank you

  • @DesireeCortezThomas
    @DesireeCortezThomas 3 роки тому

    Thank you VERY much

  • @kasunpathirana9410
    @kasunpathirana9410 2 роки тому

    So understandable

  • @mozimshafi6505
    @mozimshafi6505 3 роки тому +1

    My p value in bartlett test come

  • @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 3 роки тому +1

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

  • @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.

  • @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?

  • @nikaeloliveira2093
    @nikaeloliveira2093 3 роки тому

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

  • @Jonpaulim
    @Jonpaulim 3 роки тому

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

  • @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  3 роки тому

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

  • @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?

  • @mohsentakesh2524
    @mohsentakesh2524 5 років тому

    Thank you very very much for this great informative video

  • @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.

  • @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

  • @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?

  • @storieswithBethany1
    @storieswithBethany1 3 роки тому

    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  3 роки тому

      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 3 роки тому

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

  • @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 ?

  • @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.