easystats/see

Bug in `see:::plot.see_parameters_model()` for `mgcv::gam()` model

RoelVerbelen opened this issue · 0 comments

Experimenting with using this package for GAM coefficient plots and ran into this issue:

library(parameters)
library(mgcv)
#> Loading required package: nlme
#> This is mgcv 1.8-39. For overview type 'help("mgcv-package")'.
m <- gam(mpg ~ s(wt) + cyl + gear + disp, data = mtcars)
result <- model_parameters(m)
result
#> # Fixed Effects
#> 
#> Parameter   | Coefficient |   SE |         95% CI | t(25.59) |      p
#> ---------------------------------------------------------------------
#> (Intercept) |       30.31 | 3.83 | [22.42, 38.20] |     7.91 | < .001
#> cyl         |       -1.24 | 0.68 | [-2.64,  0.16] |    -1.82 | 0.080 
#> gear        |       -0.55 | 0.74 | [-2.07,  0.96] |    -0.75 | 0.459 
#> disp        |   -2.21e-03 | 0.01 | [-0.03,  0.02] |    -0.19 | 0.855 
#> 
#> # Smooth Terms
#> 
#> Parameter        |    F |   df |     p
#> --------------------------------------
#> Smooth term (wt) | 6.42 | 2.41 | 0.002
plot(result)
#> Error in if (all(x$group == "TRUE")) {: missing value where TRUE/FALSE needed

Created on 2023-01-27 by the reprex package (v2.0.1)