Implements the normal approximation for a test on rates.
The reponse rate in the control group,
rC, has to be specified by
rate_control.
The null hypothesis is:
rE ≤ rC,
where rE denotes the response rate
in the intervention group.
It is tested against the alternative
rE > rC.
The test statistic is given as
X1 = √n (rE - rC) / √(2  r0 (1-r0)),
where r0 denotes the mean between
rE and
rC in the two-armed case,
and rE in the one-armed case.
All priors have to be defined for the rate difference
rE - rC.
assumed response rate in control group
logical indicating if a two-armed trial is regarded
outcome
vector of probabilities
sample size
distribution parameter
further optional arguments
object of class Binomial
number of simulation runs
random seed
Note that simulate for class Binomial simulates the
   normal approximation of the test statistic.
rate_controlcf. parameter 'rate_control'
see probability_density_function and
   cumulative_distribution_function to evaluate the pdf
   and the cdf, respectively.
datadist <- Binomial(rate_control = 0.2, two_armed = FALSE)