How RAP Computes Statistics

The following statistics can be displayed/printed for each stimulus point within any data set. This is done using the "PRINT STAT" or "PLOT STAT" commands.

      NUMSPK : No. of spikes within analysis window
      SPKRAT : Spike rate within analysis window
      PKRATE : Peak spike rate using a 100 microsec window
      SSRATE : Steady state spike rate, using last x% of analysis. window
      PK/SSR : Peak rate divided by steady state rate
      SYNC   : Sync. coeff. computed using "HI BF ..."
      PHASE  : Phase computed for "HI BF .." (fraction of cycle)
      RYCOFF : Rayleigh coeff. computed from SYNC and NUMSPK
      FSREP  : No. of repetitions with at least one spike
      FSLAT  : Mean first spike latency in millisecs
      SDLAT  : Standard Dev. of first spike latency (msecs)
      PKLAT  : Latency computed using x% to PST peak
      ISMEAN : Mean interspike interval from ISI histogram (msecs)
      ISDEV  : Std. Dev. from ISI histogram (msecs)
      ISKEW  : Skewness of ISI histogram
      ISKURT : Kurtosis of ISI histogram
      ISCV   : ISDEV/ISMEAN for ISI histograms
      SDRAT  : Std. Dev. of spike rate for different repetitions
      MDLAT  : Median first-spike Latency (msecs)

Back to Top

(1) NUMSPK: This is simply the total number of spikes, counted over the specified analysis window, and over all repetitions at the particular stimulus point. The default analysis window is the stimulus duration time, and by default all repetitions (trials) are included, but these can be modified by the "AW ..." and "TR ..." commands.

Back to Top

(2) SPKRAT: Very similar to NUMSPK, except here we convert the spike count to a "spike rate", expressed as "Number of Spikes per second", by dividing the count by the analysis window in secs (multiplied by the number of reps). The default analysis window is the stimulus duration time, and by default all repetitions (trials) are included, but these can be modified by

the "AW ..." and "TR ..." commands.

Back to Top

(3) PKRATE: The "peak spike rate" is computed by computing the spike rate over a fixed time window (100 microsecs), and sliding this window over the entire "peak window". The largest spike rate during this window is reported as PKRATE in units of spikes/sec.

The default peak window is the first half of the stimulus duration time, or the first half of the analysis window, whichever is less. By default all repetitions (trials) are included, but these can be modified by the "SET PST PKW ..." and "TR ..." commands.

The following commands have a direct impact on the computation of PKRATE:

          SET PST PKW #1 #2        (Peak window in millisecs)
          AW #1 #2                 (Analysis window in millisecs)

Back to Top

(4) SSRATE: The "steady-state spike rate" is computed by computing the mean spike rate over a time window (the "steady-state window"), which is defined by the "SET PST SSW ..." command.

The default steady-state window is the second half of the stimulus duration time, or the second half of the analysis window, whichever is less. By default all repetitions (trials) are included, but these can be modified by the "SET PST SSW ..." and "TR ..." commands.

The following commands have a direct impact on the computation of SSRATE:

          SET PST SSW #1 #2        (Steady-state window in millisecs)
          AW #1 #2                 (Analysis window in millisecs)

Back to Top

(5) PK/SSR: The "Peak Spike Rate" is divided by the "Steady-state Rate" to obtain this statistic. The computation method for the individual statistics is described above.

Back to Top

(6) SYNC: The "sync" or "synchronization coefficient" is sometimes also referred to as the "vector strength". It is a dimensionless number that varies between 0 and 1, and provides an indication of how "phase locked" the unit response is to the stimulus waveform.. It is computed as follows:

and ti is the time of occurrence of the i'th spike, T is the time period of one cycle of the binning frequency, and N is the total number of spikes.

The default binning frequency is the frequency of the stimulus waveform. For some cases (such as when the stimulus is a noise waveform, e.g.) the binning frequency cannot be determined by default. In such cases it must be specified first with a "HI BF..." command.

The following commands have a direct impact on the calculation of "sync":

          HI BF ...       (set binning frequency)
          AW ....         (analysis window in millisecs)
          TR ...          (trial number range)

The default analysis window is the stimulus duration time, and all trials are included by default.

A graphical way to visualize the "sync coefficient" is to bin a "cycle histogram". A low sync. coeff. would be the case where all the bins have a roughly uniform height, and a high sync. coeff. would be where there is a single large peak. In the limit, if all bins had exactly the same height, then the sync. coeff. is exactly zero, and if all the bins are zero except for one, the the sync. coeff. is exactly 1.0.

Back to Top

(7) PHASE: The Phase is computed as follows:

and ti is the time of occurrence of the i'th spike, and T is the time period of one cycle of the binning frequency.

The Phase is converted to units of "fraction of a cycle" before being reported, i.e. it can range from 0 to 1.0.

The following commands have a direct impact on the calculation of "phase":

          HI BF ...           (set binning frequency)
          AW ...              (analysis window in millisecs)
          TR ...              (trial number range)

The default analysis window is the stimulus duration time, and all trials are included by default.

Back to Top

(8) RYCOFF: The "Rayleigh Coefficient" is a measure of the confidence that one may place in the "sync" and "phase" values described above. A description of it's calculation is beyond the scope of this chapter. Some details can be found in "A test for the significance of the mean direction and the concentration parameter of a circular distribution" by W.S.Rhode (1976), which can be found at http://www.neurophys.wisc.edu/comp/docs/not011/not011.html

