# Categorical regression example 1
pneumo <- transform(pneumo, let = log(exposure.time))
(fit <- vglm(cbind(normal, mild, severe) ~ let, propodds, pneumo))
fitted(fit)
# LMS quantile regression example 2
fit <- vgam(BMI ~ s(age, df = c(4, 2)),
lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
head(predict(fit, type = "response")) # Equal to the the following two:
head(fitted(fit))
predict(fit, type = "response", newdata = head(bmi.nz))
Run the code above in your browser using DataLab