I´m trying to model a multilevel multinomial logistic regression. I have 42 subjects with 82 observations per person. In each observation the suvjects("VP") were able to react in three different ways
mldata <- mlogit.data(data1, choice = "reaction.response", shape ="wide",
alt.levels = c("reaction1","reaction2", "reaction3"), id.var
="VP")
In oder to implement random predictors I tried this:
mod1<- mlogit(reaction.response ~ 1|TTC_ego_changer +TTC_changer_truck +
HW_changer_truck +HW_ego_changer,
data = mldatalong, panel = TRUE,
rpar = c("reaction2:TTC_ego_changer" = "n",
"reaction3:TTC_ego_changer" = "n" ),
R = 500, halton = NA)
But how can I make the subjects ("VP") to level-2 units? The random slopes should varry over these 42 subjects.
Sorry for bad english and newbie behaviour :(