Goodness-of-Fit Tests and Nonparametric Adaptive Estimation for Spike Train Analysis

When dealing with classical spike train analysis, the practitioner often performs goodness-of-fit tests to test whether the observed process is a Poisson process, for instance, or if it obeys another type of probabilistic model (Yana et al. in Biophys. J. 46(3):323–330, 1984; Brown et al. in Neural Comput. 14(2):325–346, 2002; Pouzat and Chaffiol in Technical report, http://arxiv.org/abs/arXiv:0909.2785, 2009). In doing so, there is a fundamental plug-in step, where the parameters of the supposed underlying model are estimated. The aim of this article is to show that plug-in has sometimes very undesirable effects. We propose a new method based on subsampling to deal with those plug-in issues in the case of the Kolmogorov–Smirnov test of uniformity. The method relies on the plug-in of good estimates of the underlying model that have to be consistent with a controlled rate of convergence. Some nonparametric estimates satisfying those constraints in the Poisson or in the Hawkes framework are highlighted. Moreover, they share adaptive properties that are useful from a practical point of view. We show the performance of those methods on simulated data. We also provide a complete analysis with these tools on single unit activity recorded on a monkey during a sensory-motor task. Electronic Supplementary Material The online version of this article (doi:10.1186/2190-8567-4-3) contains supplementary material.

2 Proof that Test 1 is asymptotically of level α.
To prove that Test 1 is of level α, it is sufficient to prove Equation (2) of [1] withF (x) = (1 − e −λx )1 x>0 and to apply Proposition 1 of [1]. But for all x > 0, Therefore It is well known thatλ is the maximum likelihood estimate of λ and that √ n(λ−λ) is asymptotically normal.
3 Proof of Proposition 2 of [1] When we are dealing with Poisson processes, or more general counting processes, the previous asymptotic approach should be taken with care because the total number of points is random. Indeed if one observes a Poisson process N a,p , aggregated over p trials, with constant intensity, then conditionnally to the event {N a,p ([0, T max ]) = n tot }, the repartition of the points is uniform. So the following test is exactly of level α.
Proof. Let W be a variable whose distribution is K. We set Let f be a bounded continuous function and let us consider for any positive integer n min , On the one hand, for any ε > 0, there exists n min such that for any n tot ≥ n min , On the other hand, N a,p ([0, is a sum of p i.i.d. variables and therefore tends almost surely and in probability to infinity. Therefore there exists p min such that for all p > p min , which proves the convergence in distribution. As already stated, if N is an inhomogeneous Poisson process with compensator Λ, N = {Λ(T ) : T ∈ N } is a homogeneous Poisson process with intensity 1 by the time-rescaling theorem [2,3]. Assume now that we observe p i.i.d. Poisson processes N i with compensator Λ. The previous transformation on each of the N i leads to N i , the N i 's being p homogeneous Poisson processes of intensity 1 on [0, Λ(T max )]. One can therefore consider the aggregated process N a,p , to which we associate the c.d.f. F N a,p ([0,Λ(Tmax)]) as in Equation (3) of [1]. We can apply the previous lemma and we have: But, using the original aggregated process N a,p , one can also write . Therefore we obtain: The end of the proof of Proposition 2 of [1] is then similar to the proof of Proposition 1 of [1].

Proof that Test 2 is asymptotically of level α
by the Slutsky's lemma, it is sufficient to prove that and use Proposition 2 of [1] to conclude the proof. But since the numerator is equivalent to p(n)Λ(T max ) and the denominator to nΛ(T max ), by the law of large number, (3) is obvious.

Proof that Test 3 is asymptotically of level α
Then for all t one can write that (4) of [1]. Applying Proposition 2 of [1] concludes the proof.

Explicit construction of the cumulated process and its asymptotical properties
If N , as a general point process, has compensator Λ and conditional intensity λ, the time-rescaling theorem in its general form [2][3][4] be the corresponding counting process. We cumulate the counting processes in the following way: for any where k x is the only index in {0, ..., Because each X max i is a stopping time, due to the strong Markov property of Poisson processes, the cumulation still guarantees that the jumps of N c,p , that are identified with the points of the point process N c,p , form an homogeneous Poisson process of intensity 1 on [0, ]. Let us fix some θ > 0 such that One can prove the following result.
Proof. Using the cumulation described in (4), let us complete N c,p with another independent homogeneous Poisson process with intensity 1 and infinite support beyond But by the law of large numbers, Hence P( p i=1 X max i ≤ pθ) tends to 0, which concludes the proof.
One can go back to the classical time t by introducing the cumulated point process where j t = ⌊t/T max ⌋. One can also introduce The function Λ c,p (.) is a continuous non decreasing function and therefore, one can consider its generalized inverse function (Λ c,p ) −1 . Therefore one can rewrite Lemma 2 as follows:
On Ω δ , one has therefore that In the previous expression, we consider the maximum of two independent Poisson variables (denoted U and V ) with parameter δ √ p. For any u > 0, By taking u = δ, the last expression shows that If we are able to show that ) tends to 1 in probability, this will imply the result by using Slustky's Lemma. Now, we clip Λ c,p andΛ c,p and we set for any t, But since pθ belongs to [0,Λ c,p (pT max )] with probability tending to 1, the right hand side is equal to with probability tending to 1. So it is sufficient to prove thatẐ p := N c,p ([0, pθ])A p tends in distribution to K. Note that We denote: But Z p is also equal with probability tending to 1 to because pθ belongs to [0, Λ c,p (pT max )] with probability tending to 1. Using Lemma 2 as before, we have that Z p tends in distribution to K. It is consequently sufficient to prove thatẐ p −Z p andZ p − Z p tend both in probability to 0. We have: , which tends to 0 in probability by (5). Furthermore, if (Λ c,p ) −1 (pθ) < pT max and (Λ c,p ) −1 (pθ) < pT max ,

Proof that Test 4 is of level α asymptotically
We apply Theorem 1 of [1] withλ i = ((λ i )f ) + . Since the λ i 's are positive, one has that for all u, which gives exactly Equation (7) of [1].