any other idea for this? look my case:
library("mlogit")
library(readxl)
DataSet <- read_excel("C:/Users/HP ProBook/OneDrive/OneDrive - Universidad de Costa Rica/Documentos/ECONOMÍA UCR/ECONOMÍA UNIVERSIDAD DE COSTA RICA/Seminario 2/DataSet/DataSet.xlsx")
library("dfidx")
Data <- dfidx(DataSet, idx = list(c("chid", "id")),
choice = "choice", varying = 5:10, sep = "", shape = "wide")
then I run the mixed logit:
Data.mxl <- mlogit(choice ~ is + mt | 0, Data,
rpar=c(is = 'n', mt = 'n'),
R = 100, halton = NA, panel = TRUE, seed = 1 )
I get the following error:
Error in if (abs(x - oldx) < ftol) { :
missing value where TRUE/FALSE needed