Temporal Factor (Lag-Rank)

Condense temporal organization into a single scalar per subject.

The temporal factor score measures temporal organization by computing, for each transition, the percentile rank of the actual absolute lag among all available absolute lags. A score of 0.5 indicates chance; scores above 0.5 reflect a temporal contiguity effect. Unlike Lag-CRP curves, the temporal factor produces a single per-subject scalar that can be tested against chance with a one-sample \(t\)-test.

Workflow

Code
import os
import warnings
from jaxcmr.analyses.lagrank import plot_lagrank
from jaxcmr.helpers import find_project_root, generate_trial_mask, load_data, save_figure

warnings.filterwarnings("ignore")
Code
data_path = "data/HealeyKahana2014.h5"
figure_dir = "results/figures"
figure_str = ""
trial_query = "data['listLength'] > 0"
size = 1
Code
project_root = find_project_root()
figure_dir = os.path.join(project_root, figure_dir)
data_path = os.path.join(project_root, data_path)
data = load_data(data_path)
trial_mask = generate_trial_mask(data, trial_query)
Code
plot_lagrank(data, trial_mask, size=size)
save_figure(figure_dir, figure_str)

Interpretation

The plot shows a distribution of per-subject temporal factor scores.

  • Scores above 0.5: temporal contiguity — transitions favor nearby study positions.
  • Scores near 0.5: chance-level temporal organization.
  • Scores below 0.5: anti-contiguity (rare in typical free recall).

API Details

Notebook parameters

  • data_path — path to an HDF5 file containing a RecallDataset.
  • figure_dir — directory for saving figures.
  • figure_str — base filename for the saved figure. Leave empty to display without saving.
  • trial_query — a Python expression evaluated against the dataset to select trials.
  • size — maximum number of study positions a single item can occupy (1 for no-repeat lists).