# NOT RUN {
# for reproducibility
set.seed(123)
library(statsExpressions)
options(tibble.width = Inf, pillar.bold = TRUE, pillar.neg = TRUE)
# ----------------------- parametric -------------------------------------
# between-subjects design
two_sample_test(
data = sleep,
x = group,
y = extra,
type = "p"
)
# within-subjects design
two_sample_test(
data = VR_dilemma,
x = modality,
y = score,
paired = TRUE,
subject.id = id,
type = "p"
)
# ----------------------- non-parametric ----------------------------------
# between-subjects design
two_sample_test(
data = sleep,
x = group,
y = extra,
type = "np"
)
# within-subjects design
two_sample_test(
data = VR_dilemma,
x = modality,
y = score,
paired = TRUE,
subject.id = id,
type = "np"
)
# ------------------------------ robust ----------------------------------
# between-subjects design
two_sample_test(
data = sleep,
x = group,
y = extra,
type = "r"
)
# within-subjects design
two_sample_test(
data = VR_dilemma,
x = modality,
y = score,
paired = TRUE,
subject.id = id,
type = "r"
)
#' # ------------------------------ Bayesian ------------------------------
# between-subjects design
two_sample_test(
data = sleep,
x = group,
y = extra,
type = "bayes"
)
# within-subjects design
two_sample_test(
data = VR_dilemma,
x = modality,
y = score,
paired = TRUE,
subject.id = id,
type = "bayes"
)
# }
Run the code above in your browser using DataLab