Thank you for your reply! I have tried doing it like this but it still gives me an error somehow. The error it gives is:
Error: unexpected symbol in:
"cyclemodel <- mlogit(choice ~ Crowding + Congestion + Number_of_Stops + Distance |
Gender + Age + Daily_Distance"
The ultimate goal is to do coefficient estimation once the model is set with the summary function. I have inserted my Rcode below for some clarification
#load data via window to the right
cycleroute <- read_excel("Cycling Route Survey Data - R versie.xlsx")
#mlogit data
cyclemlogit <- mlogit.data(cycleroute, choice = "Choice", shape = "long", alt.var = "Alternative")
#model
cyclemodel <- mlogit(choice ~ Crowding + Congestion + Number_of_Stops + Distance |
Gender + Age + Daily_Distance, data = cyclemlogit)