Learn R Programming

PsumtSim (version 0.4)

compRejectionFraction: Compute rejection fraction for sequential tests.

Description

Computes the fraction of simulated neurons with Poisson spike counts which are rejected by a sequence of tests. First a t-test for a difference from baseline for any category, followed by an ANOVA of an effect of category on the cells found to be significant in the first test.

Usage

compRejectionFraction(bkgLevel, respLevel, numCats, pretestP, anovaP, showProgress = FALSE, numTrialsPerCat = 10, numCells = 1000)

Arguments

bkgLevel
Average firing rate for background counts.
respLevel
Average firing rate for response counts.
numCats
Number of categories to test for a response in.
pretestP
p-value to use in first t-test for a difference from baseline.
anovaP
p-value to use in second ANOVA testing for an effect of category on the responses.
showProgress
TRUE if should list cell number as calculating. Default is FALSE.
numTrialsPerCat
Number of trials, with background and response counts, in each category. Default is 10.
numCells
Number of cells to simulate. Default is 1000.

Value

exclusionFrac
Fraction of cells which were not rejected by the first t-test; thus fraction of those ignored for the second test.
rejectionFrac
Fraction of cells rejected by the first test which were rejected by the second test.

Details

If the first and second tests were operating independently, the rejectionFrac would remain constant and equal to the anovaP value for all exclusion fractions.

References

Steinmetz & Thorp, 2012.

Examples

Run this code
  compRejectionFraction(1,1,10,0.01,0.05,showProgress=TRUE)

Run the code above in your browser using DataLab