# 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)),
fam = lms.bcn(zero = 1), data = bmi.nz, trace = TRUE)
head(predict(fit, type = "r")) # The following three are equal
head(fitted(fit))
predict(fit, type = "r", newdata = head(bmi.nz))
Run the code above in your browser using DataLab