# NOT RUN {
# for reproducibility
set.seed(123)
library(statsExpressions)
# ----------------------- parametric ---------------------------------------
expr_t_onesample(
data = ggplot2::msleep,
x = brainwt,
test.value = 0.275,
type = "parametric"
)
# ----------------------- non-parametric -----------------------------------
expr_t_onesample(
data = ggplot2::msleep,
x = brainwt,
test.value = 0.275,
type = "nonparametric"
)
# ----------------------- robust --------------------------------------------
expr_t_onesample(
data = ggplot2::msleep,
x = brainwt,
test.value = 0.275,
type = "robust"
)
# ---------------------------- Bayesian -----------------------------------
expr_t_onesample(
data = ggplot2::msleep,
x = brainwt,
test.value = 0.275,
type = "bayes",
bf.prior = 0.8
)
# }
Run the code above in your browser using DataLab