2

Is there a way to use ggpredict and get the standard errors (or confidence intervals) for predicted probabilities of a multinomial logistic regression model using multinom and ggpredict? Thank you.

var1<-sample(c('A', 'B', 'C'), size=1000, replace=T)
var2<-rnorm(n=1000)
var3<-rnorm(n=1000)

df<-data.frame(var1, var2, var3)
library(nnet)
mod1<-multinom(var1~var2+var3, data=df)

library(ggeffects)
preds<-ggpredict(mod1, terms="var2")
data.frame(preds)
spindoctor
  • 1,719
  • 1
  • 18
  • 42
  • Are you looking for `ggemmeans(mod1, terms = "var2")`? – Rui Barradas Jul 14 '20 at 17:52
  • Yes, that will work. So I need to be careful here. What is the difference between ggemmeans and ggpredict? Please note: I actually have categorical predictors, not continuous predictors as in the example. My bad. However, ggemmeans does produce confidence intervals for categorical variables. – spindoctor Jul 14 '20 at 18:45
  • According to your question regarding the difference between ggpredict and ggemmeans: https://strengejacke.github.io/ggeffects/articles/technical_differencepredictemmeans.html – Daniel Jul 26 '20 at 19:27

0 Answers0