Learn R Programming

DCchoice (version 0.0.14)

sbchoice: Parametric approach to analyze single-bounded dichotomous choice contingent valuation data

Description

This function analyzes single-bounded dichotomous choice contingent valuation (CV) data on the basis of the utility difference approach.

Usage

sbchoice(formula, data, subset, dist = "log-logistic", ...)

## S3 method for class 'sbchoice': print(x, digits = max(3, getOption("digits") - 1), ...)

## S3 method for class 'sbchoice': vcov(object, \dots)

## S3 method for class 'sbchoice': logLik(object, \dots)

Arguments

formula
an S3 class object "formula" and specifies the model structure.
data
a data frame containing the variables in the model formula.
subset
an optional vector specifying a subset of observations.
dist
a character string setting the error distribution in the model, which takes one of "logistic", "normal", "log-logistic", "log-normal" or "weibull".
x
an object of class "sbchoice".
digits
a number of digits to display.
object
an object of class "dbchoice".
...
optional arguments. Currently not in use.

Value

  • This function returns an object of S3 class "sbchoice" that is a list with the following components.
  • coefficientsa named vector of estimated coefficients.
  • callthe matched call.
  • formulathe formula supplied.
  • glm.outa list of components returned from glm() with the data set and the formula. In case of the Weibull distribution, a list of components from the optim() is saved.
  • glm.nulla list of components returned from glm() with the data set and a formula containing only constant (null model). In case of the Weibull distribution, a list of components from the optim() is saved.
  • distributiona character string showing the error distribution used.
  • nobsa number of observations.
  • covariatesa named matrix of the covariates used in the model.
  • bida named matrix of the bids used in the model.
  • yna named matrix of the responses to the CV question used in the model.
  • data.namethe data matrix.
  • termsterms
  • contrastcontrasts used for factors
  • xlevelslevels used for factors

Details

The function sbchoice() implements an analysis of single-bounded dichotomous choice contingent valuation (CV) data on the basis of the utility difference approach (Hanemann, 1984).

The extractor function summary() is available for a "sbchoice" class object. See summary.sbchoice for details.

There are two functions available for computing the confidence intervals for the estimates of WTPs. krCI implements simulations to construct empirical distributions of the WTP while bootCI carries out nonparametric bootstrapping.

Most of the details of sbchoice() is the same as those of dbchoice(), a double-bounded analogue of sbchoice. See the section Details in dbchoice. Differences between the two functions are as follows:

  • In the model formula, the first part contains only one response variable (e.g.,R1) and the third part contains only one bid variable (e.g.,BD1) because respondents are requested to answer a CV question in the single-bounded dichotomous choice CV. The following is a typical structure of the formula: R1 ~ (the names of the covariates) | BD1
  • The functionsbchoice()analyzes the responses to single-bounded dichotomous choice CV questions internally using the functionglm()with the argument family = binomial(link = "logit") or family = binomial(link = "probit"). Whendist = "weibull", optimization is carried out using theoptim()function with a hard-coded log-likelihood function.
  • Outputs fromsbchoice()are slightly different from those fromdbchoice()because the analysis insbchoice()internally depends on the functionglm()for the (log-) normal or (log-) logistic distributions. (see theValuesection).

Nonparametric analysis of single-bounded dichotomous choice data can be done by turnbull.sb or by kristrom.

References

Bateman IJ, Carson RT, Day B, Hanemann M, Hanley N, Hett T, Jones-Lee M, Loomes G, Mourato S, "{O}zdemiro={g}lu E, Pearce DW, Sugden R, Swanson J (eds.) (2002). Economic Valuation with Stated Preference Techniques: A Manual. Edward Elger, Cheltenham, UK.

Boyle KJ, Welsh MP, Bishop RC (1988). Validation of Empirical Measures of Welfare Change: Comment. Land Economics, 64(1), 94--98.

Carson RT, Hanemann WM (2005). Contingent Valuation. in KG M"{a}ler, JR Vincent (eds.), Handbook of Environmental Economics. Elsevier, New York.

Croissant Y (2011). Ecdat: Data Sets for Econometrics, Rpackage version 0.1-6.1, http://CRAN.R-project.org/package=Ecdat.

Hanemann, WM (1984). Welfare Evaluations in Contingent Valuation Experiments with Discrete Responses, American Journal of Agricultural Economics, 66(2), 332--341.

Hanemann M, Kanninen B (1999). The Statistical Analysis of Discrete-Response {CV} Data., in IJ Bateman, KG Willis (eds.), Valuing Environmental Preferences: Theory and Practice of the Contingent Valuation Methods in the {US}, {EU}, and Developing Countries, 302--441. Oxford University Press, New York.

See Also

summary.sbchoice, krCI, bootCI, NaturalPark, turnbull.sb, kristrom glm, formula dbchoice

Examples

Run this code
## Examples for sbchoice() are also based on a data set NaturalPark 
## in the package Ecdat (Croissant 2011): so see the section Examples 
## in the dbchoice() for details.
data(NaturalPark, package = "Ecdat")

## The variable answers are converted into a format that is suitable for 
## the function sbchoice() as follows:
NaturalPark$R1 <- ifelse(substr(NaturalPark$answers, 1, 1) == "y", 1, 0)
NaturalPark$R2 <- ifelse(substr(NaturalPark$answers, 2, 2) == "y", 1, 0)


## We assume that the error distribution in the model is a log-logistic; 
## therefore, the bid variables bid1 is converted into LBD1 as follows:
NaturalPark$LBD1 <- log(NaturalPark$bid1)

## The utility difference function is assumed to contain covariates 
## (sex, age, and income) as well as the bid variable (LBD1) as follows 
## (R2 is not used because of single-bounded dichotomous choice CV format):
fmsb <- R1 ~ sex + age + income | LBD1

## The formula may be alternatively defined as
fmsb <- R1 ~ sex + age + income | log(bid1)

## The function sbchoice() with the function fmsb and the data frame NP 
## is executed as follows:
NPsb <- sbchoice(fmsb, data = NaturalPark)
NPsb
NPsbs <- summary(NPsb)
NPsbs

## Generic functions such as summary() and coefficients() work for glm.out
summary(NPsb$glm.out)
coefficients(NPsb$glm.out)

## The confidence intervals for these WTPs are calculated using the 
## function krCI() or bootCI() as follows:
krCI(NPsb)
bootCI(NPsb)
## The WTP of a female with age = 5 and income = 3 is calculated
## using function krCI() or bootCI() as follows:
krCI(NPsb, individual = data.frame(sex = "female", age = 5, income = 3))
bootCI(NPsb, individual = data.frame(sex = "female", age = 5, income = 3))

## The variable age and income are deleted from the fitted model, 
## and the updated model is fitted as follows:
update(NPsb, .~. - age - income |.)

## Respondents' utility and probability of choosing Yes under 
## the fitted model and original data are predicted as follows: 
head(predict(NPsb, type = "utility"))
head(predict(NPsb, type = "probability"))
## Utility and probability of choosing Yes for a female with age = 5 
## and income = 3 under bid = 10 are predicted as follows:
predict(NPsb, type = "utility",
    newdata = data.frame(sex = "female", age = 5, income = 3, LBD1 = log(10)))
predict(NPsb, type = "probability",
    newdata = data.frame(sex = "female", age = 5, income = 3, LBD1 = log(10)))

## Plot of probabilities of choosing yes is drawn as drawn as follows:
plot(NPsb)
## The range of bid can be limited (e.g., [log(10), log(20)]):
plot(NPsb, bid = c(log(10), log(20)))

Run the code above in your browser using DataLab