Title: | R Commander Plug-in for Dichotomous Choice Contingent Valuation |
---|---|
Description: | Adds menu items to the R Commander for parametric analysis of dichotomous choice contingent valuation (DCCV) data. CV is a question-based survey method to elicit individuals' preferences for goods and services. This package depends on functions regarding parametric DCCV analysis in the package DCchoice. See Carson and Hanemann (2005) <doi:10.1016/S1574-0099(05)02017-6> for DCCV. |
Authors: | Hideo Aizaki |
Maintainer: | Hideo Aizaki <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1-5 |
Built: | 2025-02-28 08:21:46 UTC |
Source: | CRAN |
This package adds menu items to the R Commander for parametric analysis of dichotomous choice contingent valuation (DCCV) data. CV is a question-based survey method to elicit individuals' preferences for goods and services. This package depends on functions regarding parametric DCCV analysis in the package DCchoice. See Carson and Hanemann (2005) <doi:10.1016/S1574-0099(05)02017-6> for DCCV.
This package is an R Commander plug-in package for parametric analysis of dichotomous choice contingent valuation (DCCV) data. It depends on DCchoice (Nakatani et al. 2020) and Rcmdr (Fox 2005, 2017; Fox and Bouchet-Valat 2020). Refer to DCchoice-package, Aizaki et al. (2014, 2022), and ‘Non-Market Valuation with R’ <http://lab.agr.hokudai.ac.jp/nmvr/> for a brief introduction to DCCV in R. A manual for this package is available at <https://sites.google.com/view/r4sp/rcmdrplugin>
After successfully installing and loading RcmdrPlugin.DCCV,
the R Commander window will appear, and then you will find ‘DCCV
’
added to the top-level menus in the R Commander window.
Selecting ‘DCCV
’ displays some menu items. When selecting a menu
item, the corresponding dialog box opens. The following dialog boxes
are provided by RcmdrPlugin.DCCV:
The dialog box for ‘Fit Model...
’ implements a
parametric analysis of DCCV data using sbchoice
(single-bounded DCCV),
oohbchoice
(one-and-one-half-bounded DCCV), or
dbchoice
(double-bounded DCCV) in DCchoice.
The dialog box for ‘Calculate confidence intervals for
WTP...
’
calculates confidence intervals for willigness to pay (WTP) from the
fitted model using krCI
or
bootCI
in DCchoice.
The dialog box for ‘Draw survival function...
’
draws a survival function of the fitted model using
plot.sbchoice
or plot.dbchoice
in DCchoice.
This work was supported by JSPS KAKENHI Grant Number JP20K06251.
Hideo Aizaki
Aizaki H, Nakatani T, Sato K, Fogarty J (2022) R Package DCchoice for Dichotomous Choice Contingent Valuation: A Contribution to Open Scientific Software and its Impact. Japanese Journal of Statistics and Data Science, 5: 871–884. DOI: 10.1007/s42081-022-00171-1.
Aizaki H, Nakatani T, Sato K (2014) Stated Preference Methods Using R. Chapman and Hall/CRC. DOI: 10.1201/b17292.
Carson RT, Hanemann WM (2005) Contingent valuation. In KG Maler, JR Vincent (eds), Handbook of Environmental Economics, Volume 2, Chapter 17, pp. 821–936. Elsevier. DOI: 10.1016/S1574-0099(05)02017-6.
Fox J (2005) The R Commander: A Basic Statistics Graphical User Interface to R. Journal of Statistical Software, 14(9): 1–42. DOI: 10.18637/jss.v014.i09.
Fox J (2017) Using the R Commander: A Point-and-Click Interface for R. Chapman and Hall/CRC. DOI: 10.1201/9781315380537.
Fox J, Bouchet-Valat M (2020) Rcmdr: R Commander. R package version 2.7-1. https://socialsciences.mcmaster.ca/jfox/Misc/Rcmdr/.
Nakatani T, Aizaki H, Sato K (2020) DCchoice: Analyzing Dichotomous Choice Contingent Valuation Data. R package 0.0.17. https://cran.r-project.org/package=DCchoice.
if (interactive()) { library(RcmdrPlugin.DCCV) }
if (interactive()) { library(RcmdrPlugin.DCCV) }
Fit a model to DCCV data.
This dialog box implements a parametric analysis of DCCV data using
function
sbchoice
(single-bounded DCCV),
oohbchoice
(one-and-one-half-bounded DCCV), or
dbchoice
(double-bounded DCCV)
in package DCchoice.
This dialog box is activated if a data frame is selected as the active
data set.
For details on the results of this dialog box, refer to the help content
for functions
sbchoice
,
oohbchoice
, and
dbchoice
.
GUI elements of this dialog box are as follows.
Name for model
: An R object name into which the results
of a fitted model obtained through this dialog box are stored.
The default name ‘DCCVmodel.x
’, where x
indicates
the integer number assigned automatically from 1
, can be
changed following R's rules for naming objects.
Choice format
: A choice format type for DCCV to be analyzed.
Select one of the three radio buttons corresponding to
‘Single-bounded (SB)
’,
‘One-and-one-half-bounded (OOHB)
’, and
‘Double-bounded (DB)
’.
1st response variable
: A response variable for
the suggested price in the first stage of an SB-, OOHB-, or
DB-DCCV question. Select it from a drop-down list of variables.
2nd response variable
: A response variable for
the suggested price in the second stage of an OOHB- or DB-DCCV
question. Select it from a drop-down list of variables.
Covariates (optional)
: Variables to be used as
covariates in the model to be fitted. Select none or more
variables from a list box of variables.
1st bid variable
: A bid variable containing
the suggested price in the first stage of an SB-, OOHB-,
or DB-DCCV question. Select it from a drop-down list of variables.
2nd bid variable
: A bid variable containing
the suggested price in the second stage of an OOHB- or DB-DCCV
question. Select it from a drop-down list of variables.
Take the log of bid
: A check box for taking the
logarithm of the bid variables. When checked, take the logarithm
of the bid variable(s) selected by the ‘1st bid variable
’
and ‘2nd bid variable
’ drop-down lists.
Distribution
: An error distribution of the model.
Select one from radio buttons corresponding to ‘Logistic
’,
‘Normal
’, ‘Log-logistic
’,
‘Log-normal
’, and ‘Weibull
’.
Subset expression
: A logical expression for specifying
a subset of the observations in the active data set to be used for
the fitting. If necessary, type a valid logical expression into this box.
Initial parameters (optional)
: Initial parameters of
independent variables (covariates and bid variables selected above)
used in the optimization process of fitting a model. If necessary,
type comma-separated values (e.g., 0.3, 1.5, -0.9, ...) into this box.
Draw a survival function of the fitted model.
This dialog box draws a survival function of the fitted model using
function plot.sbchoice
or
plot.dbchoice
in DCchoice package.
This dialog box is activated if the fitted model
in the ‘Fit Model to DCCV Data
’ dialog box is selected
as the active model.
For details on the results of this dialog box, refer to the help content
for function plot.sbchoice
or
plot.dbchoice
.
GUI elements of this dialog box are as follows.
Title and labels (optional)
Title
: Main title of the plot.
No main title is displayed if missing (default).
x-axis
: A label of the x-axis of the plot.
A label ‘Bid
’ is displayed if missing (default).
y-axis
: A label of the y-axis of the plot.
A label ‘Probability of selecting yes
’ is displayed
if missing (default).
Ranges (optional)
x-axis
: The x limits of the plot. The lower limit and
the upper limit are specified in the ‘from
’ box and
the ‘to
’ box, respectively.
y-axis
: The y limits of the plot. The lower limit and
the upper limit are specified in the ‘from
’ box and
the ‘to
’ box, respectively.
Bid from
and to
: The ranges of bids to be drawn
on the plot. The lower bound and the upper bound are specified in
the ‘from
’ box and the ‘to
’ box,
respectively. The minimum and maximum bid values in the data set are
used as the default lower and upper bounds.
Calculate confidence intervals for a willingness to pay (WTP) from the fitted model.
This dialog box uses either function krCI
or bootCI
in package DCchoice to
calculate confidence intervals for a WTP from the fitted model.
This dialog box is activated if the fitted model in
the ‘Fit Model to DCCV Data
’ dialog box is selected
as the active model.
For details on the results of this dialog box, refer to the help
content for krCI
or
bootCI
.
GUI elementsof this dialog box are as follows.
Name for output
: An R object name into which the results
are stored. The default name is ‘WTP
’. Any name that is
valid for R is typed into this box, if necessary.
Calculation method
: A method used to calculate confidence
intervals for a WTP. Select one of the two radio buttons corresponding
to ‘Krinsky and Robb
’ and ‘Bootstrap
’.
For the details on these methods, see help for functions
krCI
and bootCI
.
Confidence level
: A confidence level used for calculating
the confidence intervals for a WTP. The default is 0.95
.
Number of replications
: Total number of replications.
The term ‘replication
’ corresponds to
‘resampling
’ for ‘Bootstrap
’ and
‘drawing
’ for ‘Krinsky and Robb
’.
The default is 200
, which may be small.
Seed for random number generator (optional)
: An integer
value used as a seed for generating random numbers. If reproducibility
is needed, type an arbitrary value into this box.