View source: R/pvlrt-object-S3-methods.R
summary.pvlrt | R Documentation |
Summary method for a pvlrt object
## S3 method for class 'pvlrt' summary(object, show_zi = FALSE, ...)
object |
a |
show_zi |
logical. Should summary of the estimates and tests (if performed) of the zero inflation parameters be returned? Defaults to FALSE. If TRUE, then the zero inflation summary is included as an attribute with name "zi". See examples. |
... |
other input parameters. Currently unused. |
Returns a data.table with rows corresponding to all possible AE/Drug pairs
as obtained from the input contingency table, and columns titled "AE", "Drug", "n", "lrstat" (log-likelihood ratio
test statistic) and "p_value". Additionally, if show_zi
is set to TRUE
, then as
an attribute named "zi" a data.table with rows
corresponding to Drugs (columns in the input contingency table), and columns titled
"AE", "zi", "lrstat" (log-likelihood ratio test statistic for zero-inflation),
"p_value" and "q_value" (Benjamini-Hochberg adjusted p-values, as obtained through
p.adjust) is returned.
pvlrt
# 500 bootstrap iterations (nsim) in the example below # are for quick demonstration only -- # we recommended setting nsim to 10000 (default) or bigger test1 <- pvlrt(statin46, test_zi = TRUE, nsim = 500) summary(test1) tmp <- summary(test1, show_zi = TRUE) print(tmp) tmp_zi <- attr(tmp, "zi") print(tmp_zi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.