[R] Error computing mlogit model
Nyarko Eric
ny@rkoer|c5 @end|ng |rom gm@||@com
Tue Aug 25 08:15:33 CEST 2020
Hi
Please, I get this error message “Error in data[theorder, ] : incorrect
number of dimensions” when I run the mlogit model presented below.
Best regards,
Eric
library(mlogit)
library(idefix)
idefix.data *<- *aggregate_design
idefix.data
des *<- *as.matrix(idefix.data[, 3*:*8], ncol = 6)
des
y *<- *idefix.data[, 9]
y
mlogit.data *<- *Datatrans(pkg = "mlogit", des = des, y = y,
n.alts = 2, n.sets = 8, n.resp = 7, bin = TRUE)
gh3aP <- mlogit(y ~ -1 + par.1 +par.2 +par.3 +par.4+ par.5 +par.6, data =
des)
[[alternative HTML version deleted]]
More information about the R-help
mailing list