The data from
Pastukhov et al. (2013), the contrast-manipulation data, and simulated data were fitted using a
bistablehistory package (
Pastukhov, 2022). We used identical models for both parameters of the Gamma distribution. Therefore, model descriptions below are for just one parameter (shape,
κ).
The following model is the default model of the
bistablehistory package. In the model below,
i is the row index within the data table. Note that although cumulative history was computed using the entire time series,
Durationi included only clear dominant states.
\begin{equation*}
\begin{array}{@{}l@{}}
Duration_{i} \sim Gamma\left( k_i,\ {\theta }_i \right)\\
log\left( {k}_i \right) = {\rm{\alpha }}_{{\rm{P}}_{{\rm{i\ }}}} + {\rm{\beta }}_{{{\rm{H}}}_{{\rm{i}}}} \cdot {\rm{H}}\left( {\rm{T}}_{\rm{i}},\ {\rm{\tau }}_{\rm{i}} \right) + {\beta }_T \cdot \log \left( {{\rm{T}}}_{\rm{i}} \right)\\
{a}_{{P}_{i}}\sim Normal\left( \log \left( 3 \right),\ 5 \right)\\
{\rm{log}}\left( {\tau }_{i} \right) = \ {\tau }_{pop} + {\tau }_{{P}_{i}}\\
{\tau }_{pop}\sim Normal\left( \log \left( 1 \right),\ 0.15 \right)\\
{\tau }_{{P}_{i}}\sim Normal\left( 0,\ {\sigma }_\tau \right)\\
{\sigma }_\tau \sim Exponential\left( {10} \right)\\
{\beta }_{{H}_{i}} = {\beta }_H + {\beta }_{{H}_{{P}_{i}}}\\
{\beta }_H\sim \ Normal\left( {0,\ 1} \right)\\
{\beta }_{{H}_{{P}_{i}}}\sim Normal\left( 0,\ {\sigma }_{{\beta }_H} \right)\\
{\sigma }_{{\beta }_H}\sim Exponential\left( 1 \right)\\
{\beta }_T\sim Normal\left( {0,\ 1} \right)
\end{array}
\end{equation*}
We used independent intercept terms for each participant (α
Pi) as prior work shows high variability between individual observers (
Brascamp, Qian, Hambrick, & Becker, 2019;
Cao et al., 2016), which were weakly regularized by a prior centered at 3 seconds (it is coded as log(3) due to the log link function). Each participant was assigned an individual value for both the time constant of cumulative history (τ
i) and the slope term for the effect of cumulative history (β
Hi) via a pooled multilevel approach. We used the log link function to ensure that τ
i is strictly positive and a strongly regularizing prior for both the population-level τ
pop and variability of individual participants. We used a neutral, weakly regularizing prior for the population-level effect of cumulative history β
H and strongly regularizing prior for variability of individual observers. The model included an effect of time via log (
Ti) to account for a slow overall trend within each run (
Mamassian & Goutcher, 2005). We used a neutral weakly regularizing prior for β
T. The code for the model is available online as part of the
bistablehistory package. The same model was used for fitting KDE display data from
Pastukhov et al. (2013) but with a stronger and more conservative prior
\({\tau }_{pop}\ \sim\ Normal( {\log ( {0.5} ),\ 0.3} )\) as the default prior led to frequent divergent transitions.
The same model was used for fitting data for the BR stimulus with modulated contrast. It included an additional term for the log contrast in the linear model:
\begin{eqnarray*}
log\left( {{k}_i} \right) &\;=& {\alpha }_{{P}_{i\ }} + {\beta }_{{H}_i} \cdot H\left( {{T}_i,\ {\tau }_i} \right) + {\beta }_T \cdot \log \left( {{T}_i} \right) +\nonumber\\
&& {\beta }_C \cdot log({C}_i)\\
{\beta }_C&\;\sim& Normal\left( {0,\ 1} \right)\end{eqnarray*}
where
Ci was the stimulus log contrast.