0

The following code was from help("tidy.speedglm"). It does not get correct p values. The previous version of broom worked fine, but the current version of broom (0.7.0) does not work. I wonder if this is a bug or something? Thanks.

library(speedglm)
library(broom)
clotting <- data.frame(
  u = c(5, 10, 15, 20, 30, 40, 60, 80, 100),
  lot1 = c(118, 58, 42, 35, 27, 25, 21, 19, 18)
)

fit <- speedglm(lot1 ~ log(u), data = clotting, family = Gamma(log))
tidy(fit)
#> # A tibble: 2 x 5
#>   term        estimate std.error statistic p.value
#>   <chr>          <dbl>     <dbl>     <dbl>   <dbl>
#> 1 (Intercept)    5.50     0.190       28.9      NA
#> 2 log(u)        -0.602    0.0553     -10.9      NA

Created on 2020-08-23 by the reprex package (v0.3.0)

Zhiqiang Wang
  • 6,206
  • 2
  • 13
  • 27
  • It looks like this is the current iterations of `broom` and `speedglm` not working well together, apparently due to the fact of `speedglm` storing p values as characters rather than numeric. Some discussion can be found at https://github.com/tidymodels/broom/pull/881 and https://github.com/MarcoEnea/speedglm/issues/2 Looks like `speedglm` maintainer has agreed to switch to numeric values, so you may want to make sure you have the most up to date version of that (maybe even installing from GitHub) – duckmayr Aug 23 '20 at 12:23
  • @duckmayr Thanks. My package depends on both `broom` and `speedglm`. I will wait for the cran update of `speedglm`. – Zhiqiang Wang Aug 23 '20 at 12:44

1 Answers1

0

try summary(fit) using broom package

Seyma Kalay
  • 2,037
  • 10
  • 22