Auto Covariance and Correlation Function Estimation for Spike Train ISIs
Description
The function acf.spikeTrain
computes (and by default plots) estimates of the
autocovariance or autocorrelation function of the interspike
intervals of a spike train.
Usage
1 2 3 4 5 6 
Arguments
spikeTrain 
a 
lag.max 
maximum lag at which to calculate the acf. Default is 10*log10(N) where N is the number of ISIs. Will be automatically limited to one less than the number of ISIs in the spike train. 
type 
character string giving the type of acf to be computed.
Allowed values are

plot 
logical. If 
na.action 
function to be called to handle missing
values. 
demean 
logical. Should the covariances be about the sample means? 
xlab 
x axis label. 
ylab 
y axis label. 
main 
title for the plot. 
... 
further arguments to be passed to 
Details
Just a wrapper for acf
function. The first argument,
spikeTrain
, is processed first to extract the interspike
intervals. acf.spikeTrain
is mainly used to plot what Perkel et
al (1967) call the serial correlation coefficient (Eq. 8) or
serial covariance coefficient (Eq. 7), p 400.
Value
An object of class "acf"
, which is a list with the following
elements:
lag 
A three dimensional array containing the lags at which the acf is estimated. 
acf 
An array with the same dimensions as 
type 
The type of correlation (same as the 
n.used 
The number of observations in the time series. 
series 
The name of the series 
snames 
The series names for a multivariate time series. 
The lag k
value returned by ccf(x,y)
estimates the
correlation between x[t+k]
and y[t]
.
The result is returned invisibly if plot
is TRUE
.
Author(s)
Christophe Pouzat christophe.pouzat@gmail.com
References
Perkel D. H., Gerstein, G. L. and Moore G. P. (1967) Neural Spike Trains and Stochastic Point Processes. I. The Single Spike Train. Biophys. J., 7: 391418. http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&pubmedid=4292791
See Also
acf
,
varianceTime
,
renewalTestPlot
Examples
1 2 3 4 5  ## Simulate a log normal train
train1 < c(cumsum(rlnorm(301,log(0.01),0.25)))
train1 < as.spikeTrain(train1)
## Get its isi acf
acf.spikeTrain(train1,lag.max=100)
