reportHTML.gam {STAR} | R Documentation |
Writes the result of a gam
fit in an html file.
## S3 method for class 'gam': reportHTML(object, filename, extension = "html", directory = getwd(), Title, neuron, neuronEvts, ...)
object |
an object returned by gam . |
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 |
see HTMLInitFile . |
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. |
neuron |
a character string describing to which the analysis
refers and used for the titles of the interaction plots (see plot.frt ). |
neuronEvts |
a named list with the event variable from the
data frame returned by mkGLMdf and corresponding to the
other neurons recorded simultaneously. One list element per neuron. |
... |
Not used, only there for compatibilty with the generic method definition. |
A summary (summary.gam
) of object
is added
to the report. A plot of the spike train after time transformation
transformedTrain
comes next followed by a renewal test
plot (renewalTestPlot
) of the spike train on the time
transformed scale. The "usual" Ogata's tests plots
(plot.transformedTrain
) are added. Then if other trains
are provided as a named list via argument neuronEvts
,
interactions plots (plot.frt
) are built showing both the
survivor function and the Berman's test. The report ends with the
call
which generated object
.
Nothing is returned, an html file and figures in png format are written to disk.
Christophe Pouzat christophe.pouzat@gmail.com
mkGLMdf
,
gam
,
gam.check
,
frt
,
transformedTrain
,
plot.transformedTrain
,
summary.transformedTrain
## Not run: ## load e070528spont data set data(e070528spont) ## make a data frame for gam using a 2 ms bin width spontDF <- mkGLMdf(e070528spont,0.002,0,60) ## make data frames specific of each neuron n1.spontDF <- spontDF[spontDF$neuron=="1",] n2.spontDF <- spontDF[spontDF$neuron=="2",] n3.spontDF <- spontDF[spontDF$neuron=="3",] n4.spontDF <- spontDF[spontDF$neuron=="4",] ## save space by removing the now redundant spontDF rm(spontDF) ## fit neuron 1 using the gam representation of a ## renewal process and a binomial model n1.spontFit1 <- gam(event ~ s(lN.1,k=25,bs="cr"),data=n1.spontDF,family=binomial()) ## create a list with the discretized spike times of the 3 other neurons preN1 <- list(n2=with(n2.spontDF,event),n3=with(n3.spontDF,event),n4=with(n4.spontDF,event)) ## generate the report reportHTML(n1.spontFit1,"e070528spontN1gFit",neuron="1",neuronEvts=preN1) ## End(Not run)