Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

wtpCompare

Compare WTP from preference and WTP space models


Description

Returns a comparison of the WTP between a preference space and WTP space model.

Usage

wtpCompare(model_pref, model_wtp, priceName)

Arguments

model_pref

The output of a "preference space" model estimated using the logitr() function.

model_wtp

The output of a "willingness to pay space" model estimated using the logitr() function.

priceName

The name of the parameter that identifies price.

Details

Willingness to pay (WTP) is first computed from the preference space model by dividing the estimated parameters by the price parameter. Then those estimates are compared against the WTP values directly estimated from the "WTP" space model. Uncertainty is handled via simulation.

Value

A data frame comparing the WTP estimates from preference space and WTP space models.

Examples

# Run a MNL model in the Preference Space:
library(logitr)

mnl_pref <- logitr(
  data = yogurt,
  choiceName = "choice",
  obsIDName = "obsID",
  parNames = c("price", "feat", "dannon", "hiland", "yoplait")
)

# Get the WTP implied from the preference space model
wtp_mnl_pref <- wtp(mnl_pref, priceName = "price")

# Run a MNL model in the WTP Space:
mnl_wtp <- logitr(
  data = yogurt,
  choiceName = "choice",
  obsIDName = "obsID",
  parNames = c("feat", "dannon", "hiland", "yoplait"),
  priceName = "price",
  modelSpace = "wtp",
  options = list(startVals = wtp_mnl_pref$Estimate)
)

# Compare the WTP between the two spaces:
wtpCompare(mnl_pref, mnl_wtp, priceName = "price")

logitr

Logit Models w/Preference & WTP Space Utility Parameterizations

v0.1.0
MIT + file LICENSE
Authors
John Helveston [aut, cre, cph] (<https://orcid.org/0000-0002-2657-9191>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.