R: Data generation: Sampling data of clinical trials
rBinomGauss
R Documentation
Data generation: Sampling data of clinical trials
Description
A random draw of a hierarchical binomial Gaussian model.
Usage
rBinomGauss(h, s, a, r, x, b)
Arguments
h
heterogeneity.
s
study sizes.
a
balance of group assignments.
r
fixed risk in the control group.
x
design matrix.
b
regression coefficients.
Details
It is always assumed that at least one response in a
study has happend, i.e., a response of 0 in a treatment
or control group is rounded up to 1. Note that this may
lead to an overestimation of small risks. If possible,
make sure your sample sizes are large enough to
compensate for this effect.
You may work around this by increasing study sizes.
Value
A list containing the risk and a data frame with the
studies.