RcmdrPlugin.BWS2-package {RcmdrPlugin.BWS2} | R Documentation |
R Commander Plug-in for Case 2 Best-Worst Scaling
Description
This package adds menu items for case 2 (profile case) best-worst scaling (BWS2) to the R Commander. BWS2 is a question-based survey method that constructs profiles (combinations of attribute levels) using an orthogonal array, asks respondents to select the best and worst levels in each profile, and measures preferences for attribute levels by analyzing the responses. For details, see Aizaki and Fogarty (2019) <doi:10.1016/j.jocm.2019.100171>.
Details
This package is an R Commander plug-in package for Case 2 (profile case) best–worst scaling (BWS2). It depends on DoE.base (Groemping 2018), Rcmdr (Fox 2005, 2017; Fox and Bouchet-Valat 2021), support.BWS2 (Aizaki 2021; Aizaki and Fogarty 2019), support.CEs (Aizaki 2012, 2021), and survival (Therneau 2022; Therneau and Grambsch 2000). Refer to Aizaki and Fogarty (2019) and ‘Non-Market Valuation with R’ <http://lab.agr.hokudai.ac.jp/nmvr/> for a brief introduction to BWS2 in R, and Louviere et al. (2015) and Flynn et al. (2007) for BWS2. A manual for this package is available at <https://sites.google.com/view/r4sp/rcmdrplugin>.
After successfully installing and loading RcmdrPlugin.BWS2,
the R Commander window will appear, and then you will find ‘BWS2
’
added to the top-level menus in the R Commander window.
Selecting ‘BWS2
’ displays menu items. When selecting a menu item,
the corresponding dialog box opens. The following dialog boxes are
provided by RcmdrPlugin.BWS2:
The dialog box for ‘
Design choice sets...
’ designs choice sets (profiles) for BWS2 with an orthogonal design using the functionoa.design
in DoE.base.The dialog box for ‘
Display questions...
’ displays BWS2 questions from the profiles designed in the first dialog box using the functionbws2.questionnaire
in support.BWS2.The dialog box for ‘
Create data set for analysis...
’ creates a data set for analysis combining the choice sets designed in the first dialog box and a data set containing responses to BWS2 questions using the functionbws2.dataset
in support.BWS2.Selecting the menu item ‘
Measure preferences...
’ gives options: ‘Counting approach
’ and ‘Modeling approach
’. Each has additional sub-items (see below).The dialog box for ‘
Calculate scores...
’ calculates various BW scores for each respondent from the data set for BWS2 analysis created in the previous dialog box, and then stores them into a data frame using the functionbws2.count
in support.BWS2. The menu item is activated if a data set for BWS2 analysis created in the previous dialog box is selected as the active data set.Selecting ‘
Sum up scores
’ sums up the BW scores calculated in the previous dialog box and displays the results in the Output pane of the R Commander window. The menu item is activated if a data frame containing BW scores created in the previous dialog box is selected as the active data set.The dialog box for ‘
Draw distributions of scores...
’ draws distributions (bar plots) of the BW scores by level using an R basic graphic functionbarplot
(S3 method for class ‘bws2.count’:bws2.count
). The menu item is activated if a data frame containing BW scores created in the previous dialog 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 BWS2 analysis created in the previous dialog box using the functionsclogit
in survival andgofm
in support.CEs. The menu item is activated if a data set for BWS2 analysis created in the previous dialog box is selected as the active data set.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 functionload
in base.
Acknowledgments
This work was supported by JSPS KAKENHI Grant Number JP20K06251.
Author(s)
Hideo Aizaki
References
Aizaki H (2012) Basic Functions for Supporting an Implementation of Choice Experiments in R. Journal of Statistical Software, 50(C2): 1–24. DOI: 10.18637/jss.v050.c02.
Aizaki H (2022) support.BWS2: Tools for Case 2 Best-Worst Scaling. R package version 0.4-0. https://CRAN.R-project.org/package=support.BWS2.
Aizaki H (2021) support.CEs: Basic Functions for Supporting an Implementation of Choice Experiments. R package version 0.5-0. https://CRAN.R-project.org/package=support.CEs.
Aizaki H, Fogarty J (2019) An R package and tutorial for case 2 best–worst scaling. Journal of Choice Modelling, 32, 100171. DOI: 10.1016/j.jocm.2019.100171.
Aizaki H, Nakatani T, Sato K (2014) Stated Preference Methods Using R. Chapman and Hall/CRC.
Flynn TN, Louviere JJ, Peters TJ, Coast J (2007) Best-Worst Scaling: What it can do for health care research and how to do it. Journal of Health Economics, 26, 171–189. DOI: 10.1016/j.jhealeco.2006.04.002.
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. https://socialsciences.mcmaster.ca/jfox/Books/RCommander/
Fox J, Bouchet-Valat M (2021) Rcmdr: R Commander. R package version 2.7-2. https://socialsciences.mcmaster.ca/jfox/Misc/Rcmdr/.
Groemping U (2018) R Package DoE.base for Factorial Experiments. Journal of Statistical Software, 85(5), 1–41. DOI: 10.18637/jss.v085.i05.
Louviere JJ, Flynn TN, Marley AAJ (2015) Best-Worst Scaling: Theory, Methods and Applications. Cambridge University Press. DOI: 10.1017/CBO9781107337855.
Therneau T (2022) survival: Survival Analysis. R package version 3.3-1. https://CRAN.R-project.org/package=survival.
Therneau TM, Grambsch PM (2000) Modeling Survival Data: Extending the Cox Model. Springer.
Examples
if(interactive()) {
library(RcmdrPlugin.BWS2)
}