-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anova - report sums of squares type + coding #159
Comments
Can you please modify and repost the output below to match your expectations? Will give a better idea about how we can achieve this. library(report)
mod <- aov(formula = Sepal.Length ~ Species, data = iris)
report(mod)
#> The ANOVA (formula: Sepal.Length ~ Species) suggests that:
#>
#> - The main effect of Species is statistically significant and large (F(2, 147) = 119.26, p < .001; Eta2 = 0.62, 90% CI [0.54, 0.68])
#>
#> Effect sizes were labelled following Field's (2013) recommendations. Created on 2021-04-16 by the reprex package (v2.0.0) |
It should be in the first line, before the actual stats. I assigned myself, I'll make the needed changes (and try to also add support for afex / anova objects at the same time). |
Fixed. library(report)
mod <- aov(formula = Sepal.Length ~ Species, data = iris)
report(mod)
#> Don't use ANOVA. |
Related to @strengejacke's point, I wonder whether it would be good to also report the actual regression coefficients in addition to/instead of eta2? |
If anyone is using They can always |
Okay, I've lost track of the API here.... @IndrajeetPatil Can you help me out? This first sentence should be changed: report(mod)
#> The {type} ANOVA (formula: Sepal.Length ~ Species) suggests that: Looking at
This information seems to be stored in the "heading" attributes: mod <- aov(Sepal.Length ~ Species * Sepal.Width, data = iris)
mod2 <- lmerTest::lmer(Sepal.Length ~ Sepal.Width + (1|Species), data = iris)
a0 <- anova(mod)
a1 <- car::Anova(mod, type = 2)
a2 <- car::Anova(mod, type = 3)
a3 <- anova(mod2)
attr(a0, "heading")
#> [1] "Analysis of Variance Table\n" "Response: Sepal.Length"
attr(a1, "heading")
#> [1] "Anova Table (Type II tests)\n" "Response: Sepal.Length"
attr(a2, "heading")
#> [1] "Anova Table (Type III tests)\n" "Response: Sepal.Length"
attr(a3, "heading")
#> [1] "Type III Analysis of Variance Table with Satterthwaite's method" Created on 2021-04-18 by the reprex package (v1.0.0) |
(people are gonna be doing type-1 tests with treatment-coding and think they're doing type-3 tests with effects-doing... daymn) |
I think that most folks using R for ANOVA (why?) are used to using |
I agree
I wouldn't be so sure, I've seen (too) many serious usage of |
Well, perhaps not, but I'd argue they should be. 😜 |
Finally, a hill for me to die on! |
Yeah, this is very unfortunate 😔 |
I think perhaps this should be supported elsewhere:
@strengejacke what do you think? |
Should the exact details of the type of test contained in I think this is what we currently do: mod <- stats::t.test(formula = wt ~ am, data = mtcars)
attributes(parameters::parameters(mod))$title
#> [1] "Welch Two Sample t-test" Created on 2021-04-20 by the reprex package (v2.0.0) |
Yes, just as this info appears in the title of anova(lmerTest::lmer(Reaction ~ Days + (Days | Subject), lme4::sleepstudy))
#> Type III Analysis of Variance Table with Satterthwaite's method
#> Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
#> Days 30031 30031 1 17 45.853 3.264e-06 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Created on 2021-04-20 by the reprex package (v1.0.0) |
bump |
This matters a lot, and without this context there is no way to interpret the results.
The text was updated successfully, but these errors were encountered: