WTP_CV: Willingness to Pay for Contingent Valuation

Description Usage Arguments Details Value Author(s) References Examples

View source: R/WTP_CV.R

Description

The function WTP_CV() calculates the coefficients from SBCV or DBCV models.

Usage

1
2
3
4
5
6
7
8
WTP_CV (object, 
        disp.pref =  c("mean", "median"), 
        disp.subj = c("individual", "mean"),
        newdata = NULL,
        CI      = "KrinskyRobb", 
         probs   = c(0.05, 0.95), 
        reps    = 10000
        )

Arguments

object

An object created by the estimation of SBCV or DBCV

disp.pref

Either mean or median.

disp.subj

Either individual or mean.

newdata

Either NULL or a data.frame

CI

Either "KrinskyRobb" or "none".

probs

A numeric vector of of probabilities with values in [0,1]

reps

Number of draws for KrinskyRobb CI

...

currently not used

Details

The calculation of the willingness to pay is for probit SBCV and DBCV.

Dispersion of the preferences, disp.pref, is either mean or median depending on which measure of central tendency of the preferences should be used. In case of functionalForm is linear the resulting willingness to pay is the same for mean and median.

disp.subj is either individual or mean. If individual and newdata is NULL, then the willingness to pay is calculated for each person in the data used to estimate the object. If individual and in newdata has a data.frame, then the willingness to pay is calculated for these data. If mean the mean of the data provided in newdata (or, if NULL, all the the data used to estimate the object) is calculated and the willingness to pay is calculated for the mean subject.

If newdata is NULL, all subjects used for the estimation of the object are used, if a data.frame is given, these data are used. The data.frame must consist of all the variables used to estimate the object. They must be of the same type (factor, numeric, ...) and have the same names as the data used to estimate the object. Only the bid variable(s) and the intercept are not needed. If functionalForm is loglinearRUM, then the last variable of data.frame must be the income.

Value

A matrix with calculated willingness to pay and the confidence interval.

Author(s)

Ulrich B. Morawetz

References

Haab, T.C. and McConnell, K.E. (2003), Valuing Environmental and Natural Resources. The Econometrics of non-market Valuation. Cheltenham, UK: Edward Elgar

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# example linear
data("maizeWTP")

maizeDBCV<- 
  DBCV(yuYes1 + yuYes2~yuBid1 + yuBid2|age+gender+experimenter, 
       data=maizeWTP, functionalForm="linear")
maizeDBCV


## willigness to pay for all individually
WTP_maizeDBCV.all.individual  <- WTP_CV(object=maizeDBCV, 
                                        disp.pref   = "mean",
                                        disp.subj = "individual")

# willigness to pay for mean individual (this means that also 
# the mean of dummy variables is used
# which might not always make sense)
WTP_maizeDBCV.all.mean  <- WTP_CV(object=maizeDBCV, 
                                  disp.pref   = "mean",
                                  disp.subj = "mean")                   

## willigness to pay for three individuals

mySubjects<-data.frame("age"=c(47,21,29),
                       "gender"=factor(c("male","female","female"),
                        levels=levels(maizeWTP$gender)), 
                       "experimenter"=factor(c(
                        "experimenter3", "experimenter1", "experimenter6"),
                        levels=levels(maizeWTP$experimenter))
                         )


# indivdual willigness to pay 
WTP_maizeDBCV.mySubjects.individual    <- WTP_CV(object=maizeDBCV, 
                                                 disp.pref   = "mean",
                                                 disp.subj = "individual",  
                                                 newdata=mySubjects
                                            )
# willingeness to pay of the mean of the three mySubjects
WTP_maizeDBCV.mySubjects.mean    <- WTP_CV(object=maizeDBCV, 
                                           disp.pref   = "mean",
                                           disp.subj = "mean",  
                                           newdata=mySubjects
                                    )

# plot something similar to a demand curve with confidence interval

plot(sort(WTP_maizeDBCV.all.individual[,1], decreasing=TRUE), type="l", 
     lwd=2, ylab="willingness to pay", xlab="Consumers", ylim=c(0,140))
lines(sort(WTP_maizeDBCV.all.individual[,2], decreasing=TRUE), type="l", 
      lwd=2, col="grey")
lines(sort(WTP_maizeDBCV.all.individual[,3], decreasing=TRUE), type="l", 
      lwd=2, col="grey")

# though, I am not sure you can use the Krinsky-Robb procdure to calculate
# individual confidence intervals. Most likely the confidence interval
# is bigger.

umor/ContingentValuation documentation built on Nov. 5, 2019, 2:16 p.m.