Get a data generating function for simulating the second stage of a trial
get_data_gen_2.RdGenerates a data generating function that give p-values from an unpaired t-test of data generated by multivariate normal distribution as specified by the arguments and the specification for the trials second stage
Usage
get_data_gen_2(
corr_control,
corr_treatment,
eff,
binary = integer(0),
bin_con_resp = NULL,
bin_treat_resp = NULL
)Arguments
- corr_control
correlation matrix for all the control endpoints
- corr_treatment
correlation matrix for all the treatment endpoints
- eff
vector of effect sizes (i.e. means) of the different treatment endpoints (compared to the control)
- binary
which treatment endpoints are binary endpoints (all control endpoints referenced by those are also automatically treated as binary)
- bin_con_resp
response rate of the binary control groups
- bin_treat_resp
response rate of the binary treatment groups
Details
This function mostly works like get_data_gen(), see there for most details
to the data generation.
However, instead of specifing the treatment and control data size, this is
taken from the specification of the second stage of the given multiarm_cer_design.
Internally, the resulting function uses get_data_gen() to get a suitable
data generation function each time it is called and immediately uses it to
generate the data. Therefore, using get_data_gen() should be prefered from a
performance standpoint whenever possible.