There is a newer version of this record available.

Software Open Access

bistablehistory: an R package for history-dependent analysis of perceptual time series

Alexander Pastukhov

A package to compute a cumulative history for time-series of perceptual dominance in bistable displays.

Estimates cumulative history, an estimate of accumulating adaptation/prediction error for the dominant percept, for time-series for continuously viewed bistable perceptual rivalry displays. Computes cumulative history via a homogeneous first order differential process. I.e., it assumes exponential growth/decay of the history as a function of time and perceptually dominant state. Supports Gamma, log normal, and normal distribution families.

Improvements in version 1.1.0

  • Custom prior values for history parameters, intercept terms, history effect, and fixed effects.
  • Simplified Stan code.
  • predict() computes values from history, reducing fit object size.
  • predict() returns a vector of length that matches original table.

Bug fixes in version 1.1.0

  • Change to difference in history values instead of the weighted mean.
  • Use for scale instead of rate for prediction for Gamma family.
  • Spelling in documentation.
  • Additional tests.
Files (4.9 MB)
Name Size
4.9 MB Download
All versions This version
Views 10544
Downloads 31
Data volume 11.5 MB4.9 MB
Unique views 8533
Unique downloads 31


Cite as