mwtp: Calculating the marginal willingness to pay

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/mwtp.R


This function calculates the marginal willingness to pay for the attributes and/or levels of the estimated model.


mwtp(output, monetary.variables, nonmonetary.variables = NULL,
     nreplications = 10000,
     percentile.points = NULL,
     confidence.level = 0.95,
     method = "kr", 
     seed = NULL)

## S3 method for class 'mwtp'
print(x, digits = max(3, getOption("digits") - 3),
      scientific = FALSE, ...)



An object containing the output from the function clogit in the package survival or from the function glm in the package stats.


A vector containing the names of the monetary variables in the output used to calculate the MWTPs.


A vector containing the names of the non-monetary variables in the output used to calculate the MWTPs. Its default is NULL.


An integer value denoting the number of replications in the simulation method. The default value is set as 10000.


It is only kept for giving an error message regarding unused argument. It will be removed. The argument confidence.level is used instead.


A value showing the confidence level (coefficient) of an empirical distribution of each MWTP. Its default vector is set as 0.95, which indicates the lower and upper bounds of the 95 percent confidence interval.


A character variable describing the method used for calculating confidence intervals of MWTPs. It is set as "kr" if the Krinsky and Robb's method is used; it is set as "delta" if the delta method is used.


Seed for a random number generator.


An object of S3 class "mwtp."


A number of significant digits. See the function format.


Whether MWTPs and their confidence intervals are encoded in scientific format. See the function format.


Arguments passed to the function format.


The definition of the marginal willingness to pay (MWTP) for a non-monetary variable provided by this function is -b_{nm}/b_{m}; where, b_{nm} is the estimated coefficient of the non-monetary variable, and b_{m} is the estimated coefficient of a monetary variable. Further, confidence intervals for the MWTPs are calculated according to the simulation method proposed by Krinsky and Robb (1987) or the delta method (see, e.g., Hole 2007).

In the Krinsky and Robb's method, N replications of a vector of the coefficients in the model are randomly sampled from a multivariate normal distribution with a vector of means and a variance-covariance matrix of the estimated coefficients. An empirical distribution for each of the MWTPs can be generated from N sets of the replicated coefficients, and a confidence interval for each of the MWTPs is identified on the basis of each empirical distribution.

In the delta method, a variance of MWTP of the non-monetary variable is calculated using estimated coefficients and variance-covariance matrix regarding the non-monetary and monetary variables, and then a confidence interval for the MWTP is calculated.

When the argument nonmonetary.variables is not set by the user, variables in the argument output—except for those assigned by the argument monetary.variables—are treated as non-monetary variables, and the MWTPs for these variables are calculated. In the model that assumes alternative-specific attribute variables (that is, a labeled type choice experiment design), variables in the argument output are classified into monetary and non-monetary variables according to the alternatives. Therefore, the argument monetary.variables is set as a vector, whereas the argument nonmonetary.variables is set as a list of vectors.

In version 0.3-0 and later versions, this function is also available for binary choice models estimated using the function glm.


This function returns an object of S3 class "mwtp" that is a list with the following components.


A matrix containing the MWTPs for the non-monetary attribute variables and confidence intervals for each of the MWTPs.


A character variable containing the method used for calculating confidence intervals of MWTPs.


A matrix containing empirical distributions of the MWTPs. It is included when the Krinsky and Robb's method is used.


A matrix containing N sets of replicated coefficients. It is included when the Krinsky and Robb's method is used.

The object mwtps can be used for a function mded in the package mded that calculates differences between two independent/dependent empirical distributions of the MWTPs.


Hideo Aizaki


Louviere, J. J., Hensher, D. A. and Swait, J. D. (2000) Stated Choice Methods: Analysis and Application. Cambridge University Press.

Krinsky, I. and Robb. A. L. (1986) On Approximating the Statistical Properties of Elasticities. The Review of Economics and Statistics, 68, 715–719.

Hole, A. R. (2007) A Comparison of Approaches to Estimating COnfidence Intervals for Willingness to Pay Measures. Health Economics, 16, 827–840.

Aizaki, H. (2012) Basic Functions for Supporting an Implementation of Choice Experiments in R. Journal of Statistical Software, Code Snippets, 50(2), 1–24.

See Also

make.dataset, clogit, glm, mded


# See "Examples" for the function make.dataset.

Example output

Loading required package: DoE.base
Loading required package: grid
Loading required package:

Attaching package: 'DoE.base'

The following objects are masked from 'package:stats':

    aov, lm

The following object is masked from 'package:graphics':

The following object is masked from 'package:base':


Loading required package: MASS
Loading required package: simex
Loading required package: RCurl
Loading required package: bitops
Loading required package: XML

support.CEs documentation built on May 29, 2017, 5:56 p.m.