gsslockedTrain: Function to Smooth a lockedTrain Object and Related Methods:...

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

View source: R/gsslockedTrain.R

Description

Smooths a lockedTrain object using a smoothing spline (gssanova or gssanova0) with the Poisson family after binning the object.

Usage

 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, ...)

Arguments

lockedTrain

a lockedTrain object.

bw

the bin width (in s) used to generate the observations on which the gss fit will be performed. See details below.

x

an gsslockedTrain or a gsslockedTrain0 object.

object

an gsslockedTrain or a gsslockedTrain0 object.

xlim

a numeric (default value supplied). See plot.

ylim

a numeric (default value supplied). See plot.

xlab

a character (default value supplied). See plot.

ylab

a character (default value supplied). See plot.

main

a character (default value supplied). See plot.

lwd

line width used to plot the estimated density. See plot.

col

color used to plot the estimated density. See plot.

...

in gsslockedTrain, respectively gsslockedTrain0, the ... are passed to the internally called gssanova, repectively gssanova0. Not used in print.gsslockedTrain and summary.gsslockedTrain and their counterparts for gsslockedTrain0 objects. Passed to plot in plot.gsslockedTrain and plot.gsslockedTrain0.

Details

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.

Value

A list of class gsslockedTrain, respectively gsslockedTrain0, is returned by gsslockedTrain, respectively gsslockedTrain0. These lists have the following components:

gssFit

the gss object generated by gssanova or gssanova0.

Time

the vector of bin centers.

nRef

the number of spikes in the reference train. See hist.lockedTrain.

testFreq

the mean frequency of the test neuron. See hist.lockedTrain.

bwV

the vector of bin widths used.

CCH

a logical which is TRUE if a cross-intensity was estimated and FALSE in the case of an auto-intensity.

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.

Author(s)

Christophe Pouzat christophe.pouzat@gmail.com

References

Gu C. (2002) Smoothing Spline ANOVA Models. Springer.

See Also

lockedTrain, plot.lockedTrain, gssanova, gssanova0

Examples

 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)

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