Learn R Programming

PsumtSim (version 0.4)

testCatEffectBoot: Test for an effect of category using bootstrapping.

Description

Test for an effect of category using bootstrapping.

Usage

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.

Value

Achieved significance level, ASL

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.

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

Run this code
  # 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)

Run the code above in your browser using DataLab