directionality: Query your data and generates a 'datafame'

Description Usage Arguments Value Examples

View source: R/directionality.R

Description

Given an object of class cAnalysis obtained from a comorbidity analysis, the comorbidity direction can be estimated. An object of class dataframe is obtained.

Usage

1
2
3
directionality(input, databasePth, minPairs = 1, sex, ageRange = c(0,
  100), days, dataSep = "-", correctedPval = 1,
  correctionMethod = "bonferroni", verbose)

Arguments

input

A cAnalysis object, containing the comorbidity data for a set of patients.

databasePth

Determines the path where the intermediate RData objects have been created. It is the same path where the three required input files (patientData, diagnosisData, admissionData) are located.

minPairs

Determines the minimum number of patients that must suffer the comorbidity. By default the minPairs value is set to 1. The value of the argument can be changed to any other numeric variable.

sex

Determine what is the sex of interest for performing the comorbidity analysis.

ageRange

Determines what is the age range of interest for performing the comorbidity analysis. By default it is set from 0 to 100 years old.

days

Determines the number of days of difference needed for considering two diseases as comorbid.

dataSep

Determines the separator symbol used in the admission date. By default "-".

correctionMethod

A binomial test for each pair of diseases is performed to assess the null hypothesis of independence between the two diseases. The Bonferroni correction ("bonferroni") is applied to correct for multiple testing by default. However user can select the best correction method for the analysis. The adjustment methods include the Benjamini-Hochberg false discovery rate method ("fdr"), Holm correction ("holm"), Hochberg correction ("hochberg"), Hommel ("hommel") and Benjamini & Yekutieli ("BY").

verbose

By default FALSE. Change it to TRUE to get a on-time log from the function.

warnings

By default TRUE. Change it to FALSE to don't see the warnings.

Value

An object of class dataframe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
load(system.file("extdata", "comorMale.RData", package="comoRbidity"))
directionEx <- directionality( input            = comorMale, 
                               databasePth      = system.file("extdata", package="comoRbidity"), 
                               minPairs         = 1, 
                               sex              = "Male",
                               ageRange         = c(0,80),
                               days             = "0",
                               dataSep          = "-", 
                               correctionMethod = "bonferroni"
              )

aGutierrezSacristan/comorbidity documentation built on April 10, 2020, 5:54 p.m.