Skip to content

prislb/Pupillometry_for_Linguistics

Repository files navigation

Pupillometry for Linguistics: The basics

Work supported by the National Science Foundation Dissertation Improvement Award awarded to Priscila López-Beltrán

NSF-1939903

Go to Kaggle to view interactive versions of all 5 Notebooks associated with this repository

Kaggle

Launch the Binder for this project in JupytherLab + RStudio Server

Binder

Materials in this repository

Made withJupyter

  1. 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)
  1. 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,

  2. 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.

  3. A CSV file with sample pupillometric data (DOI)

What is pupillometry?

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.

What can you learn using the materials in this repository?

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.

Overview of the notebooks

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:

Fitted Smooths

Difference Smooths


Finally, the reader will also learn how to visualize interactions between continuous variables in GAMMs using contour plots:

Disclaimers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published