View source: R/choice_responses.R
| choice_responses | R Documentation |
The choice_responses object defines the observed discrete responses.
Additional response columns (for example ranked choice indicators) are
preserved so they can be merged with covariates downstream.
generate_choice_responses() simulates choices
choice_responses(
data_frame,
column_choice = "choice",
column_decider = "deciderID",
column_occasion = NULL,
cross_section = FALSE
)
generate_choice_responses(
choice_effects,
choice_covariates = generate_choice_covariates(choice_effects = choice_effects),
choice_parameters = generate_choice_parameters(choice_effects = choice_effects),
choice_identifiers = extract_choice_identifiers(choice_covariates),
choice_preferences = generate_choice_preferences(choice_parameters = choice_parameters,
choice_effects = choice_effects, choice_identifiers = choice_identifiers),
column_choice = "choice",
choice_type = c("auto", "discrete", "ordered", "ranked")
)
data_frame |
[ |
column_choice |
[ |
column_decider |
[ |
column_occasion |
[ |
cross_section |
[ |
choice_effects |
[ |
choice_covariates |
[ |
choice_parameters |
[ |
choice_identifiers |
[ |
choice_preferences |
[ |
choice_type |
[ |
A data.frame.
choice_effects <- choice_effects(
choice_formula = choice_formula(
formula = choice ~ price | time,
error_term = "probit"
),
choice_alternatives = choice_alternatives(J = 5)
)
generate_choice_responses(choice_effects = choice_effects)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.