#' Report an F-test
#'
#' Report an F-test as F(df1, df2) = F, p = .###.
#' @param model Model object from which to extract F-value.
#' @param effect Parameter with F-value of interest
#'
#' @export
report_f <- function(model, effect) {
frame <- broom::tidy(car::Anova(model, type = 3))
df1 <- with(frame, df[term == effect])
df2 <- with(frame, df[term == "Residuals"])
f <- with(frame, statistic[term == effect])
f <- numformat(f)
p <- with(frame, p.value[term == effect])
p <- fix_p(p)
output <- paste0("*F*(", df1, ", ", df2, ") = ", f, ", ", p)
return(output)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.