sttcp: Compute

Description Usage Arguments Details Value Author(s) Examples

View source: R/sttc.R

Description

Compute STTC profile for a pair of spike trains

Usage

1
2
sttcp(a, b, dt = 0.05, tau_max = 5, tau_step = 0.1, beg = NULL,
  end = NULL)

Arguments

a

spike train 1

b

spike train 2

dt

time window for STTC

tau_max

maximum time shift

tau_step

step size in tau

beg

start of recording. When NULL use the minimum spike time from the two trains.

end

end of recording. When NULL use the maximum spike time from the two trains.

Details

We extend the STTC to a profile (or correlogram) by shifting one spike train by amount tau, where tau varies in [-tau_max, +tau_max] in steps of tau_step.

Value

List containing the STTC profile.

Author(s)

Stephen Eglen

Examples

1
2
3
4
5
6
t1 <- -cumsum(log(runif(1000)) / 2)
t2 <- -cumsum(log(runif(1000)) / 2)
corr <- sttcp(t1, t2)
plot(corr, main="cross correlation")
autocorr <- sttcp(t1, t1)
plot(autocorr, main="auto correlation")

meaRtools documentation built on May 1, 2019, 7:32 p.m.