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

Usage

get_data_gen(corr_control, corr_treatment, eff, n_cont, n_treat)

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

Value

A function taking two arguments, see details

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.