Get a data generating function for simulating a trial
get_data_gen.Rd
Generates a data generating function that give p-values from an unpaired t-test of data generated by multivariate normal distribution as specified
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)
- n_cont
number of data points in the control endpoints
- n_treat
number of data points in the treatment endpoints
Details
This gives back a function, which takes as its arguments a number n and a multiarm_cer_design object and returns a matrix of n * number of treatments p-values. Each of those p-values is generated by drawing as many data points as specified in the design object with the given correlation and mean, and comparing it with a t-test to the data points generated for the controls specified by treatment_assoc of the design object.