Code
import os
import matplotlib.pyplot as plt
import warnings
from jaxcmr.analyses.spc import plot_spc
from jaxcmr.helpers import find_project_root, generate_trial_mask, load_data, save_figure
warnings.filterwarnings("ignore")Reveal primacy and recency effects in free recall.
The serial position curve (SPC) is one of the most robust findings in memory research: when people study a list of items and then freely recall them, recall probability varies systematically with study position. Items from the beginning of the list (primacy) and end of the list (recency) are recalled more often than items from the middle.
The x-axis shows study position and the y-axis shows recall probability. Key patterns to look for:
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.ylim — y-axis limits as a tuple, or None for automatic scaling.trial_query — a Python expression evaluated against the dataset to select trials.size — maximum number of study positions a single item can occupy. Use 1 for non-repeating lists.confidence_level — confidence level for subject-wise error bars.