# Measuring correlation of point processes

There is a huge literature on time series analysis. My data does not seem to fit into the standard model in that it consists of event times, that is the times at which an event occurs. What is a good way to measure the correlation between two sequences of event times? Is there any literature on analyzing event time sequences?

The data might be the times at which a particular neuron fires, for example. So in this case I would like to say that the firing times of two different neurons are highly correlated ( or not).

I found this question looks related Analysis of cross correlation between point-processes.

• What exactly do you mean by your data are event times? Is this a survival analysis situation? Is this repeated events? Can you say more about your situation, your data (where they come from, what they mean), & your goals? – gung - Reinstate Monica Sep 12 '13 at 21:08
• @gung Added an example of what I am interested in. – Anush Sep 12 '13 at 21:14
• Look up stochastic point processes, as they are called. Designed for such purposes. Already extensively used in neuroscience. Rather advanced mathematically. – Alecos Papadopoulos Sep 12 '13 at 21:38
• @AlecosPapadopoulos Thank you. Do you know any of the methods used to measure correlation? Sometimes the math justification hides the methods which are in fact simple....I hope. – Anush Sep 13 '13 at 6:20
• Any method in spatial statistics used to analyze point processes specializes (usually very easily) to this one-dimensional situation. See, for instance, www-personal.umich.edu/~jiankang/papers/paper/…. Although these are not the only possible methods--one dimension typically has an intrinsic ordering not available in higher dimensions and that ordering can be exploited--they should at least give you a good toolkit to start with. – whuber Sep 17 '13 at 20:38

A series of event times is a type of point process. A good introduction to measuring correlations between point processes, as applied to neuronal spike trains, is given by Brillinger . One of the early, seminal works on point processes is that of Cox .

The simplest measure of association between two temporal point processes (let's call them $A$ and $B$) is probably the association number, $n$. To calculate $n$ a window of half-width $h$ is defined around each time in series $A$. The individual association number, $c$, is then the number of events in series $B$ that fall within a given window, and $n$ is then defined as $$n(h) = \Sigma_{i=1}^{N} c_i$$ This is generally calculated for a range of time lags, $u$, such that we get $n(u,h=const)$ [see, e.g., equations 9 and 10, and figure 3, of Brillinger ].

If series $A$ and $B$ are uncorrelated then the association number will fluctuate, as a function of lag, due to sampling variations, but will have a stable mean. If we normalize by $2hT$, where $T$ is the length of the interval from which our samples were drawn, then we get an estimate of the cross-product density. Correlations at different time lags can then be seen by inspecting the cross-product density for departures from 1 (if the processes are independent the cross-product density should be 1, which is expected at large lags for most physical processes).

Assessing the significance of these departures can be addressed in a number of different ways, but many assume that at least one of the processes is Poisson [Brillinger, 1976; Mulargia, 1992]. If those assumptions are met then 95% confidence intervals on the cross-product density can be estimated by [Brillinger, 1976] $$1 \pm \frac{1.96}{2\sqrt{}2hTp_Ap_B}$$ where $p_A$ and $p_B$ are the mean intensities of series $A$ and $B$, given by $p_A = N/T$, where $N$ is the number of events in $A$ (similar for $B$). Excursions outside the C.I. are therefore indicative of a significant association between the event sequences at certain lags.

If neither series is Poisson then a bootstrapping approach can be used to estimate confidence intervals [Morley and Freeman, 2007]. When taking this approach it's important to understand the system as resampling the series $A$ and $B$ may not work without applying, say, a moving block bootstrap to preserve correlations in the spike trains. The approach taken by Morley and Freeman was to instead resample from the individual association numbers.

... we see that n(u, h) is a summation of the N individual associations c$_i$ for given u, h. Using this set of individual associations, we can construct a new series, c*$_i$, by drawing with replacement a random selection of N individual associations. Summing these N randomly-sampled associations gives a bootstrap estimate of the association number for given u, h. Repeating this for every lag u, we construct a bootstrap estimate of the association number with lag n*(u, h). Performing this bootstrapping procedure K times allows us to model the sampling variation in n(u, h).

A further treatment of assessing confidence intervals using bootstrapping techniques is given by Niehof and Morley , but the above should work for two series of neuronal spike trains (or similar simple system).

References:

• Brillinger, D. R. (1976), Measuring the association of point processes: A case history, Am. Math. Mon., 83(1), 16–22.
• Cox, D. R. (1955), Some statistical methods connected with series of events, J. R. Stat. Soc., Ser. B, 17(2), 129–164.
• Mulargia, F. (1992), Time association between series of geophysical events, Phys. Earth Planet. Inter., 72, 147–153.
• Morley, S. K., and M. P. Freeman (2007), On the association between northward turnings of the interplanetary magnetic field and substorm onsets, Geophys. Res. Lett., 34, L08104, doi:10.1029/2006GL028891.
• Niehof, J.T., and S.K. Morley (2012). “Determining the Significance of Associations between Two Series of Discrete Events : Bootstrap Methods”. United States. doi:10.2172/1035497

Some people use serial correlation of the intervals to quantify it. Basically you take the correlation coefficient of two inter-spike intervals that are $m$ intervals apart.

See:

• Maurice J. Chacron, Benjamin Lindner, André Longtin. Noise Shaping by Interval Correlations Increases Information Transfer. Physical Review Letters, Vol. 92, No. 8. (25 Feb 2004), 080601, doi:10.1103/physrevlett.92.080601

There are algorithms to compute cross-correlation of two point process (times of events) directly without any binning of the input. A classical one is the multi-tau algorithm that is used in fluorescence correlation spectroscopy (FCS) to correlated the photon arrival times of an experiments over time-lags that are approximately log-spaced.

Another algorithm, also used for FCS, allows computing the cross-correlation at arbitrary time-lags. There is a python package called pycorrelate that implements this latter algorithm (the specific function to look for is pcorrelate). This type of cross-correlation is totally general and can be applied for auto- or cross-correlation of any point-processes.

If you have measured both neurons continuously using some form of EEG then you would want to estimate an ARIMA model for membrane potential in the controlled neuron (as a regressor) against the neuron which it is hypothesized to innervate (as an outcome). If their membrane potentials are independently influenced by other stimuli in the brain, they will show on average no association. You might want to consider adjusting for the lagged effects of the independent neuron's membrane potential as well.

• Thank you. statsmodel in python seems to have code for this statsmodels.sourceforge.net/stable/generated/… . Is that the same thing? – Anush Sep 13 '13 at 6:27
• I have no idea. I've only used R for such analyses. Can you link the source code for statsmodels.tsa.arima_model.ARIMA? It should simply be a mixed model with an autoregressive correlation structure and lagged response effects. – AdamO Sep 13 '13 at 17:19
• The source is at statsmodels.sourceforge.net/devel/_modules/statsmodels/tsa/… . Thinking about it however I don't think ARIMA is right for point processes. If you make a function from the times it certainly isn't continuous for example. – Anush Sep 16 '13 at 17:43
• How is it any less continuous than a linear regression model? – AdamO Sep 16 '13 at 17:52
• What I mean is that event occurrence is binary. It either happens or it doesn't. I think this is called a spatial point process in the literature. A typical use of ARIMA seems to be when you have annual measurements of something. That's quite a different setting. – Anush Sep 16 '13 at 17:57