-
Notifications
You must be signed in to change notification settings - Fork 302
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
Can't tidy anova
for two MASS::polr
models
#1152
Comments
Incidentally, this is my workaround which gives what I think would be the expected output:
|
Thanks for the issue! A quick reprex with some small edits: library(broom)
library(MASS)
m.polr <- polr(ordered(gear) ~ am, data = mtcars)
m.polr.0 <- polr(ordered(gear) ~ 1, data = mtcars)
fit <- anova(m.polr, m.polr.0)
class(fit)
#> [1] "Anova" "data.frame"
tidy(fit)
#> Warning: Data frame tidiers are deprecated and will be removed in an upcoming
#> release of broom.
#> Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
#> returning NA
#> Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
#> returning NA
#> Warning in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm =
#> na.rm): NAs introduced by coercion
#> Warning in var(if (is.vector(x) || is.factor(x)) x else as.double(x), na.rm =
#> na.rm): NAs introduced by coercion
#> Warning in mean.default(sort(x, partial = half + 0L:1L)[half + 0L:1L]):
#> argument is not numeric or logical: returning NA
#> Warning in mean.default(sort(x, partial = half + 0L:1L)[half + 0L:1L]):
#> argument is not numeric or logical: returning NA
#> Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
#> returning NA
#> Warning in mean.default(X[[i]], ...): argument is not numeric or logical:
#> returning NA
#> Warning in mean.default(sort(x, partial = half + 0L:1L)[half + 0L:1L]):
#> argument is not numeric or logical: returning NA
#> Error in x - stats::median(x, na.rm = na.rm): non-numeric argument to binary operator Created on 2023-05-19 with reprex v2.0.2 We're seeing these failures because broom doesn't have any methods for |
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
Hi - just came across this:
Shows this error:
Whereas this works fine:
The text was updated successfully, but these errors were encountered: