search for: pneumo2

Displaying 1 result from an estimated 1 matches for "pneumo2".

2007 Jan 06
2
Using VGAM's vglm function for ordinal logistic regression
...concerns the format in which the response variable must be provided for this function to work correctly. Consider the following example: ------ library(VGAM) library(MASS) attach(pneumo) pneumo # Inspect the format of the original dataset # Restructure the pneumo dataset into a different format pneumo2 <- data.frame(matrix(ncol=3, nrow=24)) colnames(pneumo2) <- c('exposure.time', 'severity', 'freq') pneumo2[,1] <- rep(pneumo[,1],3) pneumo2[,2] <- as.ordered(c(rep('normal',8),rep('mild',8),rep('severe',8))) pneumo2[1:8,3] <- pneumo[...