Description Usage Arguments Value References See Also Examples
An estimation plot has two key features.
It presents all datapoints as a swarmplot or sinaplot, which orders each point to display the underlying distribution.
It presents the effect size as a bootstrap 95 percent confidence interval on a separate but aligned axes.
Estimation plots emerge from estimation statistics, an intuitive framework that avoids the pitfalls of significance testing. It uses familiar statistical concepts: means, mean differences, and error bars. More importantly, it focuses on the effect size of one's experiment/intervention, as opposed to a false dichotomy engendered by P values. This function takes the output of the effect size functions and produces an estimation plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## S3 method for class 'dabest_effsize'
plot(
x,
...,
color.column = NULL,
palette = "Set1",
float.contrast = TRUE,
slopegraph = TRUE,
group.summaries = "mean_sd",
rawplot.type = c("swarmplot", "sinaplot"),
rawplot.ylim = NULL,
rawplot.ylabel = NULL,
rawplot.markersize = 2,
rawplot.groupwidth = 0.3,
effsize.ylim = NULL,
effsize.ylabel = NULL,
effsize.markersize = 4,
theme = ggplot2::theme_classic(),
tick.fontsize = 11,
axes.title.fontsize = 14,
show.legend = TRUE,
swarmplot.params = NULL,
sinaplot.params = NULL,
slopegraph.params = NULL
)
|
x |
A |
... |
Signature for S3 generic function. |
color.column |
default |
palette |
default "Set1". Accepts any one of the RColorBrewer palettes,
or a vector of colors. Colors can be specified as RGB hexcode or as a named
color. See the "Palettes" section in scale_color_brewer for more on
palettes. To obtain all 657 named colors in R, enter |
float.contrast |
default |
slopegraph |
boolean, default |
group.summaries |
"mean_sd", "median_quartiles", or |
rawplot.type |
default "beeswarm". Accepts either "beeswarm" or "sinaplot". See geom_quasirandom and geom_sina for more information. |
rawplot.ylim |
default |
rawplot.ylabel |
default |
rawplot.markersize |
default 2. This is the size (in points) of the dots used to plot the individual datapoints. There are 72 points in one inch. See this article for more info. |
rawplot.groupwidth |
default 0.3. This is the maximum amount of spread (in the x-direction) allowed, for each group. |
effsize.ylim |
default |
effsize.ylabel |
default |
effsize.markersize |
default 4. This is the size (in points) of the dots used to indicate the effect size. |
theme |
default theme_classic. This is the |
tick.fontsize |
default 11. This controls the font size (in points) of all tick labels. |
axes.title.fontsize |
default 14. This determines the font size (in points) of the axes titles. |
show.legend |
boolean, default |
swarmplot.params |
default |
sinaplot.params |
default |
slopegraph.params |
default |
A ggproto
object. This object is actually
composed of two ggplot2
objects (one for the rawdata swarmplot or
slopegraph, another for the effect sizes and bootstrapped confidence
intervals). These are arranged in the desired configuration (whether as a
Gardner-Altman plot or a Cumming plot) by the
plot_grid()
function in the cowplot
package.
Moving beyond P values: Data analysis with estimation graphics. Nature Methods 2019, 1548-7105. Joses Ho, Tayfun Tumkaya, Sameer Aryal, Hyungwon Choi, Adam Claridge-Chang
Loading data for effect size computation.
Effect size computation from the loaded data.
Run vignette("Using dabestr", package = "dabestr")
in the console to
read more about using parameters to control the plot features.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Performing unpaired (two independent groups) analysis.
# We want to obtain the mean difference between the petal widths
# of setosa and versicolor species.
unpaired_mean_diff <- dabest(iris, Species, Petal.Width,
idx = c("setosa", "versicolor"),
paired = FALSE) %>%
mean_diff()
# Create a Gardner-Altman estimation plot.
plot(unpaired_mean_diff)
## Not run:
# Comparing versicolor and virginica petal widths to setosa petal width.
shared_control_data <- dabeıst(iris, Species, Petal.Width,
idx = c("setosa", "versicolor", "virginica")) %>%
mean_diff()
# Create a Cumming estimation plot.
plot(shared_control_data)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.