- row_marginal
Marginal sums for the rows of the contingency table.
- column_marginal
Marginal sums for the columns of the contingency
table.
- signal_mat
A data matrix of the same dimension as the contingency
table with entries representing the signal strength. The values should
be greater or equal to 1, where 1 indicates no signal, and values
greater than 1 indicate signal.
- tol
Tolerance for the total report count, expressed in
terms of the Relative Total Difference (RTD), defined as:
$$RTD = \frac{|n^{orig}_{\cdot \cdot} -
n^{sim}_{\cdot \cdot}|}{n^{orig}_{\cdot \cdot}} \times 100$$
This represents the difference between the total number of reports in the
simulated datasets and the original input total number of reports.
Sufficiently low tolerance will generate tables with total report counts
equal to the actual supplied value. Default is 0.1.
- contin_table
A data matrix of an \(I\) x \(J\) contingency
table with row (adverse event) and column (drug or vaccine) names,
of which the row and column marginals are used to generate the simulated
data. Please first check the input contingency table using the function
check_and_fix_contin_table()
. Default is NULL.
- AE_idx
A data frame or list.
In case of data frame it must contain two variables idx
and AE
,
where idx
indicates the cluster index (a number),
and AE
lists the adverse event names. See the
statin49_AE_idx
for statin49
data as an example.
In case of a list, make sure the cluster indices are aligned with the
corresponding row marginal.
- n_rep
Number of contingency tables to be generated.
- rho
A numeric value, matrix, or NULL indicating the correlation
structure.If a numeric value (float or int) is provided, it represents the
correlation value rho
to be used between all elements within each
cluster specified by AE_idx
. If a matrix is provided, it must be a
square matrix with dimensions equal to the number of rows in
contin_table
. In this case, rho
defines the correlation
structure directly, and AE_idx
is not used. If rho
is NULL,
a covariance matrix is generated based on the correlation coefficients of
contin_table
.