Closed shannonpileggi closed 3 years ago
Hmm, good points. The row order is preserved, so yes the predicted probabilities align with the original alts
data frame. But you're right that a user could very easily mix this up. I think all I need is to add an altIDName
argument that identifies the alternative, similar to how the obsIDName
identifies the choice observation. I'll make this update.
In the specific yogurt
example, there's actually an alt
variable that IDs the alternative, though you could just as well use brand
.
Okay, I bumped the version to 0.2.1. If you install from Github you should now be able to include a altIDName
argument to both prediction functions.
Wow, thanks for addressing this so quickly!
Hi John! Thanks for this awesome package! I was reviewing Predicting Choice Probabilities from Estimated Models and I noticed that the predicted probabilities don't carry forward the brand assignment:
is it safe to assume that those are in the same order of the input new data here?
And can the
predictProbs
function be modified to include brand as a column in the predicted probabilities data frame? This could help protect users against misspecification.Thank you again for all of your work on this!