jhelvy / logitr

Fast estimation of multinomial (MNL) and mixed logit (MXL) models in R with "Preference" space or "Willingness-to-pay" (WTP) space utility parameterizations in R
https://jhelvy.github.io/logitr/
Other
42 stars 15 forks source link

Predict #24

Closed jhelvy closed 3 years ago

jhelvy commented 3 years ago

This PR depreciates the predictProbs() and predictChoices() functions and replaces them with new predict.logitr() method for making probability and outcome predictions from logitr class objects. I also added new fitted.logitr() and residuals.logitr() methods as well as an option predict argument to the main logitr() function which controls whether predicted probabilities, fitted.values, and residuals are included in the returned object. The default setting is TRUE. I changed the name of the coefficients vector in the returned object from "coef" to "coefficients" to be consistent with other packages. I also changed the argument name from "choice" to "outcome" to be more general.