Phase IV: The Analyst
Phase IV: The Analyst
Duration: Weeks 11 to 13 (Book Part IV: Execution) Analyze data using R for statistical insights
Reading this page for MC 501? Use the Graduate edition control in the lower corner of the page. The three assignments are the same in both courses, but the graduate expectations and point values differ. MC 451 students should leave it off.
Learning Objectives
By the end of Phase IV, you will:
- Import, clean, and transform data in R using the tidyverse
- Create frequency tables and publication-quality visualizations with ggplot2
- Select and conduct the appropriate inferential statistical test for your variables
- Interpret results in both APA format and plain English
- Calculate and contextualize effect sizes
- Document all data transformation and analysis steps
Phase IV Overview
This phase is where your research becomes quantitative. Weeks 11 to 13 work through one chapter each. In MC 451 every week pairs a concept session with a lab session on that chapter, so you practice in class rather than only at home. These three assignments build on each other in sequence: the output of one is the input of the next.
Reading map
| Chapter | Focus |
|---|---|
| Ch 11: Wrangling the data | Import, diagnose, clean, join, export with the tidyverse |
| Ch 12: Visualizing the narrative | Frequency tables, cross-tabulation, ggplot2 grammar of graphics |
| Ch 13: Making the call | Chi-square, t-test, correlation, ANOVA, regression; APA reporting; effect sizes |
Every assignment is due Friday of the week listed, by 11:59 PM.
Assignments
Data Wrangling in R (50 pts), Week 11
Using the Twitch data from the v2v package:
- Hand-code a variable for a 30-message sample drawn with
sample_messages() - Load and clean the chat and stream tables (timestamps, message length, factors, missing values)
- Join the stream-level information back onto the chat messages
- Export a clean dataset as
twitch_analysis.RDS
This assignment teaches the full data pipeline, from raw input to analysis-ready output.
MC 451 collects the Sampling Plan and Pilot (75 pts) in this same week, so Week 11 is the heaviest week of the term at 125 points. The Sampling Plan is given an extra week so the pilot is real work rather than rushed work. Draft it during Week 10.
MC 501: your wrangling script carries a data provenance statement: where each field came from, every transformation applied, and every row dropped with the reason. It is the same 50 points, but it has to survive being read by someone reproducing your work.
Describing Data in R (75 pts), Week 12
Describing Data in R (100 pts), Week 12
Using twitch_analysis.RDS:
- Create frequency tables for key categorical variables
- Build ggplot2 visualizations (bar charts, trend lines) with professional formatting
- Create a cross-tabulation showing the relationship between two variables
- Write two to three sentences of narrative interpreting each output
MC 501: this assignment is worth 100 points rather than 75, and the extra weight is in the diagnostics. Report the distributional checks behind each figure, not only the figure: what the shape of the variable is, whether the assumptions of the test you are heading toward look tenable, and what the outliers are.
Inferencing Data in R (100 pts), Week 13
Using twitch_analysis.RDS:
- State your hypothesis in plain English before running any code
- Select the appropriate test based on your variable types:
- Two categorical variables: chi-square test of independence
- One categorical (two groups) by one continuous: independent t-test
- Two continuous variables: Pearson correlation
- Run the test in R and report it in APA format
- Interpret the result in plain English
- Calculate and report the effect size
MC 501: go deeper on the same test rather than adding more tests. Report and check the assumptions, show the diagnostics, and give the power statistics behind the design. Distinguish statistical significance from practical size explicitly.
Points at a glance
MC 451, 225 points: Data Wrangling 50, Describing Data 75, Inferencing Data 100.
MC 501, 250 points: Data Wrangling 50, Describing Data 100, Inferencing Data 100.
R Environment
All R assignments use the Twitch corpus that ships with the v2v package: 35,267 chat messages and 32,276 stream snapshots across fifty channels. Load it with:
library(v2v)
chat <- twitch_chat()
streams <- twitch_streams()There is no file to download and no path to get wrong.
Required packages: tidyverse, v2v, knitr, scales
Practice Activities
- Pokemon Wrangling Practice: apply the full import, diagnose, clean, export pipeline to a TidyTuesday Pokemon dataset. Includes a downloadable
.qmdfile to work through in VS Code.