compute_interaction {vigicaen} | R Documentation |
Compute interaction disproportionality
Description
Returns the information
component of interaction for a set of 3 variables,
usually 2 drugs and an adr.
Usage
compute_interaction(
.data,
y,
x,
z,
alpha = 0.05,
na_format = "-",
dig = 2,
export_raw_values = FALSE,
min_n_obs = 0
)
Arguments
.data |
The data.table to compute from. |
y |
A character vector, one or more variable to explain. |
x |
A character vector, one or more explaining variable. |
z |
A character vector, one or more explaining variable. |
alpha |
Alpha risk. |
na_format |
Character string to fill NA values in ror and ci legends. |
dig |
Number of digits for rounding (this argument is passed to |
export_raw_values |
A logical. Should the raw values be exported? |
min_n_obs |
A numeric, compute disproportionality only for pairs
with at least |
Details
Significance is similar to usual disproportionality (see compute_dispro()
).
Value
A data.table, with Information Component (IC) of interaction,
and its credibility interval (at 1 - alpha
).
Significance as signif_ic
, if export_raw_values
is TRUE).
A data.table with columns
-
y
,x
andz
, same as input -
n_obs
the number of observed cases -
n_exp
the number of expected cases -
ic
the Information Component -
ic_tail
the tail probability of the IC -
ci_level
the confidence interval level Additional columns, if
export_raw_values
isTRUE
:-
a
,b
,c
,d
the counts in the contingency table -
signif_ic
the significance of the Information Component Additional columns, if
export_raw_values
isTRUE
:-
n_*
the counts of each setting -
signif_ic
the significance of the Information Component
See Also
compute_dispro()
, compute_or_mod()
, add_drug()
, add_adr()
Examples
# Interaction on reporting of colitis with ipilimumab and nivolumab
demo <-
demo_ |>
add_drug(
d_code = ex_$d_drecno,
drug_data = drug_
) |>
add_adr(
a_code = ex_$a_llt,
adr_data = adr_
)
demo |>
compute_interaction(
y = "a_colitis",
x = "nivolumab",
z = "ipilimumab"
)