View source: R/average_power.R

average.power.fisher | R Documentation |

Compute average power of many Fisher's exact tests

```
average.power.fisher(p1, p2, n, alpha, alternative)
```

`p1` |
probability in one group (vector) |

`p2` |
probability in other group (vector) |

`n` |
per-group sample size |

`alpha` |
p-value threshold |

`alternative` |
one- or two-sided test |

Average power estimate for multiple testing procedure

`power.fisher`

for more details about power calculation of Fisher's exact test

```
set.seed(1234);
p1 = sample(seq(0,0.5,0.1),5,replace = TRUE);
p2 = sample(seq(0.5,1,0.1),5,replace = TRUE);
average.power.fisher(p1 = p1,p2 = p2,n = 20,alpha = 0.05,alternative = "two.sided")
```

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.