Description Usage Arguments Value Author(s) See Also Examples

Adaptor for testing category effects in simulations using the boot package and function.

1 | ```
catEffectBootAdaptor(df, index, testFnc = sumSqCat, useResp = TRUE, ...)
``` |

`df` |
dataframe structured as that returned by simCatResp, with category, bkg, resp columns. |

`index` |
index for rearrangement of data as provided by boot function |

`testFnc` |
function to calculate test statistic based its first argument, using the category labels in the second argument, and passed the other arguments (...) given to this adaptor function. |

`useResp` |
true if the statistic should be calculated for the rearranged resp column of the dataframe, otherwise false to use the bkg column. |

`...` |
other arguments to pass to the testFnc |

value of the test statistic

Peter N. Steinmetz <PeterNSteinmetz@steinmetz.org>

1 2 3 4 5 6 7 8 9 | ```
# Simulate 4 categories of responses and then compute the number of times
# there would be a significant effect of a change in the categories relative
# to background using the CBT. This would form a rough estimate of the power
# of the CBT to detect such changes.
library(boot)
library(EffectsRelBaseline)
simCatResp(1,c(1,1.5,2,1),6)->sim3
boot(sim3,catEffectBootAdaptor,100,backMean=mean(1,1.5,2,1))->boot3
sum(boot3$t0>boot3$t)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.