isiHistFit: ISI Histogram With Fitted Model and CI

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

View source: R/durationDist.R

Description

Fits a duration model to isis from a spike train. Confidence intervals are also drawn.

Usage

1
isiHistFit(spikeTrain, model, nbins = 10, CI = 0.95, ...)

Arguments

spikeTrain

a spikeTrain object or a numeric vector that can be coerced to such an object.

model

a character vector whose elements are selected among: "invgauss", "lnorm", "gamma", "weibull", "llogis", "rexp".

nbins

the number of bins to use.

CI

the confidence coefficient.

...

additional arguments passed to hist, see hist.

Details

Assuming that the train is reasonably well described by a renewal process, a model distribution is fitted to the inter-spike intervals (isis) obtained from spikeTrain. The fitted distribution is then used to set the histogram breaks such that a uniform bin count would be expected if the fitted distribution was the true one. Confidence segments are also obtained from the binomial distribution. The histogram is build and the fitted density together with confidence intervals are drawn.

Value

Nothing returned, isiHistFit is used for its side effect, a plot is generated on the current graphic device.

Author(s)

Christophe Pouzat [email protected]

See Also

compModels, hist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
## 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"]])
## It does not look too bad so let fit simple models
compModels(CAL1S[["neuron 1"]])
## the best one is the invgauss. Let's look at
## it in detail
isiHistFit(CAL1S[["neuron 1"]],"invgauss",xlim=c(0,0.5))

## End(Not run)

STAR documentation built on May 2, 2019, 4:53 p.m.