easystats/parameters

error in model_parameters() for mblogit

madebyafox opened this issue · 2 comments

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

When trying retrieve parameters for 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]
I'm certain I've seen this working in the past myself as well with mblogit models, and the function does currently work with multinom() type models from nnet

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

model_parameters(m1.mn)
#> Error: Sorry, model_parameters() failed with the following error (possible class mmblogit not supported):

#> replacement has 1 row, data has 0

Thanks, should be fixed now. If you have the easystats package installed, just start a fresh R session and run easystats::install_latest(force = TRUE), and everything should work.

HUGE thanks! y'all are great!
:D