testCatEffectBoot: Test for an effect of category using bootstrapping.

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

View source: R/testCatEffectBoot.R

Description

Test for an effect of category using bootstrapping.

Usage

1
testCatEffectBoot(sim, R, testFnc, ...)

Arguments

sim

Data frame containing data to be permuted, must have 'resp' and 'category' columns.

R

Number of bootstrap iterations to execute.

testFnc

Function to evaluate one bootstrap iteration, using 'resp' and 'category' columns in the dataframe.

...

Any other arguments for catEffectBootAdaptor or testFnc.

Details

The function testFnc is invoked using the catEffectBootAdaptor function to select the response or background counts (set with the useResp argument) and permute the rows.

Value

Achieved significance level, ASL

Author(s)

Peter N. Steinmetz <PeterNSteinmetz@steinmetz.org>

References

Efron B, Tibshirani RJ. An Introduction to the Bootstrap (Chapman & Hall/CRC Monographs on Statistics & Applied Probability). Chapman and Hall/CRC; 1994.

Steinmetz, P.N. & Thorp, C.K. (2013) Testing for effects of different stimuli on neuronal firing relative to background activity. Journal of Neural Engineering, Sept. 2013.

See Also

catEffectBootAdaptor

Examples

1
2
3
4
  # run simulation of responses for 4 categories and then test for category 
  # effect on response using the CBT from Steinmetz & Thorp, 2013
  simCatResp(1,c(1,1.5,2,1),6)->sim4
  testCatEffectBoot(sim4,100,sumSqCat,backMean=1)

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