Inter-Subject Correlation (ISC) — Movie Watching Eye-Tracking
Setup
Show code
library(tidyverse)library(glue)library(patchwork)library(zoo)library(here)# ── Paths ─────────────────────────────────────────────────────────────────────SERVER_PATH <-"/Volumes/vislearnlab/experiments/movie-watching"data_dir <-file.path(SERVER_PATH, "data/raw/")isc_pairwise_csv <-file.path(SERVER_PATH, "data/data_to_be_analyzed/isc_pairwise.csv")summary_csv <-here("data/qc_checks/summary.csv")# ── QC thresholds min_valid_pct <-50# mean_validity % across trialsmin_trials <-6# minimum usable trials (half of total trials)# ── Example time-series participants # Two adults and one child used for the 10-second gaze trace plot.# Change these to any valid participant IDs in your dataset.ex_adult_1 <-"MW047"ex_adult_2 <-"MW048"ex_child <-"MWK006"example_video <-"sesameus_2"# video shown in the time-series panel
Part 1: QC Filtering
We use the pre-computed summary.csv to identify which participants have sufficient data quality, then filter isc_pairwise.csv to only those pairs where both participants pass QC.