require(VGAM) #Implementation of multinomial regression require(ggplot2) SAheart <- read.table("http://www-stat.stanford.edu/~tibs/ElemStatLearn/datasets/SAheart.data",sep=",",head=T,row.names=1) SAheart[1,] SAheartGlm <- glm(chd~.,data=SAheart,family=binomial) summary(SAheartGlm) ###The following fit a multinomial model to the vowel data ###Some warnings are given due to the fact that some probabilities ###become close to zero. vowels <- read.table("http://www-stat-class.stanford.edu/%7Etibs/ElemStatLearn/datasets/vowel.train",row.names=1,head=TRUE,sep=",") vowelsVglm <- vglm(y~.,data=vowels,family=multinomial) summary(vowelsVglm)