[R] Partial proportional odds logistic regression
Inman, Brant A. M.D.
Inman.Brant at mayo.edu
Tue Jan 9 04:10:03 CET 2007
Just a follow-up note on my last posting. I still have not had any
replies from the R-experts our there that use partial proportional odds
regression (and I have to hope that there are some of you!) but I do
think that I have figured out how to perform the unconstrained partial
proportional odds model using vglm. I show this code below for the
benefit of others that may want to try it (or point out my errors) using
one of the datasets in Petersen and Harrell's paper (Appl Stat 1990).
However, I remain open for suggestions on how to implement the
unconstrained partial proportional odds model.
--------------
library(VGAM)
library(MASS)
library(Design)
#######################################################################
# Nausea dataset
# Peterson and Harrell. Applied Statistics 1990, 39(2): 205-217
nausea.short <- data.frame(matrix(nrow=12, ncol=3)) #Table 2
colnames(nausea.short) <- c('nausea', 'cisplatin', 'freq')
nausea.short[,1] <- ordered(rep(seq(0,5,1),2),
labels=seq(0,5,1))
nausea.short[,2] <- c(rep(0,6), rep(1,6))
nausea.short[,3] <- c(43,39,13,22,15,29,7,7,3,12,15,14)
# Proportional odds ordinal logistic regression: 3 options
polr(nausea ~ cisplatin, weights=freq, data=nausea.short,
method='logistic')
lrm(nausea ~ cisplatin, weights=freq, data=nausea.short)
vglm(nausea ~ cisplatin, weights=freq, data=nausea.short,
family=cumulative(parallel=T, reverse=T))
# Unconstrained partial proportional odds ordinal logistic regression
vglm(nausea ~ cisplatin, weights=freq, data=nausea.short,
family=cumulative(parallel=F, reverse=T))
--------------
The results obtained with this approach appear consistent with those
presented in Table 3 of the paper. However, the code for the
unconstrained partial proportional odds model is so simple (just one
letter is different than in the proportional odds model!) that I wonder
if there is not room for error here that I am too inexperienced to
identify.
Again, help with the constrained model would be greatly appreciated.
Brant Inman
More information about the R-help
mailing list