# Discrete Time Rescaling Theorem

### This is a Matlab function to test the statistical adequacy of a point process model defined in discrete time, that is to say, when time is partitioned into bins. The motivation for this test is to test statistical models of neural spike trains, where generally you model the probability (conditonal intensity function) of a neuron's spiking as function of stimulus, previous spiking history, other neurons, etc. The time rescaling theorem takes a conditional intensity function and transforms it into a Poisson process with unit rate, if the conditional intensity function describes the spike train correctly. One can then use a Komogorov Smirnov test to determine if this is true.

This is a Matlab function to test the statistical adequacy of a point process model defined in discrete time, that is to say, when time is partitioned into bins. The motivation for this test is to test statistical models of neural spike trains, where generally you model the probability (conditonal intensity function) of a neuron's spiking as function of stimulus, previous spiking history, other neurons, etc. The time rescaling theorem takes a conditional intensity function and transforms it into a Poisson process with unit rate, if the conditional intensity function describes the spike train correctly. One can then use a Komogorov Smirnov test to determine if this is true.

The problem is that for computational purposes, one almost always bins time and neural spike trains aren't really point processes. Spikes have finite, ~ ms, width and so its unphysical to consider smaller time bins. If firing rates are high enough the time rescaling theorem breaks down. This code (and the paper Haslinger Neural Computation (2010)) corrects for problems caused by binning.