Timescale model (experimental)#
A state-space model of the pupil size with one fast component and slow
components at fixed time scales, for one recording
(TimescaleModel) or a group of recordings with shrinkage
(TimescaleGroup). See Slow and fast fluctuations of the pupil: the timescale model for an
introduction.
Model of the slow and fast fluctuations of the pupil size of one recording (experimental). |
|
Group of recordings whose timescale models are estimated together (experimental). |
|
Plots of a |
|
Plots of a |
Functions on arrays#
The models are built from functions in pp.signal that work on plain
arrays.
Means of the valid samples in consecutive blocks of factor samples. |
|
Coarser block means from block means (see |
|
Empirical semivariogram of a signal with missing samples. |
|
Plot one or several variograms. |
|
Power spectral density of a signal with missing samples (Welch's method). |
|
Plot one or several spectra. |
Result of |
|
Result of |
Gauss-Markov models: pp.signal.gaussmarkov#
Structure of a timescale-bank model (see |
|
Gaussian prior of the parameter vector of a |
|
Result of |
|
Result of |
|
Result of |
|
Gauss-Markov model: a sum of components plus white measurement noise. |
|
Matérn process with half-integer smoothness |
|
Ornstein-Uhlenbeck process, |
|
Unknown constant (e.g., the mean of the signal) with a diffuse prior. |
|
Linear-Gaussian state-space model. |
Fit a timescale-bank model to a signal. |
|
General prior for the pupil size in log-% (\(100 \log(x / \mathrm{median})\)), derived from recordings of several experiments. |
|
Wide prior for fits of single recordings without pooling (signals in log-%): it only keeps parameters that the data do not determine from drifting to the bounds. |
|
Empirical-Bayes fit of a group of recordings (see |
|
Blocked cross-validation of a timescale-bank model. |
|
Semivariogram of the data against that of the fitted model. |
|
Run the Kalman filter and keep everything. |
|
Log-likelihood of y under model (Kalman filter without storage). |
|
Rauch-Tung-Striebel smoother. |
|
Errors of forecasts several samples ahead. |
|
Simulate from a state-space model. |