Hi! Does anyone know how to fix this error "Errore in is.recursive(.$object) && !is.primitive(.$object) && n > 0 : 'length = 2' in coercion in 'logical(1)'"?
It seems that R is able to calculate the parameters but somehow it cannot show them.
data.choicemodelling <- mlogit.data(sdb_clean,
choice = "choice1",
shape ="long",
id.var = "id",
chid.var = "pid2",
alt.var = "alt")
###MIXED MNL###
#pooled
mixl_pooled <- gmnl(choice1 ~ price + sol + lib + none | 0,
data = data.choicemodelling,
model = "mixl",
ranp = c(sol = "n", lib = "n"), ##assumo distribuzione normale dei coefficienti
R = 50, #per preliminary analyese ok 50
haltons = NA,
panel = TRUE, # 4 task per individuo
id.var = "id", # variabile identificativa
)
summary (mixl_pooled)
Error in is.recursive(.$object) && !is.primitive(.$object) && n > 0 :
'length = 2' nella coerciion in 'logical(1)'