Module 01 Activity
Scenario
You have been asked to test whether a change worked. Set the project up so the answer is checkable by somebody who does not trust you.
What you build
A statistical project skeleton with a dated analysis plan, a script that computes and a report that only cites.
Steps
- Write the analysis plan first: question, outcome, unit, comparison, primary test, significance level and sidedness. Date it.
- Create the folders, including one for the plan, and put the raw data where code never writes.
- Put
set.seed()once at the top of the analysis script and record the value in the report. - Build the analysis table explicitly — the planned columns only, the grain set, grouping variables as factors with deliberate levels.
- Encode every exclusion as a named constant with its reason, and print how many rows it removed from each group.
- Tidy every planned test into one results table, then write the interpretation separately without re-selecting rows.
Evidence to hand in
- The dated analysis plan.
- The folder listing.
- The analysis table, with what was dropped from raw.
- The exclusion rules and their row counts.
- The results table covering every planned comparison.
- The interpretation section.
Review checklist
- The plan predates the analysis and names the primary test and alpha.
- The seed is set once and its value appears in the report.
- Every column in the analysis table was named in the plan.
- Every exclusion is a named constant with a printed row count.
- The results table contains all planned comparisons, not only the significant ones.
