Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/gamlockedTrain.R
Smooths a lockedTrain
object using a gam
model with the Poisson
family after binning the object.
1 2 3 4 5 6 7 
lockedTrain 
a 
bw 
the bin width (in s) used to generate the observations on which the gam fit will be performed. See details below. 
bs 
the type of splines used. See 
k 
the dimension of the basis used to represent the smooth
psth. See 
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 
... 
additional arguments passed to 
gamlockedTrain
essentially generates 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 gamlockedTrain
is returned by
gamlockedTrain
. This list has the following components:
gamFit 
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.gamlockedTrain
returns the result of print.gam
applied to the component gamFit
of its argument.
summary.gamlockedTrain
returns the result of summary.gam
applied to the component gamFit
of its argument.
Christophe Pouzat [email protected]
Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.
lockedTrain
,
plot.lockedTrain
,
gam
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  ## 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 < gamlockedTrain(lt1.3)
plot(slt1.3)
## do some check on the gam fit
summary(slt1.3)
gam.check(gamObj(slt1.3))
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.