summary.disease_expose: Summarize a 'disease_expose' Object

View source: R/summary.disease_expose.R

summary.disease_exposeR Documentation

Summarize a disease_expose Object

Description

Summarize disease-exposure data by finding various statistics (incidence, risk ratio, odds ratio, Fisher p-value, Chi-square p-value) for each disease-exposure combination in the disease_expose object.

Usage

## S3 method for class 'disease_expose'
summary(object, ...)

Arguments

object

an object of class disease_expose, created with disease_expose

...

additional arguments, besides l, to be passed to rbindlist, such as fill

Value

A data.frame object containing statistics for each disease-exposure combination

Thanks

Special thanks to Josh Sadowski for providing ideas of statistics to use for this function and for providing the bones of this function, which I have added to and edited to make it my own.

Examples

de_data <- disease_expose_data # use the example data in the package

cleaned_de_data <- clean_disease_expose(data = de_data, disease = "disease", noDisease = "No", exposures = c("exposure1", "exposure2", "exposure3")) # clean the data using specific columns in the dataset

## Not run: 
de_object <- disease_expose(cleaned_de_data) # the best way to create a disease_expose object is by using the helper and selecting your choices in the Shiny gadget

## End(Not run)

de_object <- new_disease_expose(cleaned_de_data, disease = 1, exposures = 2:8) # another way to create a disease_expose object is to use the constructor and manually enter the information

summary(object = de_object) # create a summary of your disease_expose object

summary(object = de_object, idcol = TRUE) # provide an input (idcol) to rbindlist to customize the summary a little more

npeters1322/hospEpi documentation built on April 30, 2022, 6:12 p.m.