View source: R/model_setup_helpers.R
h_basis | R Documentation |
The basis is calculated using the pupil response function originally described by Hoeks & levelt (1993). Wierda et al. (2012) refined it by adding an additional scaling paramter (f). The code here makes use of the convolution operation between a spike unit vector and said pupil response function and is based on the code provided by Wierda et al (2012) in their supplementary materials.
h_basis(i, expanded_time, expand_by, time, pulse_locations, fact, n, t_max, f)
i |
An integer representing index of a basis function. |
expanded_time |
A numeric vector containing positive time values in ms, expanded by a certain amount of ms |
expand_by |
Expansion time in ms passed to papss::pupil_solve(expand_by=) divided by sample length in ms |
time |
A numeric vector containing positive time values in ms |
pulse_locations |
A numeric vector containing index values of pulse loc. |
fact |
The factor column from the data-frame passed to papss::pupil_solve() |
n |
Parameter defined by Hoeks & Levelt (number of laters) |
t_max |
Parameter defined by Hoeks & Levelt (response maximum in ms) |
f |
Parameter defined by Wierda et al. (scaling factor) |
See: Wierda, S. M., van Rijn, H., Taatgen, N. A., & Martens, S. (2012). Pupil dilation deconvolution reveals the dynamics of attention at high temporal resolution. Proceedings of the National Academy of Sciences of the United States of America, 109(22), 8456–8460. https://doi.org/10.1073/pnas.1201858109 See: Hoeks, B., & Levelt, W. (1993). Pupillary dilation as a measure of attention: A quantitative system analysis. Behav. Res. Meth. Ins. C., 25, 16–26.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.