Description Usage Arguments Value Author(s) Examples
View source: R/highlevelHCAI.R
Combine length of stay calculation and Cox proportional hazard ratio calculation across defined groups.
1 | highlevelHCAI(survData.list)
|
survData.list |
A list of patient record data stratified by some comorbidity or confounder of interest. |
output.HR |
Cox regression output for the all model types. |
ouput.LOS |
Length of stay output using multistate model. |
N Green
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.