ggstatsplot (version 0.0.7)

subtitle_t_parametric: Making text subtitle for the t-test (between-/within-subjects designs).

Description

Making text subtitle for the t-test (between-/within-subjects designs).

Usage

subtitle_t_parametric(data, x, y, paired = FALSE, effsize.type = "g",
  effsize.noncentral = FALSE, conf.level = 0.95, var.equal = FALSE,
  k = 2, ...)

Arguments

data

Dataframe from which variables specified are preferentially to be taken.

x

The grouping variable.

y

The response - a vector of length the number of rows of x.

paired

a logical indicating whether you want a paired t-test.

effsize.type

Type of effect size needed for parametric tests. The argument can be "biased" ("d" for Cohen's d for t-test; "partial_eta" for partial eta-squared for anova) or "unbiased" ("g" Hedge's g for t-test; "partial_omega" for partial omega-squared for anova)).

effsize.noncentral

Logical indicating whether to use non-central t-distributions for computing the confidence interval for Cohen's d or Hedge's g (Default: FALSE).

conf.level

A scalar value between 0 and 1. If unspecified, the default is to return 95% lower and upper confidence intervals (0.95).

var.equal

a logical variable indicating whether to treat the variances in the samples as equal. If TRUE, then a simple F test for the equality of means in a one-way analysis of variance is performed. If FALSE, an approximate method of Welch (1951) is used, which generalizes the commonly known 2-sample Welch test to the case of arbitrarily many samples.

k

Number of digits after decimal point (should be an integer) (Default: k = 2).

...

Additional arguments (ignored).

Examples

Run this code
# NOT RUN {
# creating a smaller dataset
msleep_short <- dplyr::filter(
  .data = ggplot2::msleep,
  vore %in% c("carni", "herbi")
)

# with defaults
subtitle_t_parametric(
  data = msleep_short,
  x = vore,
  y = sleep_rem
)

# changing defaults
subtitle_t_parametric(
  data = msleep_short,
  x = vore,
  y = sleep_rem,
  var.equal = TRUE,
  k = 2,
  effsize.type = "d"
)
# }

Run the code above in your browser using DataLab