Rstudio tutorial (Geom Boxplot with Kruskal Wallis)

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ค. 2024
  • This video shows how to make a box and whisker plot in Rstudio using ggplot. I also explain how to make specific comparisons between treatments with a Wicox test and Kruskal Wallis.
    More Tutorials:
    www.sthda.com/english/articles...
    Ggplot cheat sheet:
    www.maths.usyd.edu.au/u/UG/SM...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 13

  • @inkmanish
    @inkmanish 2 ปีที่แล้ว +2

    Great video! Would love to see the same but with a grouped boxplot to show how to add pvalues of within and between group comparisons :)

    • @ecomattp
      @ecomattp  2 ปีที่แล้ว +2

      Thanks for the feedback! I will see about making that video soon :)

  • @christiakai9341
    @christiakai9341 9 หลายเดือนก่อน

    great video! could this be done with the bootstrap method? Also instead of numbers, how can you add asterisks?

    • @ecomattp
      @ecomattp  8 หลายเดือนก่อน

      Hello! To answer your second question, yes you can. In the line stat_compare_means you would need to add annotations=*** to your specific list of what you want to compare. This link should provide further detail! stackoverflow.com/questions/49008460/add-p-value-or-asterisk-to-ggplot
      As far as using a bootstrap method, I have not done that myself, but that's not to say it is not possible. Here is a pdf of a document I found that may be useful: pages.stat.wisc.edu/~larget/stat302/chap3.pdf
      I hope this helps!

  • @DrAjayKHarit
    @DrAjayKHarit 2 ปีที่แล้ว

    I and unable to put compare lines on box plot and showing the error ....error in stat_compare_means(comparisons = my_comparisons, method = "wilcox.test") : could not find function "stat_compare_means".
    Please let me know how to solve it

    • @ecomattp
      @ecomattp  2 ปีที่แล้ว +1

      These are all of the standard packages I use: (ggpubr is crucial for this method)
      library(ggpubr)
      library(ggplot2)
      library(dplyr)
      library(tidyr)
      library(permute)
      library(lattice)
      library(vegan)
      library(goeveg)
      library(tidyverse)
      library(nlme)
      library(ordinal)
      library(multcompView)
      library(ggthemes)
      check to see if you have these installed! If that doesn't work, here's a website that breaks down the same process:
      www.sthda.com/english/articles/24-ggpubr-publication-ready-plots/76-add-p-values-and-significance-levels-to-ggplots/

  • @galan8115
    @galan8115 ปีที่แล้ว

    Is it there a way of making all comparisons instead of just Control vs the rest?

    • @ecomattp
      @ecomattp  11 หลายเดือนก่อน +1

      Sorry for the late response! Good question. If you wanted to compare everything I would recommend an ANOVA (analysis of variance) which will compare everything. However, I just did control to each different treatment in this video to demonstrate customizable comparisons. Therefore, if you wanted to make other types of comparisons like I did in this video, the process is the same as shown, you would just need to create the list of comparisons you want to display.

  • @bacdesilva
    @bacdesilva 3 หลายเดือนก่อน

    Nice video. But how to get the significant letter grouping and show them on the boxplot?

    • @ecomattp
      @ecomattp  2 หลายเดือนก่อน +1

      Hello! To get you an answer sooner than later check this video out: th-cam.com/video/Uyof3S1gx3M/w-d-xo.html they do a good job explaining this exact item of interest.
      I hope this helps!

    • @bacdesilva
      @bacdesilva 2 หลายเดือนก่อน

      @@ecomattp Thank you. This is very helpful.

  • @plantgenetics6405
    @plantgenetics6405 ปีที่แล้ว +2

    The video quality is very poor. I can barely see anything

    • @ecomattp
      @ecomattp  11 หลายเดือนก่อน

      Hi, thanks for pointing this out, not sure why the beginning is like this, but around 1:15 it improves on my end! Hopefully that is the case for you as well.