CBC Profiles
============
veh_mileage : Continuous (8 levels, range: 1.50-5.00)
veh_price : Continuous (5 levels, range: 0.80-1.20)
battery_refurbish: Categorical (3 levels: original, cellreplace, packreplace)
battery_range_year0: Continuous (5 levels, range: 2.00-3.60)
battery_degradation: Continuous (4 levels, range: 1.00-7.00)
Profiles: 2400
First few rows:
profileID veh_mileage veh_price battery_refurbish battery_range_year0
1 1 1.5 0.8 original 2
2 2 2.0 0.8 original 2
3 3 2.5 0.8 original 2
4 4 3.0 0.8 original 2
5 5 3.5 0.8 original 2
6 6 4.0 0.8 original 2
battery_degradation
1 1
2 1
3 1
4 1
5 1
6 1
... and 2394 more rows
Resrictions
None
Step 2: Set up priors
Attribute
Expectation
Theory
Suggested Sign
veh_price
Lower price preferred
Standard economic theory (price disutility)
Negative (−)
veh_mileage
Lower mileage preferred
Higher mileage = older/worn vehicle
Negative (−)
battery_refurbish
Original battery > pack-based refurbishment > cell-based refurbishment
Risk aversion, resale concerns, BEV reliability
Negative (−)
battery_range_year0
More range preferred
Reduces range anxiety
Positive (+)
battery_degradation
Less degradation preferred
Reflects battery health and future value
Negative (−)
Fixed Parameters
For example, if the coefficient of battery degradation is -10, then:
- A 1% increase in degradation (from 0.01 to 0.02) reduces utility by 0.10.
- A full 7% increase in degradation (from 0.01 to 0.08) would reduce utility by -0.7.
In DCE models, utilities usually range between -2 and +2, so a utility loss of -0.7 is noticeable, but not extreme. It reflects that battery degradation is an important factor in evaluating a used EV.
priors_fixed <-cbc_priors(profiles = profiles,veh_mileage =-0.5, # Each 10000 mile increase reduces utility by 0.05veh_price =-0.1, # Each $20000 increase reduces utility by 0.1battery_refurbish =c(-1.0, -0.5), # Cell refurbishment least preferredbattery_range_year0 =0.5, # Each 100 mile of range adds utility by 0.5battery_degradation =-1# Each 1% of degradation increases subtracts utility by 1)priors_fixed
random: randomly samples profiles for each respondent independently; maximum diversity but may be less statistically efficient
design_random_fixed_parameter <-cbc_design(profiles = profiles,priors = priors_fixed,method ="random", # randomized full-factorial designn_resp =3000, # Number of respondentsn_alts =3, # Number of alternatives per questionn_q =6, # Number of questions per respondent #6remove_dominant =TRUE) design_random_random_parameter <-cbc_design(profiles = profiles,priors = priors_random_parameter,method ="random", # randomized full-factorial designn_resp =3000, # Number of respondentsn_alts =3, # Number of alternatives per questionn_q =6, # Number of questions per respondent #6remove_dominant =TRUE)
Frequency-Based Methods
shortcut: balances attribute level frequencies while avoiding duplicate profiles within questions.
minoverlap: prioritizes minimizing attribute overlap within choice questions.
balanced: optimizes both frequency balance and pairwise attribute interactions.
design_shortcut <-cbc_design(profiles = profiles,method ="shortcut",n_resp =3000, # Number of respondentsn_alts =3, # Number of alternatives per questionn_q =6# Number of questions per respondent #6)
Generating shortcut design for 3000 respondents using 13 cores...
design_shortcut_fixed_parameter <-cbc_design(profiles = profiles,priors = priors_fixed,method ="shortcut",n_resp =3000, # Number of respondentsn_alts =3, # Number of alternatives per questionn_q =6# Number of questions per respondent #6)
Generating shortcut design for 3000 respondents using 13 cores...
## Code will not run# design_shortcut_fixed_parameter_remove_dominant <- cbc_design(# profiles = profiles,# priors = priors_fixed,# method = "shortcut",# n_resp = 3000, # Number of respondents# n_alts = 3, # Number of alternatives per question# n_q = 6, # Number of questions per respondent #6# remove_dominant = TRUE# )
CBC Design Comparison
=====================
Designs compared: 4
Metrics: structure, efficiency, balance, overlap
Sorted by: d_error (ascending)
Structure
=====================
Design Method respondents questions
Random_fixed_parameter random 3000 6
Random_random_parameter random 3000 6
Shortcut shortcut 3000 6
Shortcut_fixed_parameter shortcut 3000 6
Alternatives Blocks Profile Usage
3 1 (2399/2400) 100%
3 1 (2399/2400) 100%
3 1 (2400/2400) 100%
3 1 (2400/2400) 100%
No Choice Labeled?
No No
No No
No No
No No
Design Metrics
=====================
Design Method D-Error (Null) D-Error (Prior) Balance
Random_fixed_parameter random NA NA 0.866
Random_random_parameter random NA NA 0.864
Shortcut shortcut NA NA 0.892
Shortcut_fixed_parameter shortcut NA NA 0.892
Overlap
0.144
0.144
0.000
0.000
Interpretation:
- D-Error: Lower is better (design efficiency)
- Balance: Higher is better (level distribution)
- Overlap: Lower is better (attribute variation)
- Profile Usage: Higher means more profiles used
Best performers:
- Balance: Shortcut (0.892)
- Overlap: Shortcut (0.000)
- Profile Usage: Random_fixed_parameter (100.0%)
Use summary() for detailed information on any one design.
Step 4: Inspect Design
Goal: Evaluate the quality and properties of the design. - D-error: Lower values indicate more efficient designs - Balance: Higher scores indicate better attribute level balance - Overlap: Lower scores indicate less attribute overlap within questions - Profile usage: Higher percentages indicate better use of available profiles
cbc_inspect(design_random_fixed_parameter)
DESIGN SUMMARY
=========================
STRUCTURE
================
Method: random
Created: 2025-07-15 13:27:06
Respondents: 3000
Questions per respondent: 6
Alternatives per question: 3
Total choice sets: 18000
Profile usage: 2399/2400 (100.0%)
Special features:
• Dominance removal: total, partial
SUMMARY METRICS
=================
D-error calculation not available for random designs
Overall balance score: 0.866 (higher is better)
Overall overlap score: 0.144 (lower is better)
VARIABLE ENCODING
=================
Format: Dummy-coded (battery_refurbish)
💡 Use cbc_decode_design() to convert to categorical format
ATTRIBUTE BALANCE
=================
Overall balance score: 0.866 (higher is better)
Individual attribute level counts:
veh_mileage:
1.5 2 2.5 3 3.5 4 4.5 5
6733 6622 6641 6716 6797 6836 6861 6794
Balance score: 0.987 (higher is better)
veh_price:
0.8 0.9 1 1.1 1.2
10926 10699 10585 10975 10815
Balance score: 0.985 (higher is better)
battery_refurbishcellreplace:
0 1
35960 18040
Balance score: 0.681 (higher is better)
battery_refurbishpackreplace:
0 1
35806 18194
Balance score: 0.684 (higher is better)
battery_range_year0:
2 2.4 2.8 3.2 3.6
10806 10771 10861 10768 10794
Balance score: 0.997 (higher is better)
battery_degradation:
1 3 5 7
13661 15961 13627 10751
Balance score: 0.864 (higher is better)
ATTRIBUTE OVERLAP
=================
Overall overlap score: 0.144 (lower is better)
Counts of attribute overlap:
(# of questions with N unique levels)
veh_mileage: Continuous variable
Questions by # unique levels:
1 (complete overlap): 1.4% (249 / 18000 questions)
2 (partial overlap): 32.2% (5788 / 18000 questions)
3 (partial overlap): 66.5% (11963 / 18000 questions)
4 (partial overlap): 0.0% (0 / 18000 questions)
5 (partial overlap): 0.0% (0 / 18000 questions)
6 (partial overlap): 0.0% (0 / 18000 questions)
7 (partial overlap): 0.0% (0 / 18000 questions)
8 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.65
veh_price: Continuous variable
Questions by # unique levels:
1 (complete overlap): 3.7% (669 / 18000 questions)
2 (partial overlap): 47.5% (8544 / 18000 questions)
3 (partial overlap): 48.8% (8787 / 18000 questions)
4 (partial overlap): 0.0% (0 / 18000 questions)
5 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.45
battery_refurbishcellreplace: Continuous variable
Questions by # unique levels:
1 (complete overlap): 32.7% (5892 / 18000 questions)
2 (no overlap): 67.3% (12108 / 18000 questions)
Average unique levels per question: 1.67
battery_refurbishpackreplace: Continuous variable
Questions by # unique levels:
1 (complete overlap): 32.5% (5850 / 18000 questions)
2 (no overlap): 67.5% (12150 / 18000 questions)
Average unique levels per question: 1.68
battery_range_year0: Continuous variable
Questions by # unique levels:
1 (complete overlap): 3.7% (674 / 18000 questions)
2 (partial overlap): 47.8% (8603 / 18000 questions)
3 (partial overlap): 48.5% (8723 / 18000 questions)
4 (partial overlap): 0.0% (0 / 18000 questions)
5 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.45
battery_degradation: Continuous variable
Questions by # unique levels:
1 (complete overlap): 12.3% (2217 / 18000 questions)
2 (partial overlap): 67.7% (12188 / 18000 questions)
3 (partial overlap): 20.0% (3595 / 18000 questions)
4 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.08
cbc_inspect(design_random_random_parameter)
DESIGN SUMMARY
=========================
STRUCTURE
================
Method: random
Created: 2025-07-15 13:27:51
Respondents: 3000
Questions per respondent: 6
Alternatives per question: 3
Total choice sets: 18000
Profile usage: 2399/2400 (100.0%)
Special features:
• Dominance removal: total, partial
SUMMARY METRICS
=================
D-error calculation not available for random designs
Overall balance score: 0.864 (higher is better)
Overall overlap score: 0.144 (lower is better)
VARIABLE ENCODING
=================
Format: Dummy-coded (battery_refurbish)
💡 Use cbc_decode_design() to convert to categorical format
ATTRIBUTE BALANCE
=================
Overall balance score: 0.864 (higher is better)
Individual attribute level counts:
veh_mileage:
1.5 2 2.5 3 3.5 4 4.5 5
6571 6840 6628 6737 6815 6884 6829 6696
Balance score: 0.984 (higher is better)
veh_price:
0.8 0.9 1 1.1 1.2
10976 10660 10640 10927 10797
Balance score: 0.986 (higher is better)
battery_refurbishcellreplace:
0 1
36048 17952
Balance score: 0.678 (higher is better)
battery_refurbishpackreplace:
0 1
35826 18174
Balance score: 0.684 (higher is better)
battery_range_year0:
2 2.4 2.8 3.2 3.6
10868 10828 10833 10670 10801
Balance score: 0.993 (higher is better)
battery_degradation:
1 3 5 7
14030 16042 13251 10677
Balance score: 0.859 (higher is better)
ATTRIBUTE OVERLAP
=================
Overall overlap score: 0.144 (lower is better)
Counts of attribute overlap:
(# of questions with N unique levels)
veh_mileage: Continuous variable
Questions by # unique levels:
1 (complete overlap): 1.4% (252 / 18000 questions)
2 (partial overlap): 32.6% (5870 / 18000 questions)
3 (partial overlap): 66.0% (11878 / 18000 questions)
4 (partial overlap): 0.0% (0 / 18000 questions)
5 (partial overlap): 0.0% (0 / 18000 questions)
6 (partial overlap): 0.0% (0 / 18000 questions)
7 (partial overlap): 0.0% (0 / 18000 questions)
8 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.65
veh_price: Continuous variable
Questions by # unique levels:
1 (complete overlap): 3.8% (678 / 18000 questions)
2 (partial overlap): 47.6% (8576 / 18000 questions)
3 (partial overlap): 48.6% (8746 / 18000 questions)
4 (partial overlap): 0.0% (0 / 18000 questions)
5 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.45
battery_refurbishcellreplace: Continuous variable
Questions by # unique levels:
1 (complete overlap): 32.9% (5930 / 18000 questions)
2 (no overlap): 67.1% (12070 / 18000 questions)
Average unique levels per question: 1.67
battery_refurbishpackreplace: Continuous variable
Questions by # unique levels:
1 (complete overlap): 32.6% (5864 / 18000 questions)
2 (no overlap): 67.4% (12136 / 18000 questions)
Average unique levels per question: 1.67
battery_range_year0: Continuous variable
Questions by # unique levels:
1 (complete overlap): 3.8% (678 / 18000 questions)
2 (partial overlap): 47.5% (8547 / 18000 questions)
3 (partial overlap): 48.8% (8775 / 18000 questions)
4 (partial overlap): 0.0% (0 / 18000 questions)
5 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.45
battery_degradation: Continuous variable
Questions by # unique levels:
1 (complete overlap): 12.2% (2193 / 18000 questions)
2 (partial overlap): 67.9% (12216 / 18000 questions)
3 (partial overlap): 20.0% (3591 / 18000 questions)
4 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.08
choices_cat <-cbc_decode(choices_random_fixed_parameter)# Filter for the chosen rows onlychoices_cat <- choices_cat[which(choices_cat$choice ==1), ]# Counts of choices made for each attribute leveltable(choices_cat$veh_mileage)
choices_cat <-cbc_decode(choices_random_random_parameter)# Filter for the chosen rows onlychoices_cat <- choices_cat[which(choices_cat$choice ==1), ]# Counts of choices made for each attribute leveltable(choices_cat$veh_mileage)
choices_cat <-cbc_decode(choices_shortcut)# Filter for the chosen rows onlychoices_cat <- choices_cat[which(choices_cat$choice ==1), ]# Counts of choices made for each attribute leveltable(choices_cat$veh_mileage)
choices_cat_fixed_parameter <-cbc_decode(choices_shortcut_fixed_parameter)# Filter for the chosen rows onlychoices_cat <- choices_cat[which(choices_cat$choice ==1), ]# Counts of choices made for each attribute leveltable(choices_cat$veh_mileage)
Statistical power is the probability of correctly detecting an effect when it truly exists, which depends on effect size, sample size, design efficiency, and model complexity.
Power analysis focuses on prevision (standard errors)
CBC Power Analysis Summary
===========================
Sample size requirements for 90% power:
veh_mileage : n >= 300 (achieves 100.0% power, SE = 0.0361)
veh_price : Threshold not reached (max 16.3% power at n = 3000)
battery_refurbishcellreplace: n >= 300 (achieves 100.0% power, SE = 0.0904)
battery_refurbishpackreplace: n >= 300 (achieves 100.0% power, SE = 0.0841)
battery_range_year0: n >= 300 (achieves 100.0% power, SE = 0.0633)
battery_degradation: n >= 300 (achieves 100.0% power, SE = 0.0426)
CBC Power Analysis Summary
===========================
Sample size requirements for 90% power:
veh_mileage : n >= 300 (achieves 100.0% power, SE = 0.0341)
veh_price : Threshold not reached (max 46.2% power at n = 3000)
battery_refurbishcellreplace: n >= 300 (achieves 100.0% power, SE = 0.0919)
battery_refurbishpackreplace: n >= 300 (achieves 99.7% power, SE = 0.0834)
battery_range_year0: n >= 300 (achieves 100.0% power, SE = 0.0622)
battery_degradation: n >= 300 (achieves 100.0% power, SE = 0.0425)
Using 'respID' as panelID for panel data estimation.
Estimating models using 10 cores...
Model estimation complete!
plot(power_shortcut, type ="power", power_threshold =0.9)
plot(power_shortcut, type ="se", power_threshold =0.9)
summary(power_shortcut, power_threshold =0.9)
CBC Power Analysis Summary
===========================
Sample size requirements for 90% power:
veh_mileage : Threshold not reached (max 44.6% power at n = 3000)
veh_price : Threshold not reached (max 19.5% power at n = 3000)
battery_refurbishcellreplace: Threshold not reached (max 9.9% power at n = 3000)
battery_refurbishpackreplace: Threshold not reached (max 21.9% power at n = 3000)
battery_range_year0: Threshold not reached (max 21.5% power at n = 3000)
battery_degradation: Threshold not reached (max 24.3% power at n = 3000)
CBC Power Analysis Summary
===========================
Sample size requirements for 90% power:
veh_mileage : n >= 300 (achieves 100.0% power, SE = 0.0464)
veh_price : Threshold not reached (max 15.5% power at n = 3000)
battery_refurbishcellreplace: n >= 300 (achieves 100.0% power, SE = 0.1107)
battery_refurbishpackreplace: n >= 300 (achieves 94.6% power, SE = 0.1026)
battery_range_year0: n >= 300 (achieves 100.0% power, SE = 0.0828)
battery_degradation: n >= 300 (achieves 100.0% power, SE = 0.0364)