Learn R Programming

STAR (version 0.3-7)

mkCPSP: Counting Process Sample Paths

Description

Functions to create and explore CountingProcessSamplePath objects. These objects are complementary to the spikeTrain objects, the latter being in fact point processes representations.

Usage

mkCPSP(st, from = floor(min(st)), to = ceiling(max(st))) as.CPSP(x) "print"(x, digits = 5, ...) "plot"(x, y, col, lwd, xlim, ylim, xlab, ylab, xaxs, yaxs, main, ...) "lines"(x, ...)

Arguments

st
A numeric vector with strictly increasing elements.
from
A numeric, the time at which the counting process obeservation started.
to
A numeric, the time at which the counting process obeservation ended.
x
A numeric or a spikeTrain object for as.CPSP, a CountingProcessSamplePath object for print, plot and lines.
digits
An integer, the number of digits to be used while printing summaries. See round.
y
Not used but required by the plot method definition.
col,lwd,xlim,ylim,xlab,ylab,main,xaxs,yaxs
See plot.
...
Not used in print (but included for compatibility with the method definition) otherwise used like in plot and lines.

Value

mkCPSP returns an object of class CountingProcessSamplePath. This object is a list with the following components:
cpspFct
a right continuous function of t returning the number of events whose occurrence time is strictly larger than from and smaller of equal than t. t can be a vector. If missing the cumulative number of events at the events occurrence time is returned.
ppspFct
a function that does not take any argument and that returns the sequence of events times, that is, the "point process sample path".
spikeTrainFct
a function that does not take any argument and that returns the spikeTrain object associated with the CountingProcessSamplePath object.
from
argument from of mkCPSP.
to
argument to of mkCPSP
call
the matched call.
Functions plot and lines are used for their side effects, function print returns a short description of the object corresponding to the summary returned by function summary.spikeTrain for spikeTrain objects. Function as.CPSP returns a CountingProcessSamplePath.

Details

CountingProcessSamplePath objects are complementary to spikeTrain objects. They are also used to represente slightly more general properties of these objects and are directed towards model testing.

More formaly, if we observe n events at times ${t1,...,tn}$ such that, $from < t1 < ... < tn <= to$,="" the="" counting process sample path is the right continuous function defined by: $$N(t) = \sharp \{ t_j \; \mathrm{with} \; from < t_j \leq t \}$$ where $#$ stands for the number of elements of a set.

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

summary.CountingProcessSamplePath, print.CountingProcessSamplePath.summary, plot.CountingProcessSamplePath.summary, summary.spikeTrain, print.spikeTrain, plot.spikeTrain, as.spikeTrain

Examples

Run this code
## A simple illustration with Ogata's hearthquakes data set
data(ShallowShocks)
plot(mkCPSP(ShallowShocks$Date),
     xlab="Time (days)",
     main="Shallow Shocks Counting Process of Ogata 1988")
## An illustration with on of STAR's data neuroanl dicharge data set
data(e060824spont)
## Create the object from a spikeTrain
n1spt.cp <- as.CPSP(e060824spont[["neuron 1"]])
## print it
n1spt.cp
## plot it
plot(n1spt.cp)

Run the code above in your browser using DataLab