wtp.logitr: Get WTP estimates a preference space model

View source: R/wtp.R

wtp.logitrR Documentation

Get WTP estimates a preference space model

Description

Returns the computed WTP from a preference space model.

Usage

## S3 method for class 'logitr'
wtp(object, scalePar)

Arguments

object

is an object of class logitr (a model estimated using the 'logitr()' function).

scalePar

The name of the column that identifies the scale variable, which is typically "price" for WTP space models, but could be any continuous variable, such as "time".

Details

Willingness to pay is computed by dividing the estimated parameters of a utility model in the "preference" space by the scale parameter, which is should be price to obtain WTP estimates. Uncertainty is handled via simulation.

Value

A data frame of the WTP estimates.

Examples

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")

logitr documentation built on Sept. 29, 2023, 5:06 p.m.