Title: | R Commander Plug-in for Case 3 Best-Worst Scaling |
---|---|
Description: | Adds menu items for case 3 (multi-profile) best-worst scaling (BWS3) to the R Commander. BWS3 is a question-based survey method that designs various combinations of attribute levels (profiles), asks respondents to select the best and worst profiles in each choice set, and then measures preferences for the attribute levels by analyzing the responses. For details on BWS3, refer to Louviere et al. (2015) <doi:10.1017/CBO9781107337855>. |
Authors: | Hideo Aizaki |
Maintainer: | Hideo Aizaki <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.2-3 |
Built: | 2024-09-19 06:44:28 UTC |
Source: | CRAN |
This package adds menu items for case 3 (multi-profile case) best–worst scaling (BWS3) to the R Commander. BWS3 is a question-based survey method that designs various combinations of attribute levels (profiles), asks respondents to select the best and worst profiles in each choice set, and then measurespreferences for the attribute levels by analyzing the responses. For details on BWS3, refer to Louviere et al. (2015).
This package is an R Commander plug-in package for case 3 best–worst scaling (BWS3). It depends on support.BWS3 (Aizaki 2019), support.CEs (Aizaki 2012, 2023), survival (Therneau 2023; Therneau and Grambsch 2000), and Rcmdr (Fox 2005, 2017; Fox and Bouchet-Valat 2023). Refer to Aizaki (2019) and ‘Non-Market Valuation with R’ <http://lab.agr.hokudai.ac.jp/nmvr/> for a brief introduction to BWS3 in R. A manual for this package is available at <https://sites.google.com/view/r4sp/rcmdrplugin>.
After successfully installing and loading RcmdrPlugin.BWS3,
the R Commander window will appear, and then you will find ‘BWS3
’
added to the top-level menus in the R Commander window.
Selecting ‘BWS3
’ displays menu items. When selecting a menu item,
the corresponding dialog box opens. The following dialog boxes are
provided by RcmdrPlugin.BWS3:
The dialog box for ‘Design choice sets...
’ designs
choice sets for BWS3 with the rotation design method or mix-and-match method
using the function rotation.design
in support.CEs.
The dialog box for ‘Display questions...
’
shows BWS3 questions that are converted from the choice sets designed in the first dialog box
using the function questionnaire
in support.CEs.
The dialog box for ‘Create data set for analysis...
’
creates a data set for BWS3 analysis from the choice sets designed in the first
dialog box and a data set containing responses to BWS3 questions using
the function bws3.dataset
in support.BWS3.
The current version assumes that a maximum difference model is used.
The menu item ‘Create data set for analysis...
’ is activated
if a data set is selected as the active data set.
The dialog box for ‘Create interactions...
’ creates
interactions between attribute/level variables and covariates in the data set for BWS3 analysis.
The menu item is activated if the data set for BWS3 analysis created in the previous daialog box
is selected as the active data set.
The dialog box for ‘Fit model...
’ implements a conditional
logit model analysis of the data set for analysis created in the previous
dialog box using the functions clogit
in survival and gofm
in support.CEs. The menu item ‘Fit model...
’ is activated
if the data set for BWS3 analysis created in the previous dialog box is selected as
the active data set.
The dialog box for ‘Calculate MWTP...
’
calculates marginal willingness to pays (MWTPs) of non-monetary variables
from the model fitted in the previous dialog box using the function
mwtp
in support.CEs. The menu item
‘Calculate MWTP...
’ is activated if the fitted model is
selected as the active model.
The dialog box for ‘Load saved objects...
’ loads
an R Data (rda) file saved in the dialog box for
‘Design choice sets...
’ or ‘Create data set for analysis...
’
using the function load
in base.
This work was supported by JSPS KAKENHI Grant Number JP20K06251.
Hideo Aizaki
Aizaki H (2012) Basic Functions for Supporting an Implementation of Choice Experiments in R. Journal of Statistical Software, 50(C2): 1–24. https://www.jstatsoft.org/article/view/v050c02.
Aizaki H (2019) support.BWS3: Tools for Case 3 Best-Worst Scaling. R package version 0.2-0. https://CRAN.R-project.org/package=support.BWS3.
Aizaki H (2023) support.CEs: Basic Functions for Supporting an Implementation of Choice Experiments. R package version 0.6-0. https://CRAN.R-project.org/package=support.CEs.
Fox J (2005) The R Commander: A Basic Statistics Graphical User Interface to R. Journal of Statistical Software, 14(9): 1–42. https://www.jstatsoft.org/article/view/v014i09.
Fox J (2017) Using the R Commander: A Point-and-Click Interface for R. Chapman and Hall/CRC. https://socialsciences.mcmaster.ca/jfox/Books/RCommander/
Fox J, Bouchet-Valat M (2023) Rcmdr: R Commander. R package version 2.9-1. https://socialsciences.mcmaster.ca/jfox/Misc/Rcmdr/.
Louviere JJ, Flynn TN, Marley AAJ (2015) Best–Worst Scaling: Theory, Methods and Applications. Cambridge University Press.
Therneau T (2023) survival: Survival Analysis. R package version 3.5-7. https://CRAN.R-project.org/package=survival.
Therneau TM, Grambsch PM (2000) Modeling Survival Data: Extending the Cox Model. Springer.
if(interactive()) { library(RcmdrPlugin.BWS3) }
if(interactive()) { library(RcmdrPlugin.BWS3) }
Create a data set for BWS3 analysis from choice sets for BWS3 and data set containing responses to BWS3 questions.
This dialog box creates a data set for BWS3 analysis from the choice sets
designed in the ‘Design Choice Sets for BWS3
’ dialog box and
a data set containing responses to BWS3 questions by using the function
bws3.dataset
in support.BWS3.
The current version assumes that a maximum difference model is used.
This dialog box is activated if the data set for BWS3 analysis is
selected as the active data set. For details on the results of this dialog box,
refer to help for function bws3.dataset
.
GUI elements of this dialog box are as follows.
Name for data set
: An R object name into which a data set
generated using this dialog box is stored.
The default name ‘BWS3data
’ can be changed
following R's rules for naming objects. If changed, you should take note of
the new object name, which will be used later.
Save to file
: A check box for saving the resultant data set to
an external file in RDA format (.rda
). If necessary, check this box.
Design
: An R object name containing BWS3 choice sets generated
in the ‘Design Choice Sets for BWS3
’ dialog box.
The default name ‘BWS3design
’ is displayed automatically.
The correct name should be entered if the name of BWS3 choice sets
(BWS3design
) was changed in the dialog box for BWS3 design.
ID variable
: A variable name identifying respondents.
The default name ‘id
’ can be changed according to
the corresponding variable name in the active data set.
Number of BWS3 questions
: A number of BWS3 questions per
respondent. According to the design parameters set in the first dialog box,
this slider is set at the appropriate number. Depending on the value,
the number of rows of the
‘Names of best- and worst-response variables
’ table varies.
Letters of best- and worst-response variables
:
A type of letters used for best- and worst-variable names shown in the
‘Names of best- and worst-variable names
’ table.
Select one from three radio buttons corresponding to ‘Uppercase
’,
‘Lowercase
’, and ‘None
’. According to the
selection, letters of best- and worst variable names in the table are
changed. When selecting ‘None
’, no variable names appear
in the table. Users must type appropriate names in each cell of the table.
Opt-out option
: A check box for an opt-out option.
If the opt-out option was used in the BWS3 questions, check this box.
Names of best- and worst-response variables
: The names given
for the best- and worst-response variables stored in the active data set.
These names must follow R's rules for naming variables.
Please click the ‘Cancel
’ button and open this dialog box again
if it does not work as expected.
Design choice sets for BWS3 with the rotation design method or mix-and-match method.
This dialog box designs choice sets for BWS3 with the rotation design
method or mix-and-match method using the function
rotation.design
in support.CEs.
For details on the results of this dialog box, refer to help for function
rotation.design
.
GUI elements of this dialog box are as follows.
Name for design
: An R object name into which choice sets
generated using this dialog box are stored.
The default name ‘BWS3design
’
can be changed following R's rules for naming objects. If changed,
you should take note of the new object name, which will be used later.
Save to file
: A check box that is used to save the resultant
design to an external file in RDA format (.rda
).
If necessary, check this box.
Design method
: A method used to generate BWS3 choice sets.
Select one from two radio buttons corresponding to ‘Rotation
’
and ‘Mix-and-Match
’. For the details on these methods,
see help for function rotation.design
.
Design parameters
: A specification of parameters for BWS3
choice sets.
Number of alternatives per set (without opt-out)
: Number of
alternatives per choice set (question), where an opt-out option is not
counted as this number even if the opt-out option will be used in your survey.
Number of blocks
: The number of blocks into which the resultant
BWS3 choice sets are divided.
Attributes and their levels
: A specification (table) of
attributes and their levels used to generate BWS3 choice sets.
Quantitative
: A check box showing that a quantitative attribute
is set in the corresponding row.
Attribute
: An attribute variable name following R's rules for
naming variables. Type names without skipping from the first row.
Level 1
to Level 6
: Level variable names corresponding
to the attribute entered in the first column. These variable names must
also follow R's rules for naming variables.
Type names without skipping from the ‘Level 1
’.
Reproducibility
: A set for reproducibility of the resultant
BWS3 choice sets.
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.
Reproduce choice sets designed with R < 3.6.0
: A check box for
reproducing BWS3 choice sets generated with R versions older than 3.6.0.
If necessary, check this box.
Create interactions between attribute/level variables and covariates in the data set for BWS3 analysis.
This dialog box creates interactions between attribute/level variables and
covariates in the data set for BWS3 analysis.
This dialog box is activated if the data set for BWS3 analysis created in
the ‘Create Data Set for BWS3 Analysis
’ dialog box is selected
as the active data set.
GUI elements of this dialog box are as follows.
Attribute/level variables
: Variables to be used as
attribute and/or level variables in the model. Select one or more
variables from this list box.
Covariates
: Variables to be used as covariates in the model.
Select one or more variables from this list box.
Fit a model to BWS3 data.
This dialog box fits the conditional logit model to the data set for BWS3
analysis using the functions clogit
in survival
and gofm
in support.CEs.
This dialog box is activated if the data set for BWS3 analysis created in
the ‘Create Data Set for BWS3 Analysis
’ dialog box is selected
as the active data set.
For details on the results of this dialog box, refer to helps for
clogit
and gofm
.
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 ‘BWS3model.x
’, where x
indicates
the integer number assigned automatically from 1
, can be changed
following R's rules for naming objects.
Response variable
: A variable containing responses to BWS3
questions in the active data set. This variable name is fixed as
‘RES
’, which cannot be changed by users (A fixed variable
is colored in green).
Independent variables
: Variables used as independent variables
in the model. Select one or more variables from this list box.
Stratification variable
: A variable for identifying each
combination of respondents and BWS3 questions.
This variable name is fixed as ‘STR
’.
Subset expression
: A logical expression for specifying
a subset of the observations in the active dataset to be used for the fitting.
Calculate marginal willingness to pay (MWTP) values of nonmonetary variables from the fitted model.
This dialog box calculates MWTP values of nonmonetary variables from
the model fitted in the ‘Fit Model to BWS3 Data
’ dialog box
using the function mwtp
in support.CEs.
This dialog box is activated if the fitted model is selected as the active
model.
For details on the results of this dialog box, refer to help for function
mwtp
.
GUI elements of this dialog box are as follows.
Name for output
: An R object name into which the calculated
results obtained through this dialog box are stored. The default name
‘MWTP
’ can be changed following R's rules for naming objects.
Monetary variable
: A variable used as the monetary variable in
the calculation of MWTPs. Select one from this drop-down list of variables.
Nonmonetary variables
: Variables used as the nonmonetary
variable(s) in the calculation of MWTP(s). Select one or more variables
from this list box.
Calculation method
: A method used to calculate confidence
intervals for MWTPs. Select one from two radio buttons corresponding
to ‘Krinsky and Robb
’ and ‘Delta
’.
For the details on these methods, see help for functions
mwtp
.
Confidence level
: A confidence level used for calculating
the confidence intervals for MWTPs. The default is 0.95
.
Number of replications
: A total number of replications for
the Krinsky and Robb method.
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.
Display a series of questions for BWS3.
This dialog box shows a series of BWS3 questions that are converted from
the choice sets designed in the ‘Design Choice Sets for BWS3
’
dialog box using the function questionnaire
in
support.CEs.
For details on the results of this dialog box, refer to help for
questionnaire
.
GUI element of this dialog box is as follows.
Design
: An R object name containing BWS3 choice sets generated
in the ‘Design Choice Sets for BWS3
’ dialog box.
The default name ‘BWS3design
’ is displayed automatically.
The correct name should be entered if the name of BWS3 choice sets
(BWS3design
) was changed in the dialog box for BWS3 design.