regression_path_duration#
- pymovements.measure.reading.regression_path_duration(fixations: DataFrame) DataFrame[source]#
Compute regression-path duration and related measures (RPD, RBRT).
Computes three measures for each word:
RPD_inc – sum of all fixation durations from first entering the word until the first fixation to its right, including fixations on the word itself.
RPD_exc – same window, excluding fixations on the word itself (i.e., time spent on regressed words only).
RBRT – sum of fixation durations on the word before any word to its right is visited (right-bounded reading time).
- Parameters:
fixations (pl.DataFrame) – Fixation table containing at least
trial,page,word_idx,onset,duration, andis_first_passcolumns.- Returns:
DataFrame with columns
trial,page,word_idx,RPD_inc,RPD_exc, andRBRT.- Return type:
pl.DataFrame