Skip to content

Commit

Permalink
retire partial arg; rebuild website
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Oct 21, 2020
1 parent 738ec94 commit 4d2a28b
Show file tree
Hide file tree
Showing 136 changed files with 1,372 additions and 1,051 deletions.
6 changes: 3 additions & 3 deletions API
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
combine_plots(..., title.text = NULL, title.color = "black", title.size = 16, title.vjust = 0.5, title.hjust = 0.5, title.fontface = "bold", caption.text = NULL, caption.color = "black", caption.size = 10, caption.vjust = 0.5, caption.hjust = 0.5, caption.fontface = "plain", sub.text = NULL, sub.color = "black", sub.size = 12, sub.vjust = 0.5, sub.hjust = 0.5, sub.fontface = "plain", sub.x = 0.5, sub.y = 0.5, sub.vpadding = ggplot2::unit(1, "lines"), sub.angle = 0, sub.lineheight = 0.9, title.rel.heights = c(0.1, 1.2), caption.rel.heights = c(1.2, 0.1), title.caption.rel.heights = c(0.1, 1.2, 0.1))
combine_plots2(plotlist, plotgrid.args = list(), title.text = NULL, title.args = list(size = 16, fontface = "bold"), caption.text = NULL, caption.args = list(size = 10), sub.text = NULL, sub.args = list(size = 12), title.rel.heights = c(0.1, 1.2), caption.rel.heights = c(1.2, 0.1), title.caption.rel.heights = c(0.1, 1.2, 0.1), ...)
ggbarstats(data, x = NULL, y = NULL, counts = NULL, ratio = NULL, paired = FALSE, results.subtitle = TRUE, sample.size.label = TRUE, label = "percentage", label.args = list(alpha = 1, fill = "white"), conf.level = 0.95, k = 2L, proportion.test = TRUE, perc.k = 0, bf.message = TRUE, sampling.plan = "indepMulti", fixed.margin = "rows", prior.concentration = 1, title = NULL, subtitle = NULL, caption = NULL, legend.title = NULL, xlab = NULL, ylab = NULL, ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, package = "RColorBrewer", palette = "Dark2", ggplot.component = NULL, output = "plot", main, condition, ...)
ggbetweenstats(data, x, y, plot.type = "boxviolin", type = "parametric", pairwise.comparisons = TRUE, pairwise.display = "significant", p.adjust.method = "holm", effsize.type = "unbiased", partial = TRUE, bf.prior = 0.707, bf.message = TRUE, results.subtitle = TRUE, xlab = NULL, ylab = NULL, caption = NULL, title = NULL, subtitle = NULL, sample.size.label = TRUE, k = 2L, var.equal = FALSE, conf.level = 0.95, nboot = 100, tr = 0.1, mean.plotting = TRUE, mean.ci = FALSE, mean.point.args = list(size = 5, color = "darkred"), mean.label.args = list(size = 3), notch = FALSE, notchwidth = 0.5, outlier.tagging = FALSE, outlier.label = NULL, outlier.coef = 1.5, outlier.shape = 19, outlier.color = "black", outlier.label.args = list(size = 3), outlier.point.args = list(), point.args = list(position = ggplot2::position_jitterdodge(dodge.width = 0.6), alpha = 0.4, size = 3, stroke = 0), violin.args = list(width = 0.5, alpha = 0.2), ggsignif.args = list(textsize = 3, tip_length = 0.01), ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, package = "RColorBrewer", palette = "Dark2", ggplot.component = NULL, output = "plot", ...)
ggcoefstats(x, output = "plot", statistic = NULL, conf.int = TRUE, conf.level = 0.95, k = 2L, exclude.intercept = TRUE, exponentiate = FALSE, effsize = "eta", partial = TRUE, meta.analytic.effect = FALSE, meta.type = "parametric", bf.message = TRUE, sort = "none", xlab = "regression coefficient", ylab = "term", title = NULL, subtitle = NULL, caption = NULL, only.significant = FALSE, point.args = list(size = 3, color = "blue"), errorbar.args = list(height = 0), vline = TRUE, vline.args = list(size = 1, linetype = "dashed"), stats.labels = TRUE, stats.label.color = NULL, stats.label.args = list(size = 3, direction = "y"), package = "RColorBrewer", palette = "Dark2", ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, ...)
ggbetweenstats(data, x, y, plot.type = "boxviolin", type = "parametric", pairwise.comparisons = TRUE, pairwise.display = "significant", p.adjust.method = "holm", effsize.type = "unbiased", bf.prior = 0.707, bf.message = TRUE, results.subtitle = TRUE, xlab = NULL, ylab = NULL, caption = NULL, title = NULL, subtitle = NULL, sample.size.label = TRUE, k = 2L, var.equal = FALSE, conf.level = 0.95, nboot = 100L, tr = 0.1, mean.plotting = TRUE, mean.ci = FALSE, mean.point.args = list(size = 5, color = "darkred"), mean.label.args = list(size = 3), notch = FALSE, notchwidth = 0.5, outlier.tagging = FALSE, outlier.label = NULL, outlier.coef = 1.5, outlier.shape = 19, outlier.color = "black", outlier.label.args = list(size = 3), outlier.point.args = list(), point.args = list(position = ggplot2::position_jitterdodge(dodge.width = 0.6), alpha = 0.4, size = 3, stroke = 0), violin.args = list(width = 0.5, alpha = 0.2), ggsignif.args = list(textsize = 3, tip_length = 0.01), ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, package = "RColorBrewer", palette = "Dark2", ggplot.component = NULL, output = "plot", ...)
ggcoefstats(x, output = "plot", statistic = NULL, conf.int = TRUE, conf.level = 0.95, k = 2L, exclude.intercept = TRUE, exponentiate = FALSE, effsize = "eta", meta.analytic.effect = FALSE, meta.type = "parametric", bf.message = TRUE, sort = "none", xlab = "regression coefficient", ylab = "term", title = NULL, subtitle = NULL, caption = NULL, only.significant = FALSE, point.args = list(size = 3, color = "blue"), errorbar.args = list(height = 0), vline = TRUE, vline.args = list(size = 1, linetype = "dashed"), stats.labels = TRUE, stats.label.color = NULL, stats.label.args = list(size = 3, direction = "y"), package = "RColorBrewer", palette = "Dark2", ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, ...)
ggcorrmat(data, cor.vars = NULL, cor.vars.names = NULL, output = "plot", matrix.type = "full", matrix.method = "square", type = "parametric", beta = 0.1, k = 2L, sig.level = 0.05, conf.level = 0.95, bf.prior = 0.707, p.adjust.method = "none", pch = "cross", ggcorrplot.args = list(outline.color = "black"), package = "RColorBrewer", palette = "Dark2", colors = c("#E69F00", "white", "#009E73"), ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, ggplot.component = NULL, title = NULL, subtitle = NULL, caption = NULL, messages = TRUE, ...)
ggdotplotstats(data, x, y, xlab = NULL, ylab = NULL, title = NULL, subtitle = NULL, caption = NULL, type = "parametric", test.value = 0, bf.prior = 0.707, bf.message = TRUE, effsize.type = "g", conf.level = 0.95, nboot = 100, k = 2, results.subtitle = TRUE, point.args = list(color = "black", size = 3, shape = 16), test.k = 0, test.value.line = FALSE, test.value.line.args = list(size = 1), test.value.label.args = list(size = 3), centrality.parameter = "mean", centrality.k = 2, centrality.line.args = list(color = "blue", size = 1), centrality.label.args = list(color = "blue", size = 3), ggplot.component = NULL, ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, output = "plot", ...)
gghistostats(data, x, binwidth = NULL, bar.measure = "count", xlab = NULL, title = NULL, subtitle = NULL, caption = NULL, type = "parametric", test.value = 0, bf.prior = 0.707, bf.message = TRUE, effsize.type = "g", conf.level = 0.95, nboot = 100, k = 2L, ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, bar.fill = "grey50", results.subtitle = TRUE, test.k = 0, test.value.line = FALSE, test.value.line.args = list(size = 1), test.value.label.args = list(size = 3), centrality.parameter = "mean", centrality.k = 2, centrality.line.args = list(size = 1, color = "blue"), centrality.label.args = list(color = "blue", size = 3), normal.curve = FALSE, normal.curve.args = list(size = 3), ggplot.component = NULL, output = "plot", ...)
ggpiestats(data, x = NULL, y = NULL, counts = NULL, ratio = NULL, paired = FALSE, results.subtitle = TRUE, label = "percentage", label.args = list(direction = "both"), label.repel = FALSE, conf.level = 0.95, k = 2L, proportion.test = TRUE, perc.k = 0, bf.message = TRUE, sampling.plan = "indepMulti", fixed.margin = "rows", prior.concentration = 1, title = NULL, subtitle = NULL, caption = NULL, legend.title = NULL, ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, package = "RColorBrewer", palette = "Dark2", ggplot.component = NULL, output = "plot", main, condition = NULL, ...)
ggscatterstats(data, x, y, type = "parametric", conf.level = 0.95, bf.prior = 0.707, bf.message = TRUE, beta = 0.1, k = 2L, label.var = NULL, label.expression = NULL, point.label.args = list(size = 3), formula = y ~ x, smooth.line.args = list(size = 1.5, color = "blue"), method = "lm", method.args = list(), point.args = list(size = 3, alpha = 0.4), point.width.jitter = 0, point.height.jitter = 0, marginal = TRUE, marginal.type = "histogram", margins = "both", marginal.size = 5, xfill = "#009E73", yfill = "#D55E00", xparams = list(fill = xfill), yparams = list(fill = yfill), centrality.parameter = "none", centrality.label.args = list(size = 3), vline.args = list(color = xfill, size = 1, linetype = "dashed"), hline.args = list(color = yfill, size = 1, linetype = "dashed"), results.subtitle = TRUE, xlab = NULL, ylab = NULL, title = NULL, subtitle = NULL, caption = NULL, ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, ggplot.component = NULL, output = "plot", ...)
ggwithinstats(data, x, y, type = "parametric", pairwise.comparisons = TRUE, pairwise.display = "significant", p.adjust.method = "holm", effsize.type = "unbiased", partial = TRUE, bf.prior = 0.707, bf.message = TRUE, results.subtitle = TRUE, xlab = NULL, ylab = NULL, caption = NULL, title = NULL, subtitle = NULL, sample.size.label = TRUE, k = 2, conf.level = 0.95, nboot = 100, tr = 0.1, mean.plotting = TRUE, mean.ci = FALSE, mean.point.args = list(size = 5, color = "darkred"), mean.label.args = list(size = 3), point.path = TRUE, point.path.args = list(alpha = 0.5, linetype = "dashed"), mean.path = TRUE, mean.path.args = list(color = "red", size = 1, alpha = 0.5), notch = FALSE, notchwidth = 0.5, outlier.tagging = FALSE, outlier.label = NULL, outlier.coef = 1.5, outlier.label.args = list(), outlier.point.args = list(), violin.args = list(width = 0.5, alpha = 0.2), ggsignif.args = list(textsize = 3, tip_length = 0.01), ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, package = "RColorBrewer", palette = "Dark2", ggplot.component = NULL, output = "plot", ...)
ggwithinstats(data, x, y, type = "parametric", pairwise.comparisons = TRUE, pairwise.display = "significant", p.adjust.method = "holm", effsize.type = "unbiased", bf.prior = 0.707, bf.message = TRUE, results.subtitle = TRUE, xlab = NULL, ylab = NULL, caption = NULL, title = NULL, subtitle = NULL, sample.size.label = TRUE, k = 2L, conf.level = 0.95, nboot = 100L, tr = 0.1, mean.plotting = TRUE, mean.ci = FALSE, mean.point.args = list(size = 5, color = "darkred"), mean.label.args = list(size = 3), point.path = TRUE, point.path.args = list(alpha = 0.5, linetype = "dashed"), mean.path = TRUE, mean.path.args = list(color = "red", size = 1, alpha = 0.5), notch = FALSE, notchwidth = 0.5, outlier.tagging = FALSE, outlier.label = NULL, outlier.coef = 1.5, outlier.label.args = list(), outlier.point.args = list(), violin.args = list(width = 0.5, alpha = 0.2), ggsignif.args = list(textsize = 3, tip_length = 0.01), ggtheme = ggplot2::theme_bw(), ggstatsplot.layer = TRUE, package = "RColorBrewer", palette = "Dark2", ggplot.component = NULL, output = "plot", ...)
grouped_ggbarstats(data, x = NULL, y = NULL, counts = NULL, grouping.var, title.prefix = NULL, output = "plot", main, condition, ..., plotgrid.args = list(), title.text = NULL, title.args = list(size = 16, fontface = "bold"), caption.text = NULL, caption.args = list(size = 10), sub.text = NULL, sub.args = list(size = 12))
grouped_ggbetweenstats(data, x, y, grouping.var, outlier.label = NULL, title.prefix = NULL, output = "plot", ..., plotgrid.args = list(), title.text = NULL, title.args = list(size = 16, fontface = "bold"), caption.text = NULL, caption.args = list(size = 10), sub.text = NULL, sub.args = list(size = 12))
grouped_ggcorrmat(data, cor.vars = NULL, cor.vars.names = NULL, grouping.var, title.prefix = NULL, output = "plot", ..., plotgrid.args = list(), title.text = NULL, title.args = list(size = 16, fontface = "bold"), caption.text = NULL, caption.args = list(size = 10), sub.text = NULL, sub.args = list(size = 12))
Expand Down
6 changes: 2 additions & 4 deletions R/ggbetweenstats.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @param xlab,ylab Labels for `x` and `y` axis variables. If `NULL` (default),
#' variable names for `x` and `y` will be used.
#' @param pairwise.comparisons Logical that decides whether pairwise comparisons
#' are to be displayed (default: `FALSE`). Please note that only
#' are to be displayed (default: `TRUE`). Please note that only
#' **significant** comparisons will be shown by default. To change this
#' behavior, select appropriate option with `pairwise.display` argument. The
#' pairwise comparison dataframes are prepared using the
Expand Down Expand Up @@ -180,7 +180,6 @@ ggbetweenstats <- function(data,
pairwise.display = "significant",
p.adjust.method = "holm",
effsize.type = "unbiased",
partial = TRUE,
bf.prior = 0.707,
bf.message = TRUE,
results.subtitle = TRUE,
Expand All @@ -193,7 +192,7 @@ ggbetweenstats <- function(data,
k = 2L,
var.equal = FALSE,
conf.level = 0.95,
nboot = 100,
nboot = 100L,
tr = 0.1,
mean.plotting = TRUE,
mean.ci = FALSE,
Expand Down Expand Up @@ -299,7 +298,6 @@ ggbetweenstats <- function(data,
y = {{ y }},
paired = FALSE,
effsize.type = effsize.type,
partial = partial,
var.equal = var.equal,
bf.prior = bf.prior,
tr = tr,
Expand Down
23 changes: 5 additions & 18 deletions R/ggcoefstats.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
#' @param effsize Character describing the effect size to be displayed: `"eta"`
#' (default) or `"omega"`. This argument is relevant only for models objects
#' of class `aov`, `anova`, `aovlist`, `"Gam"`, and `"manova"`.
#' @param partial Logical that decides if partial eta-squared or partial
#' omega-squared are returned (Default: `TRUE`). If `FALSE`, eta-squared or
#' omega-squared will be returned.
#' @param meta.analytic.effect Logical that decides whether subtitle for
#' meta-analysis via linear (mixed-effects) models (default: `FALSE`). If
#' `TRUE`, input to argument `subtitle` will be ignored. This will be mostly
Expand Down Expand Up @@ -213,7 +210,6 @@ ggcoefstats <- function(x,
exclude.intercept = TRUE,
exponentiate = FALSE,
effsize = "eta",
partial = TRUE,
meta.analytic.effect = FALSE,
meta.type = "parametric",
bf.message = TRUE,
Expand Down Expand Up @@ -262,31 +258,23 @@ ggcoefstats <- function(x,
# =========================== tidy it ====================================

if (isTRUE(insight::is_model(x))) {
if (class(x)[[1]] %in% c("aov", "aovlist", "anova", "Gam", "manova")) {
if (class(x)[[1]] %in% c("aov", "aovlist", "anova", "Gam", "manova", "maov")) {
# creating dataframe
tidy_df <-
lm_effsize_standardizer(
object = x,
effsize = effsize,
partial = partial,
conf.level = conf.level
)

# prefix for effect size
if (isTRUE(partial)) {
effsize.prefix <- "partial"
} else {
effsize.prefix <- NULL
}

# renaming the `xlab` according to the estimate chosen
xlab <- paste(effsize.prefix, " ", effsize, "-squared", sep = "")
xlab <- paste("partial", " ", effsize, "-squared", sep = "")
} else {
tidy_df <-
broomExtra::tidy_parameters(
x = x,
conf.int = conf.int,
conf.level = conf.level,
conf.int = conf.int, # remove when only `parameters`
conf.level = conf.level, # remove when only `parameters`
ci = conf.level,
exponentiate = exponentiate,
effects = "fixed",
Expand Down Expand Up @@ -414,8 +402,7 @@ ggcoefstats <- function(x,
tidy_df = .,
statistic = statistic,
k = k,
effsize = effsize,
partial = partial
effsize = effsize
)
}

Expand Down
10 changes: 4 additions & 6 deletions R/ggwithinstats.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' (unjittered) data points for within-subjects designs with statistical
#' details included in the plot as a subtitle.
#'
#' @noRd **Important**: Please note that the function expects that the data is
#' @note **Important**: Please note that the function expects that the data is
#' already sorted by subject/repeated measures ID.
#'
#' @inheritParams ggbetweenstats
Expand Down Expand Up @@ -55,7 +55,7 @@
#' library(WRS2)
#'
#' ggstatsplot::ggwithinstats(
#' data = as_tibble(WineTasting),
#' data = WineTasting,
#' x = Wine,
#' y = Taste,
#' type = "np",
Expand All @@ -76,7 +76,6 @@ ggwithinstats <- function(data,
pairwise.display = "significant",
p.adjust.method = "holm",
effsize.type = "unbiased",
partial = TRUE,
bf.prior = 0.707,
bf.message = TRUE,
results.subtitle = TRUE,
Expand All @@ -86,9 +85,9 @@ ggwithinstats <- function(data,
title = NULL,
subtitle = NULL,
sample.size.label = TRUE,
k = 2,
k = 2L,
conf.level = 0.95,
nboot = 100,
nboot = 100L,
tr = 0.1,
mean.plotting = TRUE,
mean.ci = FALSE,
Expand Down Expand Up @@ -197,7 +196,6 @@ ggwithinstats <- function(data,
y = {{ y }},
paired = TRUE,
effsize.type = effsize.type,
partial = partial,
var.equal = TRUE, ,
bf.prior = bf.prior,
tr = tr,
Expand Down
19 changes: 2 additions & 17 deletions R/helpers_ggcoefstats_graphics.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#'
#' @param ... Currently ignored.
#' @param tidy_df A tidy dataframe.
#' @param ... Currently ignored.
#' @inheritParams ggcoefstats
#'
#' @importFrom dplyr mutate rowwise
Expand All @@ -15,7 +14,6 @@ ggcoefstats_label_maker <- function(tidy_df,
statistic = NULL,
k = 2L,
effsize = "eta",
partial = TRUE,
...) {

#----------------------- p-value cleanup ------------------------------------
Expand Down Expand Up @@ -104,21 +102,8 @@ ggcoefstats_label_maker <- function(tidy_df,

if (statistic == "f") {
# which effect size is needed?
if (effsize == "eta") {
if (isTRUE(partial)) {
effsize.text <- list(quote(widehat(italic(eta)[p]^2)))
} else {
effsize.text <- list(quote(widehat(italic(eta)^2)))
}
}

if (effsize == "omega") {
if (isTRUE(partial)) {
effsize.text <- list(quote(widehat(italic(omega)[p]^2)))
} else {
effsize.text <- list(quote(widehat(italic(omega)^2)))
}
}
if (effsize == "eta") effsize.text <- list(quote(widehat(italic(eta)[p]^2)))
if (effsize == "omega") effsize.text <- list(quote(widehat(italic(omega)[p]^2)))

# which effect size is needed?
tidy_df %<>%
Expand Down
Loading

0 comments on commit 4d2a28b

Please sign in to comment.