library(logitr)
# Estimate a preference space model
mnl_pref <- logitr(
data = yogurt,
outcome = "choice",
obsID = "obsID",
pars = c("price", "feat", "brand")
)
# Compute the WTP implied from the preference space model
wtp(mnl_pref, scalePar = "price")
Run the code above in your browser using DataLab