Selected Talks

2026

Unit Testing for Autograded `R` Code

Manually grading R code can be time-consuming. Instead, we can give students instant feedback with autograded code. Many autograding implementations exist (learnR, webR, Gradescope, EdStem Lessons, an “R package” approach, GitHub, etc.), but all require writing unit tests. $\textcolor{white}{aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}$ This workshop will introduce approaches to unit testing for common problems (data wrangling, data import, functions, programs, vectors and lists, plots, code style, strings and regular expressions, SQL), as well as what packages and functions are useful for writing unit tests (testthat, lintr, autogradeR, base::parse, and utils::getParseData, etc), metaprogramming, how to balance test strictness (exact syntactical match) and test robustness (partial/full output matching), how to structure question prompts, and how to give useful feedback (assertr, praise) on failed tests.

2022

Scissors beats Rock (and other failures of Transitive Models using Paired Comparisons)

If the Utah Jazz beat the Portland Trailblazers and the Trailblazers beat the Denver Nuggets, does that mean that the Jazz are better than the Nuggets, or could the Nuggets actually be better than the Jazz? To answer this question, we investigate the assumption of transitivity. We propose a novel linear model (CRSP) whose latent bilinear fixed effect allows us to estimate deviations from our transitive model (C). Additionally, we consider extensions.

2021

An Integrative Learning Experience with Qwixx: Play, Probability, Partnership, Planning, and Programming

Undergraduate students with data science and modeling prerequisites take an elective upper-level data science course centered on “competitions” (sports, eSports, board games, elections). Under the constraints of a hybrid learning environment, students build connections with their peers in a project incorporating seemingly disparate learning objectives via Qwixx, a game of chance and partial information that can be learned in 5 to 10 minutes yet complicated enough that many valid strategies exist. Over several weeks, they build an Excel spreadsheet to play with each other over Zoom, program the game in R, and build strategies in teams to compete in a round robin head-to-head simulation in R. Along the way, they develop algorithmic thinking, expand their view of Monte Carlo simulations, exercise the software development life cycle, collaborate and practice reproducibility in RStudio and GitHub (Classroom), strategize and make decisions under uncertainty, and ultimately create their own paired comparisons data to analyze. We will also examine how student performance in this intensive enterprise is associated with other student learning in this course.

2018

Using a Large GPS Dataset to Enhance Survey Matching

NOAA Fisheries is the United States’ federal steward of their nation’s ocean resources. To this end, they currently collect data on catch and “effort” in the recreational fishing sector in the charter boat modality. Catch is estimated with the Access Point Interview Survey (APAIS), in which biologists wait at randomly assigned docks, marinas, and slips and interview all passengers of any charter boat they intercept. The caught fish are inspected, identified, measured, and counted at the passenger level to produce an estimate for catch per unit effort (CPUE). “Effort” is estimated via a costly telephone survey with low response rate. PUE and effort are then combined to produce an estimate of total catch per species.

In an effort to reduce costs, improve accuracy, and increase timeliness, NOAA Fisheries are experimenting with an alternative data collection procedure in which charter boat captains report the total catch per species at the end of each trip with a GPS-enabled electronic device (currently, Thorium). The captains’ reports are used as auxiliary data to the probability sample of intercepts, resulting in an estimator that has a similar form to a capture recapture estimator. This estimation procedure requires matching intercepted trips to reported ones. Since intercepted trips are a probability sample, this allows estimation of a reporting rate.

However, since charter boats may take multiple trips in a day, the trip report to APAIS interview matching procedure requires a time component. The times reported in the captains’ log are often misleading or erroneous, and thus the author sought an alternative source of data to enhance matching. Each vessel produces a GPS position report on a periodic basis – to date, there are over 2.5 million such reports. We describe how the periodic GPS position data is used to improve shore arrival time estimates. Initially, locations at which vessels are stationary for extended periods of time and which match the NOAA Site Register (sites at which APAIS interviews may take place) are identified. Then, trips to and from these locations are identified. From these trips, we can estimate arrival time to be as accurate as half of the report resolution. Additionally, duration of trip is estimable. For vessels whose GPS reporting is turned off, we can then use previous trip data to enhance arrival time estimates. Finally, the relationship between catch and trip duration is explored. We discuss the obstacles with the dataset size and home base and trip identification. Our findings may be extended to other surveys which may be augmented with GPS data.

CRSP: Modeling Stochastically Intransitive Relationships between NBA Teams

If the Warriors beat the Rockets and the Rockets beat the Spurs, does that mean that the Warriors are better than the Spurs? Sophisticated fans would argue that the Warriors are better by the transitive property, but could diehard Spurs fans make a legitimate argument that their team is better despite this chain of evidence? We attempt to answer whether the assumption of transitivity in pairwise comparisons should hold by modeling without the assumption.

We propose a novel linear model (CRSP) whose latent bilinear fixed effect allows us to estimate deviations from our transitive model (C). We discuss the mathematical details of the model, including an eigendecomposition that enables an estimate of the latent bilinear fixed effect. We also propose a generalized version of the bilinear fixed effect and demonstrate an application thereof.

CRSP: Modeling Stochastically Intransitive Relationships between NBA Teams

If the Warriors beat the Rockets and the Rockets beat the Spurs, does that mean that the Warriors are better than the Spurs? Sophisticated fans would argue that the Warriors are better by the transitive property, but could diehard Spurs fans make a legitimate argument that their team is better despite this chain of evidence? We attempt to answer whether the assumption of transitivity in pairwise comparisons should hold by modeling without the assumption.

Applications of pairwise comparisons reach far beyond sports. Examples include ranking political candidates, selecting a Pope, experimentally predicting animal behavior, and exploring dominance relations within or among species. We focus on the setting where all pairs of items, teams, players, or objects have been compared to one another twice.

We propose a novel linear model (CRSP) whose latent bilinear fixed effect allows us to estimate deviations from our transitive model (C). We discuss the mathematical details of the model, including an eigendecomposition that enables an estimate of the latent bilinear fixed effect. We also propose a generalized version of the bilinear fixed effect and demonstrate an application thereof.