% \VignetteIndexEntry{Arthritis - Cumulative Logit Model} % \VignetteDepends{VGAM} %\VignetteEngine{knitr::knitr} %\VignetteEncoding{UTF-8} \documentclass[a4paper]{article} \title{Arthritis - Cumulative Logit Model} \begin{document} \maketitle <>= options(width=80) @ A simple data frame for the arthritis data is created with the numbers given for the individual cells. <>= arthritis <- data.frame(drug=c(rep("new agent", 24+37+21+19+6), rep("active control", 11+51+22+21+7)), assessment=c(rep(1,24), rep(2,37), rep(3,21), rep(4,19), rep(5,6), rep(1,11), rep(2,51), rep(3,22), rep(4,21), rep(5,7))) @ <>= library(VGAM) @ Now a cumulative model is fitted. <>= cumart <- vglm(assessment ~ drug, family=cumulative(parallel=TRUE, link="logit"), data=arthritis) @ <>= summary(cumart) @ <>= detach(package:VGAM) @ \end{document}