Phase IV: The Analyst
Phase IV: The Analyst
Duration: Weeks 11 to 15 (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.
Steps on this page
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 each take one chapter, and Inferencing Data is due in Week 15, after Thanksgiving. 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 |
In MC 451 every assignment is due Friday of the week listed, by 11:59 PM. In MC 501 it is due the Monday after that week, by 11:59 PM.
R cheat sheets
Keep these open while you work through the three R worksheets. There is one page per package, and each command gets a plain sentence, a worked example on the Twitch data with the exact output R prints, the same call written for your own columns, and the error you are most likely to hit.
Assignments
Data Wrangling in R (50 pts), Week 12
Using the Twitch data from the course package, v2v:
- Hand-code a variable for a 30-message sample drawn with
set.seed()andslice_sample() - 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. The R Companion writes the load, date, join, and save steps for you (optional): AURA: Write R code, under R2 Data. Save the result as an RDS file, not a CSV.
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 13
Describing Data in R (100 pts), Week 13
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, the table the chi-square tests in Inferencing Data
- Write two to three sentences of narrative interpreting each output
Under R3 Describe in the R Companion’s AURA: Write R code (optional), it writes the tables and charts; the narrative after each output is yours.
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 15
Using twitch_analysis.RDS:
- State four hypotheses in plain English before running any code, one for each test
- Match each test to its variable types, and say why that test and not another:
- Two categorical variables: chi-square test of independence
- One categorical (two groups) by one continuous: independent t-test
- One categorical (three or more groups) by one continuous: one-way ANOVA
- One continuous outcome by one continuous predictor: linear regression
- Run all four in R and report each in APA format
- Report each effect size (Cramér’s V, Cohen’s d, eta-squared, R-squared) in the units of the data
- Interpret each result in plain English, and say what the results do not license
MC 501: the same four tests, deeper rather than wider. Check and show the assumptions behind each, give each effect size with its confidence interval (omega-squared beside eta-squared, the standardized coefficient beside the slope), report the power behind one focal test, and distinguish statistical significance from practical size across all four.
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: the course set the R Companion’s Check my setup confirms and Install what is missing installs: tidyverse, janitor, likert, rmarkdown, languageserver, httpgd, remotes, v2v, and effectsize; MC 501 adds lm.beta and pwr. (knitr and scales arrive with tidyverse and rmarkdown.)
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.