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

Trouble displaying multiple multinomial logit models

JoshRoll opened this issue · comments

I love the tab_model table summary for reviewing model results but recently when using it to summarize multiple logit models i found it duplicates independent variable estimates/results making the table unreadable. I reproduce this issue with the student outcomes data below where i show the tab_model works fine for one model but no good for two or three models.

require(foreign)
require(nnet)
require(ggplot2)
require(reshape2)
library(sjplot)
#Read data
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)
test1 <- multinom(prog2 ~ ses , data = ml)
#Looks fine
tab_model(test)
#Now it repeats variable as many times as there is a model
tab_model(test, test1)
tab_model(test, test, test)