compPowerGeneralRespDetection: Compute power to detect differences from background where all...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/compPowerGeneralRespDetection.R

Description

Compute power to detect responses differing from background in a simulation of responses to a number of categories of stimuli, all of which differ from the background level of firing.

Usage

1
2
3
compPowerGeneralRespDetection(bkgLevel, generalRespLevel, respLevel, numCats,
numCatsWithResp, normDistribution = FALSE, showProgress = FALSE, numTrialsPerCat = 15,
numBootIters = 1000, numRuns = 1000, alpha = 0.05)

Arguments

bkgLevel

Background firing rate, prior to stimulus onset.

generalRespLevel

Response firing rate applied to categories not having the respLevel of firing.

respLevel

Response firing rate during categories which have a response other than background.

numCats

Total number of categories of stimulus.

numCatsWithResp

Number of categories to be given respLevel responses.

normDistribution

TRUE if normally distributed response and background counts should be used, otherwise Poisson distributed counts are used. Default is FALSE.

showProgress

TRUE if run count should be printed. Default is FALSE.

numTrialsPerCat

Number of trials of responses and backgrounds for each category. Default is 15.

numBootIters

Number of boot iterations, passed as 'R' argument to boot function. Default is 1000.

numRuns

Number of simulations to perform followed by bootstrap testing. Default is 1000.

alpha

Significance level, alpha, to use in counting if simulated results are significant. Default is 0.05.

Value

Number of trials, out of numRuns which were detected as significant in the bootstrap testing.

Author(s)

Peter N. Steinmetz <PeterNSteinmetz@steinmetz.org>

See Also

compPowerRespDetection

Examples

1
2
3
4
5
6
# Simulate responses in 3 of 6 categories and compute how often these responses 
# are detected. Will return a random number generally between 10 and 15, so 
# the estimate of power would be between 20% and 30%.
require(EffectsRelBaseline)
require(boot)
compPowerGeneralRespDetection(1,1,2,6,3,numBootIters=50,numRuns=25)

PsumtSim documentation built on May 1, 2019, 8:03 p.m.