print.repeatedTrain: Print and Summary Methods for repeatedTrain Objects

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

View source: R/repeatedTrain.R

Description

Print and summary methods for repeatedTrain objects.

Usage

1
2
3
4
5
6
7
## S3 method for class 'repeatedTrain'
print(x,...)
## S3 method for class 'repeatedTrain'
summary(object,
                      responseWindow, acquisitionWindow,...)
## S3 method for class 'summary.repeatedTrain'
print(x,...)

Arguments

x

a repeatedTrain or a summary.repeatedTrain object.

object

a repeatedTrain object

responseWindow

a 2 elements vector specifying the begining and the end of the neuron response.

acquisitionWindow

a 2 elements vector specifying the begining and the end of the acquisition. If missing values are obtained using the floor of the smallest spike time and the ceiling of the largest one.

...

additional arguments passed to function chisq.test or print.

Details

print.repeatedTrain calls plot.repeatedTrain

Value

summary.repeatedTrain returns a LIST of class summary.repeatedTrain with the following components:

nbRepeates

The number of repetitions.

acquisitionWindow

The acquisition window.

stats

A matrix with as many rows as repetitions. The first column contains the total number of spikes generated by the neuron during a given repeat (this column appears under the heading "nb" when the object is printed). The second column contains the corresponding average discharge rate (this column appears under the heading "nu" when the object is printed). If a responseWindow was specified, the third column contains the number of spikes generated by the neuron during the response period and the fourth column contains the corresponding rate (these column appear under the headings "nbR" and "nuR", respectively when the object is printed).

globalPval

The p value of the chi square test for homogeneity of the total number of spikes generated accross repetitions. Thats a rough stationarity test.

responsePval

If a responseWindow was specified, the p value of the chi square test for homogeneity of the number of spikes generated within the "response window" accross repetitions.

Author(s)

Christophe Pouzat christophe.pouzat@gmail.com

See Also

as.repeatedTrain, is.repeatedTrain, plot.repeatedTrain, raster, psth

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Load the Vanillin responses of the first
## cockroach data set
data(CAL1V)
## convert them into repeatedTrain objects
## The stimulus command is on between 4.49 s and 4.99s
CAL1V <- lapply(CAL1V,as.repeatedTrain)
## Generate raster plot for the neurons
raster(CAL1V[["neuron 1"]],c(4.49,4.99))
plot(CAL1V[["neuron 2"]],c(4.49,4.99))
plot(CAL1V[["neuron 3"]],c(4.49,4.99))
## Basic summary of neuron 1
summary(CAL1V[["neuron 1"]])
## Enhanced summary giving a response window between 5 and 5.5s
summary(CAL1V[["neuron 1"]],c(5,5.5))

Example output

Loading required package: survival
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-28. For overview type 'help("mgcv-package")'.
Loading required package: R2HTML
Loading required package: gss
Loading required package: codetools
20  repeats in the object.
          nb        nu
stim. 1  106  9.636364
stim. 2  165 15.000000
stim. 3  141 12.818182
stim. 4  153 13.909091
stim. 5  183 16.636364
stim. 6  146 13.272727
stim. 7  133 12.090909
stim. 8  144 13.090909
stim. 9  140 12.727273
stim. 10 142 12.909091
stim. 11 137 12.454545
stim. 12 133 12.090909
stim. 13 171 15.545455
stim. 14 136 12.363636
stim. 15  93  8.454545
stim. 16 155 14.090909
stim. 17 143 13.000000
stim. 18 138 12.545455
stim. 19 151 13.727273
stim. 20 169 15.363636
The p value of the chi 2 test for the stationarity accross repeats is:
1.7321908149541e-05.
20  repeats in the object.
          nb        nu nbR nuR
stim. 1  106  9.636364  38  76
stim. 2  165 15.000000  32  64
stim. 3  141 12.818182  30  60
stim. 4  153 13.909091  45  90
stim. 5  183 16.636364  47  94
stim. 6  146 13.272727  32  64
stim. 7  133 12.090909  34  68
stim. 8  144 13.090909  41  82
stim. 9  140 12.727273  33  66
stim. 10 142 12.909091  37  74
stim. 11 137 12.454545  36  72
stim. 12 133 12.090909  35  70
stim. 13 171 15.545455  33  66
stim. 14 136 12.363636  34  68
stim. 15  93  8.454545  32  64
stim. 16 155 14.090909  36  72
stim. 17 143 13.000000  36  72
stim. 18 138 12.545455  30  60
stim. 19 151 13.727273  34  68
stim. 20 169 15.363636  39  78
The p value of the chi 2 test for the stationarity accross repeats is:
1.7321908149541e-05.
The p value of the chi 2 test for the stationarity accross repeats during the stim. is:
0.926171509238809.

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