-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inconsistent alts values in long format #21
Comments
UPDATE: My original comment had a mistake, as I mentioned the Hello @novak , Yes, in order to optimize matrix products,
Then use it in xlogit as follows model.fit(..., avail=df['avail'], ...) |
Thank you for taking the time to provide a detailed response. I really appreciate it. My |
Dear @novak. I am so sorry, I just realized that my original comment had a mistake. I updated the comment to properly convey the right way to account for availability of alternatives using the model.fit(X=df[["var1", "var2", "var3", "var4"]],
y=df["result"],
ids=df["id"],
alts=df["alt_id"],
avail=df['avail']) Note that the |
I am coming over from R and the mlogit package and I have the data formatted in the same way. It seems like xlogit is expecting that when in long format there's the same number of alt rows for each id group. Is this expected behavior for xlogit? Am I attempting to do something that just isn't possible?
The text was updated successfully, but these errors were encountered: