# using statin49 as an example
data(statin49)
data(statin49_AE_idx)
# Prepare a matrix of signal strength with the same dimension as
# statin49, where 1 indicates no signal and values > 1 indicate
# signal
lambda_matrix <- matrix(1, nrow = nrow(statin49), ncol = ncol(statin49))
# Assign the cell (45,1) with signal strength 4
lambda_matrix[45, 1] <- 4
# Generate 5 simulated tables
set.seed(123)
simulated_tables <- generate_contin_table_with_clustered_AE(
contin_table = statin49,
n_rep = 5,
AE_idx = statin49_AE_idx,
rho = 0.5,
signal_mat = lambda_matrix
)
Run the code above in your browser using DataLab