Learn R Programming

STAR (version 0.3-7)

reportHTML.spikeTrain: Performs Basic Spike Train Analysis and Generates a Report in HTML Format from a spikeTrain Object

Description

Performs a "standard" analysis on a spikeTrain object, computing some cross-correlation statistics if additional spikeTrain objects are provided, writes results to disk and generates a report in html format.

Usage

"reportHTML"(object, filename, extension = "html", directory = getwd(), Title, forceTT = TRUE, digits = 3, timeUnit = "s", otherST, laglim = c(-0.1, 0.1), cch = c("both", "scch", "cch"), method = c("gsslockedTrain0", "gsslockedTrain", "gamlockedTrain"), doGamCheck = FALSE, k = 100, bs = "tp", nbEvtPerBin = 10, ...)

Arguments

object
a spikeTrain object.
filename
a character string. The generic name of all the files (html, png as well as R data files which will be generated. See also HTMLInitFile.
extension
directory
the full or relative path to the directory where the results are going to be stored. See also HTMLInitFile.
Title
See HTMLInitFile. If missing a default value baed on filename is provided.
forceTT
Should a time transformation be performed and the compModels plots be generated even if none of the six renewal models fits the data?
timeUnit, digits
otherST
a named list of spikeTrain objects from simultaneously recorded neurons or nothing.
laglim
cch
if otherST is given (ie, not missing) cross-intensity plots will be made using the neuron of spikeTrain as a reference. Should smooth version of the cross-intensity be computed ("scch"), a "classical" one ("cch") or both ("both"). Only the first element of cch is used.
method
A character string, the name of the function used to generate the smooth cross-correlation histograms, one of: gsslockedTrain, gsslockedTrain0, gamlockedTrain.
doGamCheck
if smooth estimates are requested and method is set to gamlockedTrain, should function gam.check be used on them?
nbEvtPerBin
a number of event per bin used in a way similar to the argument with the same name in jpsth when a bining is used for pre-processing.

Value

Nothing is returned, an html file and figures in png format are written to disk together with the R variables generated during the analysis.

Details

A spike train plot (plot.spikeTrain) is performed first. The summary (summary.spikeTrain) is computed next and part of its output is written to the html file. The renewal tests are then carried out and their results added (renewalTestPlot). The six duration distributions are fitted (compModels with argument plot set to FALSE) and the best one is used to apply a time transformation to spikeTrain. The Ogata's tests are applied (summary.transformedTrain) and if they are all within the 99% confidence interval, the result of the transformation is plotted (plot.transformedTrain) as well as all the Q-Q plots of compModels. If forceTT is set to TRUE (default), then these last two plots are added even if the best model does not pass the tests.

If other spikeTrain objects are provided as a named list via argument otherST, then cross-correlation/cross-intensity functions are estimated; Two estimations methods are available, the classical histogram and a smooth version of it. Argument cch controls if a single estimation is performed or if both are performed. If the smooth version is requested a summary of the gssanova, gssanova0 or gam fit is printed (depending on the chosen value for argument method). Moreover if argument doGamCheck is set to TRUE (and if method is set to gamlockedTrain) then check plots (gam.check) are added to the report.

A R data file (filename.rda) is also generated with the following objects:

  • cm: the result of compModels.
  • bestFit: the durationDistribution object returned obtained by fitting the best model among the 6.
  • Lambda: the integrated intensity of spikeTrain with the best model.
  • fct: the matched call.
  • cchL: if other trains were provided and if argument cch was set to "both" or to "cch". A list with as many components as the otherST argument. Each component is the a hist.lockedTrain object.
  • scchL: if other trains were provided and if argument cch was set to "both" or to "scch". A list with as many components as the otherST argument. Each component is the a gsslockedTrain, gsslockedTrain0 or gamlockedTrain object.

See Also

as.spikeTrain, plot.spikeTrain, summary.spikeTrain, renewalTestPlot, plot.spikeTrain, compModels, transformedTrain, plot.transformedTrain, summary.transformedTrain, gssanova, gssanova0, gam, gam.check, lockedTrain, gsslockedTrain, gsslockedTrain0, gamlockedTrain

Examples

Run this code
## Not run: 
# ## load e070528spont data set
# data(e070528spont)
# ## perform a standard analysis on neuron 1, looking for cross-correlations
# ## with the 3 other neurons up to lag +/- 250 ms.
# ## Store the results under the generic name: e070528spontN1
# reportHTML(e070528spont[["neuron 1"]],"e070528spontN1",otherST=e070528spont[-1],laglim=c(-1,1)*0.25,forceTT=FALSE)
# ## Neuron 1 of e070528spont is exceptional in that it can be well
# ## described by a renewal process...## End(Not run)

Run the code above in your browser using DataLab