View source: R/organize_data.R
| organize_data | R Documentation |
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
)
.dataframe |
A tibble/data frame from |
.structure |
Either |
.estimand |
Either |
.remove_ties |
Logical; if |
.att_choose |
Attribute ID for the “chosen” side (e.g., |
.lev_choose |
Level ID(s) for the chosen side (e.g., |
.att_notchoose |
Attribute ID for the “not chosen” side (choice-level only). |
.lev_notchoose |
Level ID(s) for the not-chosen side (choice-level only). |
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?$").
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.