View source: R/model_setup_helpers.R
create_spike_matrix_term | R Documentation |
Create basis part of the model matrix as described by Wood (2017). Essentially, this means creating a matrix with a column for each pulse location and to assign a pupil basis (convolved with that location) to each column.
create_spike_matrix_term( expanded_time, expand_by, time, pulse_locations, fact, n, t_max, f )
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: Wood, S. N. (2017). Generalized Additive Models: An Introduction with R, Second Edition (2nd ed.). Chapman and Hall/CRC.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.