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

plot_model error for mmblogit type

madebyafox opened this issue · comments

R version 4.2.2 (2022-10-31)
sjPlot ‘2.8.12’
parameters 0.20.2
mclogit 0.9.6

When trying to visualize a mixed multinomial regression model (using mblogit), I receive an error referencing model_parameters(). However, I believe this was previously working, as demonstrated here [https://ladal.edu.au/regression.html#Mixed-Effects_Multinomial_Regression] . Same error appears for tab_model()

REPREX

pict  <- base::readRDS(url("https://slcladal.github.io/data/pict.rda", "rb"))

m1.mn <- mclogit::mblogit(formula = Response ~ Gender + Group, 
              random = ~ 1 | Item, 
              data = pict)
#> Warning: Inner iterations did not coverge - nlminb message: false convergence
#> (8)
#> 
#> Iteration 1 - deviance = 1652.545 - criterion = 0.800708
#> Warning: Inner iterations did not coverge - nlminb message: false convergence
#> (8)
#> 
#> Iteration 2 - deviance = 1571.221 - criterion = 0.08148998
#> Warning: Inner iterations did not coverge - nlminb message: false convergence
#> (8)
#> 
#> Iteration 3 - deviance = 1551.91 - criterion = 0.02744697
#> Warning: Inner iterations did not coverge - nlminb message: false convergence
#> (8)
#> 
#> Iteration 4 - deviance = 1547.298 - criterion = 0.005126671
#> Warning: Inner iterations did not coverge - nlminb message: false convergence
#> (8)
#> 
#> Iteration 5 - deviance = 1546.022 - criterion = 0.0001735434
#> Warning: Inner iterations did not coverge - nlminb message: false convergence
#> (8)
#> 
#> Iteration 6 - deviance = 1545.833 - criterion = 2.449264e-07
#> Warning: Inner iterations did not coverge - nlminb message: false convergence
#> (8)
#> 
#> Iteration 7 - deviance = 1545.828 - criterion = 7.85568e-13
#> converged

sjPlot::plot_model(m1.mn)
#> Error: Sorry, `model_parameters()` failed with the following error (possible
#>   class `mmblogit` not supported):
#> 
#>   replacement has 1 row, data has 0

Created on 2023-02-20 with reprex v2.0.2

Sincerest Thanks!

Fixed in EASYSTATS parameters::model_parameters()
SEE
easystats/parameters#857