## load e070528citronellal data
data(e070528citronellal)
## plot a jsd with neuron 1 on X and neuron 2 on Y
jsd(e070528citronellal[[1]],e070528citronellal[[2]])
## now make the jpsth
j1.2 <- jpsth(e070528citronellal[[1]],e070528citronellal[[2]])
## make a contour plot
contour(j1.2)
## make an image plot
image(j1.2)
## make a persp plot
persp(j1.2)
## Not run:
# ## fit a gss model with interactions
# ## use a larger bin width for the jpsth
# j1.2 <- jpsth(e070528citronellal[[1]],e070528citronellal[[2]],0.2,0.2)
# ## get a data frame
# j1.2DF <- jpsth2df(j1.2)
# ## To save computation time start analyzing
# ## just before the stimulation time
# j1.2DF <- j1.2DF[j1.2DF$X > 6 & j1.2DF$Y>6,]
# gf <- gssanova(Count ~ X*Y, family="poisson", data=j1.2DF,seed=20061001)
# ## Use the project function of gss to check the significance
# ## of the interaction term
# project(gf2,inc=c("X","Y"))
# ## End(Not run)
## Not run:
# ## fit a gam model assuming no interaction
# ## get a data frame
# j1.2DF <- jpsth2df(j1.2)
# fitNoI <- gam(Count ~ s(X,k=100,bs="cr") + s(Y,k=100,bs="cr"),data=j1.2DF,family=poisson())
# ## End(Not run)
Run the code above in your browser using DataLab