dgromer / apa

Format output of statistical tests in R according to APA guidelines
GNU General Public License v3.0
28 stars 2 forks source link

function F_apa for var.test #14

Open spressi opened 2 years ago

spressi commented 2 years ago

When being confronted with ceiling or floor effects, comparison of variances are a good first clue (variance gets restricted). Thus, it would be nice to have an APA output for calls to functions like var.test.

Here is a first crude approach for simple console output:


F_apa = function(f.test) {
  cat("F(", paste(f.test$parameter, collapse=", "), ") = ", f.test$statistic %>% signif(3),   
  ", p ", ifelse(f.test$p.value < .001, "< .001", paste0("= ", f.test$p.value %>% signif(3))), "\n", sep="")
}