Warning: package 'ggstatsplot' was built under R version 4.3.2
You can cite this package as:
Patil, I. (2021). Visualizations with statistical details: The 'ggstatsplot' approach.
Journal of Open Source Software, 6(61), 3167, doi:10.21105/joss.03167
Warning: package 'ggplot2' was built under R version 4.3.2
library(ggstatsplot)ggbetweenstats(data = dplyr::filter(gapminder, year ==2007, continent !="Oceania"),x = continent, ## grouping/independent variabley = lifeExp, ## dependent variablestype ="robust", ## type of statisticsxlab ="Continent", ## label for the x-axisylab ="Life expectancy", ## label for the y-axis## turn off messagesggtheme = ggplot2::theme_gray(), ## a different themepackage ="yarrr", ## package from which color palette is to be takenpalette ="info2", ## choosing a different color palettetitle ="Comparison of life expectancy across continents (Year: 2007)",caption ="Source: Gapminder Foundation") +## modifying the plot further ggplot2::scale_y_continuous(limits =c(35, 85),breaks =seq(from =35, to =85, by =5) )
Scale for y is already present.
Adding another scale for y, which will replace the existing scale.
## select part of the dataset and use it for plottinggapminder::gapminder %>% dplyr::filter(year %in%c(1967, 1987, 2007), continent !="Oceania") %>%grouped_ggbetweenstats(## arguments relevant for ggbetweenstatsx = continent,y = lifeExp,grouping.var = year,xlab ="Continent",ylab ="Life expectancy",pairwise.display ="significant", ## display only significant pairwise comparisonsp.adjust.method ="fdr", ## adjust p-values for multiple tests using this method# ggtheme = ggthemes::theme_tufte(),package ="ggsci",palette ="default_jco",## arguments relevant for combine_plotsannotation.args =list(title ="Changes in life expectancy across continents (1967-2007)"),plotgrid.args =list(nrow =3) )
Welch's t-test revealed that, across 60 guinea pigs, although the tooth length was higher when the animal received vitamin C via orange juice as compared to via ascorbic acid, this effect was not statistically significant. The effect size (g = 0.49) was medium, as per Cohen's (1988) conventions. The Bayes Factor for the same analysis revealed that the data were 1.2 times more probable under the alternative hypothesis as compared to the null hypothesis. This can be considered weak evidence (Jeffreys, 1961) in favor of the alternative hypothesis.