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

View source: R/summary.transformedTrain.R

Generates a concise summary of `transformedTrain`

objects. It is mostly
intended for use in batch processing situations where a decision to stop with the
current model or go on with a more complicated one must be made automatically.

1 2 |

`object` |
a |

`...` |
additional arguments passed to |

`summary.transformedTrain`

computes summary statistics
corresponding to plot 1, 2 and 5 of
`plot.transformedTrain`

.

The first plot tests the uniformity of the spikes (transformed) times
on the (transformed) observation window using a KS test. If the
ecdf of the (transformed) times is within
the 95% band then the first element of component `uniformOnTTime`

of the returned list is set to `TRUE`

. It is set to `FALSE`

otherwise. The second component is relative to the 99% band.

The second plot tests the exponential distribution of the intervals
between successive spikes transformed times. Again if the empirical
curve stays within the 95, respectively 99%, confidence band, the
first, respectively second, element of component `BermanTest`

of the returned list is set to `TRUE`

. It is set to `FALSE`

otherwise.

The fifth plot tests that the variance is equal to the length of the
(transformed) observation time for `object`

, using point-wise
CI. If n different observation times are defined over the whole
observation window, we expect (1 - CI/100)*n points
to be out with an approximate binomial distribution. For each CI
defined (95 and 99%, by default), component `VarTime`

of the returned list contains the probability of observing a number as
large as or smaller than the one observed under the binomial null hypothesis.

A `list`

with the following 3 components:

`uniformOnTTime ` |
A two named components vector of boolean. |

`BermanTest ` |
A two named components vector of boolean. |

`VarTime ` |
A named component vector with as many components as
passed to |

Christophe Pouzat [email protected]

Ogata, Yosihiko (1988) Statistical Models for Earthquake Occurrences and Residual
Analysis for Point Processes. *Journal of the American
Statistical Association* **83**: 9-27.

Brown, E. N., Barbieri, R., Ventura, V., Kass, R. E. and Frank,
L. M. (2002) The time-rescaling theorem and its application to neural
spike train data analysis. *Neural Computation* **14**:
325-346.

`transformedTrain`

,
`plot.transformedTrain`

,
`mkGLMdf`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ```
## Not run:
## Let us consider neuron 1 of the CAL2S data set
data(CAL2S)
CAL2S <- lapply(CAL2S,as.spikeTrain)
CAL2S[["neuron 1"]]
renewalTestPlot(CAL2S[["neuron 1"]])
summary(CAL2S[["neuron 1"]])
## Make a data frame with a 4 ms time resolution
cal2Sdf <- mkGLMdf(CAL2S,0.004,0,60)
## keep the part relative to neuron 1, 2 and 3 separately
n1.cal2sDF <- cal2Sdf[cal2Sdf$neuron=="1",]
n2.cal2sDF <- cal2Sdf[cal2Sdf$neuron=="2",]
n3.cal2sDF <- cal2Sdf[cal2Sdf$neuron=="3",]
## remove unnecessary data
rm(cal2Sdf)
## Extract the elapsed time since the second to last and
## third to last for neuron 1. Normalise the result.
n1.cal2sDF[c("rlN.1","rsN.1","rtN.1")] <- brt4df(n1.cal2sDF,"lN.1",2,c("rlN.1","rsN.1","rtN.1"))
## load mgcv library
library(mgcv)
## fit a model with a tensorial product involving the last
## three spikes and using a cubic spline basis for the last two
## To gain time use a fixed df regression spline
n1S.fitA <- gam(event ~ te(rlN.1,rsN.1,bs="cr",fx=TRUE) + rtN.1,data=n1.cal2sDF,family=binomial(link="logit"))
## transform time
N1.Lambda <- transformedTrain(n1S.fitA)
## check out the resulting spike train using the fact
## that transformedTrain objects inherit from spikeTrain
## objects
N1.Lambda
## Use more formal checks
summary(N1.Lambda)
plot(N1.Lambda,which=c(1,2,4,5),ask=FALSE)
## Transform spike trains of neuron 2 and 3
N2.Lambda <- transformedTrain(n1S.fitA,n2.cal2sDF$event)
N3.Lambda <- transformedTrain(n1S.fitA,n3.cal2sDF$event)
## Check interactions
summary(N2.Lambda %frt% N1.Lambda)
summary(N3.Lambda %frt% N1.Lambda)
plot(N2.Lambda %frt% N1.Lambda,ask=FALSE)
plot(N3.Lambda %frt% N1.Lambda,ask=FALSE)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.