CBC Profiles
============
veh_mileage : Continuous (8 levels, range: 15000.00-50000.00)
veh_price : Continuous (5 levels, range: 12000.00-18000.00)
battery_refurbish: Categorical (3 levels: original, cellreplace, packreplace)
battery_range_year0: Continuous (5 levels, range: 200.00-360.00)
battery_degradation: Continuous (4 levels, range: 0.01-0.07)
Profiles: 2400
First few rows:
profileID veh_mileage veh_price battery_refurbish battery_range_year0
1 1 15000 12000 original 200
2 2 20000 12000 original 200
3 3 25000 12000 original 200
4 4 30000 12000 original 200
5 5 35000 12000 original 200
6 6 40000 12000 original 200
battery_degradation
1 0.01
2 0.01
3 0.01
4 0.01
5 0.01
6 0.01
... 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.00005, # Each 1000 mile increase reduces utility by 0.05veh_price =-0.0001, # Each $1000 increase reduces utility by 0.1battery_refurbish =c(-1.0, -0.5), # Cell refurbishment least preferredbattery_range_year0 =0.005, # Each 100 mile of range adds utility by 0.5battery_degradation =-10# Each 1% of degradation increases subtracts utility by 0.05)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...
CBC Design Comparison
=====================
Designs compared: 3
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
Alternatives Blocks Profile Usage
3 1 (2399/2400) 100%
3 1 (2399/2400) 100%
3 1 (2400/2400) 100%
No Choice Labeled?
No No
No No
No No
Design Metrics
=====================
Design Method D-Error (Null) D-Error (Prior) Balance
Random_fixed_parameter random NA NA 0.886
Random_random_parameter random NA NA 0.887
Shortcut shortcut NA NA 0.892
Overlap
0.135
0.135
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 11:28:38
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.886 (higher is better)
Overall overlap score: 0.135 (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.886 (higher is better)
Individual attribute level counts:
veh_mileage:
15000 20000 25000 30000 35000 40000 45000 50000
6471 6812 6827 6887 6998 6758 6694 6553
Balance score: 0.975 (higher is better)
veh_price:
12000 13500 15000 16500 18000
10871 10607 10838 10796 10888
Balance score: 0.990 (higher is better)
battery_refurbishcellreplace:
0 1
35777 18223
Balance score: 0.685 (higher is better)
battery_refurbishpackreplace:
0 1
35925 18075
Balance score: 0.681 (higher is better)
battery_range_year0:
200 240 280 320 360
10810 10811 10987 10716 10676
Balance score: 0.989 (higher is better)
battery_degradation:
0.01 0.03 0.05 0.07
13420 13524 13485 13571
Balance score: 0.995 (higher is better)
ATTRIBUTE OVERLAP
=================
Overall overlap score: 0.135 (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.5% (268 / 18000 questions)
2 (partial overlap): 32.9% (5919 / 18000 questions)
3 (partial overlap): 65.6% (11813 / 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.64
veh_price: Continuous variable
Questions by # unique levels:
1 (complete overlap): 3.9% (703 / 18000 questions)
2 (partial overlap): 47.3% (8520 / 18000 questions)
3 (partial overlap): 48.8% (8777 / 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): 33.1% (5957 / 18000 questions)
2 (no overlap): 66.9% (12043 / 18000 questions)
Average unique levels per question: 1.67
battery_refurbishpackreplace: Continuous variable
Questions by # unique levels:
1 (complete overlap): 33.1% (5961 / 18000 questions)
2 (no overlap): 66.9% (12039 / 18000 questions)
Average unique levels per question: 1.67
battery_range_year0: Continuous variable
Questions by # unique levels:
1 (complete overlap): 3.6% (643 / 18000 questions)
2 (partial overlap): 47.7% (8592 / 18000 questions)
3 (partial overlap): 48.7% (8765 / 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): 5.9% (1071 / 18000 questions)
2 (partial overlap): 56.2% (10118 / 18000 questions)
3 (partial overlap): 37.8% (6811 / 18000 questions)
4 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.32
cbc_inspect(design_random_random_parameter)
DESIGN SUMMARY
=========================
STRUCTURE
================
Method: random
Created: 2025-07-15 11:28:48
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.887 (higher is better)
Overall overlap score: 0.135 (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.887 (higher is better)
Individual attribute level counts:
veh_mileage:
15000 20000 25000 30000 35000 40000 45000 50000
6735 6879 6781 6949 6755 6776 6610 6515
Balance score: 0.980 (higher is better)
veh_price:
12000 13500 15000 16500 18000
10684 10843 10735 10877 10861
Balance score: 0.992 (higher is better)
battery_refurbishcellreplace:
0 1
36277 17723
Balance score: 0.673 (higher is better)
battery_refurbishpackreplace:
0 1
35618 18382
Balance score: 0.689 (higher is better)
battery_range_year0:
200 240 280 320 360
10909 10738 10821 10854 10678
Balance score: 0.992 (higher is better)
battery_degradation:
0.01 0.03 0.05 0.07
13515 13469 13495 13521
Balance score: 0.998 (higher is better)
ATTRIBUTE OVERLAP
=================
Overall overlap score: 0.135 (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.5% (266 / 18000 questions)
2 (partial overlap): 33.0% (5931 / 18000 questions)
3 (partial overlap): 65.6% (11803 / 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.64
veh_price: Continuous variable
Questions by # unique levels:
1 (complete overlap): 3.8% (677 / 18000 questions)
2 (partial overlap): 46.9% (8451 / 18000 questions)
3 (partial overlap): 49.3% (8872 / 18000 questions)
4 (partial overlap): 0.0% (0 / 18000 questions)
5 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.46
battery_refurbishcellreplace: Continuous variable
Questions by # unique levels:
1 (complete overlap): 33.8% (6088 / 18000 questions)
2 (no overlap): 66.2% (11912 / 18000 questions)
Average unique levels per question: 1.66
battery_refurbishpackreplace: Continuous variable
Questions by # unique levels:
1 (complete overlap): 32.0% (5756 / 18000 questions)
2 (no overlap): 68.0% (12244 / 18000 questions)
Average unique levels per question: 1.68
battery_range_year0: Continuous variable
Questions by # unique levels:
1 (complete overlap): 3.9% (704 / 18000 questions)
2 (partial overlap): 47.5% (8549 / 18000 questions)
3 (partial overlap): 48.6% (8747 / 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): 6.0% (1081 / 18000 questions)
2 (partial overlap): 56.2% (10122 / 18000 questions)
3 (partial overlap): 37.8% (6797 / 18000 questions)
4 (no overlap): 0.0% (0 / 18000 questions)
Average unique levels per question: 2.32
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)
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)
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 42.6% power at n = 3000)
veh_price : Threshold not reached (max 54.1% power at n = 3000)
battery_refurbishcellreplace: Threshold not reached (max 73.9% power at n = 3000)
battery_refurbishpackreplace: Threshold not reached (max 49.0% power at n = 3000)
battery_range_year0: Threshold not reached (max 21.7% power at n = 3000)
battery_degradation: Threshold not reached (max 62.0% power at n = 3000)