Power Analysis

Step 1: Generate Profiles

profiles <- cbc_profiles(
  veh_mileage        = seq(15000, 50000, 5000), #5000
  veh_price          = 15000*seq(0.8, 1.2, 0.1),
  battery_refurbish     = c('original', 'cellreplace','packreplace'),
  battery_range_year0 = seq(200, 360, 40),
  battery_degradation = seq(0.01,0.07, 0.02)
)

profiles
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.05
  veh_price            = -0.0001,      # Each $1000 increase reduces utility by 0.1
  battery_refurbish = c(-1.0, -0.5),   # Cell refurbishment least preferred
  battery_range_year0  = 0.005,         # Each 100 mile of range adds utility by 0.5
  battery_degradation  = -10          # Each 1% of degradation increases subtracts utility by 0.05

)

priors_fixed
CBC Prior Specifications:

veh_mileage:
  Continuous variable
  Levels: 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000 
  Fixed parameter
    Coefficient: 0

veh_price:
  Continuous variable
  Levels: 12000, 13500, 15000, 16500, 18000 
  Fixed parameter
    Coefficient: 0

battery_refurbish:
  Categorical variable
  Levels: original, cellreplace, packreplace 
  Reference level: original
  Fixed parameter
    cellreplace: -1
    packreplace: -0.5

battery_range_year0:
  Continuous variable
  Levels: 200, 240, 280, 320, 360 
  Fixed parameter
    Coefficient: 0.005

battery_degradation:
  Continuous variable
  Levels: 0.01, 0.03, 0.05, 0.07 
  Fixed parameter
    Coefficient: -10

Random Parameters

priors_random_parameter <- cbc_priors(
  profiles = profiles,
  veh_mileage          = -0.00005,     # Each 1000 mile increase reduces utility by 0.05
  veh_price = -0.0001, # Assume $1,000 price increase = -0.1 utility
  battery_refurbish = rand_spec("n", c(-1.0, -0.5), c(0.1, 0.1)), # Reference = "original"
  battery_range_year0 = 0.005,   # Each 100 mile of range adds utility by 0.5
  battery_degradation = -10 # 1% increase in degradation = -0.10 utility
)

priors_random_parameter
CBC Prior Specifications:

veh_mileage:
  Continuous variable
  Levels: 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000 
  Fixed parameter
    Coefficient: 0

veh_price:
  Continuous variable
  Levels: 12000, 13500, 15000, 16500, 18000 
  Fixed parameter
    Coefficient: 0

battery_refurbish:
  Categorical variable
  Levels: original, cellreplace, packreplace 
  Reference level: original
  Random - Normal distribution
    cellreplace:
      Mean: -1
      SD:   0.1
    packreplace:
      Mean: -0.5
      SD:   0.1

battery_range_year0:
  Continuous variable
  Levels: 200, 240, 280, 320, 360 
  Fixed parameter
    Coefficient: 0.005

battery_degradation:
  Continuous variable
  Levels: 0.01, 0.03, 0.05, 0.07 
  Fixed parameter
    Coefficient: -10

Correlation Matrix:
                             battery_refurbishcellreplace
battery_refurbishcellreplace                            1
battery_refurbishpackreplace                            0
                             battery_refurbishpackreplace
battery_refurbishcellreplace                            0
battery_refurbishpackreplace                            1

Step 3: Generate Designs

Different designs

Random Method

  • 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 design
  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
) 

design_random_random_parameter <- cbc_design(
  profiles = profiles,
  priors = priors_random_parameter,
  method = "random", # randomized full-factorial design
  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
) 

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 respondents
  n_alts   = 3,    # Number of alternatives per question
  n_q      = 6    # Number of questions per respondent #6
  
)
Generating shortcut design for 3000 respondents using 13 cores...

Design comparisons

cbc_compare(
  "Random_fixed_parameter" = design_random_fixed_parameter,
  "Random_random_parameter" = design_random_random_parameter,
  "Shortcut" = design_shortcut
)
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
cbc_inspect(design_shortcut)
DESIGN SUMMARY
=========================

STRUCTURE
================
Method: shortcut
Created: 2025-07-15 11:40:32
Respondents: 3000
Questions per respondent: 6
Alternatives per question: 3
Total choice sets: 18000
Profile usage: 2400/2400 (100.0%)

SUMMARY METRICS
=================
(Lower values indicate more efficient designs)

