Description Usage Arguments Examples
View source: R/tidy_stats.mixed.R
tidy_stats.mixed
takes an afex mixed object and converts the object to
a tidy stats data frame.
1 2 | ## S3 method for class 'mixed'
tidy_stats(model, args = NULL)
|
model |
Output of afex's |
args |
Unused. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Check if afex package is available
if(!requireNamespace("afex", quietly = TRUE)) {
message(paste0("Package 'afex' is needed for this example to work. ",
"Please install it."), .call = FALSE)
} else {
# Load data
data("sk2011.2", package = "afex")
sk2_aff <- droplevels(sk2011.2[sk2011.2$what == "affirmation",])
# Perform the analysis
sk_m1 <- afex::mixed(response ~ instruction * inference * type +
(inference * type | id), sk2_aff)
# Tidy stats
tidy_stats(sk_m1) # Default ANOVA output
tidy_stats(sk_m1, args = list(summary = "lmer")) # lmer summary
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.