# 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 = bminz, trace = TRUE)
head(predict(fit, type = "r")) # The following three are equal
head(fitted(fit))
predict(fit, type = "r", newdata = head(bminz))
Run the code above in your browser using DataLab