plot.spikeTrain: Display Counting Process Associated with Single Spike Train

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/spikeTrain.R

Description

Adds a counting process display to the classical raster plot of single spike trains.

Usage

1
2
3
4
5
6
7
## S3 method for class 'spikeTrain'
plot(x, xlab = "Time (s)", ylab = "Cumulative Number of Events",
                main = paste("Counting Process of",deparse(substitute(x))),
                xlim = c(floor(x[1]), ceiling(x[length(x)])),
                ylim = c(0, length(x) + 1),
                do.points = ifelse(length(x) < 100, TRUE, FALSE),
                addMeanRate = TRUE, addRug = TRUE, ...)

Arguments

x

a spikeTrain object or a vector which can be coerced to such an object.

xlab

a character. The x label.

ylab

a character. The y label.

main

a character. The title.

xlim

a numeric. See plot.

ylim

a numeric. See plot.

do.points

see plot.stepfun.

addMeanRate

should the expected counting process for a Poisson process with the same rate be added to the plot?

addRug

should a rug representation be added at teh bottom of the plot? See rug.

...

additional arguments passed to plot, see plot and plot.stepfun.

Details

The counting process is obtained by a call to stepfun. When xlab, ylab, main, xlim or ylim is (are) missing, default values are used.

Value

Nothing is returned, plot.spikeTrain is used for its side effect, a plot is generated on the current graphic device.

Author(s)

Christophe Pouzat christophe.pouzat@gmail.com

References

D. R. Cox and P. A. W. Lewis (1966) The Statistical Analysis of Series of Events. John Wiley and Sons.

Brillinger, D. R. (1988) Maximum likelihood analysis of spike trains of interacting nerve cells. Biol. Cybern. 59: 189–200.

Johnson, D.H. (1996) Point process models of single-neuron discharges. J. Computational Neuroscience 3: 275–299.

See Also

as.spikeTrain, is.spikeTrain, print.spikeTrain, summary.spikeTrain, renewalTestPlot, varianceTime, stepfun, plot.stepfun, rug

Examples

1
2
3
4
5
6
7
## Not run: 
data(ShallowShocks)
plot(as.spikeTrain(ShallowShocks$Date),
     xlab="Time (days)",
     main="Shallow Shocks Counting Process of Ogata 1988")

## End(Not run)

Example output

Loading required package: survival
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-20. For overview type 'help("mgcv-package")'.
Loading required package: R2HTML
Loading required package: gss
Loading required package: codetools

STAR documentation built on May 2, 2019, 11:44 a.m.