Description Usage Arguments Value Examples

Using simulations, estimate power to detect differences in lying
using `compare_dists()`

, given values for *λ*, the
probability of lying, in each sample.

1 2 3 | ```
power_calc_difference(N1, N2 = N1, P, lambda1, lambda2, alpha = 0.05,
alternative = c("two.sided", "greater", "less"),
prior = stats::dunif, nsims = 200)
``` |

`N1` |
N of sample 1 |

`N2` |
N of sample 2 |

`P` |
Probability of |

`lambda1` |
Probability of lying in sample 1 |

`lambda2` |
Probability of lying in sample 2 |

`alpha` |
Significance level |

`alternative` |
"two.sided", "greater" (sample 1 is greater), or "less". Can be abbreviated |

`prior` |
Prior over lambda. A function which takes a vector of values between 0 and 1, and returns the probability density. The default is the uniform distribution. |

`nsims` |
Number of simulations to run |

Estimated power, a scalar between 0 and 1.

1 | ```
power_calc_difference(N1 = 100, P = 0.5, lambda = 0, lambda2 = 0.25)
``` |

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.