powered by
This uses simulations to estimate the power to detect a given level of lying in a sample of size N by this package's methods.
N
power_calc(N, P, lambda, alpha = 0.05, prior = stats::dunif, nsims = 200)
Total number in sample
Probability of bad outcome
Probability of a subject lying
Significance level to use for the null hypothesis
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.
Number of simulations to run
Estimated power, a scalar between 0 and 1.
# NOT RUN { power_calc(N = 50, P = 0.5, lambda = 0.2) # }
Run the code above in your browser using DataLab