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