# Bayesian multilevel models for repeated-measures data: A conceptual and practical introduction in R

*2022-02-10*

# Preface

Repeated measures data is very common in linguistics, and the norm in many linguistic subfields (phonetics, variationist sociolinguistics, psycholinguistics, etc.). Bayesian multilevel models are perfectly suited for the analysis of repeated-measures data, and offer linguists flexibility and many exciting opportunities. Because of this, there is growing interest in using Bayesian multilevel models in linguistics despite the lack of available resources. This book is an introduction to the analysis of repeated-measures data using Bayesian multilevel regression models, specifically aimed at linguists with no background in statistics.

This book is intended for an introductory statistics class for senior undergraduate or graduate students, and for faculty members and other researchers to use as a self-study guide. This book is aimed at 1) students who are looking for a conceptual framework to help understand multilevel Bayesian models, but not necessarily looking for ‘too-much’ mathematical detail, and 2) researchers who are already experienced with frequentist modeling and are looking to ‘translate’ their skillset over to a Bayesian framework.

## 0.1 Structure of book

Each chapter of the book presents a different regression model design concept:

Chapter 1: Inspecting a single group of observations: Introduction to regression models

Chapter 2: Inspecting a ‘single group’ of observations using a Bayesian multilevel model

Chapter 3: Comparing two groups of observations: Factors and contrasts

Chapter 4: Comparing many groups: ANOVA and interactions

Chapter 5: Continuous predictors and their interactions with factors

Chapter 6: Random slopes and multiple random effects

## 0.2 Statistics as Procedural knowledge

Although statistical knowledge might seem like declarative knowledge, in many ways it is more similar to procedural knowledge. You would never read a chapter from a French textbook once and expect to have memorized all the vocabulary and irregular forms. Similarly, you would never practice a piano piece a single time and assume that you are just ‘bad at the piano’ because you can’t play it flawlessly. And yet a student may read a chapter from a statistics book once and feel dissapointed that they do not already understand the concepts.

Think of acquiring statistical knowledge like learning a language. It is normal, and in fact should be expected, that the reader will need to read some parts of the text multiple times, and *practice*, before being able to really *understand* all of the concepts presented here.

I would like to tell you a little bit about John von Neumann. Von Neumann was perhaps the greatest mathematical mind the world has ever seen, and a glance at his contributions to mathematics on his Wikipedia page reveals an astonishing breadth and depth of mathematical abilities. Some quotes from his contemporaries about von Neumann:

“I have sometimes wondered whether a brain like von Neumann’s does not indicate a species superior to that of man” - Hans Bethe

“one had the impression of a perfect instrument whose gears were machined to mesh accurately to a thousandth of an inch.” - Eugene Wigner

“Johnny was the only student I was ever afraid of. If in the course of a lecture I stated an unsolved problem, the chances were he’d come to me at the end of the lecture with the complete solution scribbled on a slip of paper.” - George Pólya

There is a story about von Neumann that says that he was a late sleeper. One day, one of his theorems was proven correct, and a messenger went to tell him one morning. von Neumann is said to have responded: “You wake me up early in the morning to tell me that I’m right? Please wait until I’m wrong”.

And yet this perfect mathematical mind is said to have said the following to a graduate student who complained about not understanding some mathematical abstraction:

- “Young man, in mathematics you don’t
*understand*things. You just get*used to them*” - John von Neumann

This was von Neumann’s experience, it has certainly been my experience, and it will likely be yours. Some things will make no sense, and then one day they will. It won’t be clear when they did or why they did all of the sudden, but a combination of repetition, practice and *time* will make the difference. No amount or thinking and raw brain power alone will help you *understand* statistics.

That being said, the things we talk about in this chapter will be come up in every chapter, so if things don’t all make sense right now that’s fine, you will have plenty of chances to *get used to them*. Things will make more sense bit by bit as we learn how to use more and more complicated models. After reading a few chapters you should come back and read this chapter again (and again). You may notice that a lot of things are discussed in this chapter that you did not notice the first time you read it.