R/testCatEffectBoot.R

Defines functions testCatEffectBoot

Documented in testCatEffectBoot

#
# Test for an effect of category using bootstrapping,
# returning the achieved significance level.
#

testCatEffectBoot<-function(sim,R,testFnc,...) {
		
  testVal<-testFnc(sim$resp,sim$category,...)
  bootRes<-boot(sim,catEffectBootAdaptor,R,testFnc=testFnc,...)
  sum(bootRes$t>testVal)/R
}

Try the PsumtSim package in your browser

Any scripts or data that you put into this service are public.

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