mkCPSP {STAR} | R Documentation |
Functions to create and explore CountingProcessSamplePath
objects. These objects are complementary to the spikeTrain
objects, the latter being in fact point processes representations.
mkCPSP(st, from = floor(min(st)), to = ceiling(max(st))) as.CPSP(x) ## S3 method for class 'CountingProcessSamplePath': print(x, digits = 5, ...) ## S3 method for class 'CountingProcessSamplePath': plot(x, y, col, lwd, xlim, ylim, xlab, ylab, xaxs, yaxs, main, ...) ## S3 method for class 'CountingProcessSamplePath': lines(x, ...)
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 . |
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) = # {tj : from < tj <= t}
where # stands for the number of elements of a set.
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
.
This functions are directed towards model testing, don't be surprised
if they look redundant with the corresponding functions for
spikeTrain
objects. An apparent difference of detail with the
latter is that no scale (like seconds) is assumed by default for
CountingProcessSamplePath
objects. This is to cope in a natural
way with the time transformation / rescaling procedures used to test
conditional intensity models.
Christophe Pouzat christophe.pouzat@gmail.com
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.
summary.CountingProcessSamplePath
,
print.CountingProcessSamplePath.summary
,
plot.CountingProcessSamplePath.summary
,
summary.spikeTrain
,
print.spikeTrain
,
plot.spikeTrain
,
as.spikeTrain
## 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)