Description Usage Arguments Value Examples

Computationally intense. Lower `iter`

and/or `nsim`

for faster but
less precise calculations. Calculates approximate power, given sample size,
using Monte Carlo simulation for BSDT with covariates
for specified (expected) case score, means and standard deviations for the
control sample on the task of interest and included covariates. The number of
covariates defaults to 1, means and standard deviations for the tasks and
covariate default to 0 and 1, so if no other values are given the case scores
is interpreted as deviation from the mean in standard deviations for both tasks
and covariates.

1 2 3 4 5 6 7 8 9 10 11 12 13 |

`case_tasks` |
A vector of length 2. The expected case scores from the tasks of interest. |

`case_cov` |
A vector containing the expected case scores on all covariates included. |

`control_tasks` |
A 2x2 matrix or dataframe containing the expected means (first column) and standard deviations (second column). Defaults to two variables with means 0 and sd = 1. |

`control_covar` |
A px2 matrix or dataframe containing the expected means (first column) and standard deviations (second column), p being the number of covariates. Defaults to one covariate with mean 0 and sd = 1. |

`cor_mat` |
A correlation matrix containing the correlations of the tasks of interest and the coviariate(s). The first two variables are treated as the tasks of interest. Defaults pairwise correlations between the variates of 0.3. |

`sample_size` |
Single value giving the size of the control sample for which you wish to calculate power. |

`alternative` |
The alternative hypothesis. A string of either "less", "greater" or "two.sided" (default). |

`alpha` |
The specified Type I error rate, default is 0.05. This can be varied, with effects on power. |

`nsim` |
The number of simulations for the power calculation. Defaults to 1000 due to BSDT already being computationally intense. Increase for better accuracy. |

`iter` |
The number of simulations used by the BSDT_cov, defaults to 1000. Increase for better accuracy. |

`calibrated` |
Whether or not to use the standard theory (Jeffreys) prior
distribution (if set to |

Returns a single value approximating the power of the test for the given parameters.

1 2 3 |

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.