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
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.