lrt_poisson: Likelihood Ratio Test under the (vanilla, non-zero-inflated)...

View source: R/pvlrt-wrappers.R

lrt_poissonR Documentation

Likelihood Ratio Test under the (vanilla, non-zero-inflated) Poisson model

Description

Likelihood Ratio Test under the (vanilla, non-zero-inflated) Poisson model

Usage

lrt_poisson(contin_table, nsim = 10000, parametrization = "rrr", ...)

lrt_vanilla_poisson(contin_table, nsim = 10000, parametrization = "rrr", ...)

Arguments

contin_table

IxJ contingency table showing pairwise counts of adverse events for I AE (along the rows) and J Drugs (along the columns)

nsim

Number of simulated null contingency table to use for computing the p-value of the test

parametrization

Type of parametrization to use in the LR test. Available choices are "rrr", "lambda", "rr", and "p-q". The relative reporting ratio (default) parametrization of the test is used when when parametrization %in% c("rrr", "lambda"), and the reporting rate parametrization is used otherwise. NOTE: zero inflation can be handled only for the relative reporting ratio parametrization.

...

additional arguments. Currently unused.

Value

Returns a pvlrt object. See pvlrt for more details.

Note

lrt_poisson() and lrt_vanilla_poisson() are both wrappers for pvlrt() with omega_vec = rep(0, ncol(contin_table))

See Also

pvlrt

Examples


data("statin46")

# 500 bootstrap iterations (nsim) in the example below
# are for quick demonstration only --
# we recommended setting nsim to 10000 (default) or bigger

# no grouping -- each drug forms its own class
test1 <- lrt_poisson(lovastatin, nsim = 500)



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