ggstatsplot (version 0.0.6)

subtitle_ggbetween_t_bayes: Making text subtitle for the bayesian t-test.

Description

Making text subtitle for the bayesian t-test.

Usage

subtitle_ggbetween_t_bayes(data, x, y, bf.prior = 0.707,
  paired = FALSE, k = 3)

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.

bf.prior

A number between 0.5 and 2 (default 0.707), the prior width to use in calculating Bayes factors.

paired

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

k

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

Examples

Run this code
# NOT RUN {
# between-subjects design

subtitle_ggbetween_t_bayes(
  data = mtcars,
  x = am,
  y = wt,
  paired = FALSE
)

# within-subjects design

subtitle_ggbetween_t_bayes(
  data = dplyr::filter(
    ggstatsplot::intent_morality,
    condition %in% c("accidental", "attempted"),
    harm == "Poisoning"
  ),
  x = condition,
  y = rating,
  paired = TRUE
)
# }

Run the code above in your browser using DataLab