strengejacke / sjPlot

sjPlot - Data Visualization for Statistics in Social Science

Home Page:https://strengejacke.github.io/sjPlot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tidy_model passing component now breaks parameters:::model_parameters.gam

alansz opened this issue · comments

R version 4.2.1 on x86_64-w64-mingw32
sjPlot 2.8.10
parameters 0.18.1

Reproducible example:

dt<-data.frame(y=rnorm(100),x=rnorm(100),z=rnorm(100))
m0<-mgcv::gam(y~x+s(z),data=dt)
# Works fine
summary(m0)
# Breaks
tab_model(m0)

Error in .extract_parameters_generic(model, ci = ci, ci_method = ci_method,  : 
  formal argument "component" matched by multiple actual arguments

sjPlot:::tidy_model(m0,ci.lvl=.95,show.zeroinf = FALSE,p.val=.05,robust=NULL)

(Same error)

# Works fine:
parameters:::model_parameters.gam(m0)
# Breaks, causing error above:
 parameters:::model_parameters.gam(m0,component="conditional")
 parameters:::model_parameters.gam(m0,component="all")

It looks like tidy_model is calling model_parameters and passing along a component argument, which model_parameters no longer can handle in this case.

This used to work, and I don't know which package changed (probably parameters?), but reporting here first.

thanks, should work now after updating parameters and sjPlot (though the current parameters package in turn might require packages insight and datawizard to be updated first...)