View source: R/compute_interaction.R
| compute_interaction | R Documentation |
Returns the information
component of interaction for a set of 3 variables,
usually 2 drugs and an adr.
compute_interaction(
.data,
y,
x,
z,
alpha = 0.05,
na_format = "-",
dig = 2,
export_raw_values = FALSE,
min_n_obs = 0
)
.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 |
Significance is similar to usual disproportionality (see compute_dispro()).
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 and z, 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 is TRUE:
a, b, c, d the counts in the contingency table
signif_ic the significance of the Information Component
Additional columns, if export_raw_values is TRUE:
n_* the counts of each setting
signif_ic the significance of the Information Component
compute_dispro(), compute_or_mod(), add_drug(), add_adr()
# 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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.