model.pro: Model matrix for point-process responses
Description
Constructs a data.frame to be fitted using pro.
Reference: X Luo, S Gee, V Sohal, D Small (In Press). A Point-process Response Model for Optogenetics Experiments on Neural Circuits. _Statistics in Medicine_.
Usage
model.pro(spike, flash, fixed = NULL, kv = F)
Arguments
spike
A binary vector represents spiking (1) or no spiking (0).
flash
A binary vector of the same length of spike, 1 for flashing and 0 for non-flashing.
fixed
Whether a fixed time window of spike/flash history should be used. If it is NULL, a varying time window of history will be used as described in the reference. If it is a integer j, a fixed window from index t-j to t will be used.
kv
Whether the history dependence model in Kass and Ventura (2001) (A Spike-Train Probability Model, Neural Computation 13, 1713-1720) should be employed. This differs from the history dependence model in the reference.
Value
a data.frame of the three response functions (PF, CF, SF) and other intermediate functions (for future modeling use).