Converts a conjoint design into one forced-choice item per task. Administration draws profiles for each persona and asks the model to choose a profile by its label.
Arguments
- design
A
conjoint_design()object.- question
Question text shown above each task's profiles.
Value
A panel_instrument with task identifiers such as task_1 and
profile options such as "Profile 1". Each item retains the attribute
levels used for profile draws. The instrument's conjoint field
retains the design metadata used by conjoint_amce().
Details
Each persona-task pair is a separate request. Its item_position is
instrument metadata and does not describe an order of exposure.
Profile choice options are permuted for each request.
Profile descriptions follow profile-number order. Attributes within a
description follow the design's attribute order. The initial profile
table in design is not reused across personas.
Examples
set.seed(110)
panel <- panel_from_margins(list(group = c(A = 1)), n = 4)
design <- conjoint_design(
list(economy = c("weak", "strong"), taxes = c("lower", "higher")),
n_tasks = 3
)
instrument <- conjoint_instrument(
design, "Which candidate do you prefer?"
)
cfg <- LLMR::llm_config("groq", "example-model")
runner <- function(experiments, ...) {
experiments$response_text <- "Profile 1"
experiments
}
panel_administer(panel, instrument, cfg, .runner = runner)