You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These methods minimize D-error to create statistically efficient designs. They require more computation but produce higher-quality designs, especially with good priors. Each method has a different approach:
186
+
These methods minimize D-error to create statistically efficient designs. They require more computation but produce higher-quality designs, especially with good priors.
187
+
188
+
Unlike the previous methods, these methods identify a single d-optimal design and then repeat that design across each respondent. In contrast, the other methods create a unique design for each respondent.
189
+
190
+
Each method has a different approach:
187
191
188
192
- The `"stochastic"` method uses random profile swapping to minimize the d-error, accepting the first improvement found. This is a faster algorithm as a compromise between speed and exhaustiveness.
189
193
- The `"modfed"` (Modified Fedorov) method exhaustively tests all possible profile swaps for each position. It is slower than other methods though more thorough.
190
194
- The `"cea"` (Coordinate Exchange Algorithm) method optimizes attribute-by-attribute, testing all possible levels for each attribute. It is faster than `"modfed"`, though requires all possible profiles and cannot accept restricted profile sets.
191
195
192
-
Unlike the previous methods, these methods identify a single d-optimal design and then repeat that design across each respondent. In contrast, the other methods create a unique design for each respondent.
196
+
For the `"modfed"` and `"cea"` methods, designs are by default created using the much faster algorithms in the [{idefix}](https://github.com/traets/idefix) package. You can use the (slower) {cbcTools} versions of these methods by setting `use_idefix = FALSE`.
193
197
194
198
For the examples below, we have `n_start = 1`, meaning it will only run one design search (which is faster), but you may want to run a longer search by increasing `n_start`. The best design across all starts is chosen.
195
199
@@ -293,23 +297,25 @@ head(design_labeled)
293
297
294
298
## Blocking
295
299
296
-
For D-optimal methods, create multiple design blocks to reduce respondent burden:
300
+
For D-optimal methods, create multiple design blocks to reduce respondent burden using the `n_blocks` argument. In the example below, two blocks are created with each block containing `n_q = 6` questions:
297
301
298
302
```{r}
299
303
design_blocked <- cbc_design(
300
304
profiles = profiles,
305
+
method = "stochastic",
306
+
priors = priors,
301
307
n_alts = 2,
302
308
n_q = 6,
303
309
n_resp = 100,
304
-
n_blocks = 2, # Create 2 different design blocks
305
-
priors = priors,
306
-
method = "stochastic"
310
+
n_blocks = 2 # Create 2 different design blocks
307
311
)
308
312
309
313
# Check block allocation
310
314
table(design_blocked$blockID)
311
315
```
312
316
317
+
The way blocking works is that a single design is created with `n_q*n_blocks` questions, then those questions are allocated into blocks with `n_q` questions per block. For the `"modfed"` and `"cea"` methods, the blocking is handled using the internal logic of the [{idefix}](https://github.com/traets/idefix) package, which allocates questions to the blocks in a balanced way. You can use the (slower) {cbcTools} versions of these methods by setting `use_idefix = FALSE`. For the `"stochastic"` method, questions are randomly allocated to blocks.
318
+
313
319
## Dominance Removal
314
320
315
321
Remove choice sets where one alternative dominates others based on parameter preferences. There are two forms of dominance removal:
0 commit comments