Skip to content

Allow predict method to return utility values#3

Open
gregmacfarlane wants to merge 1 commit intoycroissant:masterfrom
gregmacfarlane:master
Open

Allow predict method to return utility values#3
gregmacfarlane wants to merge 1 commit intoycroissant:masterfrom
gregmacfarlane:master

Conversation

@gregmacfarlane
Copy link
Copy Markdown

As far as I could tell, the existing predict.mlogit method only returned the predicted probabilities. The fitted.mlogit method could return multiple types of response, but could not use the newdata argument. This commit:

  • Exposes the "type" argument from the fitted method as an argument to predict, with default set to "probabilities" (the current behavior)
  • Replaces the call to newobject$probabilities with a call to the more flexible fitted method.

As far as I could tell, the existing `predict.mlogit` method only returned the predicted probabilities. The `fitted.mlogit` method could return multiple types of response, but could not use the `newdata` argument. This commit:

  - Exposes the "type" argument from the fitted method as an argument to predict, with default set to "probabilities" (the current behavior)
  - Replaces the call to `newobject$probabilities` with a call to the more flexible `fitted` method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant