fitted.logitr | R Documentation |
Returns fitted values from an object of class logitr
.
## S3 method for class 'logitr'
fitted(object, probs = NULL, ...)
object |
is an object of class |
probs |
Predicted probabilities for an object of class |
... |
further arguments. |
A data frame of the obsID
and the fitted values extracted from
object
.
library(logitr)
# Estimate a preference space model
mnl_pref <- logitr(
data = yogurt,
outcome = "choice",
obsID = "obsID",
pars = c("price", "feat", "brand")
)
# Extract the fitted values from the model
fitted(mnl_pref)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.