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