calculate_poisson_pvalues: Calculate Poisson Values

View source: R/calculate_poisson_pvalues.R

calculate_poisson_pvaluesR Documentation

Calculate Poisson Values

Description

Helper function checking how closely the distribution of cases across clusters follows a poisson distribution. Returns a p-value with the null hypothesis being that the distribution follows a poisson distribution. Dependency with the nipnTK package, using the greensIndex function.

Usage

calculate_poisson_pvalues(df, strata = NULL, cluster, case)

Arguments

df

Inputs a dataframe.

strata

Optional input of a character value specifying the strata or groupings to test whether the data is different than poisson distribution.

cluster

Input of a character value specifying the column name for cluster id.

case

Input of a character value specifying the column name for the cases of interest.

Value

Returns a data frame with two columns for strata names and poisson p-values.

Examples

## Not run: calculate_poisson_pvalues(df, strata = "admin2", cluster = "cluster_id",
case = "gam_wfhz_noflag")
## End(Not run)


SaeedR1987/healthyr documentation built on July 4, 2023, 11:17 p.m.