model.pro {pro} | R Documentation |
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 |
fixed |
Whether a fixed time window of spike/flash history should be used. If it is |
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).
Examples
n <- 500
set.seed(100)
re <- sim.lif(n, rbinom(n, 1, 0.14), 7, 3)
d <- model.pro(re$sbin, re$I)
d[1:10, ]