Interpret multinom model

Hey there!
I have some trouble interpreting my multinom model
mod.fak_diff_2016.3 <- multinom(factor(fac.num)~ factor(lang)+ sex + age, data=voto_destill)

I try to get percent-values with the glm.predict package. However, I do not know how I get the percentage values so I can say "A 50 year old man has a xx% chance being in fac.num 1 and a xx% chance being in fac.num 2".
I tried predicts(mod.fak_diff_2016.3, "F; 1; 50", position =1) but did not get the numbers I need.
Has anyboy an idea?

Thanks,
Johanna

I think you are missing that type="probs" should be set on the predict function call.
Like in this example I made:

library(nnet)
set.seed(42)
irispart <- slice_sample(group_by(iris,Species),
                         n = 5)
irismod <- multinom(Species~ Petal.Length , data=irispart)

predicted_obj <- as_tibble(predict(irismod, newdata = irispart,type = "probs"))

library(tidyverse)
(predicted_obj <- mutate_all(predicted_obj,
                            ~round(100*.,digits = 2)))
# A tibble: 15 x 3
# setosa versicolor virginica
# <dbl>      <dbl>     <dbl>
#  1  99.8        0.19      0   
#  2  99.9        0.08      0   
#  3  99.9        0.12      0   
#  4  98.9        1.09      0   
#  5  99.8        0.19      0   
#  6   0.08      99.7       0.23
#  7   0.5       99.5       0   
#  8   0.32      99.7       0   
#  9   0.03      93.6       6.35
# 10   0.03      93.6       6.35
# 11   0          0       100   
# 12   0          0       100   
# 13   0          0       100   
# 14   0          0.32     99.7 
# 15   0          8.56     91.4

Thank you - however it is not quite what I ment - I don's want the probabilities for every person but for a case-type that I define with predict, as I wrote above with the 50year old man... Any other suggestions?

you need to calculate the probability of a 50year old man being in each fac.num given each language he could speak. you could estimate the likelihood of his fac.num membership with bayesian probability if you have assumptions about the likelihood that he would speak a given language.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.