R demo | Chi-Square Test | How to conduct, visualize and interpret | + pairwise post-hoc tests
HTML-код
- Опубликовано: 21 авг 2024
- Chi-Square test checks the independence between two categorical variables, where variables can have two or more categories. So, in this video we’ll learn how to conduct, visualize and interpret all results + pairwise post-hoc tests.
install.packages("ggstatsplot")
library(ggstatsplot)
ggbarstats(
data = mtcars,
x = am,
y = cyl,
label = "both",
)
If you only want the code (or want to support me), consider join the channel (join button below any of the videos), because I provide the code upon members requests.
Enjoy! 🥳
I can't stop watching your videos ;) please produce more of them, It's really fun to learn from your content.
learning addiction is the best addiction ever! ;)
I was looking for the means separation of chi-square test in R. THANKS ALOT.
I am glad it was useful!
Thanks Yuri, great tutorial as usual. I have a question : can I actually use these plots in a paper or thesis, or do I have to create a conventional barplot without the stats?
Hey Ouss, you can absolutely use them for a paper. They make your text cleaner, because you have all the stats on the plot, and not in the brackets, which disterbs the flow. You can do both, 1) save the plot with ggsave, where you can adjust everything, like size etc. and 2) you can create you own plot and use package "statsexpressions" from the same creator as "ggstatsplot" to add statistics to your own custom plot. Cheers.
Great. Thanks for the quick response. Looking forward to new videos 🙏
you are very welcome :) more videos are on the way ;) thanks for watching!!!
Thanks, this was really easy to follow!
Great to hear! Thanks!
Thanks for the great video! Any tips for changing colors of the bars?
Thanks, mate, sure:
library(ggplot2)
ggbarstats(mtcars, am, cyl, results.subtitle = FALSE) +
scale_fill_manual(values = c("#E7298A", "#66A61E"))
Thanks for sharing your knowledge. How can I add the Yate´s correction into the plot?
Unfortunately, either not possible, or I don't know why and how. But thanks for good feedback!
thanks, great tut
You are welcome!
this was very helpful, thank you! Is there a way to calculate Cramer's V for the pairwise post hoc tests?
Not yet! But it's a great question. I have to google it first. There is another cool package, I did not do a review yet - effectsize. Check out whether this one does the job. Thanks you for watching!
Hi, great tutorial, many thanks!
Any advise for comparison of one continuos vs one categorical variable?
thanks! sure, I have similar short video of t-test, Wilcoxon, ANOVA, Kruskal-Wallis, Repeated Measures ANOVA, Friedman .... they all deas with one continuous and one categorical variables, check them out and find what fits your need best. Cheers and thank you for watching!
@@yuzaR-Data-Science thank you very much 😁
@@andreapaolacotesperdomo2293 you are welcome!
Thanks 😀
You're very welcome 😊
I tried using it but I am facing lil bit difficulties- that ! Can’t convert to a symbol
convert it to a factor: data %>% factor(bla = factor(bla))
🥰🥰 super yuri
Thanks, Siriyak!
Thanks for sharing your knowledge. How can I add the Yate´s correction into the plot?
Unfortunately, either not possible, or I don't know why and how. But thanks for good feedback!