For purposes of this discussion, it should be noted that the smaller the value of RYCOFF, the more confidence one can place in the values of phase and sync. The RYCOFF is derived from sync. and numspk (total number of spikes). It is independent of phase. For example, if the RYCOFF is equal to 0.02 at a particular stimulus point, then there is only a 2 percent chance that sync. value is non-significant. If RYCOFF is 0.05 then there is a 5 percent chance, and so on.

Back to Top

(9) FSREP: This is simply a count of the number of stimulus repetitions (at a particular stimulus point) with at least one spike event. It can range between 0 and the NREP (the number of stimulus reps actually presented). Only spikes within the analysis window are considered, thus the "AW ..." And "TR ..." commands have an impact on the result.

Back to Top

(10) FSLAT: This is the mean first spike latency in millisecs. The time of occurrence of the first spike is averaged for all repetitions at the current stimulus point. The "AW ..." And "TR ..." commands impact the result. It is computed as follows:

where t(1)i is the time of occurrence of the first spike in trial number "i". Note that "N" is the number of trials (repetitions) that actually had at least one spike; trials with no spikes are not counted in N.

Back to Top

(11) SDLAT: This is the standard deviation of the first spike latency, in millisecs. The first spike latency is the time at which the first spike occurs at each repetition. The standard deviation is computed as follows:

where t(1)i is the time of occurrence of the first spike in trial number "i", and LM is the mean first spike latency, computed as explained above. Note that "N" is the number of trials (repetitions) that actually had at least one spike; trials with no spikes are not counted in N.

Back to Top

(12) PKLAT: This is the "peak latency", i.e. the latency to the "peak" of the PST histogram, expressed in millisecs. It is computed as follows:

  1. A PST histogram is binned, with a bin-width of 100 microsecs.
  2. The mean bin height within the steady-state window ("SET PST SSW ….") is computed. Call this RS.
  3. The histogram is smoothed using #-point smoothing ("SM PKL #")
  4. The height of the largest bin within the window set by "SET PST PKW …" is determined. Call this RM.
  5. The difference of these two is computed:
  6. Diff=RM-RS

  7. A Target bin height is computed as follows:
  8. Targ=RS+(Diff*(Per/100))

    where Per is a "percent to peak" defined by the "PER PKL #" command.

  9. The "Peak Latency" is then computed by looking for the first bin (starting with the second bin) that is equal to greater than the value of Targ.

Back to Top

(13) ISMEAN: This is the "mean inter-spike interval", computed from the Inter-spike interval histogram. The ISI histogram is computed using only the second half of the analysis window, i.e. spikes in the first half of the analysis window are excluded from the computation. The units of ISMEAN are millisecs. The default analysis window for the ISI is the stimulus duration time, and the default number of bins is 100. These can be modified by the "AW ..." and "NB ..." commands.

Back to Top

(14) ISDEV: This is the "Standard deviation of the inter-spike interval", computed from the Inter-spike Interval histogram. The ISI histogram is computed using only the second half of the analysis window, i.e. spikes in the first half of the analysis window are excluded from the computation. The units of ISDEV are millisecs. The default analysis window for the ISI is the stimulus duration time, and the default number of bins is 100. These can be modified by the "AW ..." and "NB ..." commands.

Back to Top

(15) ISKEW: This is the "skewness of the inter-spike interval histogram". The skewness is the third moment about the mean. If the ISKEW is negative, it suggests that the histogram is "skewed" to the left, if it is positive then the histogram is skewed to the right. A histogram that is perfectly symmetric about it's mean will have a skewness of zero. As for ISDEV and ISMEAN, the ISI histogram is binned only on the last half of the analysis window. It is computed as follows:

where M is the number of bins, and N is the total number of spikes in the histogram.

Hi is the height of the i'th bin, and ti is the time of the i'th bin.

Back to Top

(16) ISKURT: This is the "kurtosis" of the Interspike-interval histogram. Kurtosis is the fourth momemt about the mean. The ISI histogram is computed as described above, using the spikes from the second half of the analysis window. Then:


where U1, U2, U3 are as computed above for the case of Skewness.

The Kurtosis is a measure of the "peakedness" of the histogram. A more sharply peaked histogram will have a larger kurtosis than one which is more flat.

Back to Top

(17) ISCV: The Coefficient of variation of the Interspike histogram is computed by dividing the ISDEV by the ISMEAN, each of those being computed as described above.

Back to Top

(18) SDRAT: This is the standard deviation of the spike rate for different repetitions at the current stimulus point. The SDRAT is computed over the same analysis window that is used to compute the spike rate, and the number of spikes.

Back to Top

(19) MDLAT: This is the median value of the first-spike latencies for all repetitions within a stimulus point that had at least one spike during the analysis window. Trials that had no spikes within the analysis window are excluded. The median is computed by sorting all the included first-spike times in ascending order, then either (a) taking the middle value for odd number of trials or (b) the mean of the two middle values for an even number of trials.

The default analysis window for this computation is the stimulus duration time of the master DSS.

Back to Top

If you have questions about, or suggestions for, this document, please send them by e-mail to kochhar@physiology.wisc.edu

Return to RAP User's Guide
Return to Documentation Page
Back to The Basement
This page last modified on : June 4, 2000