Skip to content

report() assigning effect size to intercept in model #451

Open
@RenyBB

Description

@RenyBB

For example, we want to do a type III ANOVA, so we fit a linear model with categorical predictors and use the car::Anova function:

some_linear_model <- lm(mpg ~ as.factor(cyl)*as.factor(am), data=mtcars) 
some_anova <- car::Anova(some_linear_model, type = "III")

Then, we use report() and report_table() to output the results:

report::report(some_anova)
report::report_table(some_anova)

The effect sizes using repor_tablet() are correct, but the effect sizes using report() don't match up with the correct effects:

  • The main effect of (Intercept) is statistically significant and large (F(1, 26) =
    171.10, p < .001; Eta2 (partial) = 0.41, 95% CI [0.15, 1.00])
  • The main effect of as.factor(cyl) is statistically significant and large (F(2, 26)
    = 9.12, p < .001; Eta2 (partial) = 0.20, 95% CI [0.02, 1.00])
  • The main effect of as.factor(am) is statistically significant and medium (F(1, 26)
    = 6.35, p = 0.018; Eta2 (partial) = 0.10, 95% CI [0.00, 1.00])
  • The interaction between as.factor(cyl) and as.factor(am) is statistically not
    significant and large (F(2, 26) = 1.38, p = 0.269; Eta2 (partial) = 0.41, 95% CI
    [0.15, 1.00])

Compare these to the results obtained with report_table():
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions