Work supported by the National Science Foundation Dissertation Improvement Award awarded to Priscila López-Beltrán
- Pupillometry for Linguistics IPYNB files. Consist of 5 interactive notebooks covering diverse topics in pupillary data analysis. They can be opened in Kaggle or downloaded and run in JupyterLab:
- Part I: Understanding Pupillometry (open)
- Part II: Creating a GAMMs model (open)
- Part III: Significance testing in GAMMs (open)
- Part IV: AR(1) autoregressive models (open)
- Part V: Interactions in GAMMs (open)
-
Pupillometry for Linguistics Rmd file. This is a long file covering diverse topics in pupillary data analysis. This file can be run within an IRkernel in JupyterLab via RServer,
-
Pupillometry for Linguistics HTML files. Consist of HTML versions of all 5 notebooks in this repository for those who do not wish to deal with the hassle of downloading the data and running the scripts.
-
A CSV file with sample pupillometric data (DOI)
Pupillometry is an online data collection technique employed in language science research. Psychological and neurological work over the past several decades has shown that the pupillary response is linked not only to changes in ambient luminance, but also to aspects of language processing.
While the design of a pupillometric experiment is beyond the scope of this repository, the various files here below should provide a good first approach to analyzing pupillometric data.
While the design of a pupillometric experiment is beyond the scope of this repository, the notebooks here should provide a good first approach to analyzing pupillometric data in R.
The series of 5 notebooks in this repository contain the basic principles needed to analyze pupillometic time-series data using Generalized Linear Mixed Models (GAMMs), which can be seen as regression models which are able to model non-linear patterns in data.
The data (which can be donwloaded in the data branch of this repository using Git's LFS consists of pupillary dilation data recorded millisecond by millisecond as participants listened to Linguistic stimuli in a controlled experimental setting. All data were recorded using an EyeLink Portable Duo. For more information on this data, please visit my Kaggle dataset repository.
The notebooks will guide the learner in the creation of progressively more complex GAMM models using the mgcv R package. In addition, because visualization is crucial for significance testing in GAMMs, scripts will also be provided to visualize the data using the itsadug R package.
Using these packages, the reader will learn to create plots for fitted smooths and binary difference smooths, as seen below:
Finally, the reader will also learn how to visualize interactions between continuous variables in GAMMs using contour plots:
-
These materiales are based on work funded by a National Science Foundation Dissertation Improvement Award Grant BCS-1939903, awarded to Priscila López-Beltrán.
-
These materiales are based on work funded by NSF PIRE II: Translating cognitive and brain science in the laboratory and field to language learning environments, awarded to the Center for Language Science at The Pennsilvania State University.