Skip to contents

Create a ANOVA table

Usage

infer_anova(data, formula, digits = 3, caption = NULL)

Arguments

data

A data frame (or tibble).

formula

The variables to run the test on, in formula syntax, var1 ~ var2.

digits

The number of digits to round table values to. Defaults to 3.

caption

An override to the table caption. A sensible default is provided.

Value

An object of class flextable. If in an interactive session, results are viewable immediately.

Examples

infer_anova(mtcars, drat~gear)
ANOVA Table for drat vs. gear

Source

df

SS

MS

F

p-value

Between

2

6.133

3.067

32.590

< 0.0001

Within

29

2.729

0.0941

Total

31

8.862

infer_anova(mtcars, drat~gear, digits = 4)
ANOVA Table for drat vs. gear

Source

df

SS

MS

F

p-value

Between

2

6.1334

3.0667

32.5903

< 0.0001

Within

29

2.7289

0.0941

Total

31

8.8623