library / lib7732f47814ae8c96
Bayesian Multilevel Models for Repeated Measures dаta A Conceptual and Practical Introduction in R
Santiago Barreda, Noah Silbert
In a sentence
A practical, hands-on introduction to building, fitting, and interpreting Bayesian multilevel models for repeated measures data using the R package brms.
This book offers a hands-on, conceptual introduction to Bayesian multilevel models for analyzing repeated measures data, a common data type in linguistics, psychology, and cognitive science. Starting with simple models and progressing to more complex ones like multinomial regression, the authors use a single, realistic experimental dataset throughout to provide fully worked examples in R using the `brms` package. Instead of getting bogged down in mathematical theory, the book focuses on building intuitive, geometric understanding and practical coding skills, making it accessible for readers with any level of statistical background who want to move beyond traditional methods and harness the flexibility of Bayesian modeling for their own research.
The four lenses
- Science
- Statistics
- Systems
- Strategy
Tags
The model
This model represents the process by which listeners use acoustic cues from a speaker's voice to form judgments about their physical and social characteristics, such as height, age, and gender. The core idea explored in the book's main example is that the influence of primary acoustic cues (like f0 and VTL) on outcomes (like apparent height) is not direct, but is heavily moderated by the listener's perceptual categorization of the speaker (e.g., as 'adult' or 'child'). The model also accounts for systematic variation across individual listeners and speakers.
Fundamental Frequency (f0)contextual condition
The rate of vibration of a speaker's vocal folds, measured in Hertz (Hz). It is the primary acoustic correlate of perceived voice pitch and serves as a cue for speaker size, age, and gender.
Acoustic Vocal-Tract Length (VTL)contextual condition
The effective acoustic length of a speaker's vocal tract, estimated in centimeters from the resonant frequencies (formants) of the speech signal. It is a primary acoustic correlate of perceived speaker size and body length.
Apparent Agepsychological state
The listener's categorical judgment of whether a speaker is a child or an adult. This perceptual categorization acts as a moderator, changing how acoustic cues are interpreted to judge height.
Apparent Genderpsychological state
The listener's categorical judgment of whether a speaker is male or female. This perceptual categorization also acts as a moderator for how acoustic cues are used.
Apparent Heightoutcome metric
The listener's estimate of a speaker's physical height, in centimeters. This is the primary outcome variable, influenced by acoustic cues and the listener's perceptual categorizations.
Listener Variationcontextual condition
Systematic, idiosyncratic differences between individual listeners in their average judgments (intercepts) and their use of acoustic and categorical cues (slopes). This is a key source of non-independence in repeated measures data.
Speaker Variationcontextual condition
Systematic, idiosyncratic differences between individual speakers' voices that influence listener perceptions but are not captured by f0 and VTL alone. This is another source of non-independence.
How they connect
- fundamental frequency − predicts apparent height
- vocal tract length → predicts apparent height
- apparent age → predicts apparent height
- apparent gender → predicts apparent height
- apparent age → moderates vocal tract length
- listener variation → moderates fundamental frequency
- speaker variation → moderates apparent height
A candidate measure
Bayesian Multilevel Models for Repeated Measures dаta A Conceptual and Practical Introduction in R — derived measurement candidates
Fundamental Frequency (f0)
Mean f0 in Hertz (Hz) across a vowel nucleus.
self-report suitability: none
Acoustic Vocal-Tract Length (VTL)
Geometric mean of formant frequencies.; VTL in centimeters, derived from formant frequencies relative to a reference.
self-report suitability: none
Apparent Age
Binary classification (Child vs. Adult).; Categorical choice from multiple options (e.g., Boy, Girl, Man, Woman).
self-report suitability: high
Apparent Gender
Binary classification (Male vs. Female).
self-report suitability: high
Apparent Height
Height estimate in centimeters or feet/inches from a slider or numerical input.
self-report suitability: high
Listener Variation
Standard deviation of listener-level random effects (e.g., intercepts, slopes) from a multilevel model.
self-report suitability: none
Speaker Variation
Standard deviation of speaker-level random effects from a multilevel model.
self-report suitability: none
The story
The reader Researchers, graduate students, and senior undergraduates in fields like linguistics, psychology, and cognitive science. They have repeated measures data and want to analyze it properly, but they find traditional statistics curricula frustratingly slow and indirect. They may feel intimidated by the math or coding involved in modern statistical methods, or feel that their existing skills with simpler models don't fully translate to the Bayesian framework. They want to build flexible, appropriate models for their data and gain a practical, intuitive understanding without getting lost in abstract theory.
External problem
They have complex, repeated measures data, but introductory statistics courses teach inappropriate, oversimplified models (like t-tests or ANOVA) that don't handle this structure, leading to incorrect inferences and publication difficulties.
Internal problem
They feel overwhelmed, confused, and discouraged by statistics. They believe they are "not good at math" and are frustrated that they can't seem to find a straightforward path to analyzing their own research data effectively.
Philosophical problem
It's just plain wrong that researchers should have to learn a series of outdated and inappropriate statistical methods before they are taught the correct, modern tools for their work. Statistical education should be practical, direct, and empowering, not a theoretical gatekeeping exercise.
The plan
- Start with a single, realistic repeated measures dataset that will be used throughout the book to build cumulative understanding.
- Introduce the core concepts of Bayesian multilevel models conceptually and geometrically, not with dense mathematical proofs.
- Provide fully-worked code examples for building, interpreting, and checking progressively more complex models in `brms`.
- Offer practical advice on interpreting output, manipulating posterior samples, and writing up results in a publication-ready format.
Success
- The reader feels confident and competent in analyzing their own repeated measures data.
- They can build, fit, and interpret a wide range of sophisticated Bayesian multilevel models in R.
- They have a strong intuitive grasp of statistical concepts and can effectively communicate their analytical methods and results.
- They move from feeling statistically anxious to feeling empowered and curious.
At stake
- The reader continues to feel stuck, using inappropriate statistical methods or avoiding quantitative analysis altogether.
- They remain intimidated by Bayesian methods and modern statistical programming.
- Their research is held back by their inability to properly analyze their data, leading to weaker inferences and difficulty publishing.
Chapter by chapter
ch01p01Introduction: Experiments and variables (part 1/2)
This chapter introduces the foundational elements of experimental design and statistical inference, focusing on defining key variables and the structure of the experimental data to be analyzed.
ch01p02Introduction: Experiments and variables (part 2/2)
This chapter delves into the significance of probabilities and statistical inference in research, addressing how these concepts are critical for understanding data and drawing conclusions from it.
- Understanding probabilities is crucial for reliable inferences in research.
- Point estimates alone do not capture the full variability inherent in data; credible ranges are essential.
- The differences between empirical and theoretical probabilities significantly impact research conclusions.
- Conditional probabilities provide a powerful lens through which to view data variation and interdependencies.
ch02Probabilities, likelihood, and inference
This chapter unpacks the concepts of probabilities, joint probabilities, and the nuances of likelihood functions, emphasizing their significance in statistical modeling and inference.
ch03Fitting Bayesian regression models with brms
This chapter explores how to fit Bayesian regression models using the brms package, detailing the theory behind regression, Bayesian inference, and practical implementation.
ch04Inspecting a ‘single group’ of observations using a Bayesian multilevel model
This chapter explores the intricacies of analyzing a single group of observations with Bayesian multilevel models, focusing on the impact of repeated measures data and the importance of modeling within and between group variations.
- Repeated measures data requires careful attention to structure; blindly pooling data can obscure important differences among groups.
- Bayesian multilevel models can reveal systematic patterns in data that traditional models often miss due to their assumption of independence.
- The proper estimation of both within and between group variances is vital for credible model parameters and insights.
- Understanding adaptive pooling allows for more reliable estimates that leverage similarities across observations.
ch05Comparing two groups of observations: Factors and contrasts
This chapter examines how to compare the means of two groups, focusing on the statistical design considerations necessary to accurately interpret observed differences in experimental data.
ch06Variation in parameters (‘random effects’) and model comparison
This chapter examines the variation in listener judgments of height based on the apparent age of the speaker, using random effects models to reveal listener-specific differences that were previously masked.
- Listener judgments of height based on apparent age are varied and cannot be accurately represented with fixed effect models alone.
- The transition to random effects modeling provides a framework that acknowledges and incorporates individual differences in perception.
- Visual data representations illustrate the complexity of auditory judgments, necessitating an individual's perspective for comprehensive analysis.
- Recognizing listener-specific variations is crucial for making informed generalizations in auditory research and communication modeling.
ch07Variation in parameters (‘random effects’) and model comparison
This chapter addresses how to incorporate random effects in statistical models to account for variability among listeners, shedding light on interactions between variables that may influence results in nuanced ways.
- Effective statistical modeling demands a recognition of the inherent variability among data respondents; neglecting this can lead to misleading conclusions.
- Incorporating random effects allows modelers to better capture the nuances of listener-specific responses, yielding deeper insights into apparent age perceptions.
- The significance of interaction effects highlights the conditional dependencies that exist within datasets, indicating that understanding must be contextually grounded.
- Model specifications should prioritize adaptive pooling to enhance parameter estimation reliability, particularly when working with varied groups.
ch08Model comparison
This chapter explores the nuances and methodologies required for effective Bayesian model comparison, emphasizing the delicate balance between model complexity and predictive accuracy.
- Complex models are not inherently better; they can obscure generalizability and lead to overfitting.
- The log pointwise predictive density (lpd) is helpful but should not be the sole determinant for model selection.
- Adjusting lpd to account for model complexity via WAIC can enhance decision-making in model selection.
- Leave-one-out cross-validation (LOO) provides a powerful tool for assessing out-of-sample predictive power efficiently.
ch09p01Comparing many groups, interactions, and posterior predictive checks (part 1/2)
This chapter explores methodologies for analyzing complex experimental data involving multiple groups, focusing on the effects of perceived gender and age on height judgments while addressing the statistical challenges and intricacies involved.
- Understanding the impact of perceived characteristics on judgments requires careful statistical analysis of data involving multiple groups.
- Employing random effects allows for more nuanced interpretations of group interactions in multifactorial datasets.
- Posterior predictive checks are essential for validating the fit of statistical models against actual data.
- Interaction terms can elucidate how different factors interrelate and influence outcomes, underscoring the need for thorough examination in analyses.
ch09p02Comparing many groups, interactions, and posterior predictive checks (part 2/2)
This chapter navigates the intricacies of comparing multiple groups through Bayesian modeling, underscoring the significance of prior predictive checks and the flexibility offered by Bayesian approaches.
- Bayesian models facilitate straightforward comparisons of group effects with greater flexibility than traditional models like lmer.
- Prior predictive checks are critical for validating the plausibility of prior distributions and enhancing model reliability.
- Analysts should anchor their priors on domain-specific knowledge to avoid the pitfalls of uninformative model settings.
- Heteroscedastic modeling offers a nuanced understanding of variability within datasets, providing richer insights.
ch10Varying variances, more about priors, and prior predictive checks
This chapter discusses the implementation of varying variances in hierarchical models, emphasizing the significance of selecting appropriate priors and conducting prior predictive checks to enhance model accuracy and reliability.
ch11Varying variances, more about priors, and prior predictive checks
This chapter delves into the complexities of modeling variance in data, focusing on issues of model identifiability, linear dependence, and the implications of incorporating different types of predictors.
ch12Quantitative predictors and their interactions with factors
This chapter explores the utilization of quantitative predictors in models, specifically focusing on their linear relationships and interactions with categorical factors affecting the measurement of speaker height.
- Establishing a linear relationship between quantitative and categorical predictors enriches understanding of perceptual judgments regarding speaker characteristics.
- Centering predictors is crucial for deriving interpretable intercepts in regression models, leading to more meaningful analyses.
- The interactions between categorical predictors significantly influence outcomes, stressing the need for comprehensive modeling that considers all relevant factors.
- The findings support the idea that quantitative metrics like VTL can offer substantial insights into listener perceptions when appropriately modeled.
ch13Logistic regression and signal detection theory models
This chapter explores the mechanisms and applications of logistic regression and signal detection theory, demonstrating how they can be used to analyze dichotomous variables and enhance our understanding of classification tasks in social perception.
- Logistic regression allows for precise modeling of dichotomous outcomes, providing actionable insights into classification tasks.
- Understanding the relationship between predictors and categorical outcomes is critical to beneficial data interpretation.
- Signal detection theory offers a vital metric system for assessing performance in classification.
- Identifying biases in perception can help refine models and lead to more ethically informed conclusions.
ch14Multiple quantitative predictors, dealing with large models, and Bayesian ANOVA
This chapter explores the complexities of modeling with multiple quantitative predictors using Bayesian ANOVA, emphasizing the advantages of Bayesian methods in high-dimensional settings while outlining best practices for model interpretation and diagnostics.
ch15Bayesian Analysis of Variance
This chapter elucidates how Bayesian analysis can be utilized to interpret the components of variation in dependent variables, primarily through the framework of Bayesian ANOVA, distinguishing it from traditional ANOVA methodologies.
- Bayesian Analysis of Variance (BANOVA) offers a more nuanced understanding of variance and predictor importance compared to traditional methods.
- Emphasizing estimation rather than null hypothesis testing is crucial for interpreting data meaningfully in the age of complex datasets.
- Batches of predictors can meaningfully outline sources of variation, guiding researchers toward significant findings instead of superficial conclusions.
- The concept of superpopulation versus finite-population estimates is essential in understanding the uncertainty surrounding model predictions.
ch16p01Multinomial and Ordinal Regression (part 1/2)
This chapter explores multinomial regression as a robust statistical tool for predicting categorical responses based on multiple independent variables, laying the groundwork for understanding ordinal regression.
ch16p02Multinomial and Ordinal Regression (part 2/2)
This chapter navigates the complexities of analyzing experimental data through multinomial and ordinal regression models, providing a narrative coherence that is often overlooked in academic writing.
- Academic writing should be approached as a narrative structure where each section contributes to an overarching story about your research.
- The effectiveness of your analysis hinges not just on statistical rigor but also on the clarity with which you present your findings.
- Developing coherent models helps clarify the relationships between variables, facilitating reader understanding and engagement.
- Embracing multiple analytical perspectives can enrich the narrative, allowing for a deeper understanding of complex datasets.
ch17Writing up Experiments
This chapter investigates how listeners perceive apparent speaker characteristics, such as age, gender, and height, through speech acoustics, analyzing the systematic errors and consistent biases in these judgments.