[R] Multinomial Logistical Model

Frank Harrell f.harrell at vanderbilt.edu
Wed May 25 17:13:08 CEST 2011


I suggest a couple of courses before proceeding.  Multinomial logistic models
have special challenges.  And note that you have two nomenclature errors in
your note, which is usually a sign of not having taken the relevant
coursework.
Frank

Belle wrote:
> 
> Does anyone know how to run Multinomial logistical Model in R in order to
> get predicted probability?
> 
> The response is content (5 levels: 1, 2, 3, 4, 5)
> The covariance are:
> assignment - int (0, 1)
> dr0 - int (0, 1)
> dr1 - int (0, 1)
> yr_exp - num
> yr_exp_s - num
> ismgdr - int (0, 1)
> ismgyr_t_A - int (0, 1)
> pair - int (41 pairs: 1001, 1002, ...)
> 
> There is no random effect involved, all the variables are fixed. 
> 
> I have tried mlogit, but it does not work.
> 
> x <- SciContent
> x$content <- as.factor(x$content)
> mldata <- mlogit.data(x, varying=NULL, choice="content", shape="wide")
> SciCt <- mlogit(mldata$content | mldata$assignment + mldata$dr0 +
> mldata$dr1 + mldata$yr_tch_exp + mldata$yr_tch_exp_s + mldata$ismgdr +
> mldata$ismgyr_t_A + mldata$pair)
> 
> Error: inherits(object, "formula") is not TRUE
> 


-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context: http://r.789695.n4.nabble.com/Multinomial-Logistical-Model-tp3548239p3550003.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list