Description Usage Arguments Details Value Author(s) See Also Examples
Provides an adaptor function for bootstrapping tests of an effect of race on
neural responses in the sample dataset, ef. This function can be provided as
an argument to the boot
function.
1 | raceEffectBootAdaptor(df, index, testFnc = relBackgroundLL, useResp = TRUE, ...)
|
df |
Dataframe containing data which testFnc will operate upon. This dataframe must contain a bkgResp and absResp column with the background and response firing rates, respectively. |
index |
The permutation of the rows of df to be applied before calling testFnc. |
testFnc |
Function which will be used to compute the test statistic. Defaults to
|
useResp |
Whether to use the absResp column of df, or the bkgResp column of df when computing responses. |
... |
Any other required arguments to testFnc. |
This is a specialized function to illustrate the use of the different test statistics provided in this package with the example dataset.
The bootstrap result object returned by the boot
function.
Peter N. Steinmetz <PeterNSteinmetz@steinmetz.org>
1 2 3 4 5 6 7 8 | # Test for an effect of race on the neural responses in the sample data
# using the SSC statistic. This effect is highly significant if computed while
# averaging over all neurons in the dataset.
require('boot')
data(ef)
boot(ef,raceEffectBootAdaptor,1000,useResp=TRUE,
testFnc=sumSqCat,backMean=mean(ef$absBkg))->bootRes
sum(bootRes$t>bootRes$t1)/1000
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.