if (FALSE) { # identical(Sys.getenv("NOT_CRAN"), "true")
# for reproducibility
set.seed(123)
library(statsExpressions)
# ----------------------- parametric -------------------------------------
# between-subjects
oneway_anova(
data = mtcars,
x = cyl,
y = wt
)
# within-subjects design
oneway_anova(
data = iris_long,
x = condition,
y = value,
subject.id = id,
paired = TRUE
)
# ----------------------- non-parametric ----------------------------------
# between-subjects
oneway_anova(
data = mtcars,
x = cyl,
y = wt,
type = "np"
)
# within-subjects design
oneway_anova(
data = iris_long,
x = condition,
y = value,
subject.id = id,
paired = TRUE,
type = "np"
)
# ----------------------- robust -------------------------------------
# between-subjects
oneway_anova(
data = mtcars,
x = cyl,
y = wt,
type = "r"
)
# within-subjects design
oneway_anova(
data = iris_long,
x = condition,
y = value,
subject.id = id,
paired = TRUE,
type = "r"
)
}
if (FALSE) { # identical(Sys.getenv("NOT_CRAN"), "true") && requireNamespace("rstantools")
# ----------------------- Bayesian -------------------------------------
# between-subjects
oneway_anova(
data = mtcars,
x = cyl,
y = wt,
type = "bayes"
)
# within-subjects design
oneway_anova(
data = iris_long,
x = condition,
y = value,
subject.id = id,
paired = TRUE,
type = "bayes"
)
}
Run the code above in your browser using DataLab