R language Access Menu

Title Text Both  

Multiple regression for multiple categorical outcome (multinomial regression)

When the outcome variable has multiple unrelated categories, multinomial regression can be performed to identify significant predictors. This can be done using following ways: 

Using vglm() from package VGAM

Code:
> library(VGAM)
> fit <- vglm(Ycateg ~ X1 + X2, family=multinomial(refLevel=1), data=dfMN)
> summary(fit)

Using multinom() from package nnet

Code:
> library(nnet)
> fit = multinom(vch1~vnum1+vnum2+vint1, data=rndf)
> summary(fit)

Using mlogit() from package mlogit (ch syntax)

Code:
> library(mlogit)
> dfMNL <- mlogit.data(dfMN, choice="Ycateg", shape="wide", varying=NULL)
> (mlogitFit <- mlogit(Ycateg ~ 0 | X1 + X2, reflevel="--", data=dfMNL))


References:
Thomas W. Yee (2010). The VGAM Package for Categorical Data Analysis. Journal of Statistical Software, 32(10), 1-34. URL http://www.jstatsoft.org/v32/i10/.

nnet package: Venables, W. N. & Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth Edition. Springer, New York. ISBN 0-387-95457-0 
https://cran.r-project.org/web/packages/nnet/citation.html

mlogit package: Author - Yves Croissant, Title - multinomial logit model. Description - Estimation of the multinomial logit mode
https://cran.r-project.org/package=mlogit
 


    Comments & Feedback