Overall balance score: 0.892 (higher is better)
Overall overlap score: 0.000 (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.892 (higher is better)

Individual attribute level counts:

veh_mileage:

15000 20000 25000 30000 35000 40000 45000 50000 
 6740  6721  6757  6699  6728  6779  6771  6805 
  Balance score: 0.995 (higher is better)

veh_price:

12000 13500 15000 16500 18000 
10826 10784 10821 10797 10772 
  Balance score: 0.998 (higher is better)

battery_refurbishcellreplace:

    0     1 
36000 18000 
  Balance score: 0.680 (higher is better)

battery_refurbishpackreplace:

    0     1 
36000 18000 
  Balance score: 0.680 (higher is better)

battery_range_year0:

  200   240   280   320   360 
10811 10776 10791 10806 10816 
  Balance score: 0.998 (higher is better)

battery_degradation:

 0.01  0.03  0.05  0.07 
13490 13488 13500 13522 
  Balance score: 0.999 (higher is better)

ATTRIBUTE OVERLAP
=================
Overall overlap score: 0.000 (lower is better)

Counts of attribute overlap:
(# of questions with N unique levels)

veh_mileage: Continuous variable
  Questions by # unique levels:
  1 (complete overlap):   0.0%  (0 / 18000 questions)
  2 (partial overlap):    0.0%  (0 / 18000 questions)
  3 (partial overlap):  100.0%  (18000 / 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: 3.00

veh_price: Continuous variable
  Questions by # unique levels:
  1 (complete overlap):   0.0%  (0 / 18000 questions)
  2 (partial overlap):    0.0%  (0 / 18000 questions)
  3 (partial overlap):  100.0%  (18000 / 18000 questions)
  4 (partial overlap):    0.0%  (0 / 18000 questions)
  5 (no overlap):         0.0%  (0 / 18000 questions)
  Average unique levels per question: 3.00

battery_refurbishcellreplace: Continuous variable
  Questions by # unique levels:
  1 (complete overlap):   0.0%  (0 / 18000 questions)
  2 (no overlap):       100.0%  (18000 / 18000 questions)
  Average unique levels per question: 2.00

battery_refurbishpackreplace: Continuous variable
  Questions by # unique levels:
  1 (complete overlap):   0.0%  (0 / 18000 questions)
  2 (no overlap):       100.0%  (18000 / 18000 questions)
  Average unique levels per question: 2.00

battery_range_year0: Continuous variable
  Questions by # unique levels:
  1 (complete overlap):   0.0%  (0 / 18000 questions)
  2 (partial overlap):    0.0%  (0 / 18000 questions)
  3 (partial overlap):  100.0%  (18000 / 18000 questions)
  4 (partial overlap):    0.0%  (0 / 18000 questions)
  5 (no overlap):         0.0%  (0 / 18000 questions)
  Average unique levels per question: 3.00

battery_degradation: Continuous variable
  Questions by # unique levels:
  1 (complete overlap):   0.0%  (0 / 18000 questions)
  2 (partial overlap):    0.0%  (0 / 18000 questions)
  3 (partial overlap):  100.0%  (18000 / 18000 questions)
  4 (no overlap):         0.0%  (0 / 18000 questions)
  Average unique levels per question: 3.00

Step 5: Simulate Choices

choices_random_fixed_parameter <- cbc_choices(design_random_fixed_parameter, priors = priors_fixed)
choices_random_random_parameter <- cbc_choices(design_random_random_parameter, priors = priors_random_parameter)

choices_shortcut <- cbc_choices(design_shortcut)

random_fixed_parameter

choices_cat <- cbc_decode(choices_random_fixed_parameter)

# Filter for the chosen rows only
choices_cat <- choices_cat[which(choices_cat$choice == 1), ]

# Counts of choices made for each attribute level
table(choices_cat$veh_mileage)

15000 20000 25000 30000 35000 40000 45000 50000 
 3164  2999  2745  2387  2184  1756  1482  1283 
table(choices_cat$veh_price)

12000 13500 15000 16500 18000 
 4154  3767  3581  3372  3126 
table(choices_cat$battery_refurbish)

   original cellreplace packreplace 
       7269        4709        6022 
table(choices_cat$battery_range_year0)

 200  240  280  320  360 
2907 3263 3699 3894 4237 
table(choices_cat$battery_degradation)

0.01 0.03 0.05 0.07 
5091 4674 4302 3933 

random_random_parameter

choices_cat <- cbc_decode(choices_random_random_parameter)

# Filter for the chosen rows only
choices_cat <- choices_cat[which(choices_cat$choice == 1), ]

# Counts of choices made for each attribute level
table(choices_cat$veh_mileage)

15000 20000 25000 30000 35000 40000 45000 50000 
 3290  2974  2707  2483  2056  1799  1439  1252 
table(choices_cat$veh_price)

12000 13500 15000 16500 18000 
 4060  3789  3542  3450  3159 
table(choices_cat$battery_refurbish)

   original cellreplace packreplace 
       7482        4450        6068 
table(choices_cat$battery_range_year0)

 200  240  280  320  360 
3038 3210 3590 3996 4166 
table(choices_cat$battery_degradation)

0.01 0.03 0.05 0.07 
5151 4707 4283 3859 

shortcut

choices_cat <- cbc_decode(choices_shortcut)

# Filter for the chosen rows only
choices_cat <- choices_cat[which(choices_cat$choice == 1), ]

# Counts of choices made for each attribute level
table(choices_cat$veh_mileage)

15000 20000 25000 30000 35000 40000 45000 50000 
 2249  2259  2277  2197  2262  2253  2217  2286 
table(choices_cat$veh_price)

12000 13500 15000 16500 18000 
 3563  3546  3629  3593  3669 
table(choices_cat$battery_refurbish)

   original cellreplace packreplace 
       5925        5998        6077 
table(choices_cat$battery_range_year0)

 200  240  280  320  360 
3594 3659 3556 3675 3516 
table(choices_cat$battery_degradation)

0.01 0.03 0.05 0.07 
4563 4462 4410 4565 

Step 6: Assess Power

  • 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)

random_fixed_parameter

power_random_fixed_parameter <- cbc_power(
  data=choices_random_fixed_parameter,
  outcome = "choice",
  obsID = "obsID",
  n_q = 6,
  n_breaks = 10
  )
Auto-detected parameters: veh_mileage, veh_price, battery_refurbishcellreplace, battery_refurbishpackreplace, battery_range_year0, battery_degradation
Using 'respID' as panelID for panel data estimation.
Estimating models using 10 cores...
Model estimation complete!
plot(power_random_fixed_parameter, type = "power", power_threshold = 0.9)

plot(power_random_fixed_parameter, type = "se")

summary(power_random_fixed_parameter, power_threshold = 0.9)
CBC Power Analysis Summary
===========================

Sample size requirements for 90% power:

veh_mileage    : n >= 300 (achieves 100.0% power, SE = 0.0000)
veh_price      : n >= 300 (achieves 100.0% power, SE = 0.0000)
battery_refurbishcellreplace: n >= 300 (achieves 100.0% power, SE = 0.0801)
battery_refurbishpackreplace: n >= 300 (achieves 100.0% power, SE = 0.0758)
battery_range_year0: n >= 300 (achieves 100.0% power, SE = 0.0006)
battery_degradation: n >= 300 (achieves 100.0% power, SE = 1.4100)

random_random_parameter

power_random_random_parameter <- cbc_power(
  data=choices_random_random_parameter,
  outcome = "choice",
  obsID = "obsID",
  n_q = 6,
  n_breaks = 10)
Auto-detected parameters: veh_mileage, veh_price, battery_refurbishcellreplace, battery_refurbishpackreplace, battery_range_year0, battery_degradation
Using 'respID' as panelID for panel data estimation.
Estimating models using 10 cores...
Model estimation complete!
plot(power_random_random_parameter, type = "power", power_threshold = 0.9)

plot(power_random_random_parameter, type = "se")

summary(power_random_random_parameter, power_threshold = 0.9)
CBC Power Analysis Summary
===========================

Sample size requirements for 90% power:

veh_mileage    : n >= 300 (achieves 100.0% power, SE = 0.0000)
veh_price      : n >= 300 (achieves 99.9% power, SE = 0.0000)
battery_refurbishcellreplace: n >= 300 (achieves 100.0% power, SE = 0.0828)
battery_refurbishpackreplace: n >= 300 (achieves 100.0% power, SE = 0.0759)
battery_range_year0: n >= 300 (achieves 100.0% power, SE = 0.0006)
battery_degradation: n >= 300 (achieves 100.0% power, SE = 1.4504)

shortcut

power_shortcut <- cbc_power(
  data=choices_shortcut,
  outcome = "choice",
  obsID = "obsID",
  n_q = 6,
  n_breaks = 10)
Auto-detected parameters: veh_mileage, veh_price, battery_refurbishcellreplace, battery_refurbishpackreplace, battery_range_year0, battery_degradation
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)

comparison

plot_compare_power(
  random_fixed_parameter = power_random_fixed_parameter,
  random_random_parameter = power_random_random_parameter,
  shortcut = power_shortcut,
  type = "power"
)

plot_compare_power(
  random_fixed_parameter = power_random_fixed_parameter,
  random_random_parameter = power_random_random_parameter,
  shortcut = power_shortcut,
  type = "se"
)