Skip to contents

Generates 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)

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)

Value

A function taking two arguments, see details

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.