Repository navigation
Align the R teaching with the BMS Intro R reference guide - #60
Merged
Merged
Conversation
Add Lesson 2-4 on missing values, recoding and joining (na_if, is.na, na.omit, case_when, ordered factors, ifelse dummies, rename, left_join, reading Excel and SPSS files with labels), with exercise m2-4-a. Add what the guide expects where the course was silent: data types and the global environment, script style and ?? help, the BMS package list, the pipe shortcut, tabyl() crosstabs with janitor, the goodness-of-fit test, pt/qt/pchisq/qchisq, Levene's and Welch's tests, Shapiro-Wilk, Breusch-Pagan and VIF, KMO and Bartlett before a factor analysis, and the CTT, Lambda4 and mirt pointers for psychometrics. Frame the site for BMS bachelor students and point to the BMS Methodology Shop for help with students' own research.
The core course now follows the BMS Research Methods and Statistics material. Modules 16 and 17 go beyond it, so they appear in the sidebar, on the home page and in the progress totals only when Advanced topics is switched on under the new Settings group. Points still count every lesson, and a link to an advanced lesson still opens it.
The credits and README now name the BMS Intro R reference guide, the Intro R course and the Methodology Shop next to van den Berg's book, and link the online version of the book. Each lesson shows which chapters of the book and of the BMS guide to read along.
Each core lesson now names the chapters of the online book, and where they apply the appendices on the normal and t-distributions, that cover it, linked to their pages, plus the matching chapters of the BMS guide. A test checks that all 16 chapters are read along with some lesson and that every lesson in Modules 0 to 15 has a reference.
Factor analysis is in the BMS guide, so Lesson 17-2 moves into Module 3 (keeping its id, so saved progress still finds it) and Module 17 becomes Mediation and reports. Sections the sources do not cover, Fisher's exact test, robust and bootstrap intervals and nested random effects, are now wrapped in an Advanced block that shows a one-line note until Advanced topics is on. The model chooser lists only the models the core course teaches, and an advanced answer says how to see it. The README gains the chapter map.
Adds five research methods lessons before Module 0, following the BMS psychology course Introduction to Research Methodology and Van der Kolk's readers: research questions, units and measurement levels, sampling, causality with crosstabs and the elaboration models, and research designs, with four checked exercises. Aligns existing lessons with the R the course teaches: crosstabs with the independent variable in the columns and column percentages (09-2 and its exercise), Tukey quartiles and whiskers by hand (04-2), the mode and tabyl frequency tables with valid percentages (03-1), scale(), reversing and a composite index plus the empirical rule (05-2), rm(list = ls()) (01-1) and foreign::read.spss (02-4). Updates credits, README and counts.
The model chooser and sample size planner named each option button after its title only, while the button also shows an example and a note. axe 4.14 reports that as label-content-name-mismatch (WCAG 2.5.3), which failed the weekly update. The button now takes its name from its own text, with the extra lines hidden from the name and kept as its description. The accessibility check now also covers the research methods lessons.
PeterSlijkhuis
marked this pull request as ready for review
October 19, 2026 11:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: the course taught the statistics well but skipped much of the R that the BMS guide "Intro R for BMS Bachelor programs" expects students to know: missing-value codes, recoding, ordered factors, joins, SPSS imports with labels, tabyl() crosstabs, Levene's test, Breusch-Pagan, VIF, and the p/q distribution functions. The home page spoke of "psychology and business students" and did not point to the BMS Methodology Shop.
After: a new Lesson 2-4 (missing values, recoding and joining, plus Excel and SPSS files) with a checked exercise, and short additions where the guide covers something the course was silent on. The home page and README frame StatLab for BMS bachelor students and link the Methodology Shop for help with students' own research.
How: lesson additions use the course datasets and were run in native R 4.3 (all blocks except the janitor one, which has no Ubuntu package). janitor and lmtest join the on-demand package set, with a new itest that installs both in webR and runs the lesson calls. Exercise m2-4-a's solution, alternates and wrong answers were graded natively with the same check wrapper the site uses.