Learn R Programming

cbcTools

This package provides functions for generating and inspecting survey designs for choice-based conjoint (CBC) survey experiments in R. Each function in the package begins with cbc_ and supports a step in the following process for designing and analyzing survey experiments:

After installing the package, got to the Getting Started page to learn how to use the package.

Installation

You can install the latest version of {cbcTools} from CRAN:

install.packages("cbcTools")

or you can install the development version of {cbcTools} from GitHub:

# install.packages("pak")
pak::pak("jhelvy/cbcTools")

Load the package with:

library(cbcTools)

Alternatives

The cbcTools package is an open-source alternative to commercial design software such as Ngene and Sawtooth Software. Other open-source conjoint experiment design packages include idefix and spdesign.

Author, Version, and License Information

Citation Information

If you use this package for in a publication, I would greatly appreciate it if you cited it - you can get the citation by typing citation("cbcTools") into R:

citation("cbcTools")
#> To cite cbcTools in publications use:
#> 
#>   Helveston JP (2025). _cbcTools: Design and Analyze Choice-Based
#>   Conjoint Experiments_. R package,
#>   <https://jhelvy.github.io/cbcTools/>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {{cbcTools}: Design and Analyze Choice-Based Conjoint Experiments},
#>     author = {John Paul Helveston},
#>     year = {2025},
#>     note = {R package},
#>     url = {https://jhelvy.github.io/cbcTools/},
#>   }

Copy Link

Version

Install

install.packages('cbcTools')

Monthly Downloads

328

Version

0.7.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Helveston

Last Published

October 20th, 2025

Functions in cbcTools (0.7.1)

print.cbc_profiles

Print method for cbc_profiles objects
print.cbc_priors

Print method for cbc_priors objects
print.cbc_choices

Print method for cbc_choices objects
cbc_priors

Create prior specifications for CBC models
cbc_decode

Convert dummy-coded CBC data back to categorical format
cbc_choices

Simulate choices for a survey design
cbc_restrict

Obtain a restricted set of profiles
cbc_inspect

Comprehensive design quality inspection
cbc_profiles

Make a data frame of all combinations of attribute levels
cbc_power

Estimate power analysis for choice experiment designs
cbc_compare

Compare multiple choice experiment designs
cbc_encode

Encode categorical variables in a CBC design
cbc_design

Generate survey designs for choice experiments (Updated Implementation)
cor_spec

Create a correlation specification for random parameters
infer_categorical_structure

Infer categorical structure from data
rand_spec

Create a random parameter specification
validate_or_reconstruct

User-friendly wrapper to validate design with error messages
plot_compare_power

Compare power across multiple designs
infer_encoding

Infer encoding type from column names and values
infer_from_coded_columns

Infer categorical structure from dummy/effects coded columns
reconstruct_design_attributes

Reconstruct minimal design attributes from a data frame
validate_design_object

Validate and potentially reconstruct a CBC design object
plot.cbc_power

Plot method for cbc_power objects
int_spec

Create an interaction specification for fixed parameters
summary.cbc_power

Summary method for cbc_power objects
print.cbc_inspection

Print method for cbc_inspection objects
print.cbc_power

Print method for cbc_power objects
print.cbc_comparison

Print method for cbc_comparison objects
print.cbc_design

Concise print method for cbc_design objects