raceEffectBootAdaptor: Boot adaptor for testing race effect.

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

View source: R/raceEffectBootAdaptor.R

Description

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.

Usage

1
raceEffectBootAdaptor(df, index, testFnc = relBackgroundLL, useResp = TRUE, ...)

Arguments

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 relBackgroundLL.

useResp

Whether to use the absResp column of df, or the bkgResp column of df when computing responses.

...

Any other required arguments to testFnc.

Details

This is a specialized function to illustrate the use of the different test statistics provided in this package with the example dataset.

Value

The bootstrap result object returned by the boot function.

Author(s)

Peter N. Steinmetz <[email protected]>

See Also

ef, boot

Examples

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

EffectsRelBaseline documentation built on May 30, 2017, 1:08 a.m.