Open Crismoc opened 5 years ago
Should be fixed now (bug was in other packages), but requires the other packages to be updated on CRAN (and this package as well) - so either wait for the next updated, or install following packages from GitHub:
https://github.com/easystats/insight, https://github.com/easystats/parameters and https://github.com/easystats/effectsize.
I am running nnet::multinom and have installed the above three packages. I still get tab_model output that lists each parameter 2 times.
Here is a reproducible example using these data:
# I'm running 4.0.2 and these packages are loaded
pacman::p_load("ggplot2","dplyr","readr","plotscale","lattice","tidyr","readxl","mlogit","jtools","sjPlot","sjmisc","sjlabelled","knitr","kableExtra","lavaan","reshape2","semPlot","lavaanPlot","leaps","lme4","multilevelTools","rvest","nnet","parameters","insight","effectsize","foreign")
ml <- read.dta("https://stats.idre.ucla.edu/stat/data/hsbdemo.dta")
ml$prog2 <- relevel(ml$prog, ref = "academic")
test <- multinom(prog2 ~ ses + write, data = ml)
test2 <- multinom(prog2 ~ ses + write + math, data = ml)
tab_model(test,test2, file = "results/test.htm")
The code works for me, this reprex produces the html desired table:
ml <- foreign::read.dta("https://stats.idre.ucla.edu/stat/data/hsbdemo.dta")
ml$prog2 <- relevel(ml$prog, ref = "academic")
test <- nnet::multinom(prog2 ~ ses + write, data = ml)
#> # weights: 15 (8 variable)
#> initial value 219.722458
#> iter 10 value 179.982880
#> final value 179.981726
#> converged
test2 <- nnet::multinom(prog2 ~ ses + write + math, data = ml)
#> # weights: 18 (10 variable)
#> initial value 219.722458
#> iter 10 value 171.704109
#> final value 170.861739
#> converged
sjPlot::tab_model(test,test2)
Interesting. Here's mine.
BTW: thanks in general for such great packages!
Yes, I can reproduce your error. While the initial issue was only about a single multinomial model, your issue concerns merging two multinomial models. Will re-open and see how to address this...
Hi guys,
I know that this issue was already discussed a while ago but I now wanted to merge two multinomial models and use tab_models() and I still get the same error. Has this problem been solved by one of you?
Thank you in advance!
Interesting. Here's mine.
There seems to be a problem when using
tab_model()
with multinomial models fitted with nnet. This was working before, but I am not sure if it was an update in sjPlot or a change in another package. Here is a reprex of the issueCreated on 2019-10-21 by the reprex package (v0.3.0)