| residuals.logitr | R Documentation | 
Returns model residuals from an object of class logitr.
## S3 method for class 'logitr'
residuals(object, fitted = NULL, ...)
object | 
 is an object of class   | 
fitted | 
 Fitted values for an object of class   | 
... | 
 further arguments.  | 
A data frame of the obsID and the residuals (response minus 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 residuals from the model
residuals(mnl_pref)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.