Description Usage Arguments Value Examples
View source: R/poisson_analysis.R
Carries out various Poisson related tests for double-stimuli spike count distribution.
1 2 3 4 5 |
xA |
an array of whole-trial spike counts under stimulus 1 |
xB |
an array of whole-trial spike counts under stimulus 2 |
xAB |
an array of whole-trial spike counts when both stimuli are present together |
labels |
labels for stimlus conditions |
remove.zeros |
whether to remove trials with zero spike counts |
gamma.pars |
shape and rate parameters of the gamma prior on Poisson mean |
beta.pars |
shape parameters of the beta prior for the mixture/intermediate parameter |
nMC |
number of Monte Carlo samples to be used in numerical approximations. |
plot |
logical indicating if a visualization plot should be made |
add.poisson.fits |
logical indicating if a fitted Poisson pmfs will be overlaid in the visualization. Ignored when plot=FALSE. |
method.screen |
a character string, default is 'variance' which uses the Poisson variance test to assess whether a Poisson distribution fits a sample of counts. Alternative choice is 'bincount' which uses an binned histogram based nonparametric chi-square goodness of fit test |
... |
additional commands to be passed on to grid.arrange() for plotting. For example, adding 'top="PLOT TITLE"' will add a title at the top of the combined plot. See |
Returns a list with the following items:
separation.logBF |
the (log) Bayes factor for testing that that two single stimulus distributions are different |
post.prob |
posterior probabilities of the four hypotheses (Mixture, Intermediate, Outside, Single) under equal prior probabilities |
pois.pvalue |
minimum of the two p-values checking for Poisson-ness of each single stimulus distribution |
sample.sizes |
three trial counts for A, B and AB conditions |
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.