Prepares tidy inputs for MM/AMCE estimation and IRR handling.
Called inside pj_estimate() after reshaping to respondent–task–profile.
organize_data(
.dataframe,
.structure,
.estimand,
.remove_ties,
.att_choose,
.lev_choose,
.att_notchoose,
.lev_notchoose
)A named list with two tibbles:
$data_for_estimand: rows restricted and reshaped to the
requested estimand/QOI. For profile-level, one row per respondent–task–profile
where the target level is present (ties optionally removed). For choice-level,
one row per respondent–task with paired information for profiles 1 and 2,
restricted to the requested attribute-level pair(s).
$data_for_irr: one row per respondent with columns id,
agree (if available), and any detected weight/cluster hints
(columns matching "my_weight|my_cluster|^weights?$|^clusters?$").
A tibble/data frame from reshape_projoint(),
containing columns like id, task, profile, selected,
agree (if repeated), and attribute columns named att1, att2, ...
that store level_ids (e.g., "att1:level2").
Either "profile_level" or "choice_level".
Either "mm" or "amce".
Logical; if TRUE (default) remove tied responses
in profile-level setups (keeps tasks where exactly one profile is selected).
Attribute ID for the “chosen” side (e.g., "att3").
Level ID(s) for the chosen side (e.g., "level2" for
profile-level; vector of level IDs for choice-level).
Attribute ID for the “not chosen” side (choice-level only).
Level ID(s) for the not-chosen side (choice-level only).