highlevelHCAI: Combined length of stay calculations

Description Usage Arguments Value Author(s) Examples

View source: R/highlevelHCAI.R

Description

Combine length of stay calculation and Cox proportional hazard ratio calculation across defined groups.

Usage

1
highlevelHCAI(survData.list)

Arguments

survData.list

A list of patient record data stratified by some comorbidity or confounder of interest.

Value

output.HR

Cox regression output for the all model types.

ouput.LOS

Length of stay output using multistate model.

Author(s)

N Green

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (survData.list) 
{
    output.HR <- byOrganismHR(survData.list)
    type <- ""
    survData.list <- lapply(survData.list, function(x) x[!is.na(x$time) & 
        x$time > 0, ])
    survData.list.rm <- lapply(survData.list, function(x) x[x$time >= 
        min(x$spectime[x$infstatus == 1]), ])
    output.LOS <- bygroupLOS(survData.list.rm, type, standerr = TRUE)
    list(output.HR = output.HR, output.LOS = output.LOS)
  }

n8thangreen/HESmanip documentation built on March 21, 2020, 12:20 a.m.