#' Function to calculate the mean T1E under misspecification and the probabilities of obtaining an T1E under misspecification that not exceeds the significance level [P(T1E<=0.05)] regarding different randomization procedures under allocation bias in clinical trials that are evaluated with the stratified Wei-Lachin test.
#' @param balancing the balancing of the total sample across the strata, i.e. in the case of balanced strata balancing=rep(1,K)
#' @param m number of endpoints
#' @param randomization one of the randomization procedures "RAR", "PBR", "BSD", "MP", "EBC" (default parameter for this randomization procedures: PBR(4), BSD(3), EBC(0.67), MP(3))
#' @param r_number number of randomization lists that contained in the sample
#' @return A list that consists of two lists containing matrices representing the samples of randomization lists per strata and the matrices containing the sign of the biasing factor corresponding to these randomization lists
#' @param balancing the balancing of the total sample across the strata, i.e. in the case of balanced strata balancing=rep(1,K)
#' @param m number of endpoints
#' @param Sigma covariance matrix of the patient responses regarding the m endpoints
#' @param randomization one of the randomization procedures "RAR", "PBR", "BSD", "MP", "EBC" (default parameter for this randomization procedures: PBR(4), BSD(3), EBC(0.67), MP(3))
#' @param eta Kxm matrix containing the endpoint and strata specific biasing factors
#' @param r_number number of randomization lists that be used to calculate mean T1E under misspecification and the probabilities of obtaining an a T1E under misspecification that exceeds the 5% significance level
#' @return a dataframe with variables @param N, @param K, @param m, @param eta, @param randomization, mean T1E under misspecification, P(T1E<=0.05), standard error of the Monte Carlo simulations
#' Simulations of the simulation study outlined in the manuscript "A bias-adjusted analysis of stratified clinical trials with multi-component endpoints using the Wei-Lachin test"
#' Note ∆_{N,K,m} denotes the effect size that corresponds to an 80% power of the stratified Wei-Lachin test in trials with N patients, m endpoints and K strata (∆_{32,2,2} = 0.64, ∆_{32,2,4} = 0.46, ∆_{32,4,2} = 0.66 and ∆_{32,4,4} = 0.47)
#' the common biasing factor for each strata and endpoint component is chosen as proportion (5%,10%) of the effect size that corresponds to a nominal power of 80% of the stratified Wei-Lachin
p=c(0.05,0.1)
#' analyzed stratified randomization procedures
rand=c('RAR','BSD','MP','EBC','PBR')
#' run the simulations across the different simulation settings