Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/reportHTML.gam.R
Writes the result of a gam
fit in an html file.
1 2 3 4 | ## S3 method for class 'gam'
reportHTML(object, filename, extension = "html",
directory = getwd(), Title,
neuron, neuronEvts, ...)
|
object |
an object returned by |
filename |
a character string. The generic name of all the files
(html, png as well as |
extension |
see |
directory |
the full or relative path to the directory where the
results are going to be stored. See also |
Title |
See |
neuron |
a character string describing to which the analysis
refers and used for the titles of the interaction plots (see |
neuronEvts |
a named list with the |
... |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.