cbc_balance {cbcTools} | R Documentation |
Counts of attribute balance
Description
This function prints out a summary of the individual and pairwise counts of each level for each attribute across all choice questions in the design.
Usage
cbc_balance(design)
Arguments
design |
A data frame of a survey design. |
Value
Prints the individual and pairwise counts of the number of times each attribute levels in shown in the design.
Examples
library(cbcTools)
# A simple conjoint experiment about apples
# Generate all possible profiles
profiles <- cbc_profiles(
price = c(1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5),
type = c("Fuji", "Gala", "Honeycrisp"),
freshness = c('Poor', 'Average', 'Excellent')
)
# Make a survey design from all possible profiles
# (This is the default setting where method = 'full' for "full factorial")
design <- cbc_design(
profiles = profiles,
n_resp = 300, # Number of respondents
n_alts = 3, # Number of alternatives per question
n_q = 6 # Number of questions per respondent
)
# Inspect the design balance
cbc_balance(design)
# Inspect the design overlap
cbc_overlap(design)
[Package cbcTools version 0.5.0 Index]