I am conducting a multinomial regression using r package mlogit. All my independent variables are patient-specific (age, sex, etc), and not choice-specific. So my model looks like this:
mlogit(outcome ~ 0 | age+Gender+comorbidities)
I have some patients who had multiple observations, so I formatted the data with 3 indices:
dfidx(data, shape = 'wide', choice = outcome,
idx=list(c("choiceid", "Participant_ID")))
However, I see that the results are identical regardless of whether the data is formatted with 3 indices or 2 indices (2 indices being choice and choiceid, but no participant ID). How can I modify the model formula to include participant_ID?
I considered using the rpar specification but I think it is only for choice-varying variables, so I cannot use it to specify participant_ID