Description Usage Arguments Value Examples
View source: R/adverse-events.R
Obtain adverse event probabilities for treatment sequences given existing probabilities by treatment from a network meta-analysis.
1 | ae_probs(n, struct, params_ae = iviNSCLC::params_ae_nma)
|
n |
The number of random observations of the parameters to draw. |
struct |
A |
params_ae |
Parameter estimates of the probabilities of adverse
events in the same format as |
A list of matrices where each matrix corresponds to a type of adverse event. Rows of each matrix are posterior samples of the parameters and columns are treatment strategies. The list is an object of class "ae_probs" with an attribute "tx_abb" denoting the treatment used to estimate adverse events for each treatment sequence.
1 2 3 4 5 6 7 8 9 10 11 12 | txseq1 <- txseq(first = "erlotinib",
second = c("osimertinib", "PBDC"),
second_plus = c("PBDC + bevacizumab", "PBDC + bevacizumab"))
txseq2 <- txseq(first = "gefitinib",
second = c("osimertinib", "PBDC"),
second_plus = c("PBDC + bevacizumab", "PBDC + bevacizumab"))
txseqs <- txseq_list(seq1 = txseq1, seq2 = txseq2)
struct <- model_structure(txseqs)
ae_probs <- ae_probs(n = 3, struct = struct)
print(ae_probs[1:3])
tidy_ae_probs <- tidy(ae_probs)
head(tidy_ae_probs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.