Skip to main content

In-Class Studio: Planted-Error Audit

Where this fits

You have produced a clean Table 1 (eda03), thought about what each statistic claims (eda04), and learned the four audit categories (eda05). This page is the in-class studio where you apply the audit to a starter file seeded with realistic AI-style mistakes. The studio drafts feed straight into Assignment 6.

Before you start

Take 2 minutes to check that your Codespace is ready:

  1. library(tidyverse); library(knitr) runs without error.
  2. The cached data file resolves: examples/nhanes-equity/data/nhanes_equity_v6.csv.
  3. Open the rendered Week 7 worked example as your clean reference. You do not need to copy or render its source in the personal workspace. Render only the supplied personal-workspace planted-error starter and your submitted correction.

If any step fails, ask your debugging partner before running the planted-error starter.

Goal

Audit the planted-error starter, categorize at least five issues, and produce a corrected EDA note that another student could rerun.

Inputs

  • Worked example to compare against: weeks/week07-eda-ai-audit/eda03-worked-example.qmd
  • Dataset: examples/nhanes-equity/data/nhanes_equity_v6.csv
  • Planted-error starter in your personal workspace (the artifact you will audit): assignments/assignment06-eda-ai-audit/planted-error-starter.qmd

Activity Steps

  1. Review the worked example and identify the cohort definition, missingness check, and Table 1 labels.
  2. In your personal workspace, open assignments/assignment06-eda-ai-audit/planted-error-starter.qmd and inspect both code and prose before running it.
  3. Run or read the starter and annotate at least five issues.
  4. Categorize each issue as correctness, reproducibility, interpretation, or stewardship (see eda05 if you need a refresher).
  5. Produce a corrected EDA note and Table 1.

Required Outputs (studio draft)

These are the draft files you produce in class. The Assignment 6 deliverable list (eda07) is the same set, polished.

  • eda-note.qmd — a rerunnable Quarto note with cohort definition, missingness table, and Table 1.
  • eda-note.html — rendered output from the Quarto note.
  • table1.csv — exported Table 1 or equivalent descriptive summary.
  • audit-note.md — at least five detected issues with category, why it matters, and corrected approach.
  • provenance-stewardship-note.md — a short note naming the data source, classroom-use context, and one privacy or stewardship caution.
  • ai-use-note.md — if you used AI, explain what it helped with and how you verified the result.

Minimum Table 1 Requirements

  • Cohort: age 20-80.
  • Stratifier: IncomeGroup.
  • Variables: N, BMI mean (SD), and age mean (SD).
  • Methods note: state that the table is descriptive, unweighted, and non-causal.

Completion Check

You are done with the studio when another student can rerun your eda-note.qmd, see exactly who is included, understand how missingness was handled, and identify why the planted-error starter was misleading.

Where this goes next

Polish the studio drafts into the Assignment 6 submission and the Milestone 2 deliverables. eda07 walks through the A6 files one by one and shows which files double as M2 evidence.