summary.pvlrt: Summary method for a pvlrt object

View source: R/pvlrt-object-S3-methods.R

summary.pvlrtR Documentation

Summary method for a pvlrt object

Description

Summary method for a pvlrt object

Usage

## S3 method for class 'pvlrt'
summary(object, show_zi = FALSE, ...)

Arguments

object

a pvlrt object, which is the output of the function pvlrt or one of its wrappers such as lrt_zi_poisson, lrt_poisson and lrt_vanilla_poisson.

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.

Value

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.

See Also

pvlrt

Examples


# 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)


pvLRT documentation built on March 7, 2023, 7:17 p.m.