
Making expression containing Bayesian t-test results
expr_t_bayes(data, x, y, bf.prior = 0.707, paired = FALSE, k = 2, ...)
A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted.
The grouping variable from the dataframe data
.
The response (a.k.a. outcome or dependent) variable from the
dataframe data
.
A numeric value between 0.5
and 2
(default 0.707
), the
prior width to use in calculating Bayes Factors.
Logical that decides whether the experimental design is
repeated measures/within-subjects or between-subjects. The default is
FALSE
.
Number of digits after decimal point (should be an integer)
(Default: k = 2
).
Additional arguments (currently ignored).
For more details, see- https://indrajeetpatil.github.io/statsExpressions/articles/stats_details.html
# NOT RUN {
# for reproducibility
set.seed(123)
# ------------- between-subjects design --------------------------
statsExpressions::expr_t_bayes(
data = mtcars,
x = am,
y = wt,
paired = FALSE
)
# ------------- within-subjects design -----------------------------
statsExpressions::expr_t_bayes(
data = dplyr::filter(
statsExpressions::intent_morality,
condition %in% c("accidental", "attempted"),
harm == "Poisoning"
),
x = condition,
y = rating,
paired = TRUE
)
# }
Run the code above in your browser using DataLab