Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/gsslockedTrain.R
Smooths a lockedTrain object using a smoothing spline
(gssanova or gssanova0) with the Poisson
family after binning the object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | gsslockedTrain(lockedTrain, bw = 0.001, ...)
gsslockedTrain0(lockedTrain, bw = 0.001, ...)
## S3 method for class 'gsslockedTrain'
print(x, ...)
## S3 method for class 'gsslockedTrain0'
print(x, ...)
## S3 method for class 'gsslockedTrain'
summary(object, ...)
## S3 method for class 'gsslockedTrain0'
summary(object, ...)
## S3 method for class 'gsslockedTrain'
plot(x, xlab, ylab, main, xlim, ylim, col, lwd, ...)
## S3 method for class 'gsslockedTrain0'
plot(x, xlab, ylab, main, xlim, ylim, col, lwd, ...)
|
lockedTrain |
a |
bw |
the bin width (in s) used to generate the observations on which the gss fit will be performed. See details below. |
x |
an |
object |
an |
xlim |
a numeric (default value supplied). See
|
ylim |
a numeric (default value supplied). See |
xlab |
a character (default value supplied). See |
ylab |
a character (default value supplied). See |
main |
a character (default value supplied). See |
lwd |
line width used to plot the estimated density. See |
col |
color used to plot the estimated density. See |
... |
in |
gsslockedTrain calls internally gssanova while
gsslockedTrain0 calls gssanova0. See the respective
documentations and references therein for an explanation of the differences.
gsslockedTrain and gsslockedTrain0 essentially generate
a smooth version of the
histogram obtained by hist.lockedTrain. The Idea is to
build the histogram first with a "too" small bin width before fitting
a regression spline to it with a Poisson distribution of the observed
counts.
A list of class gsslockedTrain, respectively gsslockedTrain0, is returned by
gsslockedTrain, respectively gsslockedTrain0. These
lists have the following components:
gssFit |
the |
Time |
the vector of bin centers. |
nRef |
the number of spikes in the reference train. See
|
testFreq |
the mean frequency of the test neuron. See
|
bwV |
the vector of bin widths used. |
CCH |
a logical which is |
call |
the matched call. |
print.gsslockedTrain returns the result of print
applied to the gssanova object generated by gsslockedTrain
and stored in the the component gssFit of its argument. The
same goes for print.gsslockedTrain0.
summary.gsslockedTrain returns the result of summary.gssanova
applied to the gssanova object generated by gsspsth
and stored in the component gssFit of its argument. The
same goes for summary.gsslockedTrain0.
Christophe Pouzat christophe.pouzat@gmail.com
Gu C. (2002) Smoothing Spline ANOVA Models. Springer.
lockedTrain,
plot.lockedTrain,
gssanova,
gssanova0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
## load e070528spont data set
data(e070528spont)
## create a lockedTrain object with neuron 1 as reference
## and neuron 3 as test up to lags of +/- 250 ms
lt1.3 <- lockedTrain(e070528spont[[1]],e070528spont[[3]],laglim=c(-1,1)*0.25)
## look at the cross raster plot
lt1.3
## build a histogram of it using a 10 ms bin width
hist(lt1.3,bw=0.01)
## do it the smooth way
slt1.3 <- gsslockedTrain(lt1.3)
plot(slt1.3)
## do some check on the gss fit
summary(slt1.3)
## do the same with gsslockedTrain0
slt1.3 <- gsslockedTrain0(lt1.3)
plot(slt1.3)
## do some check on the gss fit
summary(slt1.3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.