← ClaudeAtlas

conjoint-cleaninglisted

Turns a raw Qualtrics conjoint export into an analysis-ready long-format dataset — export settings and metadata rows, identifying which Qualtrics implementation produced the file, reshaping wide to long by hand or with cjoint read.qualtrics and cjdata reshape_conjoint, mapping the choice variable onto profiles, ratings and secondary DVs, attribute-level translation and factor ordering, pilot data-quality diagnostics, and subgroup merges. Use when the user has a conjoint CSV and asks how to clean, reshape, restructure, or debug it, cannot line the choice column up with the profiles, or asks what the data must look like before AMCE estimation. Design questions go to conjoint-design, validity review to conjoint-diagnostics.
scdenney/open-science-skills · ★ 57 · Code & Development · score 74
Install: claude install-skill scdenney/open-science-skills
# Conjoint Data Cleaning Expert ## Instructions ### 1. Qualtrics Export Settings and Metadata **Export format:** The right Qualtrics export choice depends on the pipeline. `cjoint::read.qualtrics()` (Method A) hard-errors when the choice-response columns contain text — export **"Use numeric values"** for it. `projoint::reshape_projoint()` parses the chosen profile from a label at the end of the outcome string (default `A`/`B`), and manual reshaping benefits from readable attribute labels — **"Use choice text"** works for those. When unsure, export both versions; they differ only in response coding. If working with non-Latin scripts (Chinese, Korean, Arabic), export as XLSX rather than CSV to avoid UTF-8/ANSI encoding issues. On Windows with East Asian locales, `read.csv()` may still require `Sys.setlocale()` to match the file encoding before import (see `?cjoint::read.qualtrics` East Asian Language Support). **Metadata rows:** Current Qualtrics CSV exports include **3 header rows** before respondent data: (1) variable identifiers, (2) question text/descriptions, (3) ImportId JSON. Legacy exports have 2 rows. The `cjoint::read.qualtrics()` parameter `new.format = TRUE` (set explicitly; default is `FALSE`) handles the 3-row format. For manual import via `readxl::read_excel()` or `readr::read_csv()`, skip the appropriate number of metadata rows after reading headers. **Randomization order columns:** If "Export viewing order data" is enabled, Qualtrics adds `_DO_` columns (e