## Not run:
# ## Apply the test of Ogata (1988) shallow shock data
# data(ShallowShocks)
# renewalTestPlot(ShallowShocks$Date,d=3)
#
# ## Apply the test to the second and third neurons of the cockroachAlSpont
# ## data set
# ## load spontaneous data of 4 putative projection neurons
# ## simultaneously recorded from the cockroach (Periplaneta
# ## americana) antennal lobe
# data(CAL1S)
# ## convert data into spikeTrain objects
# CAL1S <- lapply(CAL1S,as.spikeTrain)
# ## look at the individual trains
# ## first the "raw" data
# CAL1S[["neuron 1"]]
# ## next some summary information
# summary(CAL1S[["neuron 1"]])
# ## next the renewal tests
# renewalTestPlot(CAL1S[["neuron 1"]])
#
# ## Simulate a renewal log normal train with 500 isi
# isi.nb <- 500
# train1 <- c(cumsum(rlnorm(isi.nb+1,log(0.01),0.25)))
# ## make the test
# renewalTestPlot(train1)
#
# ## Simulate a (non renewal) 2 states train
# myTransition <- matrix(c(0.9,0.1,0.1,0.9),2,2,byrow=TRUE)
# states2 <- numeric(isi.nb+1) + 1
# for (i in 1:isi.nb) states2[i+1] <- rbinom(1,1,prob=1-myTransition[states2[i],])+1
# myLnormPara2 <- matrix(c(log(0.01),0.25,log(0.05),0.25),2,2,byrow=TRUE)
# train2 <-
# cumsum(rlnorm(isi.nb+1,myLnormPara2[states2,1],myLnormPara2[states2,2]))
# ## make the test
# renewalTestPlot(train2)## End(Not run)
Run the code above in your browser using DataLab