Description Usage Arguments Value Author(s) See Also Examples
View source: R/calcNumRejects.R
Calculate number of cases rejected for repeated simulation of Poisson background and responses grouped into categories.
1 | calcNumRejects(bkg, resps, numRespsPerCat, numSims, calcPValFnc, sigLevel = 0.05, ...)
|
bkg |
Mean firing rate during a background interval, unrelated to stimulus presentation. |
resps |
Mean firing rates during a response period, one for each category. |
numRespsPerCat |
Number of repetitions (presentation of stimuli) in each category. |
numSims |
Number of simulation to run. |
calcPValFnc |
Function to be called with simulation output from |
sigLevel |
Significance level to use when determining if test is significant. Default is 0.05. |
... |
Other arguments to pass to |
Number of simulations which were detected as significant, out of numSims
Peter N. Steinmetz <PeterNSteinmetz@steinmetz.org>
compPowerRespDetection
, compPowerGeneralRespDetection
,
simCatResp
1 2 3 4 5 | # Calculate number of cases which will be detected as having an effect of
# category when there are 4 categories with 2 having different responses and
# when use a standard F test to detect the category effect.
pvalFnc<-function(df){anova(glm(resp~category,data=df),test='F')$"Pr(>F)"[2]}
calcNumRejects(1,c(1,1.5,2,1),6,100,pvalFnc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.