pneumo <- transform(pneumo, let = log(exposure.time))
fit <- vglm(cbind(normal, mild, severe) ~ let,
multinomial, trace = TRUE, data = pneumo) # For illustration only!
fitted(fit)
predict(fit)
mlogit(fitted(fit))
mlogit(fitted(fit)) - predict(fit) # Should be all 0s
mlogit(predict(fit), inverse = TRUE) # rowSums() add to unity
mlogit(predict(fit), inverse = TRUE, refLevel = 1) # For illustration only
mlogit(predict(fit), inverse = TRUE) - fitted(fit) # Should be all 0s
mlogit(fitted(fit), deriv = 1)
mlogit(fitted(fit), deriv = 2)
Run the code above in your browser using DataLab