I am doing a multi-minimal logistic regression model for a dataset iris,
library(VGAM)
mlog1 <- vglm(Species ~ ., data=iris, family=multinomial())
coef(mlog1)
and coefficients:
(Intercept):1 (Intercept):2 Sepal.Length:1 Sepal.Length:2 Sepal.Width:1
34.243397 42.637804 10.746723 2.465220 12.815353
Sepal.Width:2 Petal.Length:1 Petal.Length:2 Petal.Width:1 Petal.Width:2
6.680887 -25.042636 -9.429385 -36.060294 -18.286137
Then I use the function multinom()and do the same:
library(nnet)
mlog2 <- multinom(Species ~ ., data=iris)
Odds:
Coefficients:
(Intercept) Sepal.Length Sepal.Width Petal.Length Petal.Width
versicolor 18.69037 -5.458424 -8.707401 14.24477 -3.097684
virginica -23.83628 -7.923634 -15.370769 23.65978 15.135301
There seems to be a big gap between the two results? Where am I wrong? How can I fix them and get a similar result?
source